diff --git a/simple-mind-map/src/constants/constant.js b/simple-mind-map/src/constants/constant.js index b4b227d3..cccd5831 100644 --- a/simple-mind-map/src/constants/constant.js +++ b/simple-mind-map/src/constants/constant.js @@ -314,7 +314,8 @@ export const nodeDataNoStylePropList = [ 'associativeLinePoint', 'associativeLineText', 'attachmentUrl', - 'attachmentName' + 'attachmentName', + 'notation' ] // 错误类型 diff --git a/web/src/assets/icon-font/iconfont.css b/web/src/assets/icon-font/iconfont.css index 6065bfef..1ca4efda 100644 --- a/web/src/assets/icon-font/iconfont.css +++ b/web/src/assets/icon-font/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2479351 */ - src: url('iconfont.woff2?t=1713438156457') format('woff2'), - url('iconfont.woff?t=1713438156457') format('woff'), - url('iconfont.ttf?t=1713438156457') format('truetype'); + src: url('iconfont.woff2?t=1718261316837') format('woff2'), + url('iconfont.woff?t=1718261316837') format('woff'), + url('iconfont.ttf?t=1718261316837') format('truetype'); } .iconfont { @@ -13,6 +13,10 @@ -moz-osx-font-smoothing: grayscale; } +.iconhighlight:before { + content: "\e6b8"; +} + .iconyanshibofang:before { content: "\e648"; } diff --git a/web/src/assets/icon-font/iconfont.ttf b/web/src/assets/icon-font/iconfont.ttf index 4c06d739..d9c9585d 100644 Binary files a/web/src/assets/icon-font/iconfont.ttf and b/web/src/assets/icon-font/iconfont.ttf differ diff --git a/web/src/assets/icon-font/iconfont.woff b/web/src/assets/icon-font/iconfont.woff index 398e6416..d5edbe88 100644 Binary files a/web/src/assets/icon-font/iconfont.woff and b/web/src/assets/icon-font/iconfont.woff differ diff --git a/web/src/assets/icon-font/iconfont.woff2 b/web/src/assets/icon-font/iconfont.woff2 index 914e4be5..4301c47b 100644 Binary files a/web/src/assets/icon-font/iconfont.woff2 and b/web/src/assets/icon-font/iconfont.woff2 differ diff --git a/web/src/lang/en_us.js b/web/src/lang/en_us.js index 5fe245fa..51c7339a 100644 --- a/web/src/lang/en_us.js +++ b/web/src/lang/en_us.js @@ -278,8 +278,10 @@ export default { defaultFileName: 'Mind map', creatingTip: 'Creating file', directory: 'Directory', - newFileTip: 'Please export the currently edited file before creating a new one, otherwise the content will be lost', - openFileTip: 'Please export the currently edited file before opening it, otherwise the content will be lost' + newFileTip: + 'Please export the currently edited file before creating a new one, otherwise the content will be lost', + openFileTip: + 'Please export the currently edited file before opening it, otherwise the content will be lost' }, edit: { newFeatureNoticeTitle: 'New feature reminder', @@ -333,7 +335,8 @@ export default { loading: 'Loading, please wait...' }, sourceCodeEdit: { - sourceCodeTip: 'It is not recommended to modify the style in rich text mode because it requires synchronous modification of data and HTML structure.', + sourceCodeTip: + 'It is not recommended to modify the style in rich text mode because it requires synchronous modification of data and HTML structure.', format: 'Format', copy: 'Copy', confirm: 'Complete', @@ -345,5 +348,14 @@ export default { attachment: { deleteAttachment: 'Delete attachment', tip: 'The attachment function is only available on the client side' + }, + annotation: { + mark: 'Mark', + show: 'Show mark', + type: 'Type', + color: 'Color', + lineWidth: 'Line width', + padding: 'Padding', + animate: 'Animate' } } diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index 80ceae02..c5958717 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -327,7 +327,8 @@ export default { loading: '正在加载,请稍后...' }, sourceCodeEdit: { - sourceCodeTip: '富文本模式下不建议修改样式,因为需要同步修改数据及html结构。', + sourceCodeTip: + '富文本模式下不建议修改样式,因为需要同步修改数据及html结构。', format: '格式化', copy: '复制', confirm: '完成', @@ -339,5 +340,14 @@ export default { attachment: { deleteAttachment: '删除附件', tip: '附件功能仅在客户端可用' + }, + annotation: { + mark: '标记', + show: '显示标记', + type: '类型', + color: '颜色', + lineWidth: '线宽', + padding: '内边距', + animate: '开启动画' } } diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index 1e4e0fdf..389d234b 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -72,6 +72,8 @@ import Demonstrate from 'simple-mind-map/src/plugins/Demonstrate.js' // import Cooperate from 'simple-mind-map/src/plugins/Cooperate.js' // 手绘风格插件,该插件为付费插件,详情请查看开发文档 // import HandDrawnLikeStyle from 'simple-mind-map-plugin-handdrawnlikestyle' +// 标记插件,该插件为付费插件,详情请查看开发文档 +// import Notation from 'simple-mind-map-plugin-notation' import OutlineSidebar from './OutlineSidebar' import Style from './Style' import BaseStyle from './BaseStyle' @@ -493,6 +495,13 @@ export default { if (this.openNodeRichText) this.addRichTextPlugin() if (this.isShowScrollbar) this.addScrollbarPlugin() if (this.isUseHandDrawnLikeStyle) this.addHandDrawnLikeStylePlugin() + if (typeof HandDrawnLikeStyle !== 'undefined') { + this.$store.commit('setSupportHandDrawnLikeStyle', true) + } + if (typeof Notation !== 'undefined') { + this.mindMap.addPlugin(Notation) + this.$store.commit('setSupportMark', true) + } this.mindMap.keyCommand.addShortcut('Control+s', () => { this.manualSave() }) diff --git a/web/src/pages/Edit/components/NodeAnnotationBtn.vue b/web/src/pages/Edit/components/NodeAnnotationBtn.vue new file mode 100644 index 00000000..87043f14 --- /dev/null +++ b/web/src/pages/Edit/components/NodeAnnotationBtn.vue @@ -0,0 +1,269 @@ + + + + + diff --git a/web/src/pages/Edit/components/Toolbar.vue b/web/src/pages/Edit/components/Toolbar.vue index 70e2d5bf..4537ddf6 100644 --- a/web/src/pages/Edit/components/Toolbar.vue +++ b/web/src/pages/Edit/components/Toolbar.vue @@ -189,8 +189,9 @@ export default { 'tag', 'summary', 'associativeLine', - 'formula' - // 'attachment' + 'formula', + // 'attachment', + 'annotation' ], horizontalList: [], verticalList: [], diff --git a/web/src/pages/Edit/components/ToolbarNodeBtnList.vue b/web/src/pages/Edit/components/ToolbarNodeBtnList.vue index 70eedb6f..d4652c48 100644 --- a/web/src/pages/Edit/components/ToolbarNodeBtnList.vue +++ b/web/src/pages/Edit/components/ToolbarNodeBtnList.vue @@ -167,14 +167,22 @@ {{ $t('toolbar.attachment') }} + -