Commit 4ea4968a00325677408241708c760e46d3bbb656
1 parent
ec56f329
chore: remove console
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,10 +40,11 @@ export const mutations = { |
| 40 | 40 | switch (type) { |
| 41 | 41 | case 'add': |
| 42 | 42 | const vm = getVM(value.name) |
| 43 | - vm.$options.shortcutProps = value.shortcutProps | |
| 43 | + const basicElement = vm.$options | |
| 44 | + basicElement.shortcutProps = value.shortcutProps | |
| 44 | 45 | // 用于拖拽结束,确定最终放置的位置 |
| 45 | - vm.$options.dragStyle = value.dragStyle // {left: Number, top: Number} | |
| 46 | - const element = new Element(vm.$options) | |
| 46 | + basicElement.dragStyle = value.dragStyle // {left: Number, top: Number} | |
| 47 | + const element = new Element({ ...basicElement, zindex: len + 1 }) | |
| 47 | 48 | elements.push(element) |
| 48 | 49 | break |
| 49 | 50 | case 'copy': | ... | ... |