作者paiqiuafan (fan)
看板Web_Design
标题[请益] vuefire+vue
时间Tue Sep 19 11:46:57 2017
各位大大您们好
小弟在使用vue+vuefire+firebase时,遇到了些问题,希望是高手的您们可以为我解惑。
我从firebase取到资料时,想要把自行制作的loading画面关掉。
export {
firebase: {
source: db.ref('user'),
readyCallBack: () => {
//呼叫这方法会有报错
this.setloading(false);
}
},
methods: {
...mapActions(['setloading'])
}
}
在readCallBack呼叫store里面的action时会有报错,报错内容是dispatch is undefind
,但我在action里面没有使用到dispatch啊!
小弟不材,麻烦各位高手解惑。
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 125.227.235.157
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Web_Design/M.1505792820.A.8BA.html
※ 编辑: paiqiuafan (39.9.172.205), 09/19/2017 21:44:08