From a8c13b8f9a1d9db047e70dd9eb451972e7577e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A1=97=E8=A7=92=E5=B0=8F=E6=9E=97?= <1013335014@qq.com> Date: Wed, 14 May 2025 09:52:27 +0800 Subject: [PATCH] update --- README.md | 14 + web/src/config/en.js | 4 +- web/src/config/vi.js | 4 +- web/src/config/zh.js | 4 +- web/src/config/zhtw.js | 4 +- web/src/pages/Edit/components/BaseStyle.vue | 56 --- web/src/pages/Edit/components/Contextmenu.vue | 93 ---- .../Edit/components/CustomNodeContent.vue | 36 -- web/src/pages/Edit/components/Edit.vue | 468 +----------------- web/src/pages/Edit/components/Export.vue | 26 +- web/src/pages/Edit/components/Import.vue | 125 +---- .../pages/Edit/components/LinkNodeSelect.vue | 177 ------- .../Edit/components/NodeAnnotationBtn.vue | 275 ---------- .../pages/Edit/components/NodeAttachment.vue | 133 ----- web/src/pages/Edit/components/Setting.vue | 71 +-- .../pages/Edit/components/SourceCodeEdit.vue | 214 -------- web/src/pages/Edit/components/Structure.vue | 12 +- web/src/pages/Edit/components/Style.vue | 46 +- .../Edit/components/ToolbarNodeBtnList.vue | 12 +- web/src/store.js | 70 --- 20 files changed, 63 insertions(+), 1781 deletions(-) delete mode 100644 web/src/pages/Edit/components/CustomNodeContent.vue delete mode 100644 web/src/pages/Edit/components/LinkNodeSelect.vue delete mode 100644 web/src/pages/Edit/components/NodeAnnotationBtn.vue delete mode 100644 web/src/pages/Edit/components/NodeAttachment.vue delete mode 100644 web/src/pages/Edit/components/SourceCodeEdit.vue diff --git a/README.md b/README.md index a4b1c4dd..99c43cdf 100644 --- a/README.md +++ b/README.md @@ -362,6 +362,13 @@ const mindMap = new MindMap({ 兔子快跑 + + + +
+ LSHM +
+ @@ -994,5 +1001,12 @@ const mindMap = new MindMap({ 神话 + + + +
+ Towards the future +
+ \ No newline at end of file diff --git a/web/src/config/en.js b/web/src/config/en.js index 9490f65e..103a0b06 100644 --- a/web/src/config/en.js +++ b/web/src/config/en.js @@ -672,13 +672,11 @@ export const layoutGroupList = [ list: [ 'timeline', 'timeline2', - 'verticalTimeline2', - 'verticalTimeline3', 'verticalTimeline' ] }, { name: 'Fishbone', - list: ['fishbone', 'fishbone2', 'rightFishbone', 'rightFishbone2'] + list: ['fishbone'] } ] diff --git a/web/src/config/vi.js b/web/src/config/vi.js index f74b514b..6e296780 100644 --- a/web/src/config/vi.js +++ b/web/src/config/vi.js @@ -695,13 +695,11 @@ export const layoutGroupList = [ list: [ 'timeline', 'timeline2', - 'verticalTimeline2', - 'verticalTimeline3', 'verticalTimeline' ] }, { name: 'Bản đồ Fishbone', - list: ['fishbone', 'fishbone2', 'rightFishbone', 'rightFishbone2'] + list: ['fishbone'] } ] diff --git a/web/src/config/zh.js b/web/src/config/zh.js index e66537ac..801afaf7 100644 --- a/web/src/config/zh.js +++ b/web/src/config/zh.js @@ -773,13 +773,11 @@ export const layoutGroupList = [ list: [ 'timeline', 'timeline2', - 'verticalTimeline2', - 'verticalTimeline3', 'verticalTimeline' ] }, { name: '鱼骨图', - list: ['fishbone', 'fishbone2', 'rightFishbone', 'rightFishbone2'] + list: ['fishbone'] } ] diff --git a/web/src/config/zhtw.js b/web/src/config/zhtw.js index 1fe657ef..17770696 100644 --- a/web/src/config/zhtw.js +++ b/web/src/config/zhtw.js @@ -671,13 +671,11 @@ export const layoutGroupList = [ list: [ 'timeline', 'timeline2', - 'verticalTimeline2', - 'verticalTimeline3', 'verticalTimeline' ] }, { name: '魚骨圖', - list: ['fishbone', 'fishbone2', 'rightFishbone', 'rightFishbone2'] + list: ['fishbone'] } ] diff --git a/web/src/pages/Edit/components/BaseStyle.vue b/web/src/pages/Edit/components/BaseStyle.vue index 7c3f5c4a..d4f3f03e 100644 --- a/web/src/pages/Edit/components/BaseStyle.vue +++ b/web/src/pages/Edit/components/BaseStyle.vue @@ -301,61 +301,6 @@ > - -
-
- {{ $t('style.openLineFlow') }} - -
-
- {{ $t('style.direction') }} - - - - -
-
-
-
- {{ $t('style.lineFlowDuration') }} - -
-
{{ $t('baseStyle.rainbowLines') }}
@@ -933,7 +878,6 @@ export default { activeSidebar: state => state.activeSidebar, localConfig: state => state.localConfig, isDark: state => state.localConfig.isDark, - supportLineFlow: state => state.supportLineFlow, bgList: state => state.bgList }), lineStyleList() { diff --git a/web/src/pages/Edit/components/Contextmenu.vue b/web/src/pages/Edit/components/Contextmenu.vue index 5b98ac82..9f52fcc0 100644 --- a/web/src/pages/Edit/components/Contextmenu.vue +++ b/web/src/pages/Edit/components/Contextmenu.vue @@ -62,41 +62,6 @@
{{ $t('contextmenu.expandNodeChild') }}
-
- {{ $t('contextmenu.number') }} - -
-
- {{ item.name }} - {{ numberType === item.value ? '√' : '' }} -
-
-
- {{ item.name }} - {{ numberLevel === item.value ? '√' : '' }} -
-
-
-
- {{ - hasCheckbox ? $t('contextmenu.removeToDo') : $t('contextmenu.addToDo') - }} -
{{ $t('contextmenu.deleteNode') }} @@ -134,16 +99,6 @@
{{ $t('contextmenu.removeNote') }}
-
- {{ - hasNodeLink - ? $t('contextmenu.modifyNodeLink') - : $t('contextmenu.linkToNode') - }} -
-
- {{ $t('contextmenu.removeNodeLink') }} -
{{ $t('contextmenu.removeCustomStyles') }}
@@ -262,8 +217,6 @@ export default { ...mapState({ isZenMode: state => state.localConfig.isZenMode, isDark: state => state.localConfig.isDark, - supportNumbers: state => state.supportNumbers, - supportCheckbox: state => state.supportCheckbox, enableAi: state => state.localConfig.enableAi }), expandList() { @@ -491,13 +444,6 @@ export default { case 'REMOVE_NOTE': this.node.setNote('') break - case 'LINK_NODE': - this.$bus.$emit('show_link_node', this.node) - this.hide() - break - case 'REMOVE_LINK_NODE': - this.$bus.$emit('execCommand', 'SET_NODE_LINK', this.node, null) - break case 'EXPORT_CUR_NODE_TO_PNG': this.mindMap.export( 'png', @@ -521,45 +467,6 @@ export default { this.hide() }, - // 设置节点编号 - setNodeNumber(prop, value) { - if (prop === 'type') { - this.numberType = value - if (value === '') { - // 无编号 - this.numberLevel = '' - this.mindMap.execCommand('SET_NUMBER', [], null) - return - } else { - // 有编号 - if (this.numberLevel === '') { - this.numberLevel = 1 - } - } - } - if (prop === 'level') { - this.numberLevel = value - } - this.mindMap.execCommand('SET_NUMBER', [], { - [prop]: value - }) - this.hide() - }, - - // 设置待办 - setCheckbox() { - this.mindMap.execCommand( - 'SET_CHECKBOX', - [], - this.hasCheckbox - ? null - : { - done: false - } - ) - this.hide() - }, - // 复制到剪贴板 async copyToClipboard(type) { try { diff --git a/web/src/pages/Edit/components/CustomNodeContent.vue b/web/src/pages/Edit/components/CustomNodeContent.vue deleted file mode 100644 index 7da83ab9..00000000 --- a/web/src/pages/Edit/components/CustomNodeContent.vue +++ /dev/null @@ -1,36 +0,0 @@ - - - - - diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index 1cfe5cb1..626b786d 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -34,7 +34,6 @@ v-if="mindMap" :mindMap="mindMap" > - @@ -43,7 +42,6 @@ - @@ -54,10 +52,6 @@ -
state.localConfig.enableDragImport, useLeftKeySelectionRightKeyDrag: state => state.localConfig.useLeftKeySelectionRightKeyDrag, - isUseHandDrawnLikeStyle: state => - state.localConfig.isUseHandDrawnLikeStyle, - isUseMomentum: state => state.localConfig.isUseMomentum, extraTextOnExport: state => state.extraTextOnExport, isDragOutlineTreeNode: state => state.isDragOutlineTreeNode, - enableAi: state => state.localConfig.enableAi, - supportNodeLink: state => state.supportNodeLink + enableAi: state => state.localConfig.enableAi }) }, watch: { @@ -262,25 +225,10 @@ export default { } else { this.removeScrollbarPlugin() } - }, - isUseHandDrawnLikeStyle() { - if (this.isUseHandDrawnLikeStyle) { - this.addHandDrawnLikeStylePlugin() - } else { - this.removeHandDrawnLikeStylePlugin() - } - }, - isUseMomentum() { - if (this.isUseMomentum) { - this.addMomentumPlugin() - } else { - this.removeMomentumPlugin() - } } }, mounted() { showLoading() - // this.showNewFeatureInfo() this.getData() this.init() this.$bus.$on('execCommand', this.execCommand) @@ -295,9 +243,8 @@ export default { this.$bus.$on('showLoading', this.handleShowLoading) this.$bus.$on('localStorageExceeded', this.onLocalStorageExceeded) window.addEventListener('resize', this.handleResize) - document.body.addEventListener('click', this.onVipCheckClick) this.$bus.$on('showDownloadTip', this.showDownloadTip) - this.$bus.$on('vipCheckClick', this.onVipCheckClick) + this.webTip() }, beforeDestroy() { this.$bus.$off('execCommand', this.execCommand) @@ -312,9 +259,7 @@ export default { this.$bus.$off('showLoading', this.handleShowLoading) this.$bus.$off('localStorageExceeded', this.onLocalStorageExceeded) window.removeEventListener('resize', this.handleResize) - document.body.removeEventListener('click', this.onVipCheckClick) this.$bus.$off('showDownloadTip', this.showDownloadTip) - this.$bus.$off('vipCheckClick', this.onVipCheckClick) this.mindMap.destroy() }, methods: { @@ -425,7 +370,7 @@ export default { openRealtimeRenderOnNodeTextEdit: true, enableAutoEnterTextEditWhenKeydown: true, demonstrateConfig: { - openBlankMode: true + openBlankMode: false }, ...(config || {}), iconList: [...icon], @@ -500,116 +445,6 @@ export default { }) }) } - // createNodePrefixContent: node => { - // const el = document.createElement('div') - // el.style.width = '50px' - // el.style.height = '50px' - // el.style.background = 'red' - // return { - // el, - // width: 50, - // height: 50 - // } - // }, - // createNodePostfixContent: node => { - // const domparser = new DOMParser() - // const doc = domparser.parseFromString( - // '白日依山尽', - // 'text/html' - // ) - // const el = doc.querySelector('b') - // return { - // el, - // width: 50, - // height: 50 - // } - // }, - // addContentToHeader: () => { - // const el = document.createElement('div') - // el.className = 'footer' - // el.innerHTML = '理想青年实验室' - // const cssText = ` - // .header { - // width: 100%; - // height: 50px; - // background: #f5f5f5; - // display: flex; - // justify-content: center; - // align-items: center - // } - // ` - // return { - // el, - // cssText, - // height: 50 - // } - // }, - // beforeShortcutRun: (key, activeNodeList) => { - // console.log(key, activeNodeList) - // // 阻止删除快捷键行为 - // if (key === 'Backspace') { - // return true - // } - // } - // handleNodePasteImg: img => { - // console.log(img) - // return new Promise(resolve => { - // setTimeout(() => { - // resolve({ - // url: require('../../../assets/img/themes/autumn.jpg'), - // size: { - // width: 100, - // height: 100 - // } - // }) - // }, 200) - // }) - // } - // isUseCustomNodeContent: true, - // 示例1:组件里用到了router、store、i18n等实例化vue组件时需要用到的东西 - // customCreateNodeContent: (node) => { - // let el = document.createElement('div') - // let Comp = Vue.extend(Color) - // let comp = new Comp({ - // router, - // store, - // i18n - // }) - // comp.$mount(el) - // return comp.$el - // }, - // 示例2:组件里没有用到示例1的东西 - // customCreateNodeContent: (node) => { - // let el = document.createElement('div') - // let Comp = Vue.extend(CustomNodeContent) - // let comp = new Comp({ - // propsData: { - // html: node.nodeData.data.text - // } - // }) - // comp.$mount(el) - // return comp.$el - // }, - // 示例3:普通元素 - // customCreateNodeContent: node => { - // let el = document.createElement('div') - // el.style.cssText = ` - // width: 203px; - // height: 78px; - // opacity: 0.8; - // background-image: linear-gradient(0deg, rgba(53,130,172,0.06) 0%, rgba(24,75,116,0.06) 100%); - // box-shadow: inset 0 1px 15px 0 rgba(119,196,255,0.40); - // border-radius: 2px; - // display: flex; - // justify-content: center; - // align-items: center; - // ` - // el.innerHTML = ` - // ${node.nodeData.data.text} - // - // ` - // return el - // } }) this.loadPlugins() this.mindMap.keyCommand.addShortcut('Control+s', () => { @@ -649,7 +484,6 @@ export default { }) }) this.bindSaveEvent() - this.testDynamicCreateNodes() // 如果应用被接管,那么抛出事件传递思维导图实例 if (window.takeOverApp) { this.$bus.$emit('app_inited', this.mindMap) @@ -666,93 +500,12 @@ export default { } // 协同测试 this.cooperateTest() - // 销毁 - // setTimeout(() => { - // console.log('销毁') - // this.mindMap.destroy() - // }, 10000) - // 测试 - // setTimeout(() => { - // console.log(this.mindMap.renderer.root.getRect()) - // console.log(this.mindMap.renderer.root.getRectInSvg()) - // }, 5000); - // setTimeout(() => { - // this.mindMap.renderer.renderTree.data.fillColor = 'red' - // this.mindMap.render() - // this.mindMap.reRender() - // this.mindMap.render() - // }, 5000) }, // 加载相关插件 loadPlugins() { if (this.openNodeRichText) this.addRichTextPlugin() if (this.isShowScrollbar) this.addScrollbarPlugin() - if (typeof HandDrawnLikeStyle !== 'undefined') { - this.$store.commit('setSupportHandDrawnLikeStyle', true) - if (this.isUseHandDrawnLikeStyle) this.addHandDrawnLikeStylePlugin() - } - if (typeof Momentum !== 'undefined') { - this.$store.commit('setSupportMomentum', true) - if (this.isUseMomentum) this.addMomentumPlugin() - } - if (typeof Notation !== 'undefined') { - this.mindMap.addPlugin(Notation) - this.$store.commit('setSupportMark', true) - } - if (typeof Numbers !== 'undefined') { - this.mindMap.addPlugin(Numbers) - this.$store.commit('setSupportNumbers', true) - } - if (typeof Freemind !== 'undefined') { - this.mindMap.addPlugin(Freemind) - this.$store.commit('setSupportFreemind', true) - Vue.prototype.Freemind = Freemind - } - if (typeof Excel !== 'undefined') { - this.mindMap.addPlugin(Excel) - this.$store.commit('setSupportExcel', true) - Vue.prototype.Excel = Excel - } - if (typeof Checkbox !== 'undefined') { - this.mindMap.addPlugin(Checkbox) - this.$store.commit('setSupportCheckbox', true) - } - if (typeof LineFlow !== 'undefined') { - this.mindMap.addPlugin(LineFlow) - this.$store.commit('setSupportLineFlow', true) - } - if (typeof RightFishbone !== 'undefined') { - this.mindMap.addPlugin(RightFishbone) - this.$store.commit('setSupportRightFishbone', true) - } - if (typeof NodeLink !== 'undefined') { - this.mindMap.addPlugin(NodeLink) - this.$store.commit('setSupportNodeLink', true) - } - if (typeof MoreShapes !== 'undefined') { - this.mindMap.addPlugin(MoreShapes) - this.$store.commit('setSupportMoreShapes', true) - } - // 扩展侧边主题列表 - if (typeof MoreThemes !== 'undefined') { - const extendThemeGroupList = [ - { - name: this.$t('edit.withBg'), // 主题组名称 - // 主题列表 - list: [...MoreThemes.lightList, ...MoreThemes.darkList].map( - item => { - return { - ...item, - img: MoreThemes.themeImgMap[item.value] - } - } - ) - } - ] - this.$store.commit('setExtendThemeGroupList', extendThemeGroupList) - this.$store.commit('setBgList', MoreThemes.bgList) - } }, // url中是否存在要打开的文件 @@ -812,21 +565,6 @@ export default { this.mindMap.updateConfig(data) }, - // 显示新特性提示 - showNewFeatureInfo() { - let showed = localStorage.getItem('SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1') - if (!showed) { - this.$notify.info({ - title: this.$t('edit.newFeatureNoticeTitle'), - message: this.$t('edit.newFeatureNoticeMessage'), - duration: 0, - onClose: () => { - localStorage.setItem('SIMPLE_MIND_MAP_NEW_FEATURE_TIP_1', true) - } - }) - } - }, - // 加载节点富文本编辑插件 addRichTextPlugin() { if (!this.mindMap) return @@ -849,153 +587,6 @@ export default { this.mindMap.removePlugin(ScrollbarPlugin) }, - // 加载手绘风格插件 - addHandDrawnLikeStylePlugin() { - try { - if (!this.mindMap) return - this.mindMap.addPlugin(HandDrawnLikeStyle) - this.mindMap.reRender() - } catch (error) { - console.log('手绘风格插件不存在') - } - }, - - // 移除手绘风格插件 - removeHandDrawnLikeStylePlugin() { - try { - this.mindMap.removePlugin(HandDrawnLikeStyle) - this.mindMap.reRender() - } catch (error) { - console.log('手绘风格插件不存在') - } - }, - - // 加载动量效果插件 - addMomentumPlugin() { - try { - if (!this.mindMap) return - this.mindMap.addPlugin(Momentum) - } catch (error) { - console.log('动量效果插件不存在') - } - }, - - // 移除动量效果插件 - removeMomentumPlugin() { - try { - this.mindMap.removePlugin(Momentum) - } catch (error) { - console.log('动量效果插件不存在') - } - }, - - // 测试动态插入节点 - testDynamicCreateNodes() { - // return - setTimeout(() => { - // 动态给指定节点添加子节点 - // this.mindMap.execCommand( - // 'INSERT_CHILD_NODE', - // false, - // null, - // { - // text: '自定义内容' - // }, - // [ - // { - // data: { - // text: '自定义子节点' - // } - // } - // ] - // ) - // 动态给指定节点添加同级节点 - // this.mindMap.execCommand( - // 'INSERT_NODE', - // false, - // null, - // { - // text: '自定义内容' - // }, - // [ - // { - // data: { - // text: '自定义同级节点' - // }, - // children: [ - // { - // data: { - // text: '自定义同级节点2' - // }, - // children: [] - // } - // ] - // } - // ] - // ) - // 动态插入多个子节点 - // this.mindMap.execCommand('INSERT_MULTI_CHILD_NODE', null, [ - // { - // data: { - // text: '自定义节点1' - // }, - // children: [ - // { - // data: { - // text: '自定义节点1-1' - // }, - // children: [] - // } - // ] - // }, - // { - // data: { - // text: '自定义节点2' - // }, - // children: [ - // { - // data: { - // text: '自定义节点2-1' - // }, - // children: [] - // } - // ] - // } - // ]) - // 动态插入多个同级节点 - // this.mindMap.execCommand('INSERT_MULTI_NODE', null, [ - // { - // data: { - // text: '自定义节点1' - // }, - // children: [ - // { - // data: { - // text: '自定义节点1-1' - // }, - // children: [] - // } - // ] - // }, - // { - // data: { - // text: '自定义节点2' - // }, - // children: [ - // { - // data: { - // text: '自定义节点2-1' - // }, - // children: [] - // } - // ] - // } - // ]) - // 动态删除指定节点 - // this.mindMap.execCommand('REMOVE_NODE', this.mindMap.renderer.root.children[0]) - }, 5000) - }, - // 协同测试 cooperateTest() { if (this.mindMap.cooperate && this.$route.query.userName) { @@ -1022,9 +613,11 @@ export default { if (!this.enableDragImport || this.isDragOutlineTreeNode) return this.showDragMask = true }, + onDragleave() { this.showDragMask = false }, + onDrop(e) { if (!this.enableDragImport) return this.showDragMask = false @@ -1034,30 +627,18 @@ export default { this.$bus.$emit('importFile', file) }, - // 网页版功能试用提示 - onVipCheckClick(e) { - const el = getParentWithClass(e.target, 'vip') - if (el) { - const className = el.classList.value.split(/\s+/).join('_') - const storageKey = 'VIP_USAGE_TIP' - let data = localStorage.getItem(storageKey) - if (data) { - data = JSON.parse(data) - } else { - data = {} - } - if (!data[className]) { - data[className] = 0 - } - data[className]++ - if (data[className] > 3) { - this.showDownloadTip( - this.$t('edit.tryTipTitle'), - this.$t('edit.tryTipDesc') - ) - } - localStorage.setItem(storageKey, JSON.stringify(data)) + // 网页版试用提示 + webTip() { + const storageKey = 'webUseTip' + const data = localStorage.getItem(storageKey) + if (data) { + return } + this.showDownloadTip( + '重要提示', + '网页版已暂停更新,部分功能缺失,请下载客户端获得完整体验~' + ) + localStorage.setItem(storageKey, 1) }, showDownloadTip(title, desc) { @@ -1065,7 +646,15 @@ export default { this.$msgbox({ title, message: h('div', null, [ - h('p', null, desc), + h( + 'p', + { + style: { + marginBottom: '12px' + } + }, + desc + ), h('div', null, [ h( 'a', @@ -1137,11 +726,6 @@ export default { top: 0px; width: 100%; height: 100%; - - // left: 100px; - // top: 100px; - // right: 100px; - // bottom: 100px; } } diff --git a/web/src/pages/Edit/components/Export.vue b/web/src/pages/Edit/components/Export.vue index bc8e5740..2e6daca0 100644 --- a/web/src/pages/Edit/components/Export.vue +++ b/web/src/pages/Edit/components/Export.vue @@ -21,8 +21,7 @@ v-for="item in downTypeList" :key="item.type" :class="{ - active: exportType === item.type, - vip: ['mm', 'xlsx'].includes(item.type) + active: exportType === item.type }" @click="exportType = item.type" > @@ -80,7 +79,6 @@ {{ $t('export.format') }} PNG - JPG
@@ -176,18 +174,16 @@ export default { ...mapState({ openNodeRichText: state => state.localConfig.openNodeRichText, isDark: state => state.localConfig.isDark, - supportFreemind: state => state.supportFreemind, - supportExcel: state => state.supportExcel }), downTypeList() { const list = downTypeList[this.$i18n.locale] || downTypeList.zh return list.filter(item => { if (item.type === 'mm') { - return this.supportFreemind + return false } if (item.type === 'xlsx') { - return this.supportExcel + return false } else { return true } @@ -274,22 +270,6 @@ export default { this.isTransparent, this.isFitBg ) - } else if (this.exportType === 'mm') { - this.$bus.$emit('export', this.exportType, true, this.fileName, { - transformNote: note => { - if (!md) { - md = new MarkdownIt() - } - return md.render(note) - }, - transformImage: img => { - if (/^https?:\/\//.test(img)) { - return img - } else { - return '' - } - } - }) } else { this.$bus.$emit('export', this.exportType, true, this.fileName) } diff --git a/web/src/pages/Edit/components/Import.vue b/web/src/pages/Edit/components/Import.vue index e5636124..77180e43 100644 --- a/web/src/pages/Edit/components/Import.vue +++ b/web/src/pages/Edit/components/Import.vue @@ -21,20 +21,13 @@ {{ $t('import.selectFile') }} - {{ $t('import.mdImportDialogTitle') }}
{{ $t('import.support') }}{{ supportFileStr }}{{ $t('import.file') }}
{{ $t('dialog.cancel') }} - {{ + {{ $t('dialog.confirm') }} @@ -60,34 +53,13 @@ }} - - - - - {{ $t('dialog.cancel') }} - {{ - $t('dialog.confirm') - }} - -
- - - diff --git a/web/src/pages/Edit/components/NodeAnnotationBtn.vue b/web/src/pages/Edit/components/NodeAnnotationBtn.vue deleted file mode 100644 index aeac61eb..00000000 --- a/web/src/pages/Edit/components/NodeAnnotationBtn.vue +++ /dev/null @@ -1,275 +0,0 @@ - - - - - diff --git a/web/src/pages/Edit/components/NodeAttachment.vue b/web/src/pages/Edit/components/NodeAttachment.vue deleted file mode 100644 index 2a0f51f7..00000000 --- a/web/src/pages/Edit/components/NodeAttachment.vue +++ /dev/null @@ -1,133 +0,0 @@ - - - - - diff --git a/web/src/pages/Edit/components/Setting.vue b/web/src/pages/Edit/components/Setting.vue index e8666344..76398343 100644 --- a/web/src/pages/Edit/components/Setting.vue +++ b/web/src/pages/Edit/components/Setting.vue @@ -4,7 +4,6 @@ class="sidebarContent customScrollbar" :class="{ isDark: isDark }" v-if="configData" - @click="onClick" >
@@ -257,40 +256,6 @@ >
- -
-
- {{ $t('setting.isUseHandDrawnLikeStyle') }} -
-
- -
-
- {{ $t('setting.isUseMomentum') }} -
-
- -
-
- {{ $t('setting.openBlankMode') }} -
-
@@ -439,10 +404,7 @@ export default { enableAutoEnterTextEditWhenKeydown: true, imgTextMargin: 0, textContentMargin: 0, - enableInheritAncestorLineStyle: false, - demonstrateConfig: { - openBlankMode: false - } + enableInheritAncestorLineStyle: false }, watermarkConfig: { show: false, @@ -461,8 +423,6 @@ export default { enableNodeRichText: true, localConfigs: { isShowScrollbar: false, - isUseHandDrawnLikeStyle: false, - isUseMomentum: false, enableDragImport: false, enableAi: false } @@ -472,9 +432,7 @@ export default { ...mapState({ activeSidebar: state => state.activeSidebar, localConfig: state => state.localConfig, - isDark: state => state.localConfig.isDark, - supportHandDrawnLikeStyle: state => state.supportHandDrawnLikeStyle, - supportMomentum: state => state.supportMomentum + isDark: state => state.localConfig.isDark }) }, watch: { @@ -535,23 +493,10 @@ export default { // 更新其他配置 updateOtherConfig(key, value) { - if (key === 'openBlankMode') { - this.mindMap.updateConfig({ - demonstrateConfig: { - ...(this.mindMap.getConfig('demonstrateConfig') || {}), - openBlankMode: value - } - }) - if (!this.configData.demonstrateConfig) { - this.configData.demonstrateConfig = {} - } - this.configData.demonstrateConfig[key] = value - } else { - this.mindMap.updateConfig({ - [key]: value - }) - this.configData[key] = value - } + this.mindMap.updateConfig({ + [key]: value + }) + this.configData[key] = value storeConfig(this.configData) if ( [ @@ -628,10 +573,6 @@ export default { this.setLocalConfig({ [key]: value }) - }, - - onClick(e) { - this.$bus.$emit('vipCheckClick', e) } } } diff --git a/web/src/pages/Edit/components/SourceCodeEdit.vue b/web/src/pages/Edit/components/SourceCodeEdit.vue deleted file mode 100644 index 80b34126..00000000 --- a/web/src/pages/Edit/components/SourceCodeEdit.vue +++ /dev/null @@ -1,214 +0,0 @@ - - - - - diff --git a/web/src/pages/Edit/components/Structure.vue b/web/src/pages/Edit/components/Structure.vue index 670f7da7..d01c251f 100644 --- a/web/src/pages/Edit/components/Structure.vue +++ b/web/src/pages/Edit/components/Structure.vue @@ -49,19 +49,15 @@ export default { computed: { ...mapState({ isDark: state => state.localConfig.isDark, - activeSidebar: state => state.activeSidebar, - supportRightFishbone: state => state.supportRightFishbone + activeSidebar: state => state.activeSidebar }), layoutGroupList() { const groupList = layoutGroupList[this.$i18n.locale] || layoutGroupList.zh return groupList.map(group => { - let list = [...group.list] - if (!this.supportRightFishbone) { - list = list.filter(item => { - return !['rightFishbone', 'rightFishbone2'].includes(item) - }) - } + let list = [...group.list].filter(item => { + return !['rightFishbone', 'rightFishbone2'].includes(item) + }) return { name: group.name, list diff --git a/web/src/pages/Edit/components/Style.vue b/web/src/pages/Edit/components/Style.vue index efb1fc7f..32a80a83 100644 --- a/web/src/pages/Edit/components/Style.vue +++ b/web/src/pages/Edit/components/Style.vue @@ -437,49 +437,6 @@
- -
-
- {{ $t('style.openLineFlow') }} - -
-
- {{ $t('style.direction') }} - - - - -
-
-
-
- {{ $t('style.lineFlowDuration') }} - -
-
{{ $t('style.nodePadding') }}
@@ -623,8 +580,7 @@ export default { computed: { ...mapState({ isDark: state => state.localConfig.isDark, - activeSidebar: state => state.activeSidebar, - supportLineFlow: state => state.supportLineFlow + activeSidebar: state => state.activeSidebar }), fontFamilyList() { return fontFamilyList[this.$i18n.locale] || fontFamilyList.zh diff --git a/web/src/pages/Edit/components/ToolbarNodeBtnList.vue b/web/src/pages/Edit/components/ToolbarNodeBtnList.vue index 41abaa31..03223daf 100644 --- a/web/src/pages/Edit/components/ToolbarNodeBtnList.vue +++ b/web/src/pages/Edit/components/ToolbarNodeBtnList.vue @@ -178,13 +178,6 @@ {{ $t('toolbar.outerFrame') }}
-
import { mapState, mapMutations } from 'vuex' -import NodeAnnotationBtn from './NodeAnnotationBtn.vue' export default { - components: { NodeAnnotationBtn }, props: { dir: { type: String, @@ -231,8 +222,7 @@ export default { }, computed: { ...mapState({ - isDark: state => state.localConfig.isDark, - supportMark: state => state.supportMark + isDark: state => state.localConfig.isDark }), hasRoot() { return ( diff --git a/web/src/store.js b/web/src/store.js index 2924b990..7b746e42 100644 --- a/web/src/store.js +++ b/web/src/store.js @@ -16,10 +16,6 @@ const store = new Vuex.Store({ useLeftKeySelectionRightKeyDrag: false, // 是否显示滚动条 isShowScrollbar: false, - // 是否开启手绘风格 - isUseHandDrawnLikeStyle: false, - // 是否开启动量效果 - isUseMomentum: true, // 是否是暗黑模式 isDark: false, // 是否开启AI功能 @@ -30,17 +26,6 @@ const store = new Vuex.Store({ isReadonly: false, // 是否只读 isSourceCodeEdit: false, // 是否是源码编辑模式 extraTextOnExport: '', // 导出时底部添加的文字 - supportHandDrawnLikeStyle: false, // 是否支持设置手绘风格 - supportMark: false, // 是否支持标记 - supportNumbers: false, // 是否支持编号 - supportFreemind: false, // 是否支持Freemind插件 - supportExcel: false, // 是否支持Excel插件 - supportCheckbox: false, // 是否支持Checkbox插件 - supportLineFlow: false, // 是否支持LineFlow插件 - supportMomentum: false, // 是否支持Momentum插件 - supportRightFishbone: false, // 是否支持RightFishbone插件 - supportNodeLink: false, // 是否支持NodeLink插件 - supportMoreShapes: false, // 是否支持MoreShapes插件 isDragOutlineTreeNode: false, // 当前是否正在拖拽大纲树的节点 aiConfig: { api: 'http://ark.cn-beijing.volces.com/api/v3/chat/completions', @@ -101,61 +86,6 @@ const store = new Vuex.Store({ state.extraTextOnExport = data }, - // 设置是否支持手绘风格 - setSupportHandDrawnLikeStyle(state, data) { - state.supportHandDrawnLikeStyle = data - }, - - // 设置是否支持标记 - setSupportMark(state, data) { - state.supportMark = data - }, - - // 设置是否支持编号 - setSupportNumbers(state, data) { - state.supportNumbers = data - }, - - // 设置是否支持Freemind插件 - setSupportFreemind(state, data) { - state.supportFreemind = data - }, - - // 设置是否支持Excel插件 - setSupportExcel(state, data) { - state.supportExcel = data - }, - - // 设置是否支持Checkbox插件 - setSupportCheckbox(state, data) { - state.supportCheckbox = data - }, - - // 设置是否支持Lineflow插件 - setSupportLineFlow(state, data) { - state.supportLineFlow = data - }, - - // 设置是否支持Momentum插件 - setSupportMomentum(state, data) { - state.supportMomentum = data - }, - - // 设置是否支持RightFishbone插件 - setSupportRightFishbone(state, data) { - state.supportRightFishbone = data - }, - - // 设置是否支持NodeLink插件 - setSupportNodeLink(state, data) { - state.supportNodeLink = data - }, - - // 设置是否支持MoreShapes插件 - setSupportMoreShapes(state, data) { - state.supportMoreShapes = data - }, - // 设置树节点拖拽 setIsDragOutlineTreeNode(state, data) { state.isDragOutlineTreeNode = data