observable
官方
用法//
<el-button type="primary" @click="onSave">{{counts}}</el-button>
let state = null
state = Vue.observable({ count: 0 });
computed: {
counts() {
return state.count;
}
},
onSave() {
state.count++;
-------
这样创造对象,好像可以避免$set的使用或者在vuex进行对象式响应