<income :getStandards="getStandards" :index="index" ref="refIncome"></income>clickPurchase: function (index) {this.$refs.refIncome.handleStatePromptContent()}這是父組件引用的子組件handleStatePromptContent () { if ((this.$parent.details.isFirst === 0) && (this.$parent.details.isNovice === 1)) { // this.showDialog = true
// this.message = '僅限新手投資'
this.statePromptContent = '僅限新手投資'
return false
} if ((this.$parent.details.isNovice === 1) && (this.Total > 50000)) { // this.showDialog = true
this.statePromptContent = '新手標投資不能超過50000'
// this.message = '新手標投資不能超過50000'
return false
} if (this.count <= 0) { // this.showDialog = true
this.statePromptContent = '請選擇投資份數(shù)'
// this.message = '請選擇投資份數(shù)'
return false
}
}
這里是子組件的方法然后就報這個錯誤。求教是怎么回事。
vue 調(diào)用父組件調(diào)用子組件的問題
慕標5832272
2018-07-23 19:34:50