共享元素
16
有时候会出现控件显示不全,大概四五次会出现一次
跳转前:
跳转后:
偶尔出现问题的跳转后:
代码:
首页:
Search({ placeholder: '搜索' })
.id("searchCaseTitle")
.focusOnTouch(false)
.focusable(false)
.enableKeyboardOnFocus(false)
.backgroundColor('#E7E9E8')
.width('100%')
.height(43)
.onClick(() => {
animateTo({ duration: 800 }, () => {
this.pathInfos.pushPathByName('PageElementShare02', null, false)
});
})
.geometryTransition(this.geometryId, { follow: true })
.backgroundColor('#E7E9E8')
.borderRadius(10)跳转页:
Row() {
Image($r('sys.media.ohos_ic_public_arrow_left'))
.width(36)
.height(36)
.transition(TransitionEffect.asymmetric(
TransitionEffect.opacity(0)
.animation({ curve: curves.cubicBezierCurve(0.33, 0, 0.67, 1), duration: 200, delay: 150 }),
TransitionEffect.opacity(0)
.animation({ curve: curves.cubicBezierCurve(0.33, 0, 0.67, 1), duration: 200 }),
))
Search({ value: this.searchInput, placeholder: '搜索' })
.id("searchCaseTitleContentCover")
.searchButton('搜索', { fontSize: 16 })
.geometryTransition('search',{follow : true})
.defaultFocus(true)
.enableKeyboardOnFocus(false)
.backgroundColor('#E7E9E8')
.onChange((value) => {
this.searchInput = value;
})
.margin({ left: 10, right: 10 })
.layoutWeight(1)
.height(43)
}版本
4
浏览281 发布于2025-07-29 09:37山西
全部评论
最多点赞
最新发布
最早发布
写回答
所见即所得编辑器, editor1
工具栏
新增插入模板功能
一键使用模板,快速填写内容,轻松发帖~
知道了
- 为了保障您的信息安全,请勿上传您的敏感个人信息(如您的密码等信息)和您的敏感资产信息(如关键源代码、签名私钥、调试安装包、业务日志等信息),且您需自行承担由此产生的信息泄露等安全风险。
- 如您发布的内容为转载内容,请注明内容来源。
我要提问题
了解社区公约,与您携手共创和谐专业的开发者社区。










































苏公安网备 32011402010933号