diff --git a/packages/core/plugin/CenterAlignPlugin.ts b/packages/core/plugin/CenterAlignPlugin.ts index 6a9c575a..91396486 100644 --- a/packages/core/plugin/CenterAlignPlugin.ts +++ b/packages/core/plugin/CenterAlignPlugin.ts @@ -1,8 +1,8 @@ /* * @Author: 秦少卫 * @Date: 2023-06-15 22:49:42 - * @LastEditors: 秦少卫 - * @LastEditTime: 2024-07-09 14:12:41 + * @LastEditors: bigFace2019 599069310@qq.com + * @LastEditTime: 2024-11-03 20:39:43 * @Description: 居中对齐插件 */ @@ -59,7 +59,7 @@ class CenterAlignPlugin implements IPluginTempl { return [ { text: '水平垂直居中', - hotkey: 'Ctrl+V', + hotkey: '', disabled: false, onclick: () => this.position('center'), }, diff --git a/packages/core/plugin/DeleteHotKeyPlugin.ts b/packages/core/plugin/DeleteHotKeyPlugin.ts index 5f298652..e935190f 100644 --- a/packages/core/plugin/DeleteHotKeyPlugin.ts +++ b/packages/core/plugin/DeleteHotKeyPlugin.ts @@ -1,8 +1,8 @@ /* * @Author: 秦少卫 * @Date: 2023-06-20 12:57:35 - * @LastEditors: 秦少卫 - * @LastEditTime: 2024-04-10 17:33:02 + * @LastEditors: bigFace2019 599069310@qq.com + * @LastEditTime: 2024-11-03 20:38:33 * @Description: 删除快捷键 */ @@ -42,7 +42,10 @@ class DeleteHotKeyPlugin implements IPluginTempl { contextMenu() { const activeObject = this.canvas.getActiveObject(); if (activeObject) { - return [null, { text: '删除', hotkey: 'Ctrl+V', disabled: false, onclick: () => this.del() }]; + return [ + null, + { text: '删除', hotkey: 'Backspace', disabled: false, onclick: () => this.del() }, + ]; } } diff --git a/packages/core/plugin/FlipPlugin.ts b/packages/core/plugin/FlipPlugin.ts index faa794b8..2c6d441c 100644 --- a/packages/core/plugin/FlipPlugin.ts +++ b/packages/core/plugin/FlipPlugin.ts @@ -1,6 +1,7 @@ import { fabric } from 'fabric'; import { SelectMode } from '../eventType'; import type { IEditor, IPluginTempl } from '@kuaitu/core'; +import i18n from "@/language"; type IPlugin = Pick; @@ -9,7 +10,6 @@ declare module '@kuaitu/core' { interface IEditor extends IPlugin {} } -const t = (key: string) => key; // import event from '@/utils/event/notifier'; export default class FlipPlugin implements IPluginTempl { @@ -34,12 +34,12 @@ export default class FlipPlugin implements IPluginTempl { hotkey: '❯', subitems: [ { - text: t('flip.x'), + text: i18n.global.t('flip.x'), hotkey: '|', onclick: () => this.flip('X'), }, { - text: t('flip.y'), + text: i18n.global.t('flip.y'), hotkey: '-', onclick: () => this.flip('Y'), }, diff --git a/src/language/zh.json b/src/language/zh.json index a761dda7..628272d3 100644 --- a/src/language/zh.json +++ b/src/language/zh.json @@ -6,6 +6,10 @@ "width": "宽度", "height": "高度" }, + "flip": { + "x": "水平翻转", + "y": "垂直翻转" + }, "attrSeting": { "group": "成组", "unGroup": "拆分组", @@ -254,4 +258,4 @@ }, "mine": "我的", "batch": "批量" -} \ No newline at end of file +}