import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '商品名称',
    align:"center",
    dataIndex: 'waresTitle'
   },
   {
    title: '商品图片',
    align:"center",
    dataIndex: 'waresImage',
    customRender:render.renderAvatar,
   },
   {
    title: '商品价格',
    align:"center",
    dataIndex: 'waresPrice'
   },
   {
    title: '商品折扣',
    align:"center",
    dataIndex: 'waresDiscount'
   },
   {
    title: '商品销量',
    align:"center",
    dataIndex: 'waresSales'
   },
   {
    title: '商品详情',
    align:"center",
    dataIndex: 'waresDetail'
   },
   {
    title: '商品库存',
    align:"center",
    dataIndex: 'waresNumber'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '商品名称',
    field: 'waresTitle',
    component: 'Input',
  },
  {
    label: '商品图片',
    field: 'waresImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '商品价格',
    field: 'waresPrice',
    component: 'InputNumber',
  },
  {
    label: '商品折扣',
    field: 'waresDiscount',
    component: 'InputNumber',
  },
  {
    label: '商品销量',
    field: 'waresSales',
    component: 'InputNumber',
  },
  {
    label: '商品详情',
    field: 'waresDetail',
    component: 'Input',
  },
  {
    label: '商品库存',
    field: 'waresNumber',
    component: 'Input',
  },
];
