mirror of
https://github.com/wanglin2/mind-map.git
synced 2026-02-22 10:57:40 +08:00
客户端:1.增加手动保存按钮;2.导出时自动填充文件名称;右键菜单增加新建文件按钮
This commit is contained in:
parent
b609b226fa
commit
1e66ccc427
@ -73,7 +73,8 @@ export default {
|
||||
level5: 'Level5',
|
||||
level6: 'Level6',
|
||||
zenMode: 'Zen mode',
|
||||
fitCanvas: 'Fit canvas'
|
||||
fitCanvas: 'Fit canvas',
|
||||
create: 'Create new file'
|
||||
},
|
||||
count: {
|
||||
words: 'Words',
|
||||
@ -202,6 +203,7 @@ export default {
|
||||
export: 'Export',
|
||||
shortcutKey: 'Shortcut key',
|
||||
associativeLine: 'Associative line',
|
||||
save: 'Save'
|
||||
},
|
||||
edit: {
|
||||
newFeatureNoticeTitle: 'New feature reminder',
|
||||
|
||||
@ -73,7 +73,8 @@ export default {
|
||||
level5: '五级主题',
|
||||
level6: '六级主题',
|
||||
zenMode: '禅模式',
|
||||
fitCanvas: '适应画布'
|
||||
fitCanvas: '适应画布',
|
||||
create: '新建文件'
|
||||
},
|
||||
count: {
|
||||
words: '字数',
|
||||
@ -202,6 +203,7 @@ export default {
|
||||
export: '导出',
|
||||
shortcutKey: '快捷键',
|
||||
associativeLine: '关联线',
|
||||
save: '保存'
|
||||
},
|
||||
edit: {
|
||||
newFeatureNoticeTitle: '新特性提醒',
|
||||
|
||||
@ -97,12 +97,16 @@
|
||||
{{ $t('contextmenu.zenMode') }}
|
||||
{{ isZenMode ? '√' : '' }}
|
||||
</div>
|
||||
<div class="item" @click="createNewFile" v-if="IS_ELECTRON">
|
||||
{{ $t('contextmenu.create') }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
import { create } from '../../Workbenche/utils'
|
||||
|
||||
/**
|
||||
* @Author: 王林
|
||||
@ -296,6 +300,11 @@ export default {
|
||||
break
|
||||
}
|
||||
this.hide()
|
||||
},
|
||||
|
||||
// 新建文件
|
||||
createNewFile() {
|
||||
create()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -166,6 +166,7 @@ export default {
|
||||
}
|
||||
if (window.IS_ELECTRON) {
|
||||
this.mindMap.keyCommand.addShortcut('Control+s', this.saveToLocal)
|
||||
this.$bus.$on('saveToLocal', this.saveToLocal)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -99,7 +99,8 @@ export default {
|
||||
computed: {
|
||||
...mapState({
|
||||
openNodeRichText: state => state.localConfig.openNodeRichText,
|
||||
isDark: state => state.isDark
|
||||
isDark: state => state.isDark,
|
||||
localFileName: state => state.fileName
|
||||
}),
|
||||
|
||||
downTypeList() {
|
||||
@ -108,6 +109,7 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.$bus.$on('showExport', () => {
|
||||
this.fileName = this.localFileName || '思维导图'
|
||||
this.dialogVisible = true
|
||||
})
|
||||
},
|
||||
|
||||
@ -147,6 +147,12 @@
|
||||
<span class="text">{{ $t('toolbar.export') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbarBlock" v-if="IS_ELECTRON">
|
||||
<div class="toolbarBtn" @click="$bus.$emit('saveToLocal')">
|
||||
<span class="icon iconfont iconlingcunwei"></span>
|
||||
<span class="text">{{ $t('toolbar.save') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<NodeImage></NodeImage>
|
||||
<NodeHyperlink></NodeHyperlink>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user