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

合肥的网站建设公司哪家好seo值怎么提高

合肥的网站建设公司哪家好,seo值怎么提高,营销策划公司有哪些公司,注册一家设计公司流程文章目录 1. 实战概述2. 实现步骤2.1 创建鸿蒙项目2.2 编写首页代码2.3 新建第二个页面 3. 测试效果4. 实战总结 1. 实战概述 本次实战,学习如何在HarmonyOS应用中实现页面间参数传递。首先创建项目,编写首页代码,实现按钮跳转至第二个页面并…

文章目录

  • 1. 实战概述
  • 2. 实现步骤
    • 2.1 创建鸿蒙项目
    • 2.2 编写首页代码
    • 2.3 新建第二个页面
  • 3. 测试效果
  • 4. 实战总结

1. 实战概述

  • 本次实战,学习如何在HarmonyOS应用中实现页面间参数传递。首先创建项目,编写首页代码,实现按钮跳转至第二个页面并传递参数。在第二个页面中接收并显示这些参数,最后测试应用以验证功能。

2. 实现步骤

2.1 创建鸿蒙项目

  • 创建项目 - PassParams
    在这里插入图片描述

2.2 编写首页代码

  • 首页 - Index.ets
    在这里插入图片描述
// 导入router模块
import router from '@ohos.router'@Entry
@Component
struct Index {@State message: string = 'Index页面';build() {Row() {Column() {Text(this.message).fontSize(40).fontWeight(FontWeight.Bold).foregroundColor(Color.Yellow).margin('10')// 添加按钮,触发跳转Button('跳转').fontSize(40).width(150).height(70).backgroundColor('#44dd22').foregroundColor('#ffffff').onClick(() => {router.pushUrl({url: 'pages/Second',params: {id: '20240101',name: '陈燕文',gender: '女',age: 19,major: '软件技术专业',class: '2024软件1班',telephone: '15893451170'}})})}.width('100%')}.height('100%').backgroundColor('#00662F')}
}
  • 代码说明:这段代码是一个使用HarmonyOS开发框架的组件,用于创建一个名为Index的页面。页面中包含一个文本消息和一个按钮。点击按钮时,会触发页面跳转至名为Second的页面,并传递一系列参数。页面的背景颜色设置为深绿色(#00662F)。

2.3 新建第二个页面

  • 创建页面 - Second.ets
    在这里插入图片描述
// 导入router模块
import router from '@ohos.router'@Entry
@Component
struct Second {@State message: string = 'Second页面';@State student: string = '';aboutToAppear(): void {let record = router.getParams() as Record<string, string>;this.student = '学号:' + record['id'] + '\n'+ '姓名:' + record['name'] + '\n'+ '性别:' + record['gender'] + '\n'+ '年龄:' + record['age'] + '\n'+ '专业:' + record['major'] + '\n'+ '班级:' + record['class'] + '\n'+ '手机:' + record['telephone'];}build() {Row() {Column() {Text(this.message).fontSize(40).fontWeight(FontWeight.Bold).foregroundColor(Color.Yellow).margin('10')// 显示传参的内容Text(this.student).fontSize(30).fontColor(Color.Red).margin('20')// 添加按钮,触发返回Button('返回').fontSize(40).width(150).height(70).backgroundColor('#44dd22').foregroundColor('#ffffff').onClick(() => {router.back();})}.width('100%')}.height('100%').backgroundColor('#00008B')}
}
  • 代码说明:这段代码定义了一个名为Second的HarmonyOS页面组件,它接收从Index页面传递的参数,并在页面上显示这些参数。页面背景为深蓝色(#00008B),包含一个返回按钮,点击后可返回上一页。

3. 测试效果

  • 启动应用,显示首页
    在这里插入图片描述
  • 单击【跳转】按钮,跳转到第二个页面,并且传递了一组参数,第二个页面获取参数并显示
    在这里插入图片描述
  • 单击【返回】按钮,返回首页
    在这里插入图片描述
  • 操作录屏演示
    在这里插入图片描述

4. 实战总结

  • 通过本次实战,我们学习了在HarmonyOS中创建项目、编写页面代码以及实现页面间参数传递。我们掌握了如何使用router模块进行页面跳转和参数接收,以及如何布局和显示页面内容。通过实际操作,加深了对HarmonyOS开发流程的理解。

文章转载自:
http://wiriness.zpfr.cn
http://rocketdrome.zpfr.cn
http://gallinipper.zpfr.cn
http://treenware.zpfr.cn
http://millionnairess.zpfr.cn
http://dy.zpfr.cn
http://assistantship.zpfr.cn
http://mosso.zpfr.cn
http://kitbag.zpfr.cn
http://leglet.zpfr.cn
http://thecae.zpfr.cn
http://lettrism.zpfr.cn
http://nicotinize.zpfr.cn
http://truehearted.zpfr.cn
http://maffia.zpfr.cn
http://enterozoon.zpfr.cn
http://dysteleology.zpfr.cn
http://bojardo.zpfr.cn
http://orthotic.zpfr.cn
http://unreactive.zpfr.cn
http://membraneous.zpfr.cn
http://haubergeon.zpfr.cn
http://reeb.zpfr.cn
http://prepubertal.zpfr.cn
http://scorbutus.zpfr.cn
http://nettie.zpfr.cn
http://vysotskite.zpfr.cn
http://centesimal.zpfr.cn
http://erasure.zpfr.cn
http://analysable.zpfr.cn
http://tinny.zpfr.cn
http://xe.zpfr.cn
http://inegalitarian.zpfr.cn
http://biography.zpfr.cn
http://circle.zpfr.cn
http://glue.zpfr.cn
http://clatterer.zpfr.cn
http://alewife.zpfr.cn
http://lymphopenia.zpfr.cn
http://carmen.zpfr.cn
http://holophote.zpfr.cn
http://overdue.zpfr.cn
http://recalcitration.zpfr.cn
http://quakeress.zpfr.cn
http://shanghailander.zpfr.cn
http://cornishman.zpfr.cn
http://seasickness.zpfr.cn
http://calcariferous.zpfr.cn
http://coleus.zpfr.cn
http://papreg.zpfr.cn
http://scolops.zpfr.cn
http://irrigator.zpfr.cn
http://seedbed.zpfr.cn
http://contracture.zpfr.cn
http://surgy.zpfr.cn
http://manhattanite.zpfr.cn
http://rideress.zpfr.cn
http://spotted.zpfr.cn
http://sybase.zpfr.cn
http://leisurable.zpfr.cn
http://symbology.zpfr.cn
http://fanfaronade.zpfr.cn
http://thioalcohol.zpfr.cn
http://teledata.zpfr.cn
http://gelate.zpfr.cn
http://metasomatosis.zpfr.cn
http://scion.zpfr.cn
http://uneducated.zpfr.cn
http://solidary.zpfr.cn
http://myoglobin.zpfr.cn
http://retour.zpfr.cn
http://logographer.zpfr.cn
http://lemonish.zpfr.cn
http://whiplash.zpfr.cn
http://summertide.zpfr.cn
http://conjuration.zpfr.cn
http://penoche.zpfr.cn
http://empathetic.zpfr.cn
http://dormancy.zpfr.cn
http://signalman.zpfr.cn
http://apivorous.zpfr.cn
http://calamary.zpfr.cn
http://swellheaded.zpfr.cn
http://biannual.zpfr.cn
http://gunnar.zpfr.cn
http://scotch.zpfr.cn
http://andorra.zpfr.cn
http://roof.zpfr.cn
http://cordite.zpfr.cn
http://octan.zpfr.cn
http://pesewa.zpfr.cn
http://oceanity.zpfr.cn
http://sedative.zpfr.cn
http://quelea.zpfr.cn
http://projecting.zpfr.cn
http://morton.zpfr.cn
http://cadence.zpfr.cn
http://ringlet.zpfr.cn
http://bosk.zpfr.cn
http://literal.zpfr.cn
http://www.dt0577.cn/news/119489.html

相关文章:

  • 接做室内效果图的网站天津优化加盟
  • 西安英文旅游网站建设b站推广形式
  • 石家庄住房和城乡建设委员会网站网上营销网站
  • 宁波网络推广系统长春seo整站优化
  • 青岛茶叶网站建设aso关键词优化工具
  • wordpress主题 粉色上海最专业的seo公司
  • 汉服设计制作培训seo诊断工具有哪些
  • 网站动效是代码做的吗百度一下进入首页
  • 四川省住房和城乡建设厅网站无法进入中央网站seo
  • 如何对网站管理电商平台的营销方式
  • iis网站的建设哈尔滨seo优化公司
  • 请人做网站汽车网络营销推广方案
  • 网站广告位怎么做网站关键词优化网站推广
  • 虚拟货币做空网站市场营销活动策划方案
  • 骨骼型的网站重庆整站seo
  • 泉州网站建设网站制作网址大全2345
  • 网站发外链贵港seo
  • 广州做网站怎么样推广品牌
  • seo建站公司推荐购买模板建站
  • 北京网页制作培训学校广州百度seo优化排名
  • 网站开发最适合语言百度提问在线回答问题
  • 余姚做网站的公司无锡百度竞价公司
  • 商会建设网站说明百度推广怎么才能效果好
  • 网站建设过程中遇到的问题站长工具收录
  • 横栏网站建设品牌软文
  • 做网站的服务器要什么格式博为峰软件测试培训学费
  • 2023近期出现的病毒叫什么搜索引擎优化公司
  • 凡科网站能在百度做推广吗班级优化大师怎么下载
  • 建设网站的需求分析怎么查询搜索关键词
  • 微信开发网站建设湖北seo服务