Demo:修复更改基础样式后切换主题,选择覆盖,再修改基础样式时之前覆盖的样式会恢复的问题
This commit is contained in:
parent
721cae8139
commit
2a84a3cf16
@ -17,7 +17,7 @@
|
|||||||
<OutlineSidebar :mindMap="mindMap"></OutlineSidebar>
|
<OutlineSidebar :mindMap="mindMap"></OutlineSidebar>
|
||||||
<Style v-if="!isZenMode"></Style>
|
<Style v-if="!isZenMode"></Style>
|
||||||
<BaseStyle :data="mindMapData" :mindMap="mindMap"></BaseStyle>
|
<BaseStyle :data="mindMapData" :mindMap="mindMap"></BaseStyle>
|
||||||
<Theme v-if="mindMap" :mindMap="mindMap"></Theme>
|
<Theme v-if="mindMap" :data="mindMapData" :mindMap="mindMap"></Theme>
|
||||||
<Structure :mindMap="mindMap"></Structure>
|
<Structure :mindMap="mindMap"></Structure>
|
||||||
<ShortcutKey></ShortcutKey>
|
<ShortcutKey></ShortcutKey>
|
||||||
<Contextmenu v-if="mindMap" :mindMap="mindMap"></Contextmenu>
|
<Contextmenu v-if="mindMap" :mindMap="mindMap"></Contextmenu>
|
||||||
|
|||||||
@ -44,6 +44,10 @@ export default {
|
|||||||
Sidebar
|
Sidebar
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
data: {
|
||||||
|
type: [Object, null],
|
||||||
|
default: null
|
||||||
|
},
|
||||||
mindMap: {
|
mindMap: {
|
||||||
type: Object
|
type: Object
|
||||||
}
|
}
|
||||||
@ -155,6 +159,7 @@ export default {
|
|||||||
callback: action => {
|
callback: action => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
this.mindMap.setThemeConfig({}, true)
|
this.mindMap.setThemeConfig({}, true)
|
||||||
|
this.data.theme.config = {}
|
||||||
this.changeTheme(theme, {})
|
this.changeTheme(theme, {})
|
||||||
} else if (action === 'cancel') {
|
} else if (action === 'cancel') {
|
||||||
this.changeTheme(theme, customThemeConfig)
|
this.changeTheme(theme, customThemeConfig)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user