import UserAPI from "@/api/product/commonUnits";

import type { IModalConfig } from "@/components/CURD/types";

const modalConfig: IModalConfig<UserForm> = {
  pageName: "sys:user",
  dialog: {
    title: "新增单位",
    width: 800,
    draggable: true,
  },
  form: {
    labelWidth: 100,
  },
  formAction: UserAPI.addunit,
  beforeSubmit(data) {
    console.log("提交之前处理", data);
  },
  formItems: [
    {
      label: "单位名称",
      prop: "name",
      rules: [{ required: true, message: "单位名称不能为空", trigger: "blur" }],
      type: "input",
      attrs: {
        placeholder: "请输入单位名称",
      },
    },


  ],
};
export interface UserForm {

}
// 如果有异步数据会修改配置的，推荐用reactive包裹，而纯静态配置的可以直接导出
export default reactive(modalConfig);
