Commit cda6d96c27ca7bc618c4a086d0df0797d3848df3

Authored by ly525
1 parent e429da4a

fix: #133

front-end/h5/src/components/core/editor/index.js
... ... @@ -394,5 +394,9 @@ export default {
394 394 } else {
395 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 9 const vm = (payload && payload.name) ? getEditorConfigForEditingElement(payload.name) : null
10 10 commit('setEditingElementEditorConfig', vm)
11 11  
12   - window.getEditorApp.$emit('setEditingElement')
  12 + payload && window.getEditorApp.$emit('setEditingElement', payload)
13 13 },
14 14 setElementPosition ({ commit }, payload) {
15 15 commit('setElementCommonStyle', payload)
... ...