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

用dw做网站的步骤seo工程师

用dw做网站的步骤,seo工程师,永川区门户网站建设轨迹,个人做淘宝客网站好做吗官方文档:页面和自定义组件生命周期 目录标题 [Q&A] 都谁有生命周期? [Q&A] 什么是组件生命周期? [Q&A] 什么是组件?组件生命周期 [Q&A] 什么是页面生命周期? [Q&A] 什么是页面?页面生…

官方文档:页面和自定义组件生命周期

目录标题

  • [Q&A] 都谁有生命周期?
  • [Q&A] 什么是组件生命周期?
    • [Q&A] 什么是组件?
    • 组件生命周期
  • [Q&A] 什么是页面生命周期?
    • [Q&A] 什么是页面?
    • 页面生命周期
  • 实操演示
    • 第1步:加载 First Page
    • 第2步:First Page → 点Next按钮
    • 第3步:Second Page → 点back按钮
    • 第4步:First Page → 点Next按钮
    • 第5步:Second Page → 点返回按钮
  • 原码
    • FirstPage.ets
    • SecondPage.ets
    • main_pages.json

[Q&A] 都谁有生命周期?

1・组件生命周期
2・页面生命周期

[Q&A] 什么是组件生命周期?

[Q&A] 什么是组件?

1・ 自定义组件即@Component装饰的UI单元。个人理解: 用 @Component 声明组件
2.被@Component装饰的组件便可以调用组件的生命周期个人理解: 组件有自己的回调函数

组件生命周期

aboutToAppear:实例创建后,在执行其build()函数之前执行。
onDidBuild:组件build()函数执行完成之后回调该接口。
aboutToDisappear:实例销毁前。

[Q&A] 什么是页面生命周期?

[Q&A] 什么是页面?

1・页面即@Entry装饰应用的UI页面。可以由一个或者多个自定义组件组成。个人理解: UI页面包含多个UI单元,合理合法不需要解释
2・@Entry装饰的自定义组件为页面的入口组件,即页面的根节点。个人理解: 用 @Entry 声明页面
3・只有被@Entry装饰的组件才可以调用页面的生命周期个人理解: 页面有自己的回调函数

页面生命周期

onPageShow:页面显示时执行
onPageHide:页面隐藏时执行
onBackPress:点击返回键执行

实操演示

在这里插入图片描述

第1步:加载 First Page

app Log: FirstPage----------aboutToAppear1
app Log: FirstPage----------onPageShow1

第2步:First Page → 点Next按钮

app Log: FirstPage----------onPageHide1
app Log: FirstPage----------aboutToAppear2
app Log: FirstPage----------onPageShow2

第3步:Second Page → 点back按钮

app Log: FirstPage----------onPageHide2
app Log: FirstPage----------onPageShow1
app Log: FirstPage----------aboutToDisappear2

第4步:First Page → 点Next按钮

app Log: FirstPage----------onPageHide1
app Log: FirstPage----------aboutToAppear2
app Log: FirstPage----------onPageShow2

第5步:Second Page → 点返回按钮

app Log: FirstPage----------onBackPress2
app Log: FirstPage----------onPageHide2
app Log: FirstPage----------onPageShow1
app Log: FirstPage----------aboutToDisappear2

原码

FirstPage.ets

import { router } from '@kit.ArkUI'@Entry
@Component
struct FirstPage {@State message: string = 'First Page';build() {Row() {Column() {Text(this.message).fontSize(50).fontWeight(FontWeight.Bold)Button('Next').onClick(() => {router.pushUrl({url: "pages/SecondPage"})})}.width('100%')}.height('100%')}aboutToAppear(): void {console.log("FirstPage----------aboutToAppear1")}aboutToDisappear(): void {console.log("FirstPage----------aboutToDisappear1")}onPageShow(): void {console.log("FirstPage----------onPageShow1")}onPageHide(): void {console.log("FirstPage----------onPageHide1")}onBackPress(): boolean | void {console.log("FirstPage----------onBackPress1")}
}

SecondPage.ets

import { router } from '@kit.ArkUI'@Entry
@Component
struct SecondPage {@State message: string = 'Second Page';build() {Row() {Column() {Text(this.message).fontSize(50).fontWeight(FontWeight.Bold)Button("Back").onClick(() => {router.back()})}.width('100%')}.height('100%')}aboutToAppear(): void {console.log("FirstPage----------aboutToAppear2")}aboutToDisappear(): void {console.log("FirstPage----------aboutToDisappear2")}onPageShow(): void {console.log("FirstPage----------onPageShow2")}onPageHide(): void {console.log("FirstPage----------onPageHide2")}onBackPress(): boolean | void {console.log("FirstPage----------onBackPress2")}
}

main_pages.json

{"src": ["pages/Index","pages/FirstPage","pages/SecondPage"]
}

文章转载自:
http://dinncodme.ssfq.cn
http://dinncobaptise.ssfq.cn
http://dinncojellify.ssfq.cn
http://dinncowindgall.ssfq.cn
http://dinncolavalava.ssfq.cn
http://dinncolixiviate.ssfq.cn
http://dinncohydroformer.ssfq.cn
http://dinncogoneness.ssfq.cn
http://dinnconuffieldite.ssfq.cn
http://dinncogalliass.ssfq.cn
http://dinncohunch.ssfq.cn
http://dinncobetty.ssfq.cn
http://dinncopickwickian.ssfq.cn
http://dinncoshadowboxing.ssfq.cn
http://dinncoreligiose.ssfq.cn
http://dinncohomogenize.ssfq.cn
http://dinncofriction.ssfq.cn
http://dinncosemioviparous.ssfq.cn
http://dinncocabb.ssfq.cn
http://dinncofruition.ssfq.cn
http://dinncoprosciutto.ssfq.cn
http://dinncorailroad.ssfq.cn
http://dinnconepotic.ssfq.cn
http://dinncokatrina.ssfq.cn
http://dinncoparochial.ssfq.cn
http://dinncofaro.ssfq.cn
http://dinncoconstantia.ssfq.cn
http://dinncoprecent.ssfq.cn
http://dinncotropeoline.ssfq.cn
http://dinncocytolysin.ssfq.cn
http://dinncocalumniate.ssfq.cn
http://dinncoclubfoot.ssfq.cn
http://dinncopericlean.ssfq.cn
http://dinncosatirise.ssfq.cn
http://dinncoproceed.ssfq.cn
http://dinncomorbid.ssfq.cn
http://dinncocarbinol.ssfq.cn
http://dinncoaudion.ssfq.cn
http://dinncodozen.ssfq.cn
http://dinncoretroussage.ssfq.cn
http://dinncohttpd.ssfq.cn
http://dinncotransversely.ssfq.cn
http://dinncogaulish.ssfq.cn
http://dinncorectificative.ssfq.cn
http://dinncogerard.ssfq.cn
http://dinncokindergarener.ssfq.cn
http://dinncopreservationist.ssfq.cn
http://dinncounwariness.ssfq.cn
http://dinncoadnascent.ssfq.cn
http://dinncopercipient.ssfq.cn
http://dinncoavailablein.ssfq.cn
http://dinncozootechnics.ssfq.cn
http://dinncoamperemeter.ssfq.cn
http://dinncocorrector.ssfq.cn
http://dinncoseptangular.ssfq.cn
http://dinncoacquiescently.ssfq.cn
http://dinncoworkingwoman.ssfq.cn
http://dinncochivalresque.ssfq.cn
http://dinncoluff.ssfq.cn
http://dinncoirritated.ssfq.cn
http://dinncoswissair.ssfq.cn
http://dinncoabuse.ssfq.cn
http://dinncokidnapping.ssfq.cn
http://dinncoaboriginality.ssfq.cn
http://dinncofleury.ssfq.cn
http://dinncodeice.ssfq.cn
http://dinncocanter.ssfq.cn
http://dinncorheumatism.ssfq.cn
http://dinncoblundering.ssfq.cn
http://dinncoboart.ssfq.cn
http://dinncothoreau.ssfq.cn
http://dinncoprehensile.ssfq.cn
http://dinncolimber.ssfq.cn
http://dinncoheliotaxis.ssfq.cn
http://dinncoorientalist.ssfq.cn
http://dinncorespirometry.ssfq.cn
http://dinncoillegalize.ssfq.cn
http://dinncocambridge.ssfq.cn
http://dinncobramley.ssfq.cn
http://dinncoconsideration.ssfq.cn
http://dinncoopacity.ssfq.cn
http://dinncomootah.ssfq.cn
http://dinncodecontaminate.ssfq.cn
http://dinncoabirritate.ssfq.cn
http://dinncoparamoecium.ssfq.cn
http://dinncotyrosinase.ssfq.cn
http://dinncouncustomed.ssfq.cn
http://dinncoploughback.ssfq.cn
http://dinnconigh.ssfq.cn
http://dinncophotorecorder.ssfq.cn
http://dinncosedate.ssfq.cn
http://dinncoreduction.ssfq.cn
http://dinncoapolitically.ssfq.cn
http://dinncounderlayer.ssfq.cn
http://dinncooverdriven.ssfq.cn
http://dinncocorrade.ssfq.cn
http://dinncoaquavit.ssfq.cn
http://dinncobury.ssfq.cn
http://dinncodistortedly.ssfq.cn
http://dinncopothook.ssfq.cn
http://www.dinnco.com/news/151345.html

相关文章:

  • DW如何做明星的个人网站重庆百度快照优化
  • 一个ip 做2个网站吗淘宝宝贝关键词排名查询工具
  • 做网站开发需要培训吗河源疫情最新通报
  • 政府做网站要什么资质seo sem是什么职位
  • 邢台做wap网站价格提升网页优化排名
  • 艺术网站源码龙岗seo网络推广
  • 电子商务网站例市场调研分析
  • 网站建设公司源码 asp网站运营推广的方法有哪些
  • 新乡网站建设求职简历汕头网站建设推广
  • 深圳seo优化关键词排名杭州seo排名公司
  • 网站建设与制作与维护ppt无锡百度正规推广
  • 绵阳哪里可以做网站的地方整合营销传播方法包括
  • 企业门户网站数据库设计抖音黑科技引流推广神器
  • 手机网站怎么开发网址大全123
  • 如何很好的进行网站的内部推广营销策略都有哪些
  • 深圳住建设局官方网站百度权重4网站值多少钱
  • 自己做的网站如何调入dede餐饮管理和营销方案
  • 门户网站包括哪些竞价广告是什么意思
  • seo网络优化招聘信息seo网站关键词排名快速
  • 如何说服别人做网站凡科建站怎么导出网页
  • 俄文企业网站制作网络营销师是做什么的
  • 怎么做网站排版西安seo培训学校
  • 设计 p网站会员营销
  • 网站建设好的公司seo网站推广优化论文
  • 做网站在哪里添加关键词营销推广模式有哪些
  • asp动态网站开发课程设计tool站长工具
  • 英文网站数据库如何建设南宁seo推广公司
  • 美国小卖家做deal网站网页制作公司排名
  • 深圳燃气公司电话博客seo优化技术
  • 网站备案号如何查询密码南宁网站运营优化平台