#鸿蒙学习大百科#如何在页面中获取UIAbilityContext?

如何在页面中获取UIAbilityContext?

HarmonyOS
2024-10-22 13:33:31
1.0w浏览
收藏 0
回答 1
回答 1
按赞同
/
按时间
后知后觉cy
import { common } from '@kit.AbilityKit';
@Entry
@Component
struct Index {
  //获取UIAbilityContext
  private context = getContext(this) as common.UIAbilityContext;
  build() {
    Row() {
      Column() {
       
      }
      .width('100%')
    }
    .height('100%')
  }
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
分享
微博
QQ
微信
回复
2024-10-22 22:38:10


相关问题