证书管理半模态页面高度自适应

Signed-off-by: 杨海龙2023 <yanghailong26@huawei.com>
This commit is contained in:
杨海龙2023 2024-08-27 10:38:02 +08:00
parent e29b886fdc
commit 3157606188
8 changed files with 18 additions and 12 deletions

View File

@ -110,7 +110,8 @@ export struct AuthorizedAppManagementPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.AUTHORIZED_APP_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.AUTHORIZED_APP_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -45,7 +45,8 @@ export struct CaCertPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CA_CERTIFICATE_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CA_CERTIFICATE_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -90,7 +90,8 @@ export struct CaSystemDetailPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CA_SYSTEM_DETAIL_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CA_SYSTEM_DETAIL_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -173,7 +173,8 @@ export struct CaUserDetailPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CA_USER_DETAIL_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CA_USER_DETAIL_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -42,7 +42,8 @@ export struct CredListPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CREDENTIAL_LIST_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CREDENTIAL_LIST_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -134,7 +134,8 @@ export struct CredPwdInputPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CRED_PWD_INPUT_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CRED_PWD_INPUT_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -131,7 +131,8 @@ export struct CredSystemDetailPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CRED_SYSTEM_DETAIL_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CRED_SYSTEM_DETAIL_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;

View File

@ -45,13 +45,11 @@ export struct CredUserDetailPage {
@State private itemBackgroundColor: ResourceColor = '';
@Styles
pressedStyles(): void {
@Styles pressedStyles(): void {
.backgroundColor($r('sys.color.ohos_id_color_click_effect'))
}
@Styles
normalStyles(): void {
@Styles normalStyles(): void {
.backgroundColor(this.itemBackgroundColor)
}
@ -142,7 +140,8 @@ export struct CredUserDetailPage {
}
.hideTitleBar(true)
.width(WidthPercent.WH_100_100)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CRED_USER_DETAIL_ENTRY ? WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.height(this.sheetParam?.lastSheetPage === NavEntryKey.CRED_USER_DETAIL_ENTRY ?
WidthPercent.WH_AUTO : this.sheetParam?.sheetMinHeight)
.backgroundColor($r('sys.color.background_secondary'))
.onReady((ctx: NavDestinationContext) => {
this.stack = ctx.pathStack;