const schema = { title: "角色", type: "object", properties: { name: { title: "角色名", type: "string", showForList: true, readOnly: true, rules: [ { required: true, }, { max: 64, message: "用户名的最大长度为 64", }, ], }, }, }; const queryUrl = "role/get-list"; const detailsUrl = "role/details/%s"; const deleteUrl = "role/delete/%s"; const updateUrl = "role/update/%s"; const createUrl = "role/create"; const queryMethod = "GET"; const detailsMethod = "GET"; const deleteMethod = "DELETE"; const updateMethod = "PUT"; const createMethod = "POST"; export default function () { return { query: { url: queryUrl, method: queryMethod, schema: { title: "用户", type: "object", properties: { filter: { title: "角色名", type: "string", }, skipCount: { hidden: true, default: 0, }, maxResultCount: { hidden: true, default: 10, }, }, }, }, table: { schema: schema, }, edit: { detailsUrl, deleteUrl, updateUrl, createUrl, detailsMethod, deleteMethod, updateMethod, createMethod, schema: schema, }, }; }