vue 已经定义了方法 却一直提示未定义是什么鬼啊

methods: {
handlePlay(){
console.log('card')
},
createTestHand(){
const cards = [];
const ids = Object.keys(cards);
for(let i=0;i<5;i++){
cards.push(testDrawCard());
}
console.log(cards);
return cards
},
testDrawCard(){
const ids = Object.keys(cards);
const randomId = ids[Math.floor(Math.random()*ids.length)];
return {
uid: cardUid++,
id: randomId,
def: cards[randomId],
}
},
},

created(){
this.testHand = this.createTestHand();
},

试试这个

methods: {
    handlePlay(){
      console.log('card')
    },
    createTestHand(){
      const cards = [];
      const ids = Object.keys(cards);
      for(let i=0;i<5;i++){
        cards.push(this.testDrawCard());
      }
      console.log(cards);
      return cards
    },
    testDrawCard(){
      const ids = Object.keys(cards);
      const randomId = ids[Math.floor(Math.random()*ids.length)];
      return {
        uid: cardUid++,
        id: randomId,
        def: cards[randomId],
      }
    },
  },

  created(){
    this.testHand = this.createTestHand();
  },