nuxt初始化
This commit is contained in:
22
nuxt-web/components/ProductCard.vue
Normal file
22
nuxt-web/components/ProductCard.vue
Normal file
@@ -0,0 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
title: string
|
||||
description: string
|
||||
image: string
|
||||
to: string
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NuxtLink :to="to" class="product-card">
|
||||
<div class="card-img">
|
||||
<img :src="image" :alt="title">
|
||||
</div>
|
||||
<div class="card-content">
|
||||
<div class="card-header">
|
||||
<h4>{{ title }}</h4>
|
||||
</div>
|
||||
<p>{{ description }}</p>
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
Reference in New Issue
Block a user