shayloyuki

科技是第一生产力

 

2024年7月12日

then catch 简易写法

摘要: 为了捕获上一步 then 中的 promise 结果,必须在上一步 return; 关闭遮罩层,放在 finally 中,即无论成功或失败都要执行; archiveAction(actionType, row) { const ids = row && row.id ? row.id : this. 阅读全文

posted @ 2024-07-12 17:14 shayloyuki 阅读(2) 评论(0) 推荐(0) 编辑

接口报错 cannot read properties of undefined (reading 'then')

摘要: 问题 遇到一个很奇怪的问题,接口返回值为 undefined 代码如下: // 归档/解档 archiveAction(actionType, row) { const ids = row && row.id ? row.id : this.ids; const tip = row && row.i 阅读全文

posted @ 2024-07-12 17:00 shayloyuki 阅读(5) 评论(0) 推荐(0) 编辑

导航