mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-21 10:27:44 +08:00
Demo:增加是否自动进入文本编辑的配置
This commit is contained in:
parent
1f23257917
commit
59950b2ba0
@ -113,6 +113,16 @@ export default class TextEdit {
|
||||
)
|
||||
}
|
||||
}
|
||||
if (
|
||||
opt.enableAutoEnterTextEditWhenKeydown !==
|
||||
lastOpt.enableAutoEnterTextEditWhenKeydown
|
||||
) {
|
||||
window[
|
||||
opt.enableAutoEnterTextEditWhenKeydown
|
||||
? 'addEventListener'
|
||||
: 'removeEventListener'
|
||||
]('keydown', this.onKeydown)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +76,8 @@ export default {
|
||||
tagPosition: 'Node tag position',
|
||||
tagPositionRight: 'Text right',
|
||||
tagPositionBottom: 'Text bottom',
|
||||
alwaysShowExpandBtn: 'Always show expand btn'
|
||||
alwaysShowExpandBtn: 'Always show expand btn',
|
||||
enableAutoEnterTextEditWhenKeydown: 'Auto enter text edit when keydown'
|
||||
},
|
||||
color: {
|
||||
moreColor: 'More color'
|
||||
|
||||
@ -74,7 +74,8 @@ export default {
|
||||
tagPosition: '节点标签显示的位置',
|
||||
tagPositionRight: '文本右侧',
|
||||
tagPositionBottom: '文本下面',
|
||||
alwaysShowExpandBtn: '是否一直显示展开收起按钮'
|
||||
alwaysShowExpandBtn: '是否一直显示展开收起按钮',
|
||||
enableAutoEnterTextEditWhenKeydown: '键盘输入时自动进入文本编辑'
|
||||
},
|
||||
color: {
|
||||
moreColor: '更多颜色'
|
||||
|
||||
@ -44,7 +44,8 @@ export default {
|
||||
tagPosition: '節點標簽顯示的位置',
|
||||
tagPositionRight: '文本右側',
|
||||
tagPositionBottom: '文本下面',
|
||||
alwaysShowExpandBtn: '是否壹直顯示展開收起按鈕'
|
||||
alwaysShowExpandBtn: '是否壹直顯示展開收起按鈕',
|
||||
enableAutoEnterTextEditWhenKeydown: '鍵盤輸入時自動進入文本編輯'
|
||||
},
|
||||
setting: {
|
||||
title: '設置',
|
||||
|
||||
@ -368,11 +368,11 @@ export default {
|
||||
}
|
||||
},
|
||||
openRealtimeRenderOnNodeTextEdit: true,
|
||||
enableAutoEnterTextEditWhenKeydown: true,
|
||||
...(config || {}),
|
||||
iconList: [...icon],
|
||||
useLeftKeySelectionRightKeyDrag: this.useLeftKeySelectionRightKeyDrag,
|
||||
customInnerElsAppendTo: null,
|
||||
enableAutoEnterTextEditWhenKeydown: true,
|
||||
customHandleClipboardText: handleClipboardText,
|
||||
defaultNodeImage: require('../../../assets/img/图片加载失败.svg'),
|
||||
initRootNodePosition: ['center', 'center'],
|
||||
|
||||
@ -209,6 +209,16 @@
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 是否在键盘输入时自动进入节点文本编辑模式 -->
|
||||
<div class="row">
|
||||
<div class="rowItem">
|
||||
<el-checkbox
|
||||
v-model="config.enableAutoEnterTextEditWhenKeydown"
|
||||
@change="updateOtherConfig('enableAutoEnterTextEditWhenKeydown', $event)"
|
||||
>{{ $t('setting.enableAutoEnterTextEditWhenKeydown') }}</el-checkbox
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 是否开启手绘风格 -->
|
||||
<div class="row" v-if="supportHandDrawnLikeStyle">
|
||||
<div class="rowItem">
|
||||
@ -360,7 +370,8 @@ export default {
|
||||
createNewNodeBehavior: 'default',
|
||||
tagPosition: 'right',
|
||||
openRealtimeRenderOnNodeTextEdit: true,
|
||||
alwaysShowExpandBtn: false
|
||||
alwaysShowExpandBtn: false,
|
||||
enableAutoEnterTextEditWhenKeydown: true
|
||||
},
|
||||
watermarkConfig: {
|
||||
show: false,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user