避免空值报错

This commit is contained in:
李鹏宇
2026-01-24 19:51:55 +08:00
parent d0d276d26e
commit 0eb500fd5e
@@ -158,6 +158,14 @@ class ReceivableReport extends Component {
async onUpdateCompany(v) {
console.log(v)
// 检查v是否为空或v[0]不存在
if (!v || !v[0]) {
this.state.selectCompany = {};
this.state.selectPartner = {};
this.state.domainUsers = [];
await this.onSearch();
return;
}
// 执行一次 查询
// 通过 read 重新查询一次, 更多只返回了 id
let values = await this.serviceOrm.call(