props: ['item'],computed: {
coinPrice () { return this.item.currentPrice.toFixed(2)
}
}這里報this.item.currentPrice undefined,查了加載順訊,props在computed之前,為什么會報undefined?值可以出來,先報undefined后在出來
1 回答

泛舟湖上清波郎朗
TA貢獻1818條經驗 獲得超3個贊
that result from data request is async,so occur undefined error in first time render
添加回答
舉報
0/150
提交
取消