【通用】登录界面容易忘记生产打包去掉默认用户名,所以加此配置来容错

This commit is contained in:
俞宝山
2024-12-20 21:04:01 +08:00
parent 2b503850bf
commit 2b1f59acec

View File

@@ -128,12 +128,15 @@
const loading = ref(false)
const ruleForm = reactive({
account: 'superAdmin',
password: '123456',
validCode: '',
validCodeReqNo: '',
autologin: false
})
// 如果是开发环境,填充用户名密码
if (process.env.NODE_ENV === 'development') {
ruleForm.account = 'superAdmin'
ruleForm.password = '123456'
}
const rules = reactive({
account: [required(proxy.$t('login.accountError'), 'blur')],