diff --git a/entry/src/main/ets/constants/CommonConstants.ets b/entry/src/main/ets/constants/CommonConstants.ets index c9f3418c17b7e86970d0332504fa8af43cd8ff6b..9bc69fbd01520b1fb49470b7043ee855a2080623 100644 --- a/entry/src/main/ets/constants/CommonConstants.ets +++ b/entry/src/main/ets/constants/CommonConstants.ets @@ -53,26 +53,10 @@ export class CommonConstants { * number 2 */ public static readonly NUMBER_TWO: number = 2; - /** - * Tab adaptive padding md. - */ - public static readonly TAB_PADDING_MD: string = '33vp'; - /** - * Tab adaptive padding lg. - */ - public static readonly TAB_PADDING_LG: string = '63vp'; /** * Double tab adaptive padding sm. */ public static readonly DOUBLE_TAB_PADDING_SM: string = '16vp'; - /** - * Double tab adaptive padding md. - */ - public static readonly DOUBLE_TAB_PADDING_MD1: string = '61vp'; - /** - * Double tab adaptive padding lg. - */ - public static readonly DOUBLE_TAB_PADDING_LG1: string = '71vp'; /** * Double tab adaptive padding md. */ @@ -85,10 +69,6 @@ export class CommonConstants { * The full percentage of component. */ public static readonly FULL_WIDTH_PERCENT: string = '100%'; - /** - * The ninety percent of the components. - */ - public static readonly NINETY_PERCENT: string = '90%'; /** * The eighty percent. */ diff --git a/entry/src/main/ets/entryability/EntryAbility.ets b/entry/src/main/ets/entryability/EntryAbility.ets index 24f1044ae3f6e2f9ff438580a65252f7e8ff3aa3..f8537c54de48f4087c64a0d04c8a15c0c41581d7 100644 --- a/entry/src/main/ets/entryability/EntryAbility.ets +++ b/entry/src/main/ets/entryability/EntryAbility.ets @@ -25,11 +25,7 @@ export default class EntryAbility extends UIAbility { onCreate(): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); AppStorage.setOrCreate('systemColorMode', this.context.config.colorMode); - try { - this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); - } catch (err) { - hilog.error(0x0000, 'testTag', '%{public}s', 'setColorMode fail. error code: ' + err.code); - } + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); } onDestroy(): void { @@ -57,6 +53,8 @@ export default class EntryAbility extends UIAbility { } catch (err) { hilog.error(0x0000, 'testTag', '%{public}s', 'config main window fail. Cause: ' + err.message); } + }).catch((err: BusinessError) => { + hilog.error(0x0000, 'testTag', `Failed to get main window. Cause: ${err.message}`); }); windowStage.loadContent('pages/Index', (err) => { if (err.code) { @@ -68,9 +66,12 @@ export default class EntryAbility extends UIAbility { let isLayoutFullScreen = true; windowClass.setWindowLayoutFullScreen(isLayoutFullScreen).then(() => { hilog.info(0x0000, 'testTag', '%{public}s', 'Succeeded in setting the window layout to full-screen mode.'); + }).catch((err: BusinessError) => { + hilog.error(0x0000, 'testTag', `Failed to set the window layout to full-screen mode. Cause: ${err.message}`); }); } catch (err) { - hilog.error(0x0000, 'testTag', '%{public}s', 'Failed to set the window layout to full-screen mode. ' + err.code); + hilog.error(0x0000, 'testTag', '%{public}s', + 'Failed to set the window layout to full-screen mode. ' + err.code); } }); } @@ -88,7 +89,8 @@ export default class EntryAbility extends UIAbility { } AppStorage.setOrCreate('breakPoint', curBp); } catch (exception) { - hilog.error(0x0000, 'testTag', '%{public}s', `UpdateBreakpoint fail, error code: ${(exception as BusinessError).code}`); + hilog.error(0x0000, 'testTag', '%{public}s', + `UpdateBreakpoint fail, error code: ${(exception as BusinessError).code}`); } } diff --git a/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets b/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets index 098faab0b8d5392781d70ae6a90fd94846c9dea7..630b87d0919f566f6eda0161142defa550223bc1 100644 --- a/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets +++ b/entry/src/main/ets/pages/TableAdaptiveExtensionIndex.ets @@ -21,7 +21,6 @@ import { BreakpointType } from '../utils/BreakpointType'; export struct TableAdaptiveExtensionIndex { @StorageLink('breakPoint') breakPoint: string = CommonConstants.BREAK_POINT_SM; @Consume('pageInfos') pageInfos: NavPathStack; - @State tabIndexSelected: number = 0; @StorageProp('topRectHeight') topRectHeight: number = 0; @Builder