计算属性return props报undefined

props: ['item'],computed: {
        coinPrice () {            return this.item.currentPrice.toFixed(2)
        }
}

这里报this.item.currentPrice undefined,查了加载顺讯,props在computed之前,为什么会报undefined?
值可以出来,先报undefined后在出来


POPMUISE
浏览 885回答 1
1回答

白衣染霜花

that result from data request is async,so occur undefined error in first time render

江户川乱折腾

that result from data request is async,so occur undefined error in first time render
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Vue.js