fix music request

This commit is contained in:
2024-01-21 23:43:27 +08:00
parent 8dd85f205d
commit c1d8f75690
10 changed files with 282 additions and 79 deletions

View File

@@ -1,20 +1,45 @@
<script setup lang="ts">
import { ResponsePointGoodModel } from '@/api/api-models'
import { NCard } from 'naive-ui'
import { ref } from 'vue'
import { NButton, NCard, NDropdown, NEllipsis, NFlex, NIcon, NImage, NPopselect, NText } from 'naive-ui'
import { FILE_BASE_URL, IMGUR_URL } from '@/data/constants'
import { computed, ref } from 'vue'
import { MoreHorizontal16Filled, MoreVertical16Filled } from '@vicons/fluent'
const props = defineProps<{
goods: ResponsePointGoodModel
}>()
const emptyCover = IMGUR_URL + 'None.png'
</script>
<template>
<NCard>
<NCard style="max-width: 300px">
<template #cover>
<img :src="goods.cover" />
<NImage :src="goods.cover ? FILE_BASE_URL + goods.cover : emptyCover" :fallback-src="emptyCover" height="150" object-fit="cover" :preview-disabled="!goods.cover" style="width: 100%" />
</template>
<template #header-extra>
<slot name="header-extra"></slot>
</template>
<template #header>
{{ goods.name }}
<NEllipsis>
{{ goods.name }}
</NEllipsis>
</template>
<NFlex vertical>
<NText depth="3">
{{ goods.description }}
</NText>
<NFlex justify="space-between">
<NFlex>
<NText> 库存: </NText>
<NText v-if="goods.count && goods.count > -1">
{{ goods.count }}
</NText>
<NText v-else> 不限 </NText>
</NFlex>
</NFlex>
</NFlex>
<template #footer>
<slot name="footer"></slot>
</template>
</NCard>
</template>