Privacy.ets 817 B

123456789101112131415161718192021222324252627282930313233
  1. import { YtAvoid, YTHeader } from 'basic';
  2. import { webview } from '@kit.ArkWeb';
  3. @Builder
  4. function PrivacyBuilder() {
  5. NavDestination() {
  6. Privacy()
  7. }.title("隐私政策")
  8. .hideTitleBar(true)
  9. }
  10. @Component
  11. export struct Privacy {
  12. @State content: string = '';
  13. private webviewController: WebviewController = new webview.WebviewController()
  14. @StorageProp(YtAvoid.safeBottomKey) safeBottom: number = 0
  15. build() {
  16. Column() {
  17. YTHeader({ title: "隐私政策" })
  18. Web({
  19. src: "https://hm-static.ytpm.net/friend/doc/%E9%9A%90%E7%A7%81%E6%94%BF%E7%AD%96.html",
  20. controller: this.webviewController,
  21. renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
  22. }).padding(20)
  23. }
  24. .width('100%')
  25. .height('100%')
  26. .padding({ bottom: this.safeBottom })
  27. }
  28. }