初版卡片列表模板.

This commit is contained in:
lijiahang
2023-09-29 17:24:25 +08:00
parent 93edcd216a
commit 05af36a578
4 changed files with 175 additions and 38 deletions

View File

@@ -4,19 +4,22 @@
<icon-apps />
</a-breadcrumb-item>
<a-breadcrumb-item v-for="item in items" :key="item">
{{ $t(item) }}
{{ item }}
</a-breadcrumb-item>
</a-breadcrumb>
</template>
<script lang="ts" setup>
import { PropType } from 'vue';
import { useRoute } from 'vue-router';
defineProps({
items: {
type: Array as PropType<string[]>,
default() {
return [];
return useRoute().matched
.map(s => s.meta?.locale)
.filter(Boolean) || [];
},
},
});
@@ -24,7 +27,6 @@
<style scoped lang="less">
.container-breadcrumb {
margin: 16px 0;
:deep(.arco-breadcrumb-item) {
color: rgb(var(--gray-6));