File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 3737 < el-row v-if ="pageNum === 0 " class ="qu " style ="width:400px;margin: 6vh auto 0 auto ">
3838 < el-card style ="padding-bottom: 1rem ">
3939 < el-col :span ="24 ">
40- < el-input autofocus @input =" listenInput " clearable v-model:value ="code " maxlength ="5 "
40+ < el-input autofocus @change =" changeInput " clearable v-model:value ="code " maxlength ="5 "
4141 :disabled ="inputDisable " placeholder ="请输入五位取件码 ">
4242 </ el-input >
4343 </ el-col >
236236 }
237237 } ) ;
238238 } ,
239+ watch : {
240+ code : function ( code ) {
241+ if ( code . length === 5 ) {
242+ this . inout_disable = true ;
243+ this . getFile ( ) ;
244+ }
245+ }
246+ } ,
239247 methods : {
240248 http : function ( method , url , data = { } , config = { } ) {
241249 return new Promise ( ( resolve , reject ) => {
274282 if ( this . code . length < 5 ) {
275283 this . code += value ;
276284 }
277- if ( this . code . length === 5 ) {
278- this . inout_disable = true ;
279- this . getFile ( ) ;
280- }
285+ } ,
286+ changeInput : function ( value ) {
287+ this . code = value ;
281288 } ,
282289 toUploadData : function ( ) {
283290 if ( this . uploadData . text === '' && this . uploadData . file === null ) {
You can’t perform that action at this time.
0 commit comments