4040 ]"
4141 prop =" max_attempts"
4242 >
43- <span style =" font-size : 13px ;" >
43+ <el-row :gutter =" 16" >
44+ <el-col :span =" 24" >
45+ <span style =" font-size : 13px ;" >
4446 {{ $t('views.system.loginFailed') }}
4547 </span >
46- <el-input-number
47- style =" margin-left : 8px ;"
48- v-model =" form.max_attempts"
49- :min =" -1"
50- :max =" 10"
51- :step =" 1"
52- controls-position =" right"
53- />
54- <span style =" margin-left : 8px ; font-size : 13px ;" >
48+ <el-input-number
49+ style =" margin-left : 8px ;"
50+ v-model =" form.max_attempts"
51+ :min =" -1"
52+ :max =" 10"
53+ :step =" 1"
54+ controls-position =" right"
55+ />
56+ <span style =" margin-left : 8px ; font-size : 13px ;" >
5557 {{ $t('views.system.loginFailedMessage') }}
5658 </span >
57- <span style =" margin-left : 8px ; color : #909399 ; font-size : 12px ;" >
59+ <span style =" margin-left : 8px ; color : #909399 ; font-size : 12px ;" >
5860 ({{ $t('views.system.display_codeTip') }})
5961 </span >
62+ </el-col >
63+
64+ <el-col :span =" 24" style =" margin-top : 8px ;" >
65+ <span style =" font-size : 13px ;" >
66+ {{ $t('views.system.loginFailed') }}
67+ </span >
68+ <el-input-number
69+ style =" margin-left : 8px ;"
70+ v-model =" form.failed_attempts"
71+ :min =" -1"
72+ :max =" 10"
73+ :step =" 1"
74+ controls-position =" right"
75+ />
76+ <span style =" margin-left : 8px ; font-size : 13px ;" >
77+ {{ $t('views.system.loginFailedMessage') }}
78+ </span >
79+ <el-input-number
80+ style =" margin-left : 8px ;"
81+ v-model =" form.lock_time"
82+ :min =" -1"
83+ :max =" 10"
84+ :step =" 1"
85+ controls-position =" right"
86+ />
87+ <span style =" margin-left : 8px ; font-size : 13px ;" >
88+ 分钟
89+ </span >
90+ </el-col >
91+ </el-row >
92+
6093 </el-form-item >
6194 </el-form >
6295 <div style =" margin-top :16px ;" >
@@ -93,6 +126,8 @@ const authFormRef = ref<FormInstance>();
93126const form = ref <any >({
94127 default_value: ' LOCAL' ,
95128 max_attempts: 1 ,
129+ failed_attempts: 5 ,
130+ lock_time: 10 ,
96131})
97132
98133const submit = async (formEl : FormInstance | undefined ) => {
@@ -117,6 +152,12 @@ onMounted(() => {
117152 authApi .getLoginSetting ().then ((res ) => {
118153 if (Object .keys (res .data ).length > 0 ) {
119154 form .value = res .data ;
155+ if (! form .value .failed_attempts ) {
156+ form .value .failed_attempts = 5 ;
157+ }
158+ if (! form .value .lock_time ) {
159+ form .value .lock_time = 10 ;
160+ }
120161 loginMethods .value = res .data .auth_types
121162 }
122163 })
0 commit comments