vue The component does not render and update in , Method summary
1. use this.$forceUpdate() method
for example :
this.data.status= false; // Data change this.$forceUpdate(); // call
2. If it is object Or is it array It's best to change the value of the type this. s e t ( ) , t h i s . set(),this. set(),thi
s.delete(),array.splice() And so on
this.$set(this.data,'status',false)
3. use v-if To control the component so that after changing the value, the component disappears and is rendered again .
view
<Input v-if="show" key="1" id="keyword" name="keyword" prefix="ios-search"
placeholder=" search "/>
js:
$this.show= false; this.data.status= false; $this.show= true;
4. use v-if If the value is changed successfully and there is no re rendering, it is likely that the components are too similar vue I didn't recognize it , You have to add one key To distinguish these components .
<Input v-if="tabDefault==='company'" key="1" id="keyword" name="keyword"
prefix="ios-search" placeholder=" search "/> <Input v-if="tabDefault==='role'"
key="2" id="keyword2" name="keyword2" prefix="ios-search" placeholder=" search "/>
<Input v-if="tabDefault==='interior'" key="3" id="keyword3" name="keyword3"
prefix="ios-search" placeholder=" search "/>
Technology
Daily Recommendation