33 <template #avatar >
44 <t-avatar size =" 56px" >
55 <template #icon >
6- <shop-icon v-if =" product.type === 1" />
7- <calendar-icon v-if =" product.type === 2" />
8- <service-icon v-if =" product.type === 3" />
9- <user-avatar-icon v-if =" product.type === 4" />
10- <laptop-icon v-if =" product.type === 5" />
6+ <shop-icon v-if =" props. product.type === 1" />
7+ <calendar-icon v-if =" props. product.type === 2" />
8+ <service-icon v-if =" props. product.type === 3" />
9+ <user-avatar-icon v-if =" props. product.type === 4" />
10+ <laptop-icon v-if =" props. product.type === 5" />
1111 </template >
1212 </t-avatar >
1313 </template >
1414 <template #status >
15- <t-tag :theme =" product.isSetup ? 'success' : 'default'" :disabled =" !product.isSetup" >{{
16- product.isSetup ? t('components.isSetup.on') : t('components.isSetup.off')
17- }} </t-tag >
15+ <t-tag :theme =" props. product.isSetup ? 'success' : 'default'" :disabled =" !props. product.isSetup" >
16+ {{ props. product.isSetup ? t('components.isSetup.on') : t('components.isSetup.off') }}
17+ </t-tag >
1818 </template >
1919 <template #content >
20- <p class =" list-card-item_detail--name" >{{ product.name }}</p >
21- <p class =" list-card-item_detail--desc" >{{ product.description }}</p >
20+ <p class =" list-card-item_detail--name" >{{ props. product.name }}</p >
21+ <p class =" list-card-item_detail--desc" >{{ props. product.description }}</p >
2222 </template >
2323 <template #footer >
2424 <t-avatar-group cascading =" left-up" :max =" 2" >
3232 </template >
3333 <template #actions >
3434 <t-dropdown
35- :disabled =" !product.isSetup"
35+ :disabled =" !props. product.isSetup"
3636 trigger =" click"
3737 :options =" [
3838 {
3939 content: t('components.manage'),
4040 value: 'manage',
41- onClick: () => handleClickManage(product),
41+ onClick: () => handleClickManage(props. product),
4242 },
4343 {
4444 content: t('components.delete'),
4545 value: 'delete',
46- onClick: () => handleClickDelete(product),
46+ onClick: () => handleClickDelete(props. product),
4747 },
4848 ]"
4949 >
50- <t-button theme =" default" :disabled =" !product.isSetup" shape =" square" variant =" text" >
50+ <t-button theme =" default" :disabled =" !props. product.isSetup" shape =" square" variant =" text" >
5151 <more-icon />
5252 </t-button >
5353 </t-dropdown >
5454 </template >
5555 </t-card >
5656</template >
57+
5758<script setup lang="ts">
5859import {
5960 AddIcon ,
@@ -75,10 +76,10 @@ export interface CardProductType {
7576 name: string ;
7677}
7778
78- // eslint-disable-next-line
7979const props = defineProps ({
8080 product: {
8181 type: Object as PropType <CardProductType >,
82+ default: undefined ,
8283 },
8384});
8485
0 commit comments