0
,我在一個應用程序中使用VuexFire和在我的組件https://github.com/posva/vuexfire我有一個像VuexFire:如何合併計算:和()計算
computed: Vuex.mapGetters(['todos']),
created() {
this.$store.dispatch('setTodosRef', todosRef)
},
這個工程除了當我也有一些計算方法細紋在這種情況下,我不知道該怎麼做。我已經嘗試了諸如:
computed: Vuex.mapGetters(['todos']),
computed() {
amethod: { return 1 }
},
created() {
this.$store.dispatch('setTodosRef', todosRef)
},
和
computed() {
amethod: { return 1 }
},
created() {
...Vuex.mapGetters(['todos'])
this.$store.dispatch('setTodosRef', todosRef)
},
但這些了,我已經嘗試了其他的東西,顯然是誤導,因爲他們沒有工作(即數據從火力不可用的方法。
什麼是正確的做法?
非常感謝。不知道爲什麼我不試試這個! – Andrew