refactor: 将各个页面的面包屑导航提取为单独组件AppBreadcrumb
This commit is contained in:
@ -2,18 +2,7 @@
|
||||
<div class="page-container">
|
||||
<div class="page-header">
|
||||
<h1 class="page-title">{{ $t('learn-our-solutions') }}</h1>
|
||||
<el-breadcrumb class="breadcrumb">
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/')">{{
|
||||
$t('navigation.home')
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
<el-breadcrumb-item class="text-md opacity-50">
|
||||
<NuxtLink :to="$localePath('/solutions')">{{
|
||||
$t('navigation.solutions')
|
||||
}}</NuxtLink>
|
||||
</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
<app-breadcrumb class="breadcrumb" :items="breadcrumbItems" />
|
||||
</div>
|
||||
<div v-if="!pending" class="solutions-container">
|
||||
<el-tabs v-model="activeName" class="solutions-tabs">
|
||||
@ -55,8 +44,14 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
const localePath = useLocalePath();
|
||||
const { getImageUrl } = useDirectusImage();
|
||||
|
||||
const breadcrumbItems = [
|
||||
{ label: $t('navigation.home'), to: localePath('/') },
|
||||
{ label: $t('navigation.solutions') },
|
||||
];
|
||||
|
||||
const { data, pending, error } = await useSolutionList();
|
||||
|
||||
const solutionsRaw = computed(() => data.value ?? []);
|
||||
@ -66,8 +61,6 @@
|
||||
|
||||
const activeName = ref<string>('all');
|
||||
|
||||
console.log('Processed Data', solutions.value);
|
||||
|
||||
// 按类型分组
|
||||
const groupedSolutions = computed(() => {
|
||||
const gourps: Record<string, SolutionListView[]> = {};
|
||||
|
||||
Reference in New Issue
Block a user