Demo:增加是否一直显示展开收起按钮的配置

This commit is contained in:
街角小林 2024-10-24 09:26:25 +08:00
parent 4e1db01f44
commit 1f23257917
4 changed files with 19 additions and 5 deletions

View File

@ -75,7 +75,8 @@ export default {
belowNode: 'Display below nodes',
tagPosition: 'Node tag position',
tagPositionRight: 'Text right',
tagPositionBottom: 'Text bottom'
tagPositionBottom: 'Text bottom',
alwaysShowExpandBtn: 'Always show expand btn'
},
color: {
moreColor: 'More color'

View File

@ -73,7 +73,8 @@ export default {
belowNode: '显示在节点下方',
tagPosition: '节点标签显示的位置',
tagPositionRight: '文本右侧',
tagPositionBottom: '文本下面'
tagPositionBottom: '文本下面',
alwaysShowExpandBtn: '是否一直显示展开收起按钮'
},
color: {
moreColor: '更多颜色'

View File

@ -43,7 +43,8 @@ export default {
outerFramePadding: '外框內距',
tagPosition: '節點標簽顯示的位置',
tagPositionRight: '文本右側',
tagPositionBottom: '文本下面'
tagPositionBottom: '文本下面',
alwaysShowExpandBtn: '是否壹直顯示展開收起按鈕'
},
setting: {
title: '設置',

View File

@ -199,6 +199,16 @@
>
</div>
</div>
<!-- 是否一直显示展开收起按钮 -->
<div class="row">
<div class="rowItem">
<el-checkbox
v-model="config.alwaysShowExpandBtn"
@change="updateOtherConfig('alwaysShowExpandBtn', $event)"
>{{ $t('setting.alwaysShowExpandBtn') }}</el-checkbox
>
</div>
</div>
<!-- 是否开启手绘风格 -->
<div class="row" v-if="supportHandDrawnLikeStyle">
<div class="rowItem">
@ -349,7 +359,8 @@ export default {
mousewheelZoomActionReverse: false,
createNewNodeBehavior: 'default',
tagPosition: 'right',
openRealtimeRenderOnNodeTextEdit: true
openRealtimeRenderOnNodeTextEdit: true,
alwaysShowExpandBtn: false
},
watermarkConfig: {
show: false,
@ -437,7 +448,7 @@ export default {
storeConfig({
config: this.data.config
})
if (key === 'tagPosition') {
if (['tagPosition', 'alwaysShowExpandBtn'].includes(key)) {
this.mindMap.reRender()
}
},