ES6 promise.all () execution problem

 let promiseClaim= [],promiseAgent = [],promiseArr=[];
            let m = new Promise((resolve,reject)=>{
                that.$refs.baseDataRef.validate((valid)=>{
                    if(valid){
                        resolve(1)
                    }
                })
            })
            
            that.$refs.agentRef.map(function(item,index){
                let p = p+index+1;
                p = new Promise((resolve,reject)=>{
                    item.validate((valid)=>{
                        if(valid){
                            resolve(1)
                        }
                    })
                })
                promiseAgent.push(p)
            })
            that.$refs.claimItemRef.map(function(item,index){
                let p = p+index+1;
                p = new Promise((resolve,reject)=>{
                    item.validate((valid)=>{
                        if(valid){
                            resolve(1)
                        }
                    })
                })
                promiseClaim.push(p)
            })

            
            promiseArr = promiseAgent.concat(promiseClaim)
            promiseArr.push(m)
            Promise.all(promiseArr).then((res)=>{
                that.formatSubmitData();
                that.loading = true;
            }).catch((err)=>{
            
            })

Why does my promise.all execute successfully enter formatSubmitData () for the first time and then when I click the button on the page again, all the checks pass but no longer execute formatSubmitData ()

Apr.08,2022

that.loading = true; why

Menu