config.data.ts 868 Bytes
import { BasicColumn, FormSchema } from '/@/components/Table';
import { transformTime } from '/@/hooks/web/useDateToLocaleString';

export const columns: BasicColumn[] = [
  {
    title: '创建时间',
    dataIndex: 'createdTime',
    width: 200,
    format: (_text: string, record: Recordable) => {
      return transformTime(record.createdTime);
    },
  },
  {
    title: '名称',
    dataIndex: 'name',
    width: 200,
  },
  {
    title: '是否跟链',
    dataIndex: 'root',
    slots: {
      customRender: 'root',
    },
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'textSearch',
    label: '名称',
    component: 'Input',

    colProps: { span: 8 },
    componentProps: {
      placeholder: '请输入名称',
    },
  },
];

export const encode = (string: string) => {
  return encodeURIComponent(string);
};