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: 'title'
   },
   {
    title: '新闻封面',
    align:"center",
    dataIndex: 'image',
    customRender:render.renderAvatar,
   },
   {
    title: '新闻描述',
    align:"center",
    dataIndex: 'description'
   },
   {
    title: '新闻内容',
    align:"center",
    dataIndex: 'content',
    slots: { customRender: 'htmlSlot' },
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '新闻标题',
    field: 'title',
    component: 'Input',
  },
  {
    label: '新闻封面',
    field: 'image',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '新闻描述',
    field: 'description',
    component: 'Input',
  },
  {
    label: '新闻内容',
    field: 'content',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
];
