From 3cee0038a4ec44588120219781b3643d0e2e58c3 Mon Sep 17 00:00:00 2001 From: sfchu Date: Fri, 28 Mar 2025 17:22:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E3=80=90=E5=9F=BA=E4=BA=8E=E9=A2=84?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E6=8A=80=E6=9C=AF=E5=AE=9E=E7=8E=B0Web?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9E=AC=E5=BC=80=E6=95=88=E6=9E=9C=E3=80=91?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/common/ResourceUtil.ets | 2 -- entry/src/main/ets/entryability/EntryAbility.ets | 2 +- entry/src/main/ets/pages/Index.ets | 12 +++++------- entry/src/main/ets/pages/WebPage.ets | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/entry/src/main/ets/common/ResourceUtil.ets b/entry/src/main/ets/common/ResourceUtil.ets index a8ff80a..c747200 100644 --- a/entry/src/main/ets/common/ResourceUtil.ets +++ b/entry/src/main/ets/common/ResourceUtil.ets @@ -15,8 +15,6 @@ import { JSON, util } from '@kit.ArkTS'; -const TAG: string = '[ResourceUtil]'; - export class ResourceUtil { /** * Obtains the character string corresponding to the specified resource ID. diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 2217507..a23b39c 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -45,7 +45,7 @@ export default class EntryAbility extends UIAbility { } } - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + onCreate(): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); AppStorage.setOrCreate('systemColorMode', this.context.config.colorMode); this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 8669480..d336974 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -13,21 +13,19 @@ * limitations under the License. */ -import { getNWeb } from './WebPage'; -import { Constants } from '../common/Constants'; -import { ConfigMapKey, ResourceUtil } from '../common/ResourceUtil'; import { common } from '@kit.AbilityKit'; +import { ConfigMapKey, ResourceUtil } from '../common/ResourceUtil'; import { BreakpointType } from '../common/BreakpointSystem'; +import { Constants } from '../common/Constants'; +import { getNWeb } from './WebPage'; @Entry @Component struct WebPreRender { @State isShowSheet: boolean = false; @StorageProp('currentBreakpoint') curBp: string = Constants.BREAKPOINTS[1]; - @StorageProp('bottomRectHeight') - bottomRectHeight: number = 0; - @StorageProp('topRectHeight') - topRectHeight: number = 0; + @StorageProp('bottomRectHeight') bottomRectHeight: number = 0; + @StorageProp('topRectHeight') topRectHeight: number = 0; @Builder mySheet() { diff --git a/entry/src/main/ets/pages/WebPage.ets b/entry/src/main/ets/pages/WebPage.ets index 3cb000d..6619398 100644 --- a/entry/src/main/ets/pages/WebPage.ets +++ b/entry/src/main/ets/pages/WebPage.ets @@ -31,7 +31,7 @@ class Data { function webBuilder(data: Data) { Column() { Web({ src: data.url, controller: data.controller }) - .onControllerAttached(()=>{ + .onControllerAttached(() => { try { // Set the whitelist to allow access to only the trust web page. data.controller.setUrlTrustList(Constants.URL_TRUST); -- Gitee From 09583796781dd6b597e83e67c2e3f469f271236f Mon Sep 17 00:00:00 2001 From: sfchu Date: Mon, 31 Mar 2025 14:03:06 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E4=BB=A3=E7=A0=81=20=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oh-package.json5 | 2 -- 1 file changed, 2 deletions(-) diff --git a/oh-package.json5 b/oh-package.json5 index 9b4bc06..8bf916d 100644 --- a/oh-package.json5 +++ b/oh-package.json5 @@ -4,7 +4,5 @@ "dependencies": { }, "devDependencies": { - "@ohos/hypium": "1.0.17", - "@ohos/hamock": "1.0.0" } } -- Gitee From de9526c4365811f734a61d1d043777a13494dc60 Mon Sep 17 00:00:00 2001 From: sfchu Date: Mon, 31 Mar 2025 14:28:54 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E3=80=90=E5=9F=BA=E4=BA=8E=E9=A2=84?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E6=8A=80=E6=9C=AF=E5=AE=9E=E7=8E=B0Web?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9E=AC=E5=BC=80=E6=95=88=E6=9E=9C=E3=80=91?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/entryability/EntryAbility.ets | 2 +- entry/src/main/module.json5 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index a23b39c..39b4f27 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { AbilityConstant, common, Configuration, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { common, Configuration, ConfigurationConstant, UIAbility } from '@kit.AbilityKit'; import { display, window } from '@kit.ArkUI'; import { hilog } from '@kit.PerformanceAnalysisKit'; import { BusinessError } from '@kit.BasicServicesKit'; diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index 428fff8..12c7cc2 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -21,7 +21,7 @@ "label": "$string:EntryAbility_label", "startWindowIcon": "$media:startIcon", "startWindowBackground": "$color:start_window_background", - "exported": false, + "exported": true, "skills": [ { "entities": [ -- Gitee From cba4f0cba78b4a6a097c1c67f431d26acb1f6063 Mon Sep 17 00:00:00 2001 From: sfchu Date: Mon, 31 Mar 2025 14:29:12 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E3=80=90=E5=9F=BA=E4=BA=8E=E9=A2=84?= =?UTF-8?q?=E6=B8=B2=E6=9F=93=E6=8A=80=E6=9C=AF=E5=AE=9E=E7=8E=B0Web?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9E=AC=E5=BC=80=E6=95=88=E6=9E=9C=E3=80=91?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/module.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index 12c7cc2..428fff8 100644 --- a/entry/src/main/module.json5 +++ b/entry/src/main/module.json5 @@ -21,7 +21,7 @@ "label": "$string:EntryAbility_label", "startWindowIcon": "$media:startIcon", "startWindowBackground": "$color:start_window_background", - "exported": true, + "exported": false, "skills": [ { "entities": [ -- Gitee