新增自动触发中文公式编辑/测试、查价运输方式 Tab 分组选择,并完善销售产品字段预览与菜单展示。 Co-authored-by: Cursor <cursoragent@cursor.com>
51 lines
1.0 KiB
Vue
51 lines
1.0 KiB
Vue
<template>
|
|
<a-breadcrumb class="container-breadcrumb">
|
|
<a-breadcrumb-item>
|
|
<icon-apps />
|
|
</a-breadcrumb-item>
|
|
<a-breadcrumb-item v-for="item in items" :key="item">
|
|
{{ formatBreadcrumbLabel(item) }}
|
|
</a-breadcrumb-item>
|
|
</a-breadcrumb>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { PropType } from 'vue';
|
|
import { useI18n } from 'vue-i18n';
|
|
|
|
const { t, te } = useI18n();
|
|
|
|
defineProps({
|
|
items: {
|
|
type: Array as PropType<string[]>,
|
|
default() {
|
|
return [];
|
|
},
|
|
},
|
|
});
|
|
|
|
/** 支持菜单原名、路由 path、或历史 locale key */
|
|
function formatBreadcrumbLabel(item: string) {
|
|
const text = item?.trim() || '';
|
|
if (!text) return '';
|
|
if (text.startsWith('menu.') && te(text)) {
|
|
return t(text);
|
|
}
|
|
return text;
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
.container-breadcrumb {
|
|
margin: 16px 0;
|
|
|
|
:deep(.arco-breadcrumb-item) {
|
|
color: rgb(var(--gray-6));
|
|
|
|
&:last-child {
|
|
color: rgb(var(--gray-8));
|
|
}
|
|
}
|
|
}
|
|
</style>
|