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: 'articleTitle'
   },
   {
    title: '文章封面',
    align:"center",
    dataIndex: 'articleImage',
    customRender:render.renderAvatar,
   },
   {
    title: '文章内容',
    align:"center",
    dataIndex: 'articleContent',
    slots: { customRender: 'htmlSlot' },
   },
   {
    title: '文章所属分类',
    align:"center",
    dataIndex: 'categoryId'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '文章标题',
    field: 'articleTitle',
    component: 'Input',
  },
  {
    label: '文章封面',
    field: 'articleImage',
     component: 'JImageUpload',
     componentProps:{
      },
  },
  {
    label: '文章内容',
    field: 'articleContent',
    component: 'JCodeEditor', //TODO String后缀暂未添加
  },
  {
    label: '文章所属分类',
    field: 'categoryId',
    component: 'Input',
  },
];
