add:基本实现撤销、恢复功能
This commit is contained in:
@ -5,12 +5,12 @@
|
||||
<div class="web">pc</div>
|
||||
<div class="btn">
|
||||
<a-space>
|
||||
<a-button @click="">
|
||||
<a-button :disabled="!store.canUndo" @click="store.undo">
|
||||
<template #icon>
|
||||
<icon-left />
|
||||
</template>
|
||||
</a-button>
|
||||
<a-button @click="">
|
||||
<a-button :disabled="!store.canRedo" @click="store.redo">
|
||||
<template #icon>
|
||||
<icon-right />
|
||||
</template>
|
||||
@ -112,7 +112,7 @@ store.$onAction(
|
||||
onError, // action 抛出或拒绝的钩子
|
||||
}) => {
|
||||
after((result) => {
|
||||
console.log(`store action-${name}回调后:` + result);
|
||||
// console.log(`store action-${name}回调后:` + result);
|
||||
})
|
||||
// 如果 action 抛出或返回一个拒绝的 promise,这将触发
|
||||
onError((error) => {
|
||||
|
||||
Reference in New Issue
Block a user