@@ -5,7 +5,7 @@ import { I18nResultItem, locale } from "@i18n"
55import { getCssVariable } from "@pages/util/style"
66import verificationProcessor from "@service/limit-service/verification/processor"
77import { dateMinute2Idx , hasLimited , isEnabledAndEffective } from "@util/limit"
8- import { ElMessage , ElMessageBox , type ElMessageBoxOptions , useId } from "element-plus"
8+ import { ElMessage , ElMessageBox , type ElMessageBoxOptions , type InputType , useId } from "element-plus"
99import { defineComponent , onMounted , ref , type VNode } from "vue"
1010
1111/**
@@ -101,6 +101,7 @@ export function processVerification(option: timer.option.LimitOption, context?:
101101 message : < div > { t ( msg => msg . limit . verification . strictTip ) } </ div > ,
102102 } ) . catch ( ( ) => { } ) )
103103 }
104+ let inputType : InputType | undefined
104105 let answerValue : string | undefined
105106 let messageNode : I18nResultItem < VNode > [ ] | undefined | I18nResultItem < VNode >
106107 let incorrectMessage : string
@@ -109,6 +110,7 @@ export function processVerification(option: timer.option.LimitOption, context?:
109110 answerValue = limitPassword
110111 messageNode = t ( msg => msg . limit . verification . pswInputTip )
111112 incorrectMessage = t ( msg => msg . limit . verification . incorrectPsw )
113+ inputType = 'password'
112114 } else if ( limitLevel === 'verification' ) {
113115 const pair = verificationProcessor . generate ( limitVerifyDifficulty ?? 'easy' , locale )
114116 const { prompt, promptParam, answer, second = 60 } = pair || { }
@@ -138,6 +140,7 @@ export function processVerification(option: timer.option.LimitOption, context?:
138140 title : '' ,
139141 message : < div style = { { userSelect : 'none' } } > { messageNode } </ div > ,
140142 showInput : true ,
143+ inputType,
141144 showCancelButton : true ,
142145 showClose : false ,
143146 confirmButtonText : countdown ? btnText ( countdown ) : okBtnTxt ,
0 commit comments