diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js index 3301fd1d..fe01ddec 100644 --- a/web/src/lang/en_us.js +++ b/web/src/lang/en_us.js @@ -72,7 +72,10 @@ export default { watermarkAngle: 'Angle', watermarkTextOpacity: 'Text opacity', watermarkTextFontSize: 'Font size', - belowNode: 'Display below nodes' + belowNode: 'Display below nodes', + tagPosition: 'Node tag position', + tagPositionRight: 'Text right', + tagPositionBottom: 'Text bottom' }, color: { moreColor: 'More color' diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index bce021f8..afc71bdd 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -70,7 +70,10 @@ export default { watermarkAngle: '旋转角度', watermarkTextOpacity: '文字透明度', watermarkTextFontSize: '文字字号', - belowNode: '显示在节点下方' + belowNode: '显示在节点下方', + tagPosition: '节点标签显示的位置', + tagPositionRight: '文本右侧', + tagPositionBottom: '文本下面' }, color: { moreColor: '更多颜色' diff --git a/web/src/lang/zh_tw.js b/web/src/lang/zh_tw.js index 78d30e9f..8785a8bf 100644 --- a/web/src/lang/zh_tw.js +++ b/web/src/lang/zh_tw.js @@ -40,7 +40,10 @@ export default { edge: '邊緣', rainbowLines: '彩虹線條', notUseRainbowLines: '不使用彩虹線條', - outerFramePadding: '外框內距' + outerFramePadding: '外框內距', + tagPosition: '節點標簽顯示的位置', + tagPositionRight: '文本右側', + tagPositionBottom: '文本下面' }, setting: { title: '設置', diff --git a/web/src/pages/Edit/components/Setting.vue b/web/src/pages/Edit/components/Setting.vue index 9b31c951..436fe985 100644 --- a/web/src/pages/Edit/components/Setting.vue +++ b/web/src/pages/Edit/components/Setting.vue @@ -177,6 +177,38 @@ > + +
+
+ {{ $t('setting.openRealtimeRenderOnNodeTextEdit') }} +
+
+ +
+
+ {{ $t('setting.isShowScrollbar') }} +
+
+ +
+
+ {{ $t('setting.isUseHandDrawnLikeStyle') }} +
+
@@ -258,36 +290,30 @@
- +
- {{ $t('setting.tagPosition') }} + {{ $t('setting.openRealtimeRenderOnNodeTextEdit') }} -
-
- -
-
- {{ $t('setting.isShowScrollbar') }} -
-
- -
-
- {{ $t('setting.isUseHandDrawnLikeStyle') }} + + +
@@ -322,6 +348,7 @@ export default { mousewheelAction: 'zoom', mousewheelZoomActionReverse: false, createNewNodeBehavior: 'default', + tagPosition: 'right', openRealtimeRenderOnNodeTextEdit: true }, watermarkConfig: { @@ -373,14 +400,7 @@ export default { // 初始化其他配置 initConfig() { - ;[ - 'openPerformance', - 'enableFreeDrag', - 'mousewheelAction', - 'mousewheelZoomActionReverse', - 'createNewNodeBehavior', - 'openRealtimeRenderOnNodeTextEdit' - ].forEach(key => { + Object.keys(this.config).forEach(key => { this.config[key] = this.mindMap.getConfig(key) }) }, @@ -417,6 +437,9 @@ export default { storeConfig({ config: this.data.config }) + if (key === 'tagPosition') { + this.mindMap.reRender() + } }, // 更新水印配置