问题 I'm trying to create refs dynamically: My first ref works because it's hardcoded but the second doesn't, apparently because it's dynamic: firebase: function(){ return { categories: db.ref('categories'), subcategories: db.ref('categories').child(this.addItem.category) } } Does anyone know how to get around this? 回答1: I created a dynamic db ref by using vm.$bindAsObject found in the vue-fire docs. I used it in the created hook with a project id, like so: created () { this.$bindAsObject('project