config.data.ts 1.43 KB
import { BasicColumn, FormSchema } from '/@/components/Table';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();
// 表格列数据
export const columns: BasicColumn[] = [
  {
    title: t('system.feedback.theme'),
    dataIndex: 'title',
    width: 80,
  },
  {
    title: t('system.feedback.fullName'),
    dataIndex: 'name',
    width: 120,
  },
  {
    title: t('system.feedback.message'),
    dataIndex: 'message',
    width: 120,
  },
  {
    title: t('system.feedback.table.time'),
    dataIndex: 'createTime',
    width: 180,
  },
];

// 查询字段
export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: t('system.feedback.fullName'),
    component: 'Input',
    colProps: { span: 8 },
    componentProps: {
      maxLength: 36,
    },
  },
];

// 弹框配置项
export const formSchema: FormSchema[] = [
  {
    field: 'title',
    label: t('system.feedback.theme'),
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    field: 'name',
    label: t('system.feedback.fullName'),
    component: 'Input',
    componentProps: {
      disabled: true,
    },
  },
  {
    field: 'message',
    label: t('system.feedback.message'),
    colProps: { span: 24 },
    component: 'InputTextArea',
    componentProps: {
      disabled: true,
    },
  },
  {
    field: 'images',
    label: t('system.feedback.previewImg'),
    slot: 'iconSelect',
    component: 'Input',
  },
];