Demo:支持配置创建新节点时的行为
This commit is contained in:
parent
55d7d0a846
commit
250ff30704
@ -47,6 +47,10 @@ export default {
|
|||||||
mousewheelZoomActionReverse: 'Mouse Wheel Zoom',
|
mousewheelZoomActionReverse: 'Mouse Wheel Zoom',
|
||||||
mousewheelZoomActionReverse1: 'Zoom out forward and zoom in back',
|
mousewheelZoomActionReverse1: 'Zoom out forward and zoom in back',
|
||||||
mousewheelZoomActionReverse2: 'Zoom in forward and zoom out back',
|
mousewheelZoomActionReverse2: 'Zoom in forward and zoom out back',
|
||||||
|
createNewNodeBehavior: 'Behavior of creating new node',
|
||||||
|
default: 'Active new node and editing',
|
||||||
|
notActive: 'Not active new node',
|
||||||
|
activeOnly: 'Only active new node but not editing',
|
||||||
rootStyle: 'Root Node',
|
rootStyle: 'Root Node',
|
||||||
associativeLineText: 'Associative line text',
|
associativeLineText: 'Associative line text',
|
||||||
fontFamily: 'Font family',
|
fontFamily: 'Font family',
|
||||||
|
|||||||
@ -47,6 +47,10 @@ export default {
|
|||||||
mousewheelZoomActionReverse: '鼠标滚轮缩放',
|
mousewheelZoomActionReverse: '鼠标滚轮缩放',
|
||||||
mousewheelZoomActionReverse1: '向前缩小向后放大',
|
mousewheelZoomActionReverse1: '向前缩小向后放大',
|
||||||
mousewheelZoomActionReverse2: '向前放大向后缩小',
|
mousewheelZoomActionReverse2: '向前放大向后缩小',
|
||||||
|
createNewNodeBehavior: '创建新节点的行为',
|
||||||
|
default: '激活新节点及进入编辑',
|
||||||
|
notActive: '不激活新节点',
|
||||||
|
activeOnly: '只激活新节点,不进入编辑',
|
||||||
rootStyle: '根节点',
|
rootStyle: '根节点',
|
||||||
associativeLineText: '关联线文字',
|
associativeLineText: '关联线文字',
|
||||||
fontFamily: '字体',
|
fontFamily: '字体',
|
||||||
|
|||||||
@ -753,6 +753,36 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 配置创建新节点时的行为 -->
|
||||||
|
<div class="row">
|
||||||
|
<div class="rowItem">
|
||||||
|
<span class="name">{{ $t('baseStyle.createNewNodeBehavior') }}</span>
|
||||||
|
<el-select
|
||||||
|
size="mini"
|
||||||
|
style="width: 120px"
|
||||||
|
v-model="config.createNewNodeBehavior"
|
||||||
|
placeholder=""
|
||||||
|
@change="
|
||||||
|
value => {
|
||||||
|
updateOtherConfig('createNewNodeBehavior', value)
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
:label="$t('baseStyle.default')"
|
||||||
|
value="default"
|
||||||
|
></el-option>
|
||||||
|
<el-option
|
||||||
|
:label="$t('baseStyle.notActive')"
|
||||||
|
value="notActive"
|
||||||
|
></el-option>
|
||||||
|
<el-option
|
||||||
|
:label="$t('baseStyle.activeOnly')"
|
||||||
|
value="activeOnly"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<!-- 是否显示滚动条 -->
|
<!-- 是否显示滚动条 -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="rowItem">
|
<div class="rowItem">
|
||||||
@ -843,7 +873,8 @@ export default {
|
|||||||
config: {
|
config: {
|
||||||
enableFreeDrag: false,
|
enableFreeDrag: false,
|
||||||
mousewheelAction: 'zoom',
|
mousewheelAction: 'zoom',
|
||||||
mousewheelZoomActionReverse: false
|
mousewheelZoomActionReverse: false,
|
||||||
|
createNewNodeBehavior: 'default'
|
||||||
},
|
},
|
||||||
watermarkConfig: {
|
watermarkConfig: {
|
||||||
show: false,
|
show: false,
|
||||||
@ -968,7 +999,8 @@ export default {
|
|||||||
;[
|
;[
|
||||||
'enableFreeDrag',
|
'enableFreeDrag',
|
||||||
'mousewheelAction',
|
'mousewheelAction',
|
||||||
'mousewheelZoomActionReverse'
|
'mousewheelZoomActionReverse',
|
||||||
|
'createNewNodeBehavior'
|
||||||
].forEach(key => {
|
].forEach(key => {
|
||||||
this.config[key] = this.mindMap.getConfig(key)
|
this.config[key] = this.mindMap.getConfig(key)
|
||||||
})
|
})
|
||||||
@ -979,9 +1011,7 @@ export default {
|
|||||||
this.enableNodeRichText = this.localConfig.openNodeRichText
|
this.enableNodeRichText = this.localConfig.openNodeRichText
|
||||||
this.mousewheelAction = this.localConfig.mousewheelAction
|
this.mousewheelAction = this.localConfig.mousewheelAction
|
||||||
this.mousewheelZoomActionReverse = this.localConfig.mousewheelZoomActionReverse
|
this.mousewheelZoomActionReverse = this.localConfig.mousewheelZoomActionReverse
|
||||||
;[
|
;['isShowScrollbar'].forEach(key => {
|
||||||
'isShowScrollbar'
|
|
||||||
].forEach(key => {
|
|
||||||
this.localConfigs[key] = this.localConfig[key]
|
this.localConfigs[key] = this.localConfig[key]
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -20,36 +20,22 @@ const store = new Vuex.Store({
|
|||||||
isShowScrollbar: false
|
isShowScrollbar: false
|
||||||
},
|
},
|
||||||
activeSidebar: '', // 当前显示的侧边栏
|
activeSidebar: '', // 当前显示的侧边栏
|
||||||
isDark: false,// 是否是暗黑模式
|
isDark: false, // 是否是暗黑模式
|
||||||
isOutlineEdit: false,// 是否是大纲编辑模式
|
isOutlineEdit: false, // 是否是大纲编辑模式
|
||||||
isReadonly: false// 是否只读
|
isReadonly: false // 是否只读
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
/**
|
// 设置思维导图数据
|
||||||
* @Author: 王林
|
|
||||||
* @Date: 2021-04-10 14:50:01
|
|
||||||
* @Desc: 设置思维导图数据
|
|
||||||
*/
|
|
||||||
setMindMapData(state, data) {
|
setMindMapData(state, data) {
|
||||||
state.mindMapData = data
|
state.mindMapData = data
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
// 设置操作本地文件标志位
|
||||||
* javascript comment
|
|
||||||
* @Author: 王林
|
|
||||||
* @Date: 2022-09-24 13:55:38
|
|
||||||
* @Desc: 设置操作本地文件标志位
|
|
||||||
*/
|
|
||||||
setIsHandleLocalFile(state, data) {
|
setIsHandleLocalFile(state, data) {
|
||||||
state.isHandleLocalFile = data
|
state.isHandleLocalFile = data
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
// 设置本地配置
|
||||||
* javascript comment
|
|
||||||
* @Author: 王林25
|
|
||||||
* @Date: 2022-11-14 18:42:47
|
|
||||||
* @Desc: 设置本地配置
|
|
||||||
*/
|
|
||||||
setLocalConfig(state, data) {
|
setLocalConfig(state, data) {
|
||||||
state.localConfig = {
|
state.localConfig = {
|
||||||
...state.localConfig,
|
...state.localConfig,
|
||||||
@ -58,12 +44,7 @@ const store = new Vuex.Store({
|
|||||||
storeLocalConfig(state.localConfig)
|
storeLocalConfig(state.localConfig)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
// 设置当前显示的侧边栏
|
||||||
* javascript comment
|
|
||||||
* @Author: 王林25
|
|
||||||
* @Date: 2022-11-15 19:25:26
|
|
||||||
* @Desc: 设置当前显示的侧边栏
|
|
||||||
*/
|
|
||||||
setActiveSidebar(state, data) {
|
setActiveSidebar(state, data) {
|
||||||
state.activeSidebar = data
|
state.activeSidebar = data
|
||||||
},
|
},
|
||||||
@ -81,14 +62,10 @@ const store = new Vuex.Store({
|
|||||||
// 设置是否只读
|
// 设置是否只读
|
||||||
setIsReadonly(state, data) {
|
setIsReadonly(state, data) {
|
||||||
state.isReadonly = data
|
state.isReadonly = data
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
/**
|
// 设置初始思维导图数据
|
||||||
* @Author: 王林
|
|
||||||
* @Date: 2021-04-10 14:50:40
|
|
||||||
* @Desc: 设置初始思维导图数据
|
|
||||||
*/
|
|
||||||
getUserMindMapData(ctx) {
|
getUserMindMapData(ctx) {
|
||||||
try {
|
try {
|
||||||
let { data } = {
|
let { data } = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user