<div id="mount-point"></div>
</body>
<script>
var Comp = Vue.extend({
props: ['msg'],
template: '<div>{{ msg }}</div>'
})
var vm = new Comp({
propsData: {
msg: 'hello'
}
}).$mount('#mount-point')
</script>
Vue的propsData
猜你喜欢
转载自blog.csdn.net/qq_33518543/article/details/83145420
今日推荐
周排行