From 3054ddb13b9fb14725adc93a84e5c94ed95c800f Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 19 Dec 2020 15:50:04 +0800 Subject: [PATCH] feat: improve users options --- packages/plugin-users/src/collections/users.ts | 6 +++--- packages/plugin-users/src/server.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/plugin-users/src/collections/users.ts b/packages/plugin-users/src/collections/users.ts index 904bce84c..7b19c4ead 100644 --- a/packages/plugin-users/src/collections/users.ts +++ b/packages/plugin-users/src/collections/users.ts @@ -12,6 +12,7 @@ export default { name: 'username', title: '用户名', unique: true, + required: true, component: { type: 'string', showInTable: true, @@ -24,6 +25,7 @@ export default { type: 'string', name: 'nickname', title: '昵称', + required: true, component: { type: 'string', showInTable: true, @@ -49,6 +51,7 @@ export default { type: 'password', name: 'password', title: '密码', + required: true, hidden: true, component: { type: 'password', @@ -62,9 +65,6 @@ export default { title: 'Token', unique: true, hidden: true, - component: { - type: 'string', - }, }, ], actions: [ diff --git a/packages/plugin-users/src/server.ts b/packages/plugin-users/src/server.ts index 43915eaee..97cc3f963 100644 --- a/packages/plugin-users/src/server.ts +++ b/packages/plugin-users/src/server.ts @@ -47,7 +47,7 @@ export default async function (options = {}) { 'users:check': check, }); - resourcer.import({ - directory: path.resolve(__dirname, 'resources'), - }); + // resourcer.import({ + // directory: path.resolve(__dirname, 'resources'), + // }); }