有谁知道错误“FirebaseError:未知的字段过滤器操作”是什么意思?
我正在开发一个 Vue 项目,我将播放列表存储在 Firestore 数据库中,并且我想要进行 CRUD 操作。当我尝试从数据库接收单个文档时,会弹出此错误。我不知道在哪里寻找错误。
<template>
<div v-if="playlist">
<h2> {{ playlist.title }} </h2>
</div>
</template>
<script>
import db from '../firebase/config'
export default {
data() {
return {
playlist: null
}
},
created(){
let ref = db.collection('playlists').where('slug', '=', this.$route.params.playlist_slug)
ref.get().then(snapshot => {
snapshot.forEach(doc => {
this.playlist = doc.data()
this.playlist.id = doc.id
})
})
}
}
</script>
<style scoped>
</style>
Run Code Online (Sandbox Code Playgroud)