diff --git a/simple-mind-map/package-lock.json b/simple-mind-map/package-lock.json index 4e66c5eba..393799eef 100644 --- a/simple-mind-map/package-lock.json +++ b/simple-mind-map/package-lock.json @@ -1,11 +1,12 @@ { "name": "simple-mind-map", - "version": "0.14.0", + "version": "0.14.0-fix.2", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.14.0", + "name": "simple-mind-map", + "version": "0.14.0-fix.2", "license": "MIT", "dependencies": { "@svgdotjs/svg.js": "3.2.0", diff --git a/simple-mind-map/src/theme/darkTheme.js b/simple-mind-map/src/theme/darkTheme.js new file mode 100644 index 000000000..effe7182d --- /dev/null +++ b/simple-mind-map/src/theme/darkTheme.js @@ -0,0 +1,143 @@ +// 深色主题 +export default { + paddingX: 15, + paddingY: 5, + imgMaxWidth: 200, + imgMaxHeight: 100, + iconSize: 20, + lineWidth: 1, + lineColor: '#6366f1', + lineDasharray: 'none', + lineFlow: false, + lineFlowDuration: 1, + lineFlowForward: true, + lineStyle: 'straight', + rootLineKeepSameInCurve: true, + rootLineStartPositionKeepSameInCurve: false, + lineRadius: 5, + showLineMarker: false, + generalizationLineWidth: 1, + generalizationLineColor: '#6366f1', + generalizationLineMargin: 0, + generalizationNodeMargin: 20, + associativeLineWidth: 2, + associativeLineColor: '#a5b4fc', + associativeLineActiveWidth: 8, + associativeLineActiveColor: 'rgba(99, 102, 241, 1)', + associativeLineDasharray: '6,4', + associativeLineTextColor: '#a5b4fc', + associativeLineTextFontSize: 14, + associativeLineTextLineHeight: 1.2, + associativeLineTextFontFamily: 'Segoe UI, sans-serif', + backgroundColor: '#1e1e2e', + backgroundImage: 'none', + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center center', + backgroundSize: 'cover', + nodeUseLineStyle: false, + root: { + shape: 'rectangle', + fillColor: '#313244', + fontFamily: 'Segoe UI, sans-serif', + color: '#cdd6f4', + fontSize: 18, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#6366f1', + borderWidth: 2, + borderDasharray: 'none', + borderRadius: 8, + textDecoration: 'none', + gradientStyle: true, + startColor: '#313244', + endColor: '#45475a', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#6366f1', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + second: { + shape: 'rectangle', + marginX: 100, + marginY: 40, + fillColor: '#45475a', + fontFamily: 'Segoe UI, sans-serif', + color: '#bac2de', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#89b4fa', + borderWidth: 1, + borderDasharray: 'none', + borderRadius: 6, + textDecoration: 'none', + gradientStyle: false, + startColor: '#45475a', + endColor: '#585b70', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#89b4fa', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + node: { + shape: 'rectangle', + marginX: 50, + marginY: 0, + fillColor: '#585b70', + fontFamily: 'Segoe UI, sans-serif', + color: '#a6adc8', + fontSize: 14, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#b4befe', + borderWidth: 0, + borderRadius: 4, + borderDasharray: 'none', + textDecoration: 'none', + gradientStyle: false, + startColor: '#585b70', + endColor: '#6c7086', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#b4befe', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + generalization: { + shape: 'rectangle', + marginX: 100, + marginY: 40, + fillColor: '#45475a', + fontFamily: 'Segoe UI, sans-serif', + color: '#bac2de', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#89b4fa', + borderWidth: 1, + borderDasharray: 'none', + borderRadius: 6, + textDecoration: 'none', + gradientStyle: false, + startColor: '#45475a', + endColor: '#585b70', + startDir: [0, 0], + endDir: [1, 0], + hoverRectColor: '#89b4fa', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + } +} diff --git a/simple-mind-map/src/theme/handDrawn.js b/simple-mind-map/src/theme/handDrawn.js new file mode 100644 index 000000000..63cae9073 --- /dev/null +++ b/simple-mind-map/src/theme/handDrawn.js @@ -0,0 +1,143 @@ +// 手绘风主题 +export default { + paddingX: 20, + paddingY: 10, + imgMaxWidth: 200, + imgMaxHeight: 100, + iconSize: 20, + lineWidth: 3, + lineColor: '#8B4513', + lineDasharray: '8,3', + lineFlow: false, + lineFlowDuration: 1, + lineFlowForward: true, + lineStyle: 'curve', + rootLineKeepSameInCurve: true, + rootLineStartPositionKeepSameInCurve: false, + lineRadius: 10, + showLineMarker: false, + generalizationLineWidth: 3, + generalizationLineColor: '#8B4513', + generalizationLineMargin: 0, + generalizationNodeMargin: 20, + associativeLineWidth: 2, + associativeLineColor: '#A0522D', + associativeLineActiveWidth: 8, + associativeLineActiveColor: 'rgba(160, 82, 45, 1)', + associativeLineDasharray: '6,4', + associativeLineTextColor: '#8B4513', + associativeLineTextFontSize: 14, + associativeLineTextLineHeight: 1.2, + associativeLineTextFontFamily: 'Comic Sans MS, cursive', + backgroundColor: '#FFF8DC', + backgroundImage: 'none', + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center center', + backgroundSize: 'cover', + nodeUseLineStyle: false, + root: { + shape: 'rectangle', + fillColor: '#FFE4C4', + fontFamily: 'Comic Sans MS, cursive', + color: '#8B4513', + fontSize: 20, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#DEB887', + borderWidth: 3, + borderDasharray: 'none', + borderRadius: 15, + textDecoration: 'none', + gradientStyle: false, + startColor: '#FFE4C4', + endColor: '#FFDAB9', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#DEB887', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + second: { + shape: 'rectangle', + marginX: 100, + marginY: 50, + fillColor: '#FFFACD', + fontFamily: 'Comic Sans MS, cursive', + color: '#A0522D', + fontSize: 18, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#DEB887', + borderWidth: 2, + borderDasharray: 'none', + borderRadius: 12, + textDecoration: 'none', + gradientStyle: false, + startColor: '#FFFACD', + endColor: '#FFE4B5', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#DEB887', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + node: { + shape: 'rectangle', + marginX: 50, + marginY: 0, + fillColor: '#FFFAF0', + fontFamily: 'Comic Sans MS, cursive', + color: '#CD853F', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#DEB887', + borderWidth: 2, + borderRadius: 10, + borderDasharray: 'none', + textDecoration: 'none', + gradientStyle: false, + startColor: '#FFFAF0', + endColor: '#FFF5EE', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#DEB887', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + generalization: { + shape: 'rectangle', + marginX: 100, + marginY: 50, + fillColor: '#FFE4C4', + fontFamily: 'Comic Sans MS, cursive', + color: '#A0522D', + fontSize: 18, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#DEB887', + borderWidth: 2, + borderDasharray: 'none', + borderRadius: 12, + textDecoration: 'none', + gradientStyle: false, + startColor: '#FFE4C4', + endColor: '#FFDAB9', + startDir: [0, 0], + endDir: [1, 0], + hoverRectColor: '#DEB887', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + } +} diff --git a/simple-mind-map/src/theme/index.js b/simple-mind-map/src/theme/index.js index b958df579..07e612287 100644 --- a/simple-mind-map/src/theme/index.js +++ b/simple-mind-map/src/theme/index.js @@ -1,5 +1,15 @@ import defaultTheme from './default' +import minimalist from './minimalist' +import tech from './tech' +import handDrawn from './handDrawn' +import darkTheme from './darkTheme' +import rainbow from './rainbow' export default { - default: defaultTheme + default: defaultTheme, + minimalist, + tech, + handDrawn, + darkTheme, + rainbow } diff --git a/simple-mind-map/src/theme/minimalist.js b/simple-mind-map/src/theme/minimalist.js new file mode 100644 index 000000000..a7d208c95 --- /dev/null +++ b/simple-mind-map/src/theme/minimalist.js @@ -0,0 +1,143 @@ +// 简约风主题 +export default { + paddingX: 15, + paddingY: 5, + imgMaxWidth: 200, + imgMaxHeight: 100, + iconSize: 20, + lineWidth: 1, + lineColor: '#9ca3af', + lineDasharray: 'none', + lineFlow: false, + lineFlowDuration: 1, + lineFlowForward: true, + lineStyle: 'straight', + rootLineKeepSameInCurve: true, + rootLineStartPositionKeepSameInCurve: false, + lineRadius: 5, + showLineMarker: false, + generalizationLineWidth: 1, + generalizationLineColor: '#9ca3af', + generalizationLineMargin: 0, + generalizationNodeMargin: 20, + associativeLineWidth: 2, + associativeLineColor: '#6b7280', + associativeLineActiveWidth: 8, + associativeLineActiveColor: 'rgba(107, 114, 128, 1)', + associativeLineDasharray: '6,4', + associativeLineTextColor: '#6b7280', + associativeLineTextFontSize: 14, + associativeLineTextLineHeight: 1.2, + associativeLineTextFontFamily: 'Arial, sans-serif', + backgroundColor: '#ffffff', + backgroundImage: 'none', + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center center', + backgroundSize: 'cover', + nodeUseLineStyle: true, + root: { + shape: 'rectangle', + fillColor: '#f3f4f6', + fontFamily: 'Arial, sans-serif', + color: '#1f2937', + fontSize: 18, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#d1d5db', + borderWidth: 1, + borderDasharray: 'none', + borderRadius: 4, + textDecoration: 'none', + gradientStyle: false, + startColor: '#f3f4f6', + endColor: '#e5e7eb', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + second: { + shape: 'rectangle', + marginX: 100, + marginY: 40, + fillColor: 'transparent', + fontFamily: 'Arial, sans-serif', + color: '#374151', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: 'transparent', + borderWidth: 0, + borderDasharray: 'none', + borderRadius: 4, + textDecoration: 'none', + gradientStyle: false, + startColor: '#f3f4f6', + endColor: '#e5e7eb', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + node: { + shape: 'rectangle', + marginX: 50, + marginY: 0, + fillColor: 'transparent', + fontFamily: 'Arial, sans-serif', + color: '#6b7280', + fontSize: 14, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: 'transparent', + borderWidth: 0, + borderRadius: 4, + borderDasharray: 'none', + textDecoration: 'none', + gradientStyle: false, + startColor: '#f3f4f6', + endColor: '#e5e7eb', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + generalization: { + shape: 'rectangle', + marginX: 100, + marginY: 40, + fillColor: '#f9fafb', + fontFamily: 'Arial, sans-serif', + color: '#4b5563', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#e5e7eb', + borderWidth: 1, + borderDasharray: 'none', + borderRadius: 4, + textDecoration: 'none', + gradientStyle: false, + startColor: '#f3f4f6', + endColor: '#e5e7eb', + startDir: [0, 0], + endDir: [1, 0], + hoverRectColor: '', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + } +} diff --git a/simple-mind-map/src/theme/rainbow.js b/simple-mind-map/src/theme/rainbow.js new file mode 100644 index 000000000..60bd38cb3 --- /dev/null +++ b/simple-mind-map/src/theme/rainbow.js @@ -0,0 +1,143 @@ +// 彩虹主题 +export default { + paddingX: 15, + paddingY: 5, + imgMaxWidth: 200, + imgMaxHeight: 100, + iconSize: 20, + lineWidth: 2, + lineColor: '#ec4899', + lineDasharray: 'none', + lineFlow: false, + lineFlowDuration: 1, + lineFlowForward: true, + lineStyle: 'curve', + rootLineKeepSameInCurve: true, + rootLineStartPositionKeepSameInCurve: false, + lineRadius: 10, + showLineMarker: false, + generalizationLineWidth: 2, + generalizationLineColor: '#f472b6', + generalizationLineMargin: 0, + generalizationNodeMargin: 20, + associativeLineWidth: 2, + associativeLineColor: '#a855f7', + associativeLineActiveWidth: 8, + associativeLineActiveColor: 'rgba(168, 85, 247, 1)', + associativeLineDasharray: '8,4', + associativeLineTextColor: '#7c3aed', + associativeLineTextFontSize: 14, + associativeLineTextLineHeight: 1.2, + associativeLineTextFontFamily: 'Arial, sans-serif', + backgroundColor: '#fdf4ff', + backgroundImage: 'none', + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center center', + backgroundSize: 'cover', + nodeUseLineStyle: false, + root: { + shape: 'rectangle', + fillColor: '#ef4444', + fontFamily: 'Arial, sans-serif', + color: '#ffffff', + fontSize: 20, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#dc2626', + borderWidth: 0, + borderDasharray: 'none', + borderRadius: 12, + textDecoration: 'none', + gradientStyle: false, + startColor: '#ef4444', + endColor: '#dc2626', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#fca5a5', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + second: { + shape: 'rectangle', + marginX: 100, + marginY: 50, + fillColor: '#f97316', + fontFamily: 'Arial, sans-serif', + color: '#ffffff', + fontSize: 18, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#ea580c', + borderWidth: 0, + borderDasharray: 'none', + borderRadius: 10, + textDecoration: 'none', + gradientStyle: false, + startColor: '#f97316', + endColor: '#ea580c', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#fdba74', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + node: { + shape: 'rectangle', + marginX: 50, + marginY: 0, + fillColor: '#22c55e', + fontFamily: 'Arial, sans-serif', + color: '#ffffff', + fontSize: 16, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#16a34a', + borderWidth: 0, + borderRadius: 8, + borderDasharray: 'none', + textDecoration: 'none', + gradientStyle: false, + startColor: '#22c55e', + endColor: '#16a34a', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#86efac', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + generalization: { + shape: 'rectangle', + marginX: 100, + marginY: 50, + fillColor: '#8b5cf6', + fontFamily: 'Arial, sans-serif', + color: '#ffffff', + fontSize: 18, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#7c3aed', + borderWidth: 0, + borderDasharray: 'none', + borderRadius: 10, + textDecoration: 'none', + gradientStyle: false, + startColor: '#8b5cf6', + endColor: '#7c3aed', + startDir: [0, 0], + endDir: [1, 0], + hoverRectColor: '#c4b5fd', + hoverRectRadius: 10, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + } +} diff --git a/simple-mind-map/src/theme/tech.js b/simple-mind-map/src/theme/tech.js new file mode 100644 index 000000000..d3df20f3e --- /dev/null +++ b/simple-mind-map/src/theme/tech.js @@ -0,0 +1,143 @@ +// 科技风主题 +export default { + paddingX: 20, + paddingY: 8, + imgMaxWidth: 200, + imgMaxHeight: 100, + iconSize: 20, + lineWidth: 2, + lineColor: '#00ffff', + lineDasharray: 'none', + lineFlow: false, + lineFlowDuration: 1, + lineFlowForward: true, + lineStyle: 'curve', + rootLineKeepSameInCurve: true, + rootLineStartPositionKeepSameInCurve: false, + lineRadius: 5, + showLineMarker: false, + generalizationLineWidth: 2, + generalizationLineColor: '#00ffff', + generalizationLineMargin: 0, + generalizationNodeMargin: 20, + associativeLineWidth: 2, + associativeLineColor: '#00d4ff', + associativeLineActiveWidth: 8, + associativeLineActiveColor: 'rgba(0, 212, 255, 1)', + associativeLineDasharray: '10,5', + associativeLineTextColor: '#00ffff', + associativeLineTextFontSize: 14, + associativeLineTextLineHeight: 1.2, + associativeLineTextFontFamily: 'Consolas, monospace', + backgroundColor: '#0a0a1a', + backgroundImage: 'none', + backgroundRepeat: 'no-repeat', + backgroundPosition: 'center center', + backgroundSize: 'cover', + nodeUseLineStyle: false, + root: { + shape: 'rectangle', + fillColor: '#1a1a2e', + fontFamily: 'Consolas, monospace', + color: '#00ffff', + fontSize: 18, + fontWeight: 'bold', + fontStyle: 'normal', + borderColor: '#00ffff', + borderWidth: 2, + borderDasharray: 'none', + borderRadius: 8, + textDecoration: 'none', + gradientStyle: true, + startColor: '#1a1a2e', + endColor: '#16213e', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#00ffff', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + second: { + shape: 'rectangle', + marginX: 100, + marginY: 40, + fillColor: '#0f0f1e', + fontFamily: 'Consolas, monospace', + color: '#00d4ff', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#00d4ff', + borderWidth: 1, + borderDasharray: 'none', + borderRadius: 6, + textDecoration: 'none', + gradientStyle: true, + startColor: '#0f0f1e', + endColor: '#1a1a2e', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#00d4ff', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + node: { + shape: 'rectangle', + marginX: 50, + marginY: 0, + fillColor: '#0a0a1a', + fontFamily: 'Consolas, monospace', + color: '#88ffff', + fontSize: 14, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#00ffff', + borderWidth: 1, + borderRadius: 4, + borderDasharray: 'none', + textDecoration: 'none', + gradientStyle: false, + startColor: '#0a0a1a', + endColor: '#0f0f1e', + startDir: [0, 0], + endDir: [1, 0], + lineMarkerDir: 'end', + hoverRectColor: '#00ffff', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + }, + generalization: { + shape: 'rectangle', + marginX: 100, + marginY: 40, + fillColor: '#1a1a2e', + fontFamily: 'Consolas, monospace', + color: '#00d4ff', + fontSize: 16, + fontWeight: 'normal', + fontStyle: 'normal', + borderColor: '#00ffff', + borderWidth: 1, + borderDasharray: 'none', + borderRadius: 6, + textDecoration: 'none', + gradientStyle: true, + startColor: '#1a1a2e', + endColor: '#16213e', + startDir: [0, 0], + endDir: [1, 0], + hoverRectColor: '#00ffff', + hoverRectRadius: 5, + textAlign: 'left', + imgPlacement: 'top', + tagPlacement: 'right' + } +} diff --git a/web/src/config/zh.js b/web/src/config/zh.js index 801afaf7c..b90c43d5d 100644 --- a/web/src/config/zh.js +++ b/web/src/config/zh.js @@ -531,6 +531,11 @@ export const sidebarTriggerList = [ value: 'theme', icon: 'iconjingzi' }, + { + name: '主题编辑器', + value: 'themeEditor', + icon: 'iconbianji' + }, { name: '结构', value: 'structure', diff --git a/web/src/lang/zh_cn.js b/web/src/lang/zh_cn.js index 3de670013..626961f89 100644 --- a/web/src/lang/zh_cn.js +++ b/web/src/lang/zh_cn.js @@ -300,7 +300,78 @@ export default { coverTip: '你当前自定义过基础样式,是否覆盖?', tip: '提示', cover: '覆盖', - reserve: '保留' + reserve: '保留', + editor: '主题编辑器', + editorTitle: '自定义主题', + exportTheme: '导出主题', + importTheme: '导入主题', + saveTheme: '保存主题', + resetTheme: '重置主题', + background: '背景', + backgroundColor: '背景颜色', + backgroundImage: '背景图片', + backgroundRepeat: '背景重复', + backgroundPosition: '背景位置', + backgroundSize: '背景大小', + line: '连线', + lineColor: '连线颜色', + lineWidth: '连线粗细', + lineStyle: '连线风格', + lineDasharray: '连线样式', + lineRadius: '连线圆角', + showLineMarker: '显示箭头', + node: '节点', + rootNode: '根节点', + secondNode: '二级节点', + generalNode: '普通节点', + generalizationNode: '概要节点', + nodeShape: '节点形状', + fillColor: '填充颜色', + fontFamily: '字体', + fontSize: '字号', + fontWeight: '字重', + fontStyle: '字体样式', + textColor: '文字颜色', + borderColor: '边框颜色', + borderWidth: '边框粗细', + borderRadius: '圆角大小', + textDecoration: '文字装饰', + gradientStyle: '渐变样式', + startColor: '渐变起始色', + endColor: '渐变结束色', + associativeLine: '关联线', + associativeLineWidth: '关联线粗细', + associativeLineColor: '关联线颜色', + associativeLineActiveWidth: '激活粗细', + associativeLineActiveColor: '激活颜色', + associativeLineStyle: '关联线样式', + associativeLineText: '关联线文字', + associativeLineTextColor: '文字颜色', + associativeLineTextFontSize: '文字大小', + associativeLineTextFontFamily: '文字字体', + generalizationLine: '概要连线', + generalizationLineWidth: '概要连线粗细', + generalizationLineColor: '概要连线颜色', + themeName: '主题名称', + themeNamePlaceholder: '请输入主题名称', + exportSuccess: '导出成功', + importSuccess: '导入成功', + importFailed: '导入失败', + fileFormatError: '文件格式错误', + selectFile: '选择文件', + preview: '预览', + nodeUseLineStyle: '仅底边框样式', + lineFlow: '流动效果', + lineFlowDuration: '流动周期', + lineFlowForward: '流动方向', + forward: '正向', + reverse: '反向', + themeMarket: '主题市场', + minimalist: '简约风', + tech: '科技风', + handDrawn: '手绘风', + darkTheme: '深色主题', + rainbow: '彩虹主题' }, toolbar: { undo: '回退', diff --git a/web/src/pages/Edit/components/Edit.vue b/web/src/pages/Edit/components/Edit.vue index 626b786df..1a5a4042b 100644 --- a/web/src/pages/Edit/components/Edit.vue +++ b/web/src/pages/Edit/components/Edit.vue @@ -26,6 +26,7 @@ :mindMap="mindMap" > + @@ -126,6 +127,7 @@ import NodeImgPlacementToolbar from './NodeImgPlacementToolbar.vue' import NodeNoteSidebar from './NodeNoteSidebar.vue' import AiCreate from './AiCreate.vue' import AiChat from './AiChat.vue' +import ThemeEditor from './ThemeEditor.vue' // 注册插件 MindMap.usePlugin(MiniMap) @@ -185,7 +187,8 @@ export default { NodeImgPlacementToolbar, NodeNoteSidebar, AiCreate, - AiChat + AiChat, + ThemeEditor }, data() { return { diff --git a/web/src/pages/Edit/components/ThemeEditor.vue b/web/src/pages/Edit/components/ThemeEditor.vue new file mode 100644 index 000000000..feebd5462 --- /dev/null +++ b/web/src/pages/Edit/components/ThemeEditor.vue @@ -0,0 +1,1594 @@ + + + + + diff --git a/web/vue.config.js b/web/vue.config.js index cd7b6cca6..8cda49f3a 100644 --- a/web/vue.config.js +++ b/web/vue.config.js @@ -35,7 +35,8 @@ module.exports = { configureWebpack: { resolve: { alias: { - '@': path.resolve(__dirname, './src/') + '@': path.resolve(__dirname, './src/'), + 'simple-mind-map': path.resolve(__dirname, '../simple-mind-map') } } },