vue中的:is
is
string | Object (组件的选项对象)
<div id="app">
<span>这是:is的案例</span>
<component :is="show"></component>
<span>这是 is="show"的案例</span>
<component is="show"></component>
</div>
<script>
Vue.component('one',{
template: "<div>nihao<div>"
})
Vue.component('show',{
template: "<div>nihaohao<div>"
})
var vm = new Vue({
el: '#app',
data: {
show: 'one'
},
})
</script>