Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/canvas/DesignCanvas/src/api/useCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ export default function () {
setSaved,
clearCanvas,
getPageSchema,
resetCanvasState,
Comment thread
gene9831 marked this conversation as resolved.
resetPageCanvasState,
resetBlockCanvasState,
clearCurrentState,
Expand Down
3 changes: 2 additions & 1 deletion packages/toolbars/redoundo/src/composable/useHistory.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ const push = (schema) => {

const go = (addend, valid) => {
historyState.index = historyState.index + addend
useCanvas().importSchema(string2Schema(list[historyState.index]))
const { pageState, resetCanvasState } = useCanvas()
resetCanvasState({ ...pageState, pageSchema: string2Schema(list[historyState.index]) })

// 不是锁定状态,撤销操作后,传递第二个标识位,将 list 的长度减一,置灰 undoredo 操作按钮
if (typeof valid === 'boolean') {
Expand Down