diff --git a/features/hot/src/main/ets/constants/CommonConstants.ets b/features/hot/src/main/ets/constants/CommonConstants.ets index 71819aa7582f462742691a5f78bd8246604b6979..c40c8efa3a367f492d923819bde390993cdc858c 100644 --- a/features/hot/src/main/ets/constants/CommonConstants.ets +++ b/features/hot/src/main/ets/constants/CommonConstants.ets @@ -18,147 +18,118 @@ export class CommonConstants { * Rank item margin left sm. */ static readonly RANK_ITEM_ML_SM: string = '2.2%'; - /** * Rank item margin left md. */ static readonly RANK_ITEM_ML_MD: string = '1.2%'; - /** * Rank item margin left lg. */ static readonly RANK_ITEM_ML_LG: string = '1.2%'; - /** * Rank title margin left. */ static readonly RANK_TITLE_MARGIN_LEFT: string = '2.2%'; - /** * Search bar width md. */ static readonly SEARCH_BAR_WIDTH_MD: string = '27.2%'; - /** *Search bar width lg. */ static readonly SEARCH_BAR_WIDTH_LG: string = '18.1%'; - /** * Animation duration. */ static readonly TAB_ANIMATION_DURATION: number = 300; - /** * Water flow columns template normal. */ static readonly WATER_FLOW_COLUMNS_TEMPLATE_NORMAL: string = '1fr'; - /** * Water flow columns template lg. */ static readonly WATER_FLOW_COLUMNS_TEMPLATE_LG: string = '1fr 1fr'; - /** * Hot column item space sm. */ - static readonly HOT_COLUMN_IS_SM:string = '0vp'; - + static readonly HOT_COLUMN_IS_SM: string = '0vp'; /** * Hot column item space md. */ - static readonly HOT_COLUMN_IS_MD:string = '49vp'; - + static readonly HOT_COLUMN_IS_MD: string = '49vp'; /** * Hot column item space lg. */ - static readonly HOT_COLUMN_IS_LG:string = '81vp'; - + static readonly HOT_COLUMN_IS_LG: string = '81vp'; /** * Swiper display count one. */ static readonly SWIPER_DISPLAY_COUNT_ONE: number = 1; - /** * Swiper display count two. */ static readonly SWIPER_DISPLAY_COUNT_TWO: number = 2; - /** * Swiper display count three. */ static readonly SWIPER_DISPLAY_COUNT_THREE: number = 3; - /** * Hot column max count. */ static readonly HOT_COLUMN_MAX_COUNT: number = 5; - /** * Hot item column space. */ static readonly HOT_ITEM_COLUMN_SPACE: string = '4vp'; - /** * Top count. */ static readonly TOP_COUNT: number = 3; - /** * Search bar opacity. */ static readonly SEARCH_BAR_OPACITY: number = 0.9; - /** * Card item shadow radius. */ static readonly CARD_ITEM_SHADOW_RADIUS: number = 10; - /** * Icon more opacity. */ static readonly ICON_MORE_OPACITY: number = 0.4; - /** * Window padding sm. */ static readonly WINDOW_PADDING_SM: string = '16vp'; - /** * Window padding md. */ static readonly WINDOW_PADDING_MD: string = '23vp'; - /** * Window padding lg. */ static readonly WINDOW_PADDING_LG: string = '32vp'; - /** * Linear gradient angel. */ static readonly LINEAR_GRADIENT_ANGEL: number = 180; - /** * Linear gradient from color. */ static readonly LINEAR_GRADIENT_FROM_COLOR: string = '#FFFFFF'; - /** * Linear gradient to color. */ static readonly LINEAR_GRADIENT_TO_COLOR: string = '#F1F3F5'; - /** * Linear gradient to area. */ static readonly LINEAR_GRADIENT_TO_AREA: number = 0.02; - /** * Follow item picture max height. */ static readonly FOLLOW_ITEM_PICTURE_MAX_HEIGHT: string = '60%'; - /** * Follow title space. */ diff --git a/features/hot/src/main/ets/view/CardItemView.ets b/features/hot/src/main/ets/view/CardItemView.ets index 4e057d73f986af090c9a0ebae599b1e79a9bea59..23adb1f3bb7a567397996990fa44385e2230b7a4 100644 --- a/features/hot/src/main/ets/view/CardItemView.ets +++ b/features/hot/src/main/ets/view/CardItemView.ets @@ -27,7 +27,7 @@ export struct CardItemView { name: string = ''; aboutToAppear(): void { - app.setImageRawDataCacheSize(1024*1024*100); + app.setImageRawDataCacheSize(1024 * 1024 * 100); app.setImageCacheCount(100); } diff --git a/features/hot/src/main/ets/view/FoundView.ets b/features/hot/src/main/ets/view/FoundView.ets index b69991cc7c637d6e9bbd8e70167f85b5cfd608dd..2319b703cb3ecf214b20dd0fa39024d712aab4f5 100644 --- a/features/hot/src/main/ets/view/FoundView.ets +++ b/features/hot/src/main/ets/view/FoundView.ets @@ -28,7 +28,7 @@ export struct FoundView { @State tabIndexSelected: number = 0; jumpDetail() { - this.pageInfos.pushPath({name : 'detailPage'}); + this.pageInfos.pushPath({ name: 'detailPage' }); } @Builder @@ -133,10 +133,10 @@ export struct FoundView { }) } .borderRadius(this.currentBreakpoint === Breakpoint.BREAKPOINT_LG ? - $r('app.float.water_flow_br') : $r('app.float.zero')) + $r('app.float.water_flow_br') : $r('app.float.zero')) .backgroundColor($r('app.color.white')) .margin(this.currentBreakpoint === Breakpoint.BREAKPOINT_LG ? - $r('app.float.water_flow_margin') : $r('app.float.zero')) + $r('app.float.water_flow_margin') : $r('app.float.zero')) } }, (item: CardItem, index: number) => index + JSON.stringify(item)) // [EndExclude foundView] diff --git a/features/hot/src/main/ets/view/HotColumnView.ets b/features/hot/src/main/ets/view/HotColumnView.ets index 082a319578128d9638773898253f1442852a68bd..89ce58187582e34727bf231f5a6ea5f9b18a3d8b 100644 --- a/features/hot/src/main/ets/view/HotColumnView.ets +++ b/features/hot/src/main/ets/view/HotColumnView.ets @@ -37,7 +37,7 @@ export struct HotColumnView { item: item, showDetail: true, indexWidth: item.index <= Common.HOT_COLUMN_MAX_COUNT ? $r('app.float.index_width_normal') : - $r('app.float.index_width_more'), + $r('app.float.index_width_more'), indexIconGap: $r('app.float.index_icon_gap') }) } diff --git a/features/hot/src/main/ets/view/HotTitleView.ets b/features/hot/src/main/ets/view/HotTitleView.ets index 54dce745a8f81881aa033d99fb43e43656c57719..6b1a6a39f6680d75ac3b27413c3e74a90f17aaff 100644 --- a/features/hot/src/main/ets/view/HotTitleView.ets +++ b/features/hot/src/main/ets/view/HotTitleView.ets @@ -27,18 +27,18 @@ export struct HotTitleView { Row() { Text($r('app.string.found')) .fontSize(this.isFoundSelected ? $r('app.float.title_font_size_selected') : - $r('app.float.title_font_size_normal')) + $r('app.float.title_font_size_normal')) .fontWeight(BaseCommon.FONT_WEIGHT_500) .fontColor(Color.Black) .opacity(this.isFoundSelected ? $r('app.float.title_opacity_selected') : - $r('app.float.title_opacity_normal')) - .onClick(()=>{ + $r('app.float.title_opacity_normal')) + .onClick(() => { this.isFoundSelected = true; }) Text($r('app.string.follow')) .fontSize(this.isFoundSelected ? $r('app.float.title_font_size_normal') : - $r('app.float.title_font_size_selected')) + $r('app.float.title_font_size_selected')) .fontWeight(BaseCommon.FONT_WEIGHT_500) .fontColor(Color.Black) .margin({ @@ -46,8 +46,8 @@ export struct HotTitleView { $r('app.float.title_margin_left_lg')).getValue(this.currentBreakpoint) }) .opacity(this.isFoundSelected ? $r('app.float.title_opacity_normal') : - $r('app.float.title_opacity_selected')) - .onClick(()=>{ + $r('app.float.title_opacity_selected')) + .onClick(() => { this.isFoundSelected = false; }) } diff --git a/features/rank/Index.ets b/features/rank/Index.ets index 2ed50651eb0029513bded2c946c42e27b5c8a950..e11164d323edd0f2b9b128fc1727d431a70f28f2 100644 --- a/features/rank/Index.ets +++ b/features/rank/Index.ets @@ -14,4 +14,5 @@ */ export { HotListItemView } from './src/main/ets/view/HotListItemView'; + export { HotRankPage } from './src/main/ets/view/HotRankPage'; \ No newline at end of file diff --git a/features/rank/src/main/ets/constants/CommonConstants.ets b/features/rank/src/main/ets/constants/CommonConstants.ets index 4304fcd1fde685edafe092d66225e35783fd8609..f10f1bb195e00aefd6c2825fbc75cf53c748c46b 100644 --- a/features/rank/src/main/ets/constants/CommonConstants.ets +++ b/features/rank/src/main/ets/constants/CommonConstants.ets @@ -18,47 +18,38 @@ export class CommonConstants { * Linear gradient angle. */ static readonly LINEAR_GRADIENT_ANGLE: number = 180; - /** * Linear gradient from. */ static readonly LINEAR_GRADIENT_FROM: number = 0.01; - /** * Linear gradient to. */ static readonly LINEAR_GRADIENT_TO: number = 0.92; - /** * Linear gradient from color. */ static readonly LINEAR_GRADIENT_FROM_COLOR: string = '#80307AF8'; - /** * Linear gradient to color. */ static readonly LINEAR_GRADIENT_TO_COLOR: string = '#000A59F7'; - /** * Subtitle opacity. */ static readonly SUBTITLE_OPACITY: number = 0.6; - /** * Swiper item space. */ static readonly SWIPER_ITEM_SPACE: string = '20vp'; - /** * Title content space. */ static readonly TITLE_CONTENT_SPACE: string = '4vp'; - /** * Top count. */ static readonly TOP_COUNT: number = 3; - /** * Window padding half sm. */ diff --git a/features/rank/src/main/ets/view/HotRankPage.ets b/features/rank/src/main/ets/view/HotRankPage.ets index ae8f4f668b83eefffbbe8672ea5e34cbe3c283e1..cb4d5bcb495d5972bc6632af023d50c4b46b0a24 100644 --- a/features/rank/src/main/ets/view/HotRankPage.ets +++ b/features/rank/src/main/ets/view/HotRankPage.ets @@ -69,10 +69,10 @@ export struct HotRankPage { }) .margin({ top: this.titleMarginTop === MIN_MARGIN_TOP ? - $r('app.float.hot_list_view_min_mt') : $r('app.float.hot_list_view_max_mt') + $r('app.float.hot_list_view_min_mt') : $r('app.float.hot_list_view_max_mt') }) .width(this.currentBreakpoint === Breakpoint.BREAKPOINT_SM ? - BaseCommon.FULL_PERCENT : $r('app.float.zero')) + BaseCommon.FULL_PERCENT : $r('app.float.zero')) .padding({ left: new BreakpointType($r('app.float.window_padding_left_sm'), $r('app.float.window_padding_left_md'), $r('app.float.window_padding_left_lg') diff --git a/products/phone/src/main/ets/entryability/EntryAbility.ets b/products/phone/src/main/ets/entryability/EntryAbility.ets index d7ad56a678171219b753afa3aa139376b9afdab2..9d527a0a3d0d573b7e3e2843d7c0045ed4319f2e 100644 --- a/products/phone/src/main/ets/entryability/EntryAbility.ets +++ b/products/phone/src/main/ets/entryability/EntryAbility.ets @@ -20,7 +20,6 @@ import { window, display } from '@kit.ArkUI'; import { CommonConstants as BaseCommon, BreakpointConstants } from 'base' export default class EntryAbility extends UIAbility { - onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); } @@ -71,7 +70,7 @@ export default class EntryAbility extends UIAbility { hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); } - private updateBreakpoint(windowWidth: number) :void{ + private updateBreakpoint(windowWidth: number): void { let windowWidthVp = windowWidth / display.getDefaultDisplaySync().densityPixels; let curBp: string = ''; if (windowWidthVp < BreakpointConstants.BREAKPOINT_RANGES[1]) { diff --git a/products/phone/src/main/ets/pages/MainPage.ets b/products/phone/src/main/ets/pages/MainPage.ets index e0427748ccb33e011a39511f423883d05891b538..51692bfcb5318720c78b3568f294c7f4ac3ed4fb 100644 --- a/products/phone/src/main/ets/pages/MainPage.ets +++ b/products/phone/src/main/ets/pages/MainPage.ets @@ -49,7 +49,7 @@ struct Index { NavDestination() { DetailPage() } - .onBackPressed(()=>{ + .onBackPressed(() => { AppStorage.setOrCreate('isDetailPage', false); return false; }) diff --git a/products/phone/src/main/ets/view/TabContentView.ets b/products/phone/src/main/ets/view/TabContentView.ets index 59febd64933f0b636557f624d2ee9f199d1dcd71..8be43d87c7e41be05aa6c750d2103f1c466a1014 100644 --- a/products/phone/src/main/ets/view/TabContentView.ets +++ b/products/phone/src/main/ets/view/TabContentView.ets @@ -84,13 +84,15 @@ export struct TabContentView { }) .barHeight(this.currentBreakpoint === Breakpoint.BREAKPOINT_LG ? Common.HALF_PERCENT : $r('app.float.bar_height')) .barWidth(this.currentBreakpoint === Breakpoint.BREAKPOINT_LG ? - $r('app.float.tab_bar_width') : Common.FULL_PERCENT) + $r('app.float.tab_bar_width') : Common.FULL_PERCENT) .scrollable(false) .height(Common.FULL_PERCENT) } .backgroundColor($r('app.color.bar_background_color')) - .padding({ bottom: this.currentBreakpoint !== Breakpoint.BREAKPOINT_LG ? - $r('app.float.tab_content_pb') : $r('app.float.zero') }) + .padding({ + bottom: this.currentBreakpoint !== Breakpoint.BREAKPOINT_LG ? + $r('app.float.tab_content_pb') : $r('app.float.zero') + }) .height(Common.FULL_PERCENT) } } \ No newline at end of file