listDetailthisdataParamsthenresponse = thistotalCount=response; thisloading = false; ; consolelogtotalCount thistotalCount+df; thispass1=thistotalCountpass; consolelogpass1 th
根据给出的代码,listDetail()是一个异步函数,返回一个Promise对象。因此,该代码块中的.then()方法是在listDetail()函数执行完毕并返回结果后才会被调用。所以,console.log('totalCount:', this.totalCount+'df'),以及后续的代码都会在listDetail()执行之前被执行,这意味着this.totalCount的值在这里是undefined。
因此,this.totalCount1=this.unComplete+this.complete;这行代码中的this.unComplete和this.complete的值也会是undefined,因为this.totalCount的值是undefined。因此,this.totalCount1的值也会是NaN。
原文地址: https://www.cveoy.top/t/topic/icxb 著作权归作者所有。请勿转载和采集!