部件选取多语言

This commit is contained in:
李志鹏
2026-01-26 17:07:06 +08:00
parent 44674b5396
commit 8ff7a31e92
4 changed files with 23 additions and 10 deletions

View File

@@ -20,13 +20,13 @@
<img
src="/src/assets/images/canvas/shubiao-l.png"
/>
<span>Left Click: Add</span>
<span>{{ t("Canvas.LeftClickAdd") }}</span>
</div>
<div>
<img
src="/src/assets/images/canvas/shubiao-r.png"
/>
<span>Right Click: Remove</span>
<span>{{ t("Canvas.RightClickRemove") }}</span>
</div>
</div>
</div>
@@ -65,7 +65,7 @@
</div> -->
<div class="action-btn" @click="onReset">
<svg-icon name="CCut" size="26" />
<span class="btn-text">清空当前点位</span>
<span class="btn-text">{{ $t("Canvas.TheClearlySelectedContent") }}</span>
</div>
</div>
</div>
@@ -77,6 +77,8 @@
import { ref, onMounted, watch } from "vue";
import { useI18n } from "vue-i18n";
import { OperationType } from "../utils/layerHelper";
// 国际化
const { t } = useI18n();
const props = defineProps({
canvas: {
type: Object,
@@ -121,32 +123,30 @@
const toolList = [
{
type: OperationType.PART,
label: "Point Selection",
label: t("Canvas.PointSelection"),
icon: "CPoint",
size: "20",
},
{
type: OperationType.PART_RECTANGLE,
label: "Marquee Selection",
label: t("Canvas.MarqueeSelection"),
icon: "CMarquee",
size: "20",
},
{
type: OperationType.PART_BRUSH,
label: "Brush Selection",
label: t("Canvas.BrushSelection"),
icon: "CBrush2",
size: "16",
},
{
type: OperationType.PART_ERASER,
label: "Erase",
label: t("Canvas.Erase"),
icon: "CEraser2",
size: "22",
},
];
// 国际化
const { t } = useI18n();
onMounted(() => {});