mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 22:08:25 +08:00
Demo:优化主题设置弹窗
This commit is contained in:
@@ -149,15 +149,17 @@ export default {
|
||||
this.$confirm(this.$t('theme.coverTip'), this.$t('theme.tip'), {
|
||||
confirmButtonText: this.$t('theme.cover'),
|
||||
cancelButtonText: this.$t('theme.reserve'),
|
||||
type: 'warning'
|
||||
type: 'warning',
|
||||
distinguishCancelAndClose: true,
|
||||
callback: action => {
|
||||
if (action === 'confirm') {
|
||||
this.mindMap.setThemeConfig({}, true)
|
||||
this.changeTheme(theme, {})
|
||||
} else if (action === 'cancel') {
|
||||
this.changeTheme(theme, customThemeConfig)
|
||||
}
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
this.mindMap.setThemeConfig({}, true)
|
||||
this.changeTheme(theme, {})
|
||||
})
|
||||
.catch(() => {
|
||||
this.changeTheme(theme, customThemeConfig)
|
||||
})
|
||||
} else {
|
||||
this.changeTheme(theme, customThemeConfig)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user