& lt; El - form: model="form" v - if="is_queryinfo==true" & gt;
data: {
Is_queryinfo: false,
Form: {
Query: "'
Training_method: Number,
}
},
Methods: {
OnQuery () {
Var _this=this;
_this. Is_queryinfo=true;
_this $forceUpdate ();
The console. The log (_this. Is_queryinfo);
}
}
CodePudding user response:
If above all is judge true and false, it is not necessary to judgment again in the v - if true, v - if="is_queryinfo", secondly, vue is scope, where did your el Settings, where the vue grammar is effectiveCodePudding user response:
Look from your hair of the code, first of all, you have to adjust the code:
Data: {
Is_queryinfo: false,
Form: {
Query: "'
Training_method: 0,//with specific values, specific Number have a definition, didn't you define complains
}
},
Finally, you begin to look at the console, with or without an error,
CodePudding user response:
Comprehensive upstairs, you don't have a point of this problem, here also don't spare the var _this=thisCodePudding user response:
<script SRC="https://cdn.jsdelivr.net/npm/vue" & gt; </script>
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" & gt;
<script SRC="https://unpkg.com/element-ui/lib/index.js" & gt; </script>
<body>