Vue + typescript parent components and subcomponents reported the Error in the callback for watcher "value" : "TypeError: always read the property 'call' of undefined" oh how to solve
CodePudding user response:
Object does not exist,,
CodePudding user response:
I like the ah is Boolean
CodePudding user response:
Post code... Look at the code
CodePudding user response:
The parent component
Subcomponents
Hello, you are choosing
{{courseTitle}}
Course, according to the level of your current account, the curriculum for
{{coursePrice + 'points'}}
Sign up and pay
Style="background - color: RGB (92,65,52)"
@ click="hideDialog"
Give up
<script lang="ts" & gt;
The import {Component, Prop, Watch,} the from 'vue - property - decorators';
The import {PlainView} from '@/SDK/components/PlainView';
@ Component ({})
Export the default class OnLineBuyDialog extends PlainView {
@ Prop ({required: false, the default: false})
Public value! : Boolean;
@ Prop ({required: false, the default: '})
Public courseTitle! : string;
@ Prop ({required: false, the default: '})
Public coursePrice! : string;
Private showBuy: Boolean=false;
@ Watch (' value ')
Public onShow (val: Boolean) {
Enclosing showBuy=val;
}
Public created () {
Enclosing showBuy=!!!!! This. The value;
}
</script>
CodePudding user response:
Listening test under other values, the question of whether or not to value is the keyword, inside the component shows a {{value}}
CodePudding user response:
I tried, with other variables by value elsewhere, too, so I didn't open components, write directly in a page
CodePudding user response:
Can you add your WeChat