MALL:简化商品分类的 VO 转化

This commit is contained in:
YunaiV 2024-01-13 22:58:32 +08:00
parent fdfb028dd9
commit 26bb847383
4 changed files with 1 additions and 12 deletions

View File

@ -20,10 +20,6 @@ export interface CategoryVO {
*
*/
picUrl: string
/**
* PC
*/
bigPicUrl?: string
/**
*
*/

View File

@ -25,10 +25,6 @@
<UploadImg v-model="formData.picUrl" :limit="1" :is-show-tip="false" />
<div style="font-size: 10px" class="pl-10px">推荐 180x180 图片分辨率</div>
</el-form-item>
<el-form-item label="PC 端分类图" prop="bigPicUrl">
<UploadImg v-model="formData.bigPicUrl" :limit="1" :is-show-tip="false" />
<div style="font-size: 10px" class="pl-10px">推荐 468x340 图片分辨率</div>
</el-form-item>
<el-form-item label="分类排序" prop="sort">
<el-input-number v-model="formData.sort" controls-position="right" :min="0" />
</el-form-item>
@ -68,7 +64,6 @@ const formData = ref({
id: undefined,
name: '',
picUrl: '',
bigPicUrl: '',
status: CommonStatusEnum.ENABLE
})
const formRules = reactive({
@ -133,7 +128,6 @@ const resetForm = () => {
id: undefined,
name: '',
picUrl: '',
bigPicUrl: '',
status: CommonStatusEnum.ENABLE
}
formRef.value?.resetFields()

View File

@ -38,7 +38,7 @@
<el-table-column label="名称" min-width="240" prop="name" sortable />
<el-table-column label="分类图标" align="center" min-width="80" prop="picUrl">
<template #default="scope">
<img v-if="scope.row.picUrl" :src="scope.row.picUrl" alt="移动端分类图" class="h-36px" />
<img :src="scope.row.picUrl" alt="移动端分类图" class="h-36px" />
</template>
</el-table-column>
<el-table-column label="排序" align="center" min-width="150" prop="sort" />

View File

@ -119,7 +119,6 @@ const resetForm = () => {
id: undefined,
name: '',
picUrl: '',
bigPicUrl: '',
status: CommonStatusEnum.ENABLE
}
formRef.value?.resetFields()