HarmonyOS开发案例 router路由-数据传输

效果展示:
1.建立项目包
2.创建文件
3.代码部分:
4.显示部分:
index.hml
记录 时间:{{ time }}地点:{{ address }}人员:{{ personal }}
index.css
.container { flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%;}.title{ width: 100%; text-align: center; margin-bottom: 20px;}.boxs{ flex-direction: column; justify-content: center; align-items: flex-start; width: 100%;}.text { font-size: 20px; color: #333; opacity: 0.9; margin-bottom: 10px; margin-left: 20px;} index.js
.container { flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%;}.title{ width: 100%; text-align: center; margin-bottom: 20px;}.boxs{ flex-direction: column; justify-content: center; align-items: flex-start; width: 100%;}.text { font-size: 20px; color: #333; opacity: 0.9; margin-bottom: 10px; margin-left: 20px;} 输入记录部分:
tuoter.hml
输入记录
touter.css
.container { flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%;}.title { font-size: 30px; text-align: center; width: 200px; height: 100px;}.box{ flex-direction: column; justify-content: space-between; align-items: center; height: 200px; width: 100%;} touter.js
import router from '@system.router';export default { data:{ time:, address:, personal:, }, getchange(e){ let idname = e.target.id if (idname === 1) { this.time = e.value }else if (idname === 2) { this.address = e.value }else if (idname === 3) { this.personal = e.value } }, btnclick(){ router.push({ uri:pages/index/index, params:{ time:this.time, address:this.address, personal:this.personal, } }) }}
微软基于Chromium的Edge浏览器最新稳定版本推送
赞奇云一站式云上制作,完美应对游戏行业困难及挑战
电力负荷管理模拟系统的构建和应用
台积电官方对外开放16nm FinFET技术
骏成电子创业板IPO获受理,拟募资5.5亿元
HarmonyOS开发案例 router路由-数据传输
什么是光伏储能?光伏储能的相关技术及应用介绍
usmile大理石电动牙刷怎么样?小编分享真实使用经历
物联网“十二五”规划进最后审核阶段
俄罗斯官员说国有控股的稳定币完全相当于俄罗斯的法定货币卢布
江苏国泰子公司锂电池电解液项目试生产
USB Host不停NAK的问题
24GHz雷达传感器的原理及运用解析
ST新推出ST25R+ST25T停车管理方案 实现共享电动车的定点停车管理
华为P40外观配置曝光,2K双曲面+5500毫安石墨烯电池
MIT研发新材料,使太阳能电池效率提升50%
电化学氧气传感器与荧光氧传感器相比哪个更具优势?
Google打算在下一版智能手机操作系统中实施减少屏幕使用模式
RC无源滤波器电路
融合创新,共促发展丨南京纳特通信亮相北京2023中国电磁兼容展暨峰会127展位