Answer the question
In order to leave comments, you need to log in
Props and v-if are not friendly, why such behavior?
Good day!
Guys, I was busy for an hour, I don't know why this behavior:
A small program in view is old, then I studied the basics and the implementation remained without vue-cli.
There is a js and html file. The html contains the application container and the module window template .
js contains everything: there is a root component, it includes others, but it is the module window that is of interest - this is one level of nesting.
So: the root component on created receives from the server the settings for displaying the form (ajax(axios)), which is located in the module window. It receives a list of procedures to output v-for and receives settings for displaying input fields. As:
formSettings:{
name: {used:true, required:true},
phone: {used:false, required:false},
.....
}
Vue.component('#myModalForm' ,{
props: ['procedureList', 'siteSettings'],
data: function(){return}
}
<div v-for="procedure in procedureList">
<div>{{ procedure.name }}</div>
</div>
<div v-if="siteSettings.name.used"></div>
Answer the question
In order to leave comments, you need to log in
The only oddity is that chrome displays false in black after the data arrives, and blue after the change using events (on click).
What could be the problem?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question