From 58390f8f6e32fac5025dafeac8a26894aaba6388 Mon Sep 17 00:00:00 2001 From: ShawnPhang Date: Sat, 18 May 2024 01:54:06 +0800 Subject: [PATCH] fix: history bug --- src/common/hooks/history.ts | 4 ++-- src/components/modules/widgets/wImage/wImage.vue | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/hooks/history.ts b/src/common/hooks/history.ts index 3e7bf06..cfb09cf 100644 --- a/src/common/hooks/history.ts +++ b/src/common/hooks/history.ts @@ -6,7 +6,7 @@ * 差分补丁目前已知的问题是,对于预期以外的影响状态树的修改,现在都会写进历史记录,看起来就像多了一段毫无变化的历史栈一样 * 例如图层的 left 在修改后可能为 12.6262638 但为了输入框中显示友好,在 input 组件中将自动格式化为 12.63,这个逻辑以前不会有问题,现在则不能这么做了 * @LastEditors: ShawnPhang - * @LastEditTime: 2024-04-18 20:54:41 + * @LastEditTime: 2024-05-18 01:51:34 */ import { onMounted } from 'vue' // import WebWorker from '@/utils/plugins/webWorker' @@ -14,7 +14,7 @@ import historyFactory from '@/utils/widgets/diffLayouts' import { useHistoryStore, useWidgetStore } from '@/store' const blackClass: string[] = ['operation-item', 'icon-undo', 'icon-redo'] -const whiteKey: string[] = ['ArrowLeft', 'ArrowDown', 'ArrowRight', 'ArrowUp', 'Backspace'] +const whiteKey: string[] = ['ArrowLeft', 'ArrowDown', 'ArrowRight', 'ArrowUp', 'Backspace', 'Delete'] const historyStore = useHistoryStore() const widgetStore = useWidgetStore() diff --git a/src/components/modules/widgets/wImage/wImage.vue b/src/components/modules/widgets/wImage/wImage.vue index 6845950..cce548a 100644 --- a/src/components/modules/widgets/wImage/wImage.vue +++ b/src/components/modules/widgets/wImage/wImage.vue @@ -36,9 +36,8 @@ // const NAME = 'w-image' import { CSSProperties, StyleValue, computed, nextTick, onBeforeUnmount, onMounted, onUpdated, reactive, ref, watch } from 'vue' -import { getMatrix } from '@/common/methods/handleTransform' +// import { getMatrix } from '@/common/methods/handleTransform' import setting from "./wImageSetting" -import PointImg from '@/utils/plugins/pointImg' // import { useSetupMapGetters } from '@/common/hooks/mapGetters' import { useRoute } from 'vue-router' import { storeToRefs } from 'pinia'