const CounterComponent = Vue.extend(Counter);
this.vm = new CounterComponent({}).$mount('#container');
其中 Counter 是引进来的组件
this.vm是引进来的组件生成的vue实例
我们可以通过this.vm.xx来直接控制Counter中的data中的数据
长风破浪会有时,直挂云帆济沧海
微信扫一扫
const CounterComponent = Vue.extend(Counter);
this.vm = new CounterComponent({}).$mount('#container');
其中 Counter 是引进来的组件
this.vm是引进来的组件生成的vue实例
我们可以通过this.vm.xx来直接控制Counter中的data中的数据
长风破浪会有时,直挂云帆济沧海
相关推荐