You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
1.7 KiB

const schema = {
title: "用户",
type: "object",
properties: {
userName: {
title: "用户名",
type: "string",
showForList: true,
rules: [
{
required: true,
},
{
max: 64,
message: "用户名的最大长度为 64",
},
],
},
phoneNumber: {
title: "电话",
type: "string",
input: "password",
showForList: true,
rules: [
{
required: true,
},
],
},
name: {
title: "姓名",
type: "string",
showForList: true,
rules: [
{
required: true,
},
],
},
email: {
title: "邮箱",
type: "string",
showForList: true,
rules: [
{
required: true,
},
],
},
roleNames: {
title: "角色",
type: "array",
input: "select",
multiple: true,
},
password: {
title: "密码",
type: "string",
input: "password",
rules: [
{
required: true,
message: "密码不能为空",
},
],
},
},
};
export default function () {
return {
query: {
url: "base/user",
method: "get",
schema: {
title: "用户",
type: "object",
properties: {
filter: {
title: "用户名",
type: "string",
},
skipCount: {
hidden: true,
default: 0,
},
maxResultCount: {
hidden: true,
default: 10,
},
},
},
},
table: {
schema: schema,
},
};
}