canvas语言适配
This commit is contained in:
@@ -62,7 +62,8 @@ import { fabric } from "fabric-with-all";
|
||||
import { getOriginObjectInfo } from "../utils/layerUtils";
|
||||
import { restoreFabricObject } from "../utils/objectHelper";
|
||||
import { UpdateGroupMaskPositionCommand } from "../commands/UpdateGroupMaskPositionCommand";
|
||||
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const {t} = useI18n()
|
||||
/**
|
||||
* 图层管理器 - 负责管理画布上的所有图层
|
||||
* 包含图层的创建、删除、修改、排序等操作
|
||||
@@ -579,7 +580,7 @@ export class LayerManager {
|
||||
this.createFixedLayer();
|
||||
|
||||
// 创建一个空白图层(默认位于背景图层和固定图层之上)
|
||||
await this.createLayer("图层 1");
|
||||
await this.createLayer(t('Canvas.Layer1'));
|
||||
} else {
|
||||
// 检查是否已有背景层
|
||||
const hasBackgroundLayer = this.layers.value.some((layer) => layer.isBackground);
|
||||
@@ -601,7 +602,7 @@ export class LayerManager {
|
||||
);
|
||||
|
||||
if (!hasNormalLayer) {
|
||||
await this.createLayer("图层 1");
|
||||
await this.createLayer(t('Canvas.Layer1'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user