04 2022 档案

摘要:$emit : 子组件触发父组件方法 ref : 父组件调用子组件方法 现在有父子组件分别如下: Parent.vue <template> <div> <span>这里是父组件</span> <Child ref="child" v-bind:parentValue="parent" @editV 阅读全文
posted @ 2022-04-19 23:12 RookieCoderAdu 阅读(535) 评论(0) 推荐(0) 编辑
摘要:.prevent用来阻止浏览器的默认行为 1.超链接跳转,比如 <a href="http://www.baidu.com" @click.prevent="dosomething"/> 2.form标签的submit点击后导致的页面刷新 3.网页 右键菜单 等 阅读全文
posted @ 2022-04-18 11:22 RookieCoderAdu 阅读(401) 评论(0) 推荐(0) 编辑
摘要:V-bind //一般绑定data中的数据,用于响应式更新数据 V-if //根据true或false来决定是否显示 V-on //监听Dom事件,比如点击 V-show //跟v-if类似,但html元素依然存在,相当于display:none V-html //插入html V-for //循环 阅读全文
posted @ 2022-04-15 17:44 RookieCoderAdu 阅读(28) 评论(0) 推荐(0) 编辑
摘要:创建(Create) =》挂载(Mount)=》 更改 (Update) =》销毁 (Destory) 那么对应的 beforeCreate:此时 data和method没有初始化。没有赋值也没声明函数 Created:此时data和method才初始化。那么可以调用值和函数了 beforeMoun 阅读全文
posted @ 2022-04-15 16:45 RookieCoderAdu 阅读(60) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示