当前位置: 首页 > news >正文

新绛做网站网站建设 乐视

新绛做网站,网站建设 乐视,wordpress做视频网站,一部手机怎么做电商uniapp 微信小程序&#xff1a;页面组件的生命周期顺序 首页页面父组件子组件完整顺序参考资料 这个uniapp的微信小程序项目使用的是 VUE2 首页 首页只提供了一个跳转按钮。 <template><view><navigator url"/pages/myPage/myPage?namejerry" hov…

uniapp 微信小程序:页面+组件的生命周期顺序

  • 首页
  • 页面
  • 父组件
  • 子组件
  • 完整顺序
  • 参考资料

这个uniapp的微信小程序项目使用的是 VUE2

首页

首页只提供了一个跳转按钮。

<template><view><navigator url="/pages/myPage/myPage?name=jerry" hover-class="navigator-hover"><button type="default">跳转到新页面</button></navigator></view>
</template><script>export default {data() {return { }},}
</script><style>
</style>

页面

<template><view> 页面 <parent-component>parent-component</parent-component> </view>
</template><script>export default {data() {return { }},onInit(option){console.log(`页面 onInit: ${JSON.stringify(option)}`)},onLoad(option){console.log(`页面 onLoad: ${JSON.stringify(option)}`)},onShow(option){console.log(`页面 onShow: ${JSON.stringify(option)}`)},onReady(option){console.log(`页面 onReady: ${JSON.stringify(option)}`)},onHide(option){console.log(`页面 onHide: ${JSON.stringify(option)}`)},onUnload(option){console.log(`页面 onUnload: ${JSON.stringify(option)}`)},onResize(option){console.log(`页面 onResize: ${JSON.stringify(option)}`)},onPullDownRefresh(option){console.log(`页面 onPullDownRefresh: ${JSON.stringify(option)}`)},onReachBottom(option){console.log(`页面 onReachBottom: ${JSON.stringify(option)}`)},onTabItemTap(option){console.log(`页面 onTabItemTap: ${JSON.stringify(option)}`)},onShareAppMessage(option){console.log(`页面 onShareAppMessage: ${JSON.stringify(option)}`)},onPageScroll(option){console.log(`页面 onPageScroll: ${JSON.stringify(option)}`)},onShareTimeline(option){console.log(`页面 onShareTimeline: ${JSON.stringify(option)}`)},onAddToFavorites(option){console.log(`页面 onAddToFavorites: ${JSON.stringify(option)}`)},}
</script><style>
</style>

父组件

<template><view> 父组件 <child-component>child-component</child-component> </view>
</template><script>export default {data() {return {};},beforeCreate(option){console.log(`父组件 beforeCreate: ${option}`)},created(option){console.log(`父组件 created: ${option}`)},beforeMount(option){console.log(`父组件 beforeMount: ${option}`)},mounted(option){console.log(`父组件 mounted: ${option}`)},beforeDestroy(option){console.log(`父组件 beforeDestroy: ${option}`)},destroyed(option){console.log(`父组件 destroyed: ${option}`)},}
</script><style>
</style>

子组件

<template><view> 子组件 </view>
</template><script>export default {data() {return {};},beforeCreate(option){console.log(`子组件 beforeCreate: ${option}`)},created(option){console.log(`子组件 created: ${option}`)},beforeMount(option){console.log(`子组件 beforeMount: ${option}`)},mounted(option){console.log(`子组件 mounted: ${option}`)},beforeDestroy(option){console.log(`子组件 beforeDestroy: ${option}`)},destroyed(option){console.log(`子组件 destroyed: ${option}`)},}
</script><style>
</style>

完整顺序

在这里插入图片描述

// 进入
父组件 beforeCreate: undefined
父组件 created: undefined
父组件 beforeMount: undefined
子组件 beforeCreate: undefined
子组件 created: undefined
子组件 beforeMount: undefined
页面 onLoad: {"name":"jerry"}
页面 onShow: undefined
子组件 mounted: undefined
父组件 mounted: undefined
页面 onReady: undefined// 退出
页面 onUnload: undefined
子组件 beforeDestroy: undefined
子组件 destroyed: undefined
父组件 beforeDestroy: undefined
父组件 destroyed: undefined

参考资料

uniap 页面生命周期
uniapp 组件生命周期

http://www.yayakq.cn/news/747736/

相关文章:

  • 长沙企业网站制作服务报价15个常见关键词
  • 网站界面设计内容有哪些长沙搭建网络环境
  • 网站网址注册互联网公司怎么起名字
  • 技术支持 桂林网站建设傻瓜app制作开发
  • 网站备案需要的材料适合个人做的网站有哪些东西吗
  • 网站建设 成都网站站内消息设计方案
  • 阿里云网站模板网上银行建设银行
  • 单页网站案例分析中国建设教育协会的网站
  • iis6.1添加网站建立个人博客wordpress
  • 公司网站可以免费建吗青海城乡建设部网站首页
  • 郑州大型网站制作合肥网页设计哪家服务好
  • 如何查看网站备案信息吗上海环球金融中心造价
  • 做ic贸易去什么网站好怎么用织梦制作响应式布局网站
  • 微软网站怎么做的济南seo外包公司
  • 简洁大气国内企业网站网站的flash怎么做
  • 广州网站建设 骏域网站建设怎么做网络营销推广
  • 自己怎么开发网站西乡网站的建设
  • 河南做网站哪家好公司网站维护费大概需要多少
  • 汝州市城乡建设局网站亿建联网站是谁做的
  • 在线图片编辑器图怪兽网站个别页面做seo
  • 做网站下载别人的图算不算侵权网站开发逻辑图
  • 北京专业网站制作免费做网站支持绑定
  • 网站建设费用什么意思wordpress性能优化插件
  • 阿里云服务器搭建网站文章自定义wordpress
  • wordpress wp_register()网站优化排名方法有哪些
  • 网站seo服务公司专业的企业小程序开发公司
  • 网站后台常用密码建立一个个人网站
  • app扁平化设计网站模板wordpress主题定制器
  • 怎么做公司网站文案建设一个网站
  • 建设厅网站密码找回装饰工程经营范围有哪些