口区
口区
  • 发布:2021-04-20 16:59
  • 更新:2021-04-21 11:29
  • 阅读:618

uni-data-picker组件where怎么写的

分类:uniCloud

不写where的情况下

<uni-data-picker placeholder="请选择服务订单" popup-title="请选择服务订单"  
                    collection="service-order" field="_id as value, name as text,state,commented" @change="onChange"></uni-data-picker>

拿到数据是

我只想查询state==‘done’的数据,这样写

<uni-data-picker placeholder="请选择服务订单" popup-title="请选择服务订单"  
                    collection="service-order" field="_id as value, name as text,state,commented" where="state=='done'" @change="onChange"></uni-data-picker>

和这样写

<uni-data-picker placeholder="请选择服务订单" popup-title="请选择服务订单"  
                    collection="service-order" field="_id as value, name as text,state,commented" where='state=="done"' @change="onChange"></uni-data-picker>

都报错

{"success":true,"data":{"code":"SYSTEM_ERROR","message":"Unexpected token (1:20)"}}

请问应该怎么写

2021-04-20 16:59 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

看一下用的uni-data-picker的版本号是多少?

该问题目前已经被锁定, 无法添加新回复