部件选取多语言
This commit is contained in:
@@ -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(() => {});
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ export class PartManager {
|
||||
}
|
||||
// 如果从选区工具切换到非选区工具,清理事件和选区
|
||||
else if (wasActive && !this.isActive) {
|
||||
this.selectionManager.clearSelection();
|
||||
this.cleanupEvents();
|
||||
this.clearPartObject();
|
||||
this.clearPointData();
|
||||
@@ -618,7 +619,7 @@ export class PartManager {
|
||||
selectionManager: this.selectionManager,
|
||||
toolManager: this.toolManager,
|
||||
})
|
||||
this.commandManager.execute(cmd);
|
||||
this.commandManager.execute(cmd)
|
||||
}
|
||||
/** 清空点位 */
|
||||
clearPart() {
|
||||
|
||||
@@ -1503,6 +1503,12 @@ export default {
|
||||
CompositeLuminosity: '亮度',
|
||||
CompositeLuminosityTip: '亮度:保留原图像颜色,改变新图像亮度',
|
||||
GarmentPartSelector: '服装部件选取',
|
||||
LeftClickAdd: '左键添加',
|
||||
RightClickRemove: '右键移除',
|
||||
PointSelection: '点选',
|
||||
MarqueeSelection: '框选',
|
||||
BrushSelection: '画笔',
|
||||
Erase: '擦除',
|
||||
},
|
||||
speedList: {
|
||||
High: '高级',
|
||||
|
||||
@@ -1554,6 +1554,12 @@ export default {
|
||||
CompositeLuminosityTip:
|
||||
'Luminosity: Preserve the original image color and change the luminosity of the new image',
|
||||
GarmentPartSelector: 'Garment Part Selector',
|
||||
LeftClickAdd: 'Left Click: Add',
|
||||
RightClickRemove: 'Right Click: Remove',
|
||||
PointSelection: 'Point Selection',
|
||||
MarqueeSelection: 'Marquee Selection',
|
||||
BrushSelection: 'Brush Selection',
|
||||
Erase: 'Erase',
|
||||
},
|
||||
speedList: {
|
||||
High: 'High',
|
||||
|
||||
Reference in New Issue
Block a user