@@ -62,6 +62,7 @@ export type Board = {
setImage(url: string): void
getStore(): Promise<BoardData>
calcTableShape(data: string[][]): Promise<TableShapeData>
+ initHistory(): void;
setDefaultTable(bottomData: TableShapeData['content'] | null, topData: setDefaultTable['content'] | null)
export(): Promise<Blob>
destroy(): void
@@ -125,6 +125,9 @@ export const create = (store, canvas) => {
layer.uiControl.initTopTable(rtTable)
}
},
+ initHistory() {
+ history.init()
+ },
readyAddShape(shapeType, onFine) {
layer.uiControl.selectUI = shapeType
layer.uiControl.updateEventNameForSelectUI()
@@ -248,8 +248,10 @@ export const EShape = ({ board }: EShapeProps) => {
["绘图时间", ""]
]).then(data => {
board.setDefaultTable(data.content, null)
+ board.initHistory()
})
-
+ } else {
}, [user, board, path?.id])
@@ -1,4 +1,3 @@
-import { ArrowLeftOutlined } from "@ant-design/icons"
import { Button, Form, Input, Popover } from "antd"
import { useNavigate, fillRoutePath, RoutePath, usePathData } from "router"
import { saveAs } from 'utils'