不异步的方式:
Vue.component('child', {
props: ['message'],
template: '<span>{{ message }}</span>'
})
异步组件的时候 props该怎么放?
Vue.component('async-webpack-example', function (resolve) {
require(['./my-async-component'], resolve)
})
自己瞎试了几种写法都失败了..
同样也是利用props来向子组件传值, 异步组件只是加载组件的方式不一样而已.