|
@@ -688,7 +688,21 @@ function onZoneActivate(index: number, content: string) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-defineExpose({ undo, redo, canUndo, canRedo })
|
|
|
|
|
|
|
+defineExpose({
|
|
|
|
|
+ undo,
|
|
|
|
|
+ redo,
|
|
|
|
|
+ canUndo,
|
|
|
|
|
+ canRedo,
|
|
|
|
|
+ getHistoryState: () => ({
|
|
|
|
|
+ canUndo: history.canUndo,
|
|
|
|
|
+ canRedo: history.canRedo,
|
|
|
|
|
+ }),
|
|
|
|
|
+ applyHistory: (op: EditorOperation) => {
|
|
|
|
|
+ history.execute(op)
|
|
|
|
|
+ canUndo.value = history.canUndo
|
|
|
|
|
+ canRedo.value = history.canRedo
|
|
|
|
|
+ },
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
<template>
|