Skip to content

Commit

Permalink
fix: e.path and cloneDeep
Browse files Browse the repository at this point in the history
  • Loading branch information
deot committed Jan 9, 2019
1 parent 5a651b5 commit 9111584
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wya-vm",
"version": "0.0.14",
"version": "0.1.0",
"description": "",
"main": "dist/vm.min.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/combo/frame/frame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default {
let index = this.dataSource.length;
// 会同步到上级 这里不用this.$emit("update:sync")
this.dataSource.push({
...result.data,
...cloneDeep(result.data),
module: mod,
id,
x: mouseX - x,
Expand Down
3 changes: 2 additions & 1 deletion src/core/draggable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -296,10 +296,11 @@ export default {
className: /handle-([(top|right|-|bottom|left)]{2})/
};
let path = e.path || (e.composedPath && e.composedPath()) || [];
if (
!this.$el.contains(target)
&& !eleInRegExp(target, regex)
&& (!e.path.some(item => eleInRegExp(item, this.editorRegExp)))
&& (!path.some(item => eleInRegExp(item, this.editorRegExp)))
) {
if (this.active) {
// 解绑
Expand Down

0 comments on commit 9111584

Please sign in to comment.