fix: 🐛 Repair part of internationalization Lost dynamics

This commit is contained in:
viarotel 2024-09-08 23:56:28 +08:00
parent 70339b6ff6
commit d18444f28b

View File

@ -29,7 +29,7 @@
@click="handleBreadcrumb(item)" @click="handleBreadcrumb(item)"
> >
<el-button text class="!px-2" :icon="item.icon" :title="item.label"> <el-button text class="!px-2" :icon="item.icon" :title="item.label">
{{ item.label }} {{ $t(item.label) }}
</el-button> </el-button>
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
@ -183,13 +183,13 @@ const tableData = ref([])
const currentPath = ref('sdcard') const currentPath = ref('sdcard')
const presetMap = { const presetMap = ref({
sdcard: { sdcard: {
icon: 'Iphone', icon: 'Iphone',
label: window.t('device.control.file.manager.storage'), label: 'device.control.file.manager.storage',
value: 'sdcard', value: 'sdcard',
}, },
} })
const breadcrumbModel = computed(() => { const breadcrumbModel = computed(() => {
const list = currentPath.value.split('/') const list = currentPath.value.split('/')
@ -197,7 +197,7 @@ const breadcrumbModel = computed(() => {
const value = list.map(item => ({ const value = list.map(item => ({
label: item, label: item,
value: item, value: item,
...(presetMap[item] || {}), ...(presetMap.value[item] || {}),
})) }))
return value return value