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
| @@ -145,6 +145,7 @@ export default { | @@ -145,6 +145,7 @@ export default { | ||
| 145 | { | 145 | { |
| 146 | this.editorPositionConfig.map(item => { | 146 | this.editorPositionConfig.map(item => { |
| 147 | const { type, label, key } = item | 147 | const { type, label, key } = item |
| 148 | + console.log(key, commonStyle) | ||
| 148 | const data = { | 149 | const data = { |
| 149 | props: { | 150 | props: { |
| 150 | value: commonStyle[key], | 151 | value: commonStyle[key], |
front-end/h5/src/components/core/store/modules/element.js
| @@ -40,11 +40,10 @@ export const mutations = { | @@ -40,11 +40,10 @@ export const mutations = { | ||
| 40 | switch (type) { | 40 | switch (type) { |
| 41 | case 'add': | 41 | case 'add': |
| 42 | const vm = getVM(value.name) | 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 | elements.push(element) | 47 | elements.push(element) |
| 49 | break | 48 | break |
| 50 | case 'copy': | 49 | case 'copy': |