canvas语言适配
This commit is contained in:
@@ -36,6 +36,8 @@ import { ToolManager } from "./managers/toolManager.js";
|
||||
// import { fabric } from "fabric-with-all";
|
||||
import { uploadImageAndCreateLayer, loadImageUrlToLayer, loadImage } from "./utils/imageHelper.js";
|
||||
// import MinimapPanel from "./components/MinimapPanel.vue";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const {t} = useI18n()
|
||||
const KeyboardShortcutHelp = defineAsyncComponent(
|
||||
() => import("./components/KeyboardShortcutHelp.vue")
|
||||
);
|
||||
@@ -514,7 +516,7 @@ function updateCanvasColor() {
|
||||
}
|
||||
|
||||
async function addLayer() {
|
||||
await layerManager.createLayer("空图层");
|
||||
await layerManager.createLayer(t('Canvas.EmptyLayer'));
|
||||
}
|
||||
async function addTopLayer() {
|
||||
await layerManager.createLayer("空图层", LayerType.EMPTY, {
|
||||
@@ -980,9 +982,9 @@ defineExpose({
|
||||
/>
|
||||
|
||||
<div class="zoom-info">
|
||||
缩放: {{ currentZoom }}%
|
||||
<button class="reset-zoom" @click="resetZoom">重置视图</button>
|
||||
<button class="help-btn" @click="toggleShortcutHelp" title="查看快捷键和触控操作">
|
||||
{{ t('Canvas.Scale') }}: {{ currentZoom }}%
|
||||
<button class="reset-zoom" @click="resetZoom">{{ $t('Canvas.ResetLayer') }}</button>
|
||||
<button class="help-btn" @click="toggleShortcutHelp" :title="$t('Canvas.Help')">
|
||||
?
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user