fix shop
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
<p class="text-lg xl:text-2xl font-extrabold text-black dark:text-white">
|
||||
{{ mainCategoryName }}
|
||||
</p>
|
||||
<span :class="['flex items-center justify-center',isOpen && 'rotate-180', 'transition-all']"><i
|
||||
<span :class="['flex items-center justify-center', isOpen && 'rotate-180', 'transition-all']"><i
|
||||
class="iconify i-lucide:chevron-down text-button shrink-0 size-6 ms-auto"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
@ -40,7 +40,7 @@ const toggle = () => {
|
||||
};
|
||||
|
||||
// Computed properties
|
||||
const hasMainCategory = computed(() => props.data.length > 0 && props.data[0].langs && props.data[0].langs.length > 0);
|
||||
const hasMainCategory = computed(() => props.data && props.data.length > 0 && props.data[0].langs && props.data[0].langs.length > 0);
|
||||
const mainCategoryName = computed(() => hasMainCategory.value ? props.data[0].langs[0].Name : '');
|
||||
const subcategories = computed(() => hasMainCategory.value && props.data[0].children ? props.data[0].children : []);
|
||||
</script>
|
Reference in New Issue
Block a user