首页 > 解决方案 > Firebase 不读取随机键

问题描述

我尝试了一个 firebase 读取脚本,如果 ket 的类型为 0 1 2 3 4 读取,但如果它是随机类型(M5ppDoMZ8lnqBtT8Zme),它不会被读取,我不明白为什么?

import {gamesRef} from './firebase'

import { GameTypeEnum, PiattaformaEnum,nuovofilm } from './models/game'



export default {
  firebase: {
    
    games: gamesRef.orderByChild('titolo')
    //games : gamesRef
    

  },
  data() {
    return {
       gameTypes: GameTypeEnum.properties,
      gamePlatforms: PiattaformaEnum.properties,
      nuoevo : nuovofilm,
       games : gamesRef,
       film: gamesRef,
     // gam : gamesRef.orderByChild('titolo'),
      fields: ['Indice','titolo', 'regista','locandina', 'anno','Modifica','Cancella','piattaforma'],
      //fields: ['titolo', 'autore', 'anno', ''],
       datas : [1,2,3,4],
      //  fields: ['first_name', 'last_name', 'age'],
        items: [
          { age: 40, first_name: 'Dickerson', last_name: 'Macdonald' },
          { age: 21, first_name: 'Larsen', last_name: 'Shaw' },
          { age: 89, first_name: 'Geneva', last_name: 'Wilson' }
        ],

        newGame: {
        Titolo: '',
        SoftwareHouse: '',
        Tipo: GameTypeEnum.FPS,
        Piattaforma: PiattaformaEnum.PC
      },
<b-table striped hover :items="games" :fields="fields">
        
        
         <template v-slot:cell(indice)="data">
        {{ data.index + 1 }}
       
              </template>
          <template v-slot:cell(locandina)>
        
         <img :src="valore" width="100" />
              </template>

        <template v-slot:cell(Modifica)>
       <button type="button" class="btn btn-warning">x</button>
      </template>
       <template v-slot:cell(Cancella)>
       <button type="button" class="btn btn-danger">y</button>
      </template>
        <template v-slot:cell(index)="data">
        {{ data.index + 1 }}
        <b-btn size="sm" variant="warning">X</b-btn>
        {{ data.index + 1 }}
          <b-btn size="sm" variant="warning">y</b-btn>
      </template>
94/5000 我也尝试过 v-for 这个问题似乎不明白它与随机密钥有什么关系提前谢谢

标签: node.jsfirebasevue.js

解决方案


推荐阅读