1
0
mirror of https://github.com/fumiama/paper-manager.git synced 2026-06-07 17:00:23 +08:00

fix name exist check

This commit is contained in:
源文雨
2023-03-21 00:36:44 +08:00
parent dae0830d24
commit 3905ff4b9e

View File

@@ -49,7 +49,6 @@ export const nameFormSchema: FormSchema[] = [
field: 'name',
label: '用户名',
component: 'Input',
helpMessage: ['不能输入带有admin的用户名'],
rules: [
{
required: true,
@@ -60,7 +59,7 @@ export const nameFormSchema: FormSchema[] = [
return new Promise((resolve, reject) => {
isNameExist(value)
.then((v) => {
if (v) resolve()
if (!v) resolve()
else reject('用户名已存在')
})
.catch((err) => {