摘要: vue3中子组件向父组件暴露方法并传值,同样兼容老写法1、父组件 <template> <div class="home"> <h1>父组件</h1> <img alt="Vue logo" src="../assets/logo.png" /> <HelloWorld @changeMsg="ch 阅读全文
posted @ 2020-11-03 23:35 我吃柠檬 阅读(3693) 评论(0) 推荐(0) 编辑
摘要: 只贴出了vue3中新的子父组件传值,V3兼容老的写法就不再赘述1、父组件 <template> <div class="home"> <h1>父组件</h1> <img alt="Vue logo" src="../assets/logo.png" /> <HelloWorld :msg="msg" 阅读全文
posted @ 2020-11-03 23:10 我吃柠檬 阅读(1031) 评论(0) 推荐(0) 编辑
摘要: vue3中,实现数据驱动,在写法上有了改变 <template> <div style="cursor:pointer;" @click="changeWord">{{world}}</div> </template> <script> import { reactive, toRefs } fro 阅读全文
posted @ 2020-10-24 21:37 我吃柠檬 阅读(3979) 评论(0) 推荐(1) 编辑
摘要: 1、弃用钩子“beforeDestroy”、“destroyed”ESlint检查 2、钩子的变化 <template> <div> </div> </template> <script> export default { setup() { console.log('setup'); }, bef 阅读全文
posted @ 2020-10-24 20:57 我吃柠檬 阅读(698) 评论(0) 推荐(0) 编辑
摘要: 1、创建命令的变化 用vue3命令创建xx项目:vue create "xx" 注:vue3在创建项目时,只能使用小写字母,以及亲和url的字符,否则将会报错 vue create m+ 创建项目时报错:Error: name can only contain URL-friendly charac 阅读全文
posted @ 2020-10-24 17:42 我吃柠檬 阅读(3573) 评论(0) 推荐(0) 编辑