feat: 登录界面devMode才有默认用户密码
This commit is contained in:
parent
e6c9d21a41
commit
f7e1fc5417
@ -9,6 +9,8 @@ defineOptions({
|
|||||||
name: 'PwdLogin'
|
name: 'PwdLogin'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const devMode = import.meta.env.DEV;
|
||||||
|
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const { formRef, validate } = useNaiveForm();
|
const { formRef, validate } = useNaiveForm();
|
||||||
const { defaultRequiredRule } = useFormRules();
|
const { defaultRequiredRule } = useFormRules();
|
||||||
@ -19,8 +21,8 @@ interface FormModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const model: FormModel = reactive({
|
const model: FormModel = reactive({
|
||||||
userName: 'admin',
|
userName: devMode ? 'admin' : '',
|
||||||
password: 'admin'
|
password: devMode ? 'admin' : ''
|
||||||
});
|
});
|
||||||
|
|
||||||
type RuleKey = Extract<keyof FormModel, 'userName' | 'password'>;
|
type RuleKey = Extract<keyof FormModel, 'userName' | 'password'>;
|
||||||
|
Loading…
Reference in New Issue
Block a user