feat(mindmap): 打开图标/备注/公式侧栏并显示官方触发项
This commit is contained in:
@@ -345,9 +345,7 @@ const MindmapBlockView = ({
|
||||
};
|
||||
|
||||
const handleIcon = () => {
|
||||
const value = createSimplePrompt("请输入内置图标键(示例:priority_1 或 progress_2)", "priority_1");
|
||||
if (!value) return;
|
||||
applyToActiveNodes(mindmap, (node) => mindmap?.execCommand("SET_NODE_ICON", node, [value]));
|
||||
setActiveSidebar("icons");
|
||||
};
|
||||
|
||||
const handleLink = () => {
|
||||
@@ -357,9 +355,7 @@ const MindmapBlockView = ({
|
||||
};
|
||||
|
||||
const handleNote = () => {
|
||||
const note = createSimplePrompt("请输入备注内容");
|
||||
if (!note) return;
|
||||
applyToActiveNodes(mindmap, (node) => mindmap?.execCommand("SET_NODE_NOTE", node, note));
|
||||
setActiveSidebar("note");
|
||||
};
|
||||
|
||||
const handleTag = () => {
|
||||
@@ -370,9 +366,7 @@ const MindmapBlockView = ({
|
||||
};
|
||||
|
||||
const handleFormula = () => {
|
||||
const formula = createSimplePrompt("输入 LaTeX 公式(示例:a^2+b^2=c^2)", "a^2+b^2=c^2");
|
||||
if (!formula) return;
|
||||
mindmap?.execCommand("INSERT_FORMULA", formula, mindmap?.renderer?.activeNodeList ?? []);
|
||||
setActiveSidebar("formula");
|
||||
};
|
||||
|
||||
const handleAttachment = () => {
|
||||
|
||||
Reference in New Issue
Block a user