今天我们来说一说vue1.0和vue2.0的主要变化有哪些
一.在每个组件模板,不在支持片段代码
VUE1.0是:
<template>
<h3>我是组件</h3><strong>我是加粗标签</strong>
</template>
VUE2.0:必须有根元素,包裹住所有的代码
<template id=aaa>
<div>
<h3>我是组件</h3>
<strong>我是加粗标签</strong>
</div>
</template>
二.关于组件定义
VUE1.0定义组件的方式有:
Vue.extend 这种方式,在2.0