修复画布多语言

This commit is contained in:
李志鹏
2025-09-24 16:26:40 +08:00
parent bdb3c50650
commit 016b25fcb9
12 changed files with 98 additions and 32 deletions

View File

@@ -1,6 +1,8 @@
import { generateId, optimizeCanvasRendering } from "../utils/helper";
import { createLayer, LayerType, OperationType } from "../utils/layerHelper";
import { Command } from "./Command";
import i18n from "@/lang/index.ts";
const { t } = i18n.global;
/**
* 文本内容命令
@@ -329,7 +331,7 @@ export class CreateTextCommand extends Command {
// 默认文本属性
this.defaultOptions = {
text: "双击编辑文本",
text: t('Canvas.DoubleClickText'),
fontFamily: "Arial",
fontSize: 24,
fontWeight: "normal",