## 添加一条数据
使用`$cloud`类的`delete`方法向数据库数据删除
~~~
export default {
data() {
return {
data: {
'foo': 'bar',
'bar': 'foo'
}
}
},
/**
* 页面加载执行
* @return {[type]} [description]
*/
async mounted() {
this.$cloud.name('demo').where('_id', 1).delete().then(res => {
console.log("条件删除", res)
});
this.$cloud.name('demo').where('_id', '<', 10).delete().then(res => {
console.log("条件删除", res)
});
this.$cloud.name('demo').where({ _id: 1 }).delete().then(res => {
console.log("条件删除", res)
});
}
}
~~~