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",
    sorter: true,
    dataIndex: 'createTime'
   },
   {
    title: '标题',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '图片',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '星闻内容',
    align:"center",
    dataIndex: 'details',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '文章描述',
    align:"center",
    dataIndex: 'descValue'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '图片',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '星闻内容',
    field: 'details',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '文章描述',
    field: 'descValue',
    component: 'InputTextArea',//TODO 注意string转换问题
  },
];
