深度画布多语言

This commit is contained in:
lzp
2026-03-26 13:34:52 +08:00
parent dd22e97985
commit 2b34e45b2d
10 changed files with 131 additions and 41 deletions

View File

@@ -30,7 +30,7 @@
</template>
<button class="export" @click="emit('export')">
<span class="icon"><svg-icon name="export" size="12" /></span>
<span class="text">Export</span>
<span class="text">{{ $t('DepthCanvas.export') }}</span>
</button>
<!-- <button class="export" @click="emit('export-local')">
<span class="text">保存本地</span>
@@ -40,7 +40,7 @@
</button> -->
<button class="workbench" @click="onWorkbench">
<span class="icon"><svg-icon name="dc-workbench" size="20" /></span>
<span class="text">Workbench</span>
<span class="text">{{ $t('DepthCanvas.save') }}</span>
</button>
</div>
</template>
@@ -49,6 +49,8 @@
import { ref, inject, computed } from 'vue'
import { exportCanvasToImage } from '../tools/exportMethod'
import { OperationType, BlendMode } from '../tools/layerHelper'
import { useI18n } from 'vue-i18n'
const { t } = useI18n()
const props = defineProps({
zoom: { default: 1, type: Number },
step: { default: 0.1, type: Number }
@@ -86,37 +88,37 @@
child: [
{
name: OperationType.RECTANGLE,
label: 'Rectangle',
label: t('DepthCanvas.rectangle'),
icon: 'dc-rectangle',
iconSize: 13
},
{
name: OperationType.LINE,
label: 'Line',
label: t('DepthCanvas.line'),
icon: 'dc-line',
iconSize: 10
},
{
name: OperationType.ARROW,
label: 'Arrow',
label: t('DepthCanvas.arrow'),
icon: 'dc-arrow',
iconSize: 11
},
{
name: OperationType.ELLIPSE,
label: 'Ellipse',
label: t('DepthCanvas.ellipse'),
icon: 'dc-ellipse',
iconSize: 15
},
{
name: OperationType.TRIANGLE,
label: 'Polygon',
label: t('DepthCanvas.triangle'),
icon: 'dc-triangle',
iconSize: 14
},
{
name: OperationType.STAR,
label: 'Star',
label: t('DepthCanvas.star'),
icon: 'dc-star',
iconSize: 15
}