🐛 Fixing a bug. 用户管理用户名校验

This commit is contained in:
aeizzz 2023-03-10 09:10:47 +08:00
parent a50bdb7688
commit 764c499ad1
3 changed files with 3 additions and 3 deletions

View File

@ -96,7 +96,7 @@ export const registerUser = (userInfo: object) => {
};
export function validateUsername(rule: any, value: any, callback: any, isEdit: boolean) {
const flag = new RegExp(/^([a-z\u4e00-\u9fa5\d]+?)$/).test(value);
const flag = new RegExp(/^([a-z\d]+?)$/).test(value);
if (!flag) {
callback(new Error('用户名支持小写英文、数字、中文'));
}

View File

@ -171,7 +171,7 @@ const onSubmit = () => {
const getTenantData = (id: string) => {
//
getObj(id).then((res: any) => {
Object.assign(form, res.data[0]);
Object.assign(form, res.data);
});
};

View File

@ -86,7 +86,7 @@
:title="$t('appuser.importUserTip')"
@refreshDataList="getDataList"
ref="excelUploadRef"
temp-url="/admin/sys-file/local/file/user.xlsx"
temp-url="/admin/sys-file/local/file/appuser.xlsx"
url="/admin/appuser/import"
/>
</div>