diff --git a/src/pages/system/tenant/list/config.tsx b/src/pages/system/tenant/list/config.tsx index 03d1192..276810c 100644 --- a/src/pages/system/tenant/list/config.tsx +++ b/src/pages/system/tenant/list/config.tsx @@ -1,5 +1,5 @@ import { type TenantVO, deleteTenant } from "@/services/system/tenant/list"; -import { ProColumns } from "@ant-design/pro-components"; +import { ProColumns, ProFormColumnsType } from "@ant-design/pro-components"; import { DatePicker, Modal, Popconfirm } from "antd"; import { FormInstance } from "antd/lib"; import dayjs from "dayjs"; @@ -80,7 +80,7 @@ export const baseTenantColumns: ProColumns[] = [ }, ]; -export const formColumns: any = [ +export const formColumns = (type: string): ProFormColumnsType[] => [ { title: "租户名", dataIndex: "name", @@ -140,7 +140,7 @@ export const formColumns: any = [ { title: "用户名称", dataIndex: "username", - hideInForm: true, + hideInForm: type === "update", formItemProps: { rules: [ { @@ -159,7 +159,7 @@ export const formColumns: any = [ title: "用户密码", dataIndex: "password", valueType: "password", - hideInForm: true, + hideInForm: type === "update", fieldProps: { placeholder: "请输入用户密码", autoComplete: "new-password", diff --git a/src/pages/system/tenant/list/index.tsx b/src/pages/system/tenant/list/index.tsx index b82d531..c69b4fc 100644 --- a/src/pages/system/tenant/list/index.tsx +++ b/src/pages/system/tenant/list/index.tsx @@ -130,7 +130,7 @@ const TenantList = () => {