-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: do not set editingElement null if change tab(not background)
- Loading branch information
Showing
2 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
front-end/h5/src/components/core/editor/edit-panel/background.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,36 @@ | ||
/* | ||
* @Author: ly525 | ||
* @Date: 2019-12-01 18:11:49 | ||
* @LastEditors : ly525 | ||
* @LastEditTime : 2019-12-22 18:09:54 | ||
* @FilePath: /luban-h5/front-end/h5/src/components/core/editor/edit-panel/background.js | ||
* @Github: https://github.com/ly525/luban-h5 | ||
* @Description: Do not edit | ||
* @Copyright 2018 - 2019 luban-h5. All Rights Reserved | ||
*/ | ||
import propsEditPanel from './props.js' | ||
import { mapState, mapActions } from 'vuex' | ||
|
||
export default { | ||
computed: { | ||
...mapState('editor', [ | ||
'editingPage' | ||
]) | ||
}, | ||
methods: { | ||
...mapActions('editor', [ | ||
'setEditingElement' | ||
]) | ||
}, | ||
render () { | ||
return <propsEditPanel layout="vertical" /> | ||
}, | ||
created () { | ||
const bgElement = this.editingPage.elements.find(e => e.name === 'lbp-background') | ||
this.setEditingElement(bgElement) | ||
}, | ||
beforeDestroy () { | ||
this.setEditingElement() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters