vue is a syntactic sugar for two-way binding of component properties. If there is component 1
var component1 = {
template:"<div v-show="visible">{{title}}</div>",
props:["title","visible"]
}
where visible uses the sync modifier
<template>
<components1 title="title" :visible.sync="visible"></components1>
</template>
<script>
export default {
data(){
return {
visible:false
}
}
}
</script>
The above is the normal way to write it, so now I"m going to call the components1, property with the sync modifier in the form of a constructor. How should I write
?var constructor = Vue.extend(component1)
var vm = new constructor({
propsData:{
title:"title",
"visible.sync":true //
}
})
Why step on me (you can see who stepped on my app), is it too stupid for me to ask, or are you all too big to answer this kind of question?