diff --git a/web/src/pages/Edit/components/BaseStyle.vue b/web/src/pages/Edit/components/BaseStyle.vue index d068ca7d..ef1e89dc 100644 --- a/web/src/pages/Edit/components/BaseStyle.vue +++ b/web/src/pages/Edit/components/BaseStyle.vue @@ -863,10 +863,21 @@ export default { this.enableNodeRichText = this.localConfig.openNodeRichText this.mousewheelAction = this.localConfig.mousewheelAction this.mousewheelZoomActionReverse = this.localConfig.mousewheelZoomActionReverse + this.$bus.$on('setData', this.onSetData) + }, + beforeDestroy() { + this.$bus.$off('setData', this.onSetData) }, methods: { ...mapMutations(['setLocalConfig']), + onSetData() { + if (this.activeSidebar !== 'baseStyle') return + setTimeout(() => { + this.initStyle() + }, 0) + }, + /** * @Author: 王林 * @Date: 2021-05-05 14:02:12