Commit 21d0fe9f9fffc6dede9fa8457a4472201624edb7
1 parent
4ea4968a
Revert "chore: remove console"
This reverts commit 4ea4968a.
Showing
2 changed files
with
4 additions
and
4 deletions
front-end/h5/src/components/core/editor/right-panel/props.js
front-end/h5/src/components/core/store/modules/element.js
| ... | ... | @@ -40,11 +40,10 @@ export const mutations = { |
| 40 | 40 | switch (type) { |
| 41 | 41 | case 'add': |
| 42 | 42 | const vm = getVM(value.name) |
| 43 | - const basicElement = vm.$options | |
| 44 | - basicElement.shortcutProps = value.shortcutProps | |
| 43 | + vm.$options.shortcutProps = value.shortcutProps | |
| 45 | 44 | // 用于拖拽结束,确定最终放置的位置 |
| 46 | - basicElement.dragStyle = value.dragStyle // {left: Number, top: Number} | |
| 47 | - const element = new Element({ ...basicElement, zindex: len + 1 }) | |
| 45 | + vm.$options.dragStyle = value.dragStyle // {left: Number, top: Number} | |
| 46 | + const element = new Element(vm.$options) | |
| 48 | 47 | elements.push(element) |
| 49 | 48 | break |
| 50 | 49 | case 'copy': | ... | ... |