1、Vue3的Template支持多个根标签,Vue2不支持
2、Vue3有createApp(),而Vue2的是newVue()
createApp(组件),newVue({template,render})
3、v-model代替以前的v-model和.sync
vue3中v-model的用法要求:props属性名任意,这里假设为x,那么事件名必须为“update:x”
><Switch:value="y"@update:value="y=$event"/>
>vue2中的写法:<<Switch:value.sync=“y”/>>
>vue3中的写法:<<Switchv=model:value="y">>
4、context.emit
新增context.emit,与this.$emit(vue3中只能在方法里使用)作用相同