🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## # 更新数据 使用`$cloud`类的`update`方法向数据库数据删除 ~~~ export default { data() { return { data: { 'foo': 'bar', 'bar': 'foo' } } }, /** * 页面加载执行 * @return {[type]} [description] */ async mounted() { this.$cloud.name('demo').where('_id', 1).update(this.data).then(res => { console.log("条件删除", res) }); this.$cloud.name('demo').where('_id', '<', 10).update(this.data).then(res => { console.log("条件删除", res) }); this.$cloud.name('demo').where({ _id: 1 }).update(this.data).then(res => { console.log("条件删除", res) }); } } ~~~