|
|
|
|
@ -13,7 +13,12 @@ const store = useStore();
|
|
|
|
|
|
|
|
|
|
const { config } = storeToRefs(store);
|
|
|
|
|
|
|
|
|
|
const cateData = ref(null);
|
|
|
|
|
const cateData = computed(() => {
|
|
|
|
|
if(cateRes.value.data){
|
|
|
|
|
return cateRes.value.data
|
|
|
|
|
}
|
|
|
|
|
return []
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const { data: cateRes } = await useMyFetch('/index/getCateList', "GET")
|
|
|
|
|
|
|
|
|
|
@ -55,7 +60,7 @@ const goRoute = (path) => {
|
|
|
|
|
<li class="nav-item">
|
|
|
|
|
<div class="nav-link" data-toggle="dropdown" data-submenu>{{ $t('products') }}</div>
|
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
|
<template v-for="(item, index) in cateRes.data" :key="index">
|
|
|
|
|
<template v-for="(item, index) in cateData" :key="index">
|
|
|
|
|
<div class="dropdown dropright dropdown-submenu" v-if="item.children.length > 0">
|
|
|
|
|
<button class="dropdown-item dropdown-toggle" type="button">{{ item.name }}</button>
|
|
|
|
|
<div class="dropdown-menu">
|
|
|
|
|
|