mirror of
https://gitee.com/openharmony/codelabs
synced 2024-11-27 00:20:53 +00:00
一次开发,多端部署-视频应用(ArkTS)Codelinter整改
Signed-off-by: 13871184879 <452399386@qq.com>
This commit is contained in:
parent
2a4bc1afe2
commit
c06d2c9eb6
@ -20,13 +20,13 @@
|
||||
|
||||
### 软件要求
|
||||
|
||||
- [DevEco Studio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87)版本:DevEco Studio 3.1 Release及以上版本。
|
||||
- OpenHarmony SDK版本:API version 9及以上版本。
|
||||
- [DevEco Studio](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/start-overview.md#%E5%B7%A5%E5%85%B7%E5%87%86%E5%A4%87)版本:DevEco Studio 3.1 Release。
|
||||
- OpenHarmony SDK版本:API version 9。
|
||||
|
||||
### 硬件要求
|
||||
|
||||
- 开发板类型:[润和RK3568开发板](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/quickstart-appendix-rk3568.md)。
|
||||
- OpenHarmony系统:3.2 Release及以上版本。
|
||||
- OpenHarmony系统:3.2 Release。
|
||||
|
||||
### 环境搭建
|
||||
|
||||
@ -54,16 +54,16 @@
|
||||
```
|
||||
├──common // 公共能力层
|
||||
│ ├──src/main/ets
|
||||
│ │ ├──bean // 资源类接口
|
||||
│ │ │ ├──BottomTabsItem.ets
|
||||
│ │ │ ├──DriveTabsItem.ets
|
||||
│ │ │ ├──FindTabsItem.ets
|
||||
│ │ │ ├──HomeTabsItem.ets
|
||||
│ │ │ └──MineTabsItem.ets
|
||||
│ │ ├──constants
|
||||
│ │ │ └──CommonConstants.ets // 公共常量类
|
||||
│ │ └──utils
|
||||
│ │ └──BreakpointSystem.ets // 断点工具类
|
||||
│ │ ├──utils
|
||||
│ │ │ └──BreakpointSystem.ets // 断点工具类
|
||||
│ │ └──viewmodel // 资源类接口
|
||||
│ │ ├──BottomTabsItem.ets
|
||||
│ │ ├──DriveTabsItem.ets
|
||||
│ │ ├──FindTabsItem.ets
|
||||
│ │ ├──HomeTabsItem.ets
|
||||
│ │ └──MineTabsItem.ets
|
||||
│ └──src/main/resources // 资源文件夹
|
||||
└──product // 产品定制层
|
||||
├──default/src/main/ets // 支持手机(含折叠屏)、平板
|
||||
@ -223,7 +223,7 @@ export struct FindTabs {
|
||||
}) {
|
||||
... // 榜单内容
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: FindTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
}
|
||||
...
|
||||
@ -262,7 +262,7 @@ export struct DriveTabs {
|
||||
GridCol({ span: { xs: Const.NUM_2, sm: Const.NUM_2, md: Const.NUM_2, lg: Const.NUM_2 } }) {
|
||||
... // 云盘内容
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: DriveTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
}
|
||||
...
|
||||
|
@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type { BottomTabsItem } from './src/main/ets/bean/BottomTabsItem';
|
||||
export type { HomeTabsItem } from './src/main/ets/bean/HomeTabsItem';
|
||||
export type { FindTabsItem } from './src/main/ets/bean/FindTabsItem';
|
||||
export type { DriveTabsItem } from './src/main/ets/bean/DriveTabsItem';
|
||||
export type { MineTabsItem } from './src/main/ets/bean/MineTabsItem';
|
||||
export { BottomTabsItem } from './src/main/ets/viewmodel/BottomTabsItem';
|
||||
export { HomeTabsItem } from './src/main/ets/viewmodel/HomeTabsItem';
|
||||
export { FindTabsItem } from './src/main/ets/viewmodel/FindTabsItem';
|
||||
export { DriveTabsItem } from './src/main/ets/viewmodel/DriveTabsItem';
|
||||
export { MineTabsItem } from './src/main/ets/viewmodel/MineTabsItem';
|
||||
export { CommonConstants } from './src/main/ets/constants/CommonConstants';
|
||||
export { BreakpointSystem } from './src/main/ets/utils/BreakpointSystem';
|
||||
|
@ -18,9 +18,9 @@ import { CommonConstants as Const } from '../constants/CommonConstants';
|
||||
|
||||
export class BreakpointSystem {
|
||||
private currentBreakpoint: string = Const.MD;
|
||||
private smListener: mediaQuery.MediaQueryListener;
|
||||
private mdListener: mediaQuery.MediaQueryListener;
|
||||
private lgListener: mediaQuery.MediaQueryListener;
|
||||
private smListener: mediaQuery.MediaQueryListener = mediaQuery.matchMediaSync(Const.BREAKPOINTS_SCOPE_1);
|
||||
private mdListener: mediaQuery.MediaQueryListener = mediaQuery.matchMediaSync(Const.BREAKPOINTS_SCOPE_2);
|
||||
private lgListener: mediaQuery.MediaQueryListener = mediaQuery.matchMediaSync(Const.BREAKPOINTS_SCOPE_3);
|
||||
|
||||
private updateCurrentBreakpoint(breakpoint: string) {
|
||||
if (this.currentBreakpoint !== breakpoint) {
|
||||
@ -29,19 +29,19 @@ export class BreakpointSystem {
|
||||
}
|
||||
}
|
||||
|
||||
private isBreakpointSM = (mediaQueryResult) => {
|
||||
private isBreakpointSM = (mediaQueryResult: mediaQuery.MediaQueryResult) => {
|
||||
if (mediaQueryResult.matches) {
|
||||
this.updateCurrentBreakpoint(Const.SM);
|
||||
}
|
||||
}
|
||||
|
||||
private isBreakpointMD = (mediaQueryResult) => {
|
||||
private isBreakpointMD = (mediaQueryResult: mediaQuery.MediaQueryResult) => {
|
||||
if (mediaQueryResult.matches) {
|
||||
this.updateCurrentBreakpoint(Const.MD);
|
||||
}
|
||||
}
|
||||
|
||||
private isBreakpointLG = (mediaQueryResult) => {
|
||||
private isBreakpointLG = (mediaQueryResult: mediaQuery.MediaQueryResult) => {
|
||||
if (mediaQueryResult.matches) {
|
||||
this.updateCurrentBreakpoint(Const.LG);
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ export struct BottomTabs {
|
||||
.onClick(() => {
|
||||
this.bottomTabIndex = BottomTabsList.indexOf(item);
|
||||
})
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: BottomTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
.height(Const.BOTTOM_TAB_HEIGHT)
|
||||
|
@ -63,7 +63,7 @@ export struct DriveTabs {
|
||||
.margin({ bottom: $r('app.float.drive_text_margin') })
|
||||
}
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: DriveTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
|
@ -121,7 +121,7 @@ export struct FindTabs {
|
||||
.width(Const.FULL_SIZE)
|
||||
.margin({ bottom: $r('app.float.find_margin5') })
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: FindTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
|
@ -78,7 +78,7 @@ export struct HomeTabs {
|
||||
.alignItems(HorizontalAlign.Start)
|
||||
.margin({ top: $r('app.float.home_text_margin_3'), left: $r('app.float.home_text_margin_2') })
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: HomeTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
.height($r('app.float.home_swiper_height'))
|
||||
.itemSpace(Const.ITEM_SPACE)
|
||||
|
@ -60,7 +60,7 @@ export struct LeftTabs {
|
||||
.onClick(() => {
|
||||
this.bottomTabIndex = BottomTabsList.indexOf(item);
|
||||
})
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: BottomTabsItem) => JSON.stringify(item))
|
||||
|
||||
Row()
|
||||
.width(Const.FULL_SIZE)
|
||||
|
@ -67,7 +67,7 @@ export struct MineTabs {
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
.height($r('app.float.mine_list_height'))
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: MineTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
.height(Const.FULL_SIZE)
|
||||
|
@ -59,7 +59,7 @@ export struct RecentlyPlayed {
|
||||
.opacity(Const.OPACITY)
|
||||
}
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: HomeTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
.height($r('app.float.home_row_height1'))
|
||||
|
@ -49,7 +49,7 @@ export struct Recommended {
|
||||
.margin({ bottom: $r('app.float.home_margin1') })
|
||||
}
|
||||
}
|
||||
}, item => JSON.stringify(item))
|
||||
}, (item: HomeTabsItem) => JSON.stringify(item))
|
||||
}
|
||||
.width(Const.FULL_SIZE)
|
||||
.height($r('app.float.home_list_height2'))
|
||||
|
Loading…
Reference in New Issue
Block a user