| 123456789101112131415161718192021222324252627282930313233 |
- import { YTAvoid, YTHeader } from 'basic';
- import { webview } from '@kit.ArkWeb';
- @Builder
- function PrivacyBuilder() {
- NavDestination() {
- Privacy()
- }.title("隐私政策")
- .hideTitleBar(true)
- }
- @Component
- export struct Privacy {
- @State content: string = '';
- @StorageProp(YTAvoid.SAFE_BOTTOM_KEY) safeBottom: number = 0
- private webviewController: WebviewController = new webview.WebviewController()
- build() {
- Column() {
- YTHeader({ defaultStyle: { title: '隐私政策' } })
- Web({
- src: "https://hm-test.ytpm.net/babyfoodAgreement",
- controller: this.webviewController,
- renderMode: RenderMode.ASYNC_RENDER // 设置渲染模式
- }).padding(20)
- }
- .width('100%')
- .height('100%')
- .padding({ bottom: this.safeBottom })
- }
- }
|