feat: package api
This commit is contained in:
@@ -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<TenantVO>[] = [
|
||||
},
|
||||
];
|
||||
|
||||
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",
|
||||
|
||||
@@ -130,7 +130,7 @@ const TenantList = () => {
|
||||
<ConfigurableDrawerForm
|
||||
ref={configurableDrawerRef}
|
||||
title={formStatusType[type]}
|
||||
columns={formColumns}
|
||||
columns={formColumns(type)}
|
||||
onSubmit={handleSubmit}
|
||||
/>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user