代码拉取完成,页面将自动刷新
本例介绍各种应用登录页面。
本例涉及的关键特性和实现方案如下:
Button($r('app.string.full_screen_modal_login_description'))
.fontColor(Color.White)
.borderRadius($r('app.integer.border_radius'))
.type(ButtonType.Normal)
.backgroundColor($r('app.color.grey_2'))
.width($r('app.string.size_full'))
.bindContentCover(this.isPresent, this.loginBuilder)
.onClick(() => {
this.isPresent = true;
})
if (this.isDefaultLogin) {
// 默认一键登录方式
...
} else {
// 其他登录方式
OtherWaysToLogin()
.transition(this.effect)
}
OtherWaysToLogin()
.transition(this.effect)
Stack() {
Image($r('app.media.arrow_back')) // 通过Stack组件,两个页面只实现一个back
.width($r('app.integer.height_twenty_five')).height($r('app.integer.height_twenty_five'))
.margin({ top: $r('app.integer.margin_mid') })
.onClick(() => {
if (this.isDefaultLogin) {
this.isPresentInLoginView = false;
} else {
this.isDefaultLogin = true
}
})
}
不涉及。
modalwindow // har包
|---model
| |---DefaultLogin.ets // 默认一键登录页面
| |---OtherWaysToLogin.ets // 其他登录方式页面
|---ModalWindow.ets // 主页面,提供登录类型选项
不涉及。
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。