preWhere && newWhere 如何拼接?
filterChange(e, name) {
this._filter[name] = {
type: e.filterType,
value: e.filter
}
let newWhere = filterToWhere(this._filter, db.command)
if (Object.keys(newWhere).length) {
// 例如 preWhere = "status === 1"
// this.where = preWhere && newWhere 如何拼接
} else {
this.where = ''
}
this.$nextTick(() => {
this.$refs.udb.loadData()
})
}
3***@qq.com
- 发布:2024-10-29 17:58
- 更新:2024-11-08 11:59
- 阅读:78
2 个回复
DCloud_uniCloud_VK
可参考如下代码
通过 db.command.and([newWhere, preWhere]) 来拼接
3***@qq.com (作者)
已解决,感谢!