<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 = '請選擇投資份數'
// this.message = '請選擇投資份數'
return false
}
}
這里是子組件的方法然后就報這個錯誤。求教是怎么回事。
vue 調用父組件調用子組件的問題
阿晨1998
2018-07-20 10:22:20