feat: add product publish controls
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { computed, h, ref } from 'vue';
|
||||
import { NImage } from 'naive-ui';
|
||||
import { NImage, NTag } from 'naive-ui';
|
||||
import { FormSchema } from '@/components/Form';
|
||||
import { useDictStore } from '@/store/modules/dict';
|
||||
|
||||
@@ -42,6 +42,17 @@ export const columns = [
|
||||
{ title: '名称', key: 'name', width: 145, ellipsis: { tooltip: true } },
|
||||
{ title: '商品价格', key: 'price', width: 90 },
|
||||
{ title: '店铺名称', key: 'shopName', width: 100, ellipsis: { tooltip: true } },
|
||||
{
|
||||
title: '发布状态',
|
||||
key: 'publishStatus',
|
||||
width: 90,
|
||||
render: (row) =>
|
||||
h(
|
||||
NTag,
|
||||
{ type: dict.getType('bizPublishStatus', row.publishStatus), bordered: false },
|
||||
{ default: () => dict.getLabel('bizPublishStatus', row.publishStatus) || '-' }
|
||||
),
|
||||
},
|
||||
{ title: '创建时间', key: 'createdAt', width: 125 },
|
||||
{
|
||||
title: '是否推荐',
|
||||
@@ -51,4 +62,4 @@ export const columns = [
|
||||
},
|
||||
];
|
||||
|
||||
export const loadOptions = () => dict.loadOptions(['productCategoryOption']);
|
||||
export const loadOptions = () => dict.loadOptions(['productCategoryOption', 'bizPublishStatus']);
|
||||
|
||||
Reference in New Issue
Block a user