如何为 vuefire 设置路径,如下所示
export default {
firebase: {
classlist: db.ref('chapter/1'), // here 1 need to be taken from data
// like this db.ref('chapter/' + this.chapterid),
},
data:{
chapterid:''
},
mounted:{
// getchapterid here
this.chapterid=getChapterId()
}
}
它不起作用,它返回错误 undefined chapterid ,有没有办法做到这一点?