会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
我吃柠檬
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
2020年11月4日
vue3的新写法和特性整理——六、插槽的使用
摘要: 1、子组件暴露插槽的写法 <template> <div class="hello"> <h1>子组件</h1> <h1>↓↓↓以下是默认插槽内容↓↓↓</h1> <slot :scope="sexEn1"></slot> <h1>↑↑↑以上是插槽内容↑↑↑</h1> <br /> <div>{{s
阅读全文
posted @ 2020-11-04 00:36 我吃柠檬
阅读(1695)
评论(0)
推荐(1)
2020年11月3日
vue3的新写法和特性整理——五、子组件向组件向父组件暴露方法
摘要: 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 我吃柠檬
阅读(3767)
评论(0)
推荐(0)
vue3的新写法和特性整理——四、子父组件之间传值
摘要: 只贴出了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 我吃柠檬
阅读(1049)
评论(0)
推荐(0)
2020年10月24日
vue3的新写法和特性整理——三、变量和事件的绑定
摘要: vue3中,实现数据驱动,在写法上有了改变 <template> <div style="cursor:pointer;" @click="changeWord">{{world}}</div> </template> <script> import { reactive, toRefs } fro
阅读全文
posted @ 2020-10-24 21:37 我吃柠檬
阅读(3996)
评论(0)
推荐(1)
vue3的新写法和特性整理——二、生命周期函数的变化
摘要: 1、弃用钩子“beforeDestroy”、“destroyed”ESlint检查 2、钩子的变化 <template> <div> </div> </template> <script> export default { setup() { console.log('setup'); }, bef
阅读全文
posted @ 2020-10-24 20:57 我吃柠檬
阅读(716)
评论(0)
推荐(0)
vue3的新写法和特性整理—— 一、从创建项目开始
摘要: 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 我吃柠檬
阅读(3666)
评论(0)
推荐(0)
上一页
1
2
公告