diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 242952c91ca0422854a9510c5a4b603c4217005a..22175076f761c6be5c741c426e83e0f0ca904098 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -26,18 +26,22 @@ export default class EntryAbility extends UIAbility { private curBp: string = ''; private updateBreakpoint(windowWidth: number): void { - let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; - let newBp: string = ''; - if (windowWidthVp < 600) { - newBp = 'sm'; - } else if (windowWidthVp < 840) { - newBp = 'md'; - } else { - newBp = 'lg'; - } - if (this.curBp !== newBp) { - this.curBp = newBp; - AppStorage.setOrCreate('currentBreakpoint', this.curBp); + try { + let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; + let newBp: string = ''; + if (windowWidthVp < 600) { + newBp = 'sm'; + } else if (windowWidthVp < 840) { + newBp = 'md'; + } else { + newBp = 'lg'; + } + if (this.curBp !== newBp) { + this.curBp = newBp; + AppStorage.setOrCreate('currentBreakpoint', this.curBp); + } + } catch (error) { + hilog.info(0x0000, 'updateBreakpoint', '%{public}s', `updateBreakpoint fail, err: ${JSON.stringify(error)}`); } } diff --git a/entry/src/main/module.json5 b/entry/src/main/module.json5 index 12c7cc2538aca8124e159ecc77e978f7a36fc3a7..428fff8e5c4a8532d2b9fcab40d43dfab4779a7c 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": [ diff --git a/entry/src/main/resources/base/element/color.json b/entry/src/main/resources/base/element/color.json index 6e031c433da27f16d237bdf06e9bf30683434eee..3c712962da3c2751c2b9ddb53559afcbd2b54a02 100644 --- a/entry/src/main/resources/base/element/color.json +++ b/entry/src/main/resources/base/element/color.json @@ -3,14 +3,6 @@ { "name": "start_window_background", "value": "#FFFFFF" - }, - { - "name": "title_color", - "value": "#E6000000" - }, - { - "name": "back_color", - "value": "#F1F3F5" } ] } \ No newline at end of file diff --git a/entry/src/main/resources/base/element/string.json b/entry/src/main/resources/base/element/string.json index d75615829a8107ed1911b3c2b49227fbd30eb1a4..af7e1aafa57639ef1df8abbfa4755abe31a4fa1e 100644 --- a/entry/src/main/resources/base/element/string.json +++ b/entry/src/main/resources/base/element/string.json @@ -24,42 +24,10 @@ "name": "full_height_width", "value": "100%" }, - { - "name": "width_percentage_ninety", - "value": "91%" - }, - { - "name": "height_large", - "value": "110%" - }, - { - "name": "title_size", - "value": "30fp" - }, - { - "name": "text_size", - "value": "16fp" - }, - { - "name": "title_padding_top_bot", - "value": "8vp" - }, - { - "name": "title_padding_left_right", - "value": "12vp" - }, - { - "name": "row_padding", - "value": "15vp" - }, { "name": "index_tab", "value": "56vp" }, - { - "name": "row_top", - "value": "18vp" - }, { "name": "reason_internet", "value": "Used for instant page loading effects in web scenarios" diff --git a/entry/src/main/resources/en_US/element/string.json b/entry/src/main/resources/en_US/element/string.json index 1e40065f9a679c86744a6d3bb45d25b070bcf5c5..37f89039cc94dca60cd6c21a5326364215a7d7f8 100644 --- a/entry/src/main/resources/en_US/element/string.json +++ b/entry/src/main/resources/en_US/element/string.json @@ -24,42 +24,10 @@ "name": "full_height_width", "value": "100%" }, - { - "name": "width_percentage_ninety", - "value": "91%" - }, - { - "name": "height_large", - "value": "110%" - }, - { - "name": "title_size", - "value": "30fp" - }, - { - "name": "text_size", - "value": "16fp" - }, - { - "name": "title_padding_top_bot", - "value": "8vp" - }, - { - "name": "title_padding_left_right", - "value": "12vp" - }, - { - "name": "row_padding", - "value": "12vp" - }, { "name": "index_tab", "value": "56vp" }, - { - "name": "row_top", - "value": "18vp" - }, { "name": "reason_internet", "value": "Used for instant page loading effects in web scenarios" diff --git a/entry/src/main/resources/zh_CN/element/string.json b/entry/src/main/resources/zh_CN/element/string.json index ff4f1bde481768f812875a16815a465b95d37776..4fa1acda9237a5db808ac8343f55526833986377 100644 --- a/entry/src/main/resources/zh_CN/element/string.json +++ b/entry/src/main/resources/zh_CN/element/string.json @@ -24,42 +24,10 @@ "name": "full_height_width", "value": "100%" }, - { - "name": "width_percentage_ninety", - "value": "91%" - }, - { - "name": "height_large", - "value": "110%" - }, - { - "name": "title_size", - "value": "30fp" - }, - { - "name": "text_size", - "value": "16fp" - }, - { - "name": "title_padding_top_bot", - "value": "8vp" - }, - { - "name": "title_padding_left_right", - "value": "12vp" - }, - { - "name": "row_padding", - "value": "15vp" - }, { "name": "index_tab", "value": "72vp" }, - { - "name": "row_top", - "value": "18vp" - }, { "name": "reason_internet", "value": "用于Web页面的瞬开效果场景"