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-01 14:52
- 阅读:41
1 个回复
DCloud_uniCloud_VK
可参考如下代码
通过 db.command.and([newWhere, preWhere]) 来拼接