Commit 1406139a91b81bcf62cc441966aef86b01f43eab

Authored by ly525
1 parent 877eb4b1

fix: #293

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':
... ...