Update category card props
This commit is contained in:
@@ -4,13 +4,15 @@
|
||||
import { useImageColor } from "~/composables/global/useImageColor";
|
||||
|
||||
type Props = {
|
||||
id: number;
|
||||
id: number | string;
|
||||
slug: string;
|
||||
category: string;
|
||||
video?: string;
|
||||
count: number;
|
||||
description: string;
|
||||
picture: string;
|
||||
darkLayer?: boolean;
|
||||
isActive: boolean;
|
||||
isActive?: boolean;
|
||||
};
|
||||
|
||||
// props
|
||||
@@ -24,12 +26,12 @@ const { colorObject } = useImageColor(`#category-image-${id.value}`);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NuxtLink :to="`/products/category/${id}`">
|
||||
<NuxtLink :to="`/products/category/${slug}`">
|
||||
<div class="group relative rounded-150 overflow-hidden w-full aspect-square bg-white brightness-[97%]">
|
||||
<Transition name="fade">
|
||||
<video
|
||||
v-if="isActive"
|
||||
src="/video/category.mp4"
|
||||
:src="video"
|
||||
autoplay
|
||||
muted
|
||||
loop
|
||||
|
||||
Reference in New Issue
Block a user