Commit cda6d96c27ca7bc618c4a086d0df0797d3848df3
1 parent
e429da4a
fix: #133
Showing
2 changed files
with
5 additions
and
1 deletions
front-end/h5/src/components/core/editor/index.js
| @@ -394,5 +394,9 @@ export default { | @@ -394,5 +394,9 @@ export default { | ||
| 394 | } else { | 394 | } else { |
| 395 | this.$message.error('no work id!') | 395 | this.$message.error('no work id!') |
| 396 | } | 396 | } |
| 397 | + | ||
| 398 | + window.getEditorApp.$on('setEditingElement', ({ name }) => { | ||
| 399 | + this.setActiveTab(name === 'lbp-background' ? 'background' : '属性') | ||
| 400 | + }) | ||
| 397 | } | 401 | } |
| 398 | } | 402 | } |
front-end/h5/src/store/modules/element.js
| @@ -9,7 +9,7 @@ export const actions = { | @@ -9,7 +9,7 @@ export const actions = { | ||
| 9 | const vm = (payload && payload.name) ? getEditorConfigForEditingElement(payload.name) : null | 9 | const vm = (payload && payload.name) ? getEditorConfigForEditingElement(payload.name) : null |
| 10 | commit('setEditingElementEditorConfig', vm) | 10 | commit('setEditingElementEditorConfig', vm) |
| 11 | 11 | ||
| 12 | - window.getEditorApp.$emit('setEditingElement') | 12 | + payload && window.getEditorApp.$emit('setEditingElement', payload) |
| 13 | }, | 13 | }, |
| 14 | setElementPosition ({ commit }, payload) { | 14 | setElementPosition ({ commit }, payload) { |
| 15 | commit('setElementCommonStyle', payload) | 15 | commit('setElementCommonStyle', payload) |