product:优化分类列表

(cherry picked from commit 5f80d1611c)
This commit is contained in:
YunaiV 2023-10-01 20:55:51 +08:00 committed by shizhong
parent 1ddd72cc46
commit 74a43565f6
2 changed files with 6 additions and 6 deletions

View File

@ -35,14 +35,14 @@
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<el-table v-loading="loading" :data="list" row-key="id" default-expand-all> <el-table v-loading="loading" :data="list" row-key="id" default-expand-all>
<el-table-column label="分类名称" prop="name" sortable /> <el-table-column label="名称" min-width="240" prop="name" sortable />
<el-table-column label="移动端分类图" align="center" prop="picUrl"> <el-table-column label="分类图" align="center" min-width="80" prop="picUrl">
<template #default="scope"> <template #default="scope">
<img v-if="scope.row.picUrl" :src="scope.row.picUrl" alt="移动端分类图" class="h-30px" /> <img v-if="scope.row.picUrl" :src="scope.row.picUrl" alt="移动端分类图" class="h-36px" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="分类排序" align="center" prop="sort" /> <el-table-column label="排序" align="center" min-width="150" prop="sort" />
<el-table-column label="开启状态" align="center" prop="status"> <el-table-column label="状态" align="center" min-width="150" prop="status">
<template #default="scope"> <template #default="scope">
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" /> <dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status" />
</template> </template>

View File

@ -161,7 +161,7 @@ const submitForm = async () => {
deepCopyFormData.sliderPicUrls = newSliderPicUrls deepCopyFormData.sliderPicUrls = newSliderPicUrls
// //
const data = deepCopyFormData as ProductSpuApi.Spu const data = deepCopyFormData as ProductSpuApi.Spu
const id = params.spuId as unknown as number const id = params.id as unknown as number
if (!id) { if (!id) {
await ProductSpuApi.createSpu(data) await ProductSpuApi.createSpu(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))