Ben Lin
2024-07-04 d582f081e148c5df7c1b334a94fa1df1cd2655a9
src/views/tigerprojects/system/menu/menu.data.ts
@@ -60,6 +60,11 @@
    dataIndex: 'btnType',
    ifShow: false,
  },
  {
    title: '执行方法',
    dataIndex: 'doMethod',
    ifShow: false,
  },
];
const isDir = (type: string) => type === '0';
@@ -73,18 +78,18 @@
    component: 'Input',
    colProps: { span: 8 },
  },
  {
    field: 'status',
    label: '状态',
    component: 'Select',
    componentProps: {
      options: [
        { label: '启用', value: '1' },
        { label: '停用', value: '0' },
      ],
    },
    colProps: { span: 8 },
  },
  // {
  //   field: 'status',
  //   label: '状态',
  //   component: 'Select',
  //   componentProps: {
  //     options: [
  //       { label: '启用', value: '1' },
  //       { label: '停用', value: '0' },
  //     ],
  //   },
  //   colProps: { span: 8 },
  // },
];
export const formSchema: FormSchema[] = [
@@ -134,7 +139,7 @@
    label: '图标',
    component: 'IconPicker',
    required: ({ values }) => isDir(values.func_type),
    ifShow: ({ values }) => !isButton(values.func_type),
    ifShow: ({ values }) => true, //!isButton(values.func_type),
  },
  {
@@ -154,18 +159,24 @@
    field: 'btnType',
    label: '按钮类型',
    component: 'ApiSelect',
    defaultValue: '',
    defaultValue: 0,
    componentProps: {
      api: GetEnum,
      params: { name: 'SYS_MENU+BUTTON_TYPEs' },
      resultField: 'Data',
      labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name',
      valueField: 'Value',
      placeholder: '请选择按钮类型'
      placeholder: '请选择按钮类型',
    },
    ifShow: ({ values }) => isButton(values.func_type),
  },
  {
    field: 'doMethod',
    label: '执行方法名',
    component: 'Input',
    ifShow: ({ values }) => isButton(values.func_type),
  },
  {
    field: 'func_code',
    label: '权限标识',
    component: 'Input',