mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-17 14:04:47 +08:00
Demo:支持设置是否开启演示模式的填空功能
This commit is contained in:
@@ -64,6 +64,7 @@ export default {
|
||||
isShowScrollbar: 'Is show scrollbar',
|
||||
isUseHandDrawnLikeStyle: 'Is use hand drawn like style',
|
||||
isUseMomentum: 'Is open drag momentum',
|
||||
openBlankMode: 'Is open blank mode of the demonstrate',
|
||||
watermark: 'Watermark',
|
||||
showWatermark: 'Is show watermark',
|
||||
onlyExport: 'Only export',
|
||||
|
||||
@@ -62,6 +62,7 @@ export default {
|
||||
isShowScrollbar: '是否显示滚动条',
|
||||
isUseHandDrawnLikeStyle: '是否开启手绘风格',
|
||||
isUseMomentum: '是否开启拖动画布的动量效果',
|
||||
openBlankMode: '是否开启演示模式的填空功能',
|
||||
watermark: '水印',
|
||||
showWatermark: '是否显示水印',
|
||||
watermarkDefaultText: '水印文字',
|
||||
|
||||
@@ -63,6 +63,7 @@ export default {
|
||||
isShowScrollbar: '顯示捲軸',
|
||||
isUseHandDrawnLikeStyle: '使用手繪風格',
|
||||
isUseMomentum: '是否開啓拖動畫布的動量效果',
|
||||
openBlankMode: '是否開啓演示模式的填空功能',
|
||||
watermark: '浮水印',
|
||||
showWatermark: '顯示浮水印',
|
||||
onlyExport: '僅在匯出時顯示',
|
||||
|
||||
@@ -417,6 +417,9 @@ export default {
|
||||
},
|
||||
openRealtimeRenderOnNodeTextEdit: true,
|
||||
enableAutoEnterTextEditWhenKeydown: true,
|
||||
demonstrateConfig: {
|
||||
openBlankMode: true
|
||||
},
|
||||
...(config || {}),
|
||||
iconList: [...icon],
|
||||
useLeftKeySelectionRightKeyDrag: this.useLeftKeySelectionRightKeyDrag,
|
||||
|
||||
@@ -276,6 +276,20 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 是否开启演示模式的填空功能 -->
|
||||
<div class="row">
|
||||
<div class="rowItem">
|
||||
<el-checkbox
|
||||
v-model="config.demonstrateConfig.openBlankMode"
|
||||
@change="
|
||||
value => {
|
||||
updateOtherConfig('openBlankMode', value)
|
||||
}
|
||||
"
|
||||
>{{ $t('setting.openBlankMode') }}</el-checkbox
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 配置鼠标滚轮行为 -->
|
||||
<div class="row">
|
||||
<div class="rowItem">
|
||||
@@ -424,7 +438,10 @@ export default {
|
||||
enableAutoEnterTextEditWhenKeydown: true,
|
||||
imgTextMargin: 0,
|
||||
textContentMargin: 0,
|
||||
enableInheritAncestorLineStyle: false
|
||||
enableInheritAncestorLineStyle: false,
|
||||
demonstrateConfig: {
|
||||
openBlankMode: false
|
||||
}
|
||||
},
|
||||
watermarkConfig: {
|
||||
show: false,
|
||||
@@ -483,7 +500,13 @@ export default {
|
||||
// 初始化其他配置
|
||||
initConfig() {
|
||||
Object.keys(this.config).forEach(key => {
|
||||
this.config[key] = this.mindMap.getConfig(key)
|
||||
if (typeof this.config[key] === 'object') {
|
||||
this.config[key] = {
|
||||
...(this.mindMap.getConfig(key) || {})
|
||||
}
|
||||
} else {
|
||||
this.config[key] = this.mindMap.getConfig(key)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -511,10 +534,23 @@ export default {
|
||||
|
||||
// 更新其他配置
|
||||
updateOtherConfig(key, value) {
|
||||
this.mindMap.updateConfig({
|
||||
[key]: value
|
||||
})
|
||||
this.configData[key] = value
|
||||
if (key === 'openBlankMode') {
|
||||
this.mindMap.updateConfig({
|
||||
demonstrateConfig: {
|
||||
...(this.mindMap.getConfig('demonstrateConfig') || {}),
|
||||
openBlankMode: value
|
||||
}
|
||||
})
|
||||
if (!this.configData.demonstrateConfig) {
|
||||
this.configData.demonstrateConfig = {}
|
||||
}
|
||||
this.configData.demonstrateConfig[key] = value
|
||||
} else {
|
||||
this.mindMap.updateConfig({
|
||||
[key]: value
|
||||
})
|
||||
this.configData[key] = value
|
||||
}
|
||||
storeConfig(this.configData)
|
||||
if (
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user