|
@@ -15,70 +15,91 @@ export default function index() {
|
|
|
useModel("mindMapModel");
|
|
|
|
|
|
const handleAddImage = () => {
|
|
|
- insertImage(selectedCell.find(node => node.isNode()));
|
|
|
- }
|
|
|
+ insertImage(selectedCell.find((node) => node.isNode()));
|
|
|
+ };
|
|
|
|
|
|
return (
|
|
|
- <div className="absolute top-8px right-8px bg-white shadow-md rounded-4px flex flex-col p-8px">
|
|
|
- <Tooltip placement="bottom" title="样式">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- icon={<i className="iconfont icon-yangshi" />}
|
|
|
- className={rightToobarActive === "style" ? "active" : ""}
|
|
|
- onClick={() => rightToolbarActive("style")}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
- <Tooltip placement="bottom" title="属性">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- icon={<i className="iconfont icon-shuxing-shouqi" />}
|
|
|
- className={rightToobarActive === "attrs" ? "active" : ""}
|
|
|
- onClick={() => rightToolbarActive("attrs")}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
- <Tooltip placement="bottom" title="结构">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- icon={<ApartmentOutlined />}
|
|
|
- className={rightToobarActive === "structure" ? "active" : ""}
|
|
|
- onClick={() => rightToolbarActive("structure")}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
- <Tooltip placement="bottom" title="风格">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- icon={<StarOutlined />}
|
|
|
- className={rightToobarActive === "theme" ? "active" : ""}
|
|
|
- onClick={() => rightToolbarActive("theme")}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
- <Divider className="my-8px" />
|
|
|
- <Tooltip placement="bottom" title="图标">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- disabled={!selectedCell.length}
|
|
|
- icon={<SmileOutlined />}
|
|
|
- className={rightToobarActive === "icon" ? "active" : ""}
|
|
|
- onClick={() => rightToolbarActive("icon")}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
- <Tooltip placement="bottom" title="图片">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- disabled={!selectedCell.length}
|
|
|
- icon={<FileImageOutlined />}
|
|
|
- onClick={handleAddImage}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
- <Tooltip placement="bottom" title="标签">
|
|
|
- <Button
|
|
|
- type="text"
|
|
|
- disabled={!selectedCell.length}
|
|
|
- icon={<TagOutlined />}
|
|
|
- className={rightToobarActive === "tag" ? "active" : ""}
|
|
|
- onClick={() => rightToolbarActive("tag")}
|
|
|
- />
|
|
|
- </Tooltip>
|
|
|
+ <div className="absolute top-8px right-8px">
|
|
|
+ <div className="bg-white shadow-md m-b-20px rounded-4px flex flex-col p-8px">
|
|
|
+ <Tooltip placement="bottom" title="AI助手">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ icon={<i className="iconfont icon-AIduihua text-[#2984fd]" />}
|
|
|
+ className={rightToobarActive === "ai-chat" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("ai-chat")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip placement="bottom" title="AI创作">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ icon={<i className="iconfont icon-AIchuangzuo text-[#aa6dff]" />}
|
|
|
+ className={rightToobarActive === "ai-creator" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("ai-creator")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div className="bg-white shadow-md rounded-4px flex flex-col p-8px">
|
|
|
+ <Tooltip placement="bottom" title="样式">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ icon={<i className="iconfont icon-fenggeyangshi" />}
|
|
|
+ className={rightToobarActive === "style" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("style")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip placement="bottom" title="属性">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ icon={<i className="iconfont icon-shuxing-shouqi" />}
|
|
|
+ className={rightToobarActive === "attrs" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("attrs")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip placement="bottom" title="结构">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ icon={<ApartmentOutlined />}
|
|
|
+ className={rightToobarActive === "structure" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("structure")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip placement="bottom" title="风格">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ icon={<StarOutlined />}
|
|
|
+ className={rightToobarActive === "theme" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("theme")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Divider className="my-8px" />
|
|
|
+ <Tooltip placement="bottom" title="图标">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ disabled={!selectedCell.length}
|
|
|
+ icon={<SmileOutlined />}
|
|
|
+ className={rightToobarActive === "icon" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("icon")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip placement="bottom" title="图片">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ disabled={!selectedCell.length}
|
|
|
+ icon={<FileImageOutlined />}
|
|
|
+ onClick={handleAddImage}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip placement="bottom" title="标签">
|
|
|
+ <Button
|
|
|
+ type="text"
|
|
|
+ disabled={!selectedCell.length}
|
|
|
+ icon={<TagOutlined />}
|
|
|
+ className={rightToobarActive === "tag" ? "active" : ""}
|
|
|
+ onClick={() => rightToolbarActive("tag")}
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
);
|
|
|
}
|