vue
zhangyadong_QQ
这个作者很懒,什么都没留下…
展开
-
vue 父传子、子传父、非父子关系之间的组件传值
1.父传子 建立ComponentA.vue文件 <template> <div> <h1>A组件</h1> <span>消息为:{{message}}</span><br> <button v-on:click="onclick原创 2019-03-12 09:57:37 · 217 阅读 · 0 评论 -
Vue组件的生命周期
beforeCreate 创建前 created 创建完毕 初始化 data数据 beforeMount 挂载前 初始化 el mounted 挂载完成 beforeUpdate 更新前 updated 更新完成 beforeDestroy 销毁前 destroyed 销毁完成 代码如下: <template> <div> <h3...原创 2019-03-12 10:49:11 · 102 阅读 · 0 评论