## 添加一條數據
使用`$cloud`類的`insert`方法向數據庫提交數據
~~~
export default {
data() {
return {
data: {
'foo': 'bar',
'bar': 'foo'
}
}
},
/**
* 頁面加載執行
* @return {[type]} [description]
*/
async mounted() {
this.$cloud.name('demo').insert(this.data).then(res => {
console.log("返回結果集",res)
});
}
}
~~~