Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
# Conflicts: # sight_harmony/features/wdComponent/src/main/ets/components/calendar/RMCalendar.ets
Showing
5 changed files
with
78 additions
and
54 deletions
| @@ -60,10 +60,11 @@ export struct ENewspaperPageComponent { | @@ -60,10 +60,11 @@ export struct ENewspaperPageComponent { | ||
| 60 | //watch监听报纸页码回调 | 60 | //watch监听报纸页码回调 |
| 61 | onCurrentPageNumUpdated(): void { | 61 | onCurrentPageNumUpdated(): void { |
| 62 | console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) | 62 | console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "currentPageNum:", this.currentPageNum) |
| 63 | - let _swiperIndex = Number.parseInt(this.currentPageNum) | ||
| 64 | - console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex) | ||
| 65 | - this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex | 63 | + // let _swiperIndex = Number.parseInt(this.currentPageNum) |
| 64 | + // console.log("ENewspaperPageComponent-onCurrentPageNumUpdated", "_swiperIndex:", _swiperIndex) | ||
| 65 | + // this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex | ||
| 66 | 66 | ||
| 67 | + this.swiperIndex = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum) | ||
| 67 | //电子报--版面序号选择点击 | 68 | //电子报--版面序号选择点击 |
| 68 | TrackingContent.clickWithEvent('panel_number_selection_click', TrackConstants.PageName.NewsPaperPage, | 69 | TrackingContent.clickWithEvent('panel_number_selection_click', TrackConstants.PageName.NewsPaperPage, |
| 69 | TrackConstants.PageName.NewsPaperPage | 70 | TrackConstants.PageName.NewsPaperPage |
| @@ -140,7 +141,8 @@ export struct ENewspaperPageComponent { | @@ -140,7 +141,8 @@ export struct ENewspaperPageComponent { | ||
| 140 | let screenHeight = this.displayTool.height; | 141 | let screenHeight = this.displayTool.height; |
| 141 | // bottomSafeHeight 底导高度 topSafeHeight 顶导高度 44 顶部高度 60 底部高度 | 142 | // bottomSafeHeight 底导高度 topSafeHeight 顶导高度 44 顶部高度 60 底部高度 |
| 142 | // newspaper_shadow 49 高度 e_newspaper_content 59 margin top | 143 | // newspaper_shadow 49 高度 e_newspaper_content 59 margin top |
| 143 | - let height = screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) -vp2px(59) | 144 | + let height = |
| 145 | + screenHeight - this.bottomSafeHeight - this.topSafeHeight - vp2px(44) - vp2px(60) - vp2px(49) - vp2px(59) | ||
| 144 | this.picHeight = height | 146 | this.picHeight = height |
| 145 | 147 | ||
| 146 | let ratio = this.ratio == '100%' ? 1 : 0.5 | 148 | let ratio = this.ratio == '100%' ? 1 : 0.5 |
| @@ -178,6 +180,7 @@ export struct ENewspaperPageComponent { | @@ -178,6 +180,7 @@ export struct ENewspaperPageComponent { | ||
| 178 | this.swiperController.changeIndex(this.swiperIndex) | 180 | this.swiperController.changeIndex(this.swiperIndex) |
| 179 | }); | 181 | }); |
| 180 | } | 182 | } |
| 183 | + | ||
| 181 | resize() { | 184 | resize() { |
| 182 | this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width | 185 | this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.displayTool.width |
| 183 | // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 | 186 | // 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件 |
| @@ -16,7 +16,7 @@ import { topicInfoView } from './topicInfoView'; | @@ -16,7 +16,7 @@ import { topicInfoView } from './topicInfoView'; | ||
| 16 | import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer'; | 16 | import { DateFormatUtil, PlayerConstants, WDPlayerController } from 'wdPlayer'; |
| 17 | import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList'; | 17 | import { AudioDataList } from 'wdBean/src/main/ets/bean/morningevening/AudioDataList'; |
| 18 | import { image } from '@kit.ImageKit'; | 18 | import { image } from '@kit.ImageKit'; |
| 19 | -import { getPicture, imageNet2PixelMap } from '../../utils/ImageUtils'; | 19 | +import { findMaxPixel, getPicture, imageNet2PixelMap, traverseAllPixel } from '../../utils/ImageUtils'; |
| 20 | import { effectKit } from '@kit.ArkGraphics2D'; | 20 | import { effectKit } from '@kit.ArkGraphics2D'; |
| 21 | import { window } from '@kit.ArkUI'; | 21 | import { window } from '@kit.ArkUI'; |
| 22 | import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel'; | 22 | import { PeopleShipMainViewModel } from '../../viewmodel/PeopleShipMainViewModel'; |
| @@ -25,7 +25,7 @@ import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare' | @@ -25,7 +25,7 @@ import { viewColumInsightIntentShare } from '../../utils/InsightIntentShare' | ||
| 25 | import { common } from '@kit.AbilityKit'; | 25 | import { common } from '@kit.AbilityKit'; |
| 26 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | 26 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' |
| 27 | import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' | 27 | import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' |
| 28 | -import { ColorUtils } from '../../utils/ColorUtils'; | 28 | +import { ColorHsv, ColorRgb, ColorUtils } from '../../utils/ColorUtils'; |
| 29 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; | 29 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; |
| 30 | import { EmitterEventId, EmitterUtils } from 'wdKit/Index' | 30 | import { EmitterEventId, EmitterUtils } from 'wdKit/Index' |
| 31 | 31 | ||
| @@ -238,14 +238,20 @@ export struct MorningEveningPaperComponent { | @@ -238,14 +238,20 @@ export struct MorningEveningPaperComponent { | ||
| 238 | private async pickColor(imageSource: image.ImageSource | undefined) { | 238 | private async pickColor(imageSource: image.ImageSource | undefined) { |
| 239 | if (imageSource) { | 239 | if (imageSource) { |
| 240 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); | 240 | const pixelMap: image.PixelMap = await imageNet2PixelMap(imageSource); |
| 241 | - effectKit.createColorPicker(pixelMap, (err, colorPicker) => { | ||
| 242 | - let color = colorPicker.getMainColorSync(); | ||
| 243 | - console.log(TAG, "compInfoBean compStyle = " + color) | ||
| 244 | - // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) | ||
| 245 | - // 将取色器选取的color示例转换为十六进制颜色代码 | ||
| 246 | - this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); | ||
| 247 | - console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor) | ||
| 248 | - }); | 241 | + let allPixels: number[] = await traverseAllPixel(pixelMap); |
| 242 | + let maxPixel: number = findMaxPixel(allPixels); | ||
| 243 | + let rgb: ColorRgb = ColorUtils.numberToRgb(maxPixel); | ||
| 244 | + let hsv: ColorHsv = ColorUtils.rgb2hsv(rgb); | ||
| 245 | + rgb = ColorUtils.hsv2rgb(hsv); | ||
| 246 | + this.mixedBgColor = "#" + rgb.red.toString(16) + rgb.green.toString(16) + rgb.blue.toString(16); | ||
| 247 | + // effectKit.createColorPicker(pixelMap, (err, colorPicker) => { | ||
| 248 | + // let color = colorPicker.getMainColorSync(); | ||
| 249 | + // console.log(TAG, "compInfoBean compStyle = " + color) | ||
| 250 | + // // color = ColorUtils.getMorningEveningPaperRgb({red:color.red,green:color.green,blue:color.blue,alpha:color.alpha}) | ||
| 251 | + // // 将取色器选取的color示例转换为十六进制颜色代码 | ||
| 252 | + // this.mixedBgColor = "#" + color.alpha.toString(16) + color.red.toString(16) + color.green.toString(16) + color.blue.toString(16); | ||
| 253 | + // console.log(TAG, "compInfoBean compStyle = " + this.mixedBgColor) | ||
| 254 | + // }); | ||
| 249 | } | 255 | } |
| 250 | } | 256 | } |
| 251 | 257 |
| @@ -4,7 +4,9 @@ import { WDRouterRule } from 'wdRouter/Index' | @@ -4,7 +4,9 @@ import { WDRouterRule } from 'wdRouter/Index' | ||
| 4 | import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' | 4 | import { ENewspaperPageDialog } from '../dialog/ENewspaperPageDialog' |
| 5 | import { Logger } from 'wdKit'; | 5 | import { Logger } from 'wdKit'; |
| 6 | import { font, window } from '@kit.ArkUI'; | 6 | import { font, window } from '@kit.ArkUI'; |
| 7 | + | ||
| 7 | const TAG: string = 'ENewspaperListDialog'; | 8 | const TAG: string = 'ENewspaperListDialog'; |
| 9 | + | ||
| 8 | /** | 10 | /** |
| 9 | * 读报纸半屏弹窗 | 11 | * 读报纸半屏弹窗 |
| 10 | * 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2) | 12 | * 弹窗嵌套参考资料(https://developer.harmonyos.com/cn/docs/documentation/doc-references-V2/ts-methods-custom-dialog-box-0000001580345722-V2) |
| @@ -18,9 +20,7 @@ export struct ENewspaperListDialog { | @@ -18,9 +20,7 @@ export struct ENewspaperListDialog { | ||
| 18 | private listScroller: Scroller = new Scroller() | 20 | private listScroller: Scroller = new Scroller() |
| 19 | @State scrollOffset: number = 0 | 21 | @State scrollOffset: number = 0 |
| 20 | @State isCurrentViewOpen: boolean = false | 22 | @State isCurrentViewOpen: boolean = false |
| 21 | - @Consume bottomSafeHeight:number | ||
| 22 | - | ||
| 23 | - firstFlag : boolean = true | 23 | + @Consume bottomSafeHeight: number |
| 24 | //文字版选择弹框 | 24 | //文字版选择弹框 |
| 25 | pageListDialogController: CustomDialogController = new CustomDialogController({ | 25 | pageListDialogController: CustomDialogController = new CustomDialogController({ |
| 26 | builder: ENewspaperPageDialog({ | 26 | builder: ENewspaperPageDialog({ |
| @@ -42,28 +42,36 @@ export struct ENewspaperListDialog { | @@ -42,28 +42,36 @@ export struct ENewspaperListDialog { | ||
| 42 | // 那么此处需要将指向自己的controller放在所有controller的后面 | 42 | // 那么此处需要将指向自己的controller放在所有controller的后面 |
| 43 | // listDialogController: CustomDialogController | 43 | // listDialogController: CustomDialogController |
| 44 | public closeDialog?: () => void | 44 | public closeDialog?: () => void |
| 45 | - | ||
| 46 | // 手势滑动相关 | 45 | // 手势滑动相关 |
| 47 | private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down }) | 46 | private panOption: PanGestureOptions = new PanGestureOptions({ direction: PanDirection.Up | PanDirection.Down }) |
| 48 | private topFixedHeight = 124 | 47 | private topFixedHeight = 124 |
| 49 | @State topHeight: number = 124 | 48 | @State topHeight: number = 124 |
| 50 | private deviceHeight: number = 0 | 49 | private deviceHeight: number = 0 |
| 51 | 50 | ||
| 51 | + | ||
| 52 | + selectPageNum : boolean = true | ||
| 53 | + | ||
| 52 | //watch监听报纸页码回调 | 54 | //watch监听报纸页码回调 |
| 53 | onCurrentPageNumUpdated(): void { | 55 | onCurrentPageNumUpdated(): void { |
| 54 | - this.firstFlag = false | ||
| 55 | - console.log(TAG, "onCurrentPageNumUpdated currentPageNum:", this.currentPageNum) | ||
| 56 | - let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 57 | - console.log(TAG, "onCurrentPageNumUpdated _scrollIndex:", _scrollIndex) | ||
| 58 | - let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | 56 | + // console.log(TAG, "onCurrentPageNumUpdated currentPageNum:", this.currentPageNum) |
| 57 | + // let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 58 | + // console.log(TAG, "onCurrentPageNumUpdated _scrollIndex:", _scrollIndex) | ||
| 59 | + // let scrollIndexEnd = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | ||
| 60 | + | ||
| 61 | + if (this.newspaperListBean != undefined) { | ||
| 62 | + | ||
| 63 | + this.selectPageNum = false | ||
| 64 | + // 从业务数据中找到编号 | ||
| 65 | + let scrollIndexEnd = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum) | ||
| 59 | 66 | ||
| 60 | console.log(TAG, "onCurrentPageNumUpdated scrollIndexEnd:", scrollIndexEnd) | 67 | console.log(TAG, "onCurrentPageNumUpdated scrollIndexEnd:", scrollIndexEnd) |
| 61 | 68 | ||
| 62 | - console.log(TAG, "onCurrentPageNumUpdated (!this.isCurrentViewOpen):", ""+!this.isCurrentViewOpen) | 69 | + console.log(TAG, "onCurrentPageNumUpdated (!this.isCurrentViewOpen):", "" + !this.isCurrentViewOpen) |
| 63 | if (!this.isCurrentViewOpen) { | 70 | if (!this.isCurrentViewOpen) { |
| 64 | this.listScroller.scrollToIndex(scrollIndexEnd) | 71 | this.listScroller.scrollToIndex(scrollIndexEnd) |
| 65 | } | 72 | } |
| 66 | } | 73 | } |
| 74 | + } | ||
| 67 | 75 | ||
| 68 | async aboutToAppear() { | 76 | async aboutToAppear() { |
| 69 | //注册字体 | 77 | //注册字体 |
| @@ -79,10 +87,12 @@ export struct ENewspaperListDialog { | @@ -79,10 +87,12 @@ export struct ENewspaperListDialog { | ||
| 79 | 87 | ||
| 80 | this.isCurrentViewOpen = true | 88 | this.isCurrentViewOpen = true |
| 81 | console.log(TAG, "aboutToAppear currentPageNum:", this.currentPageNum) | 89 | console.log(TAG, "aboutToAppear currentPageNum:", this.currentPageNum) |
| 82 | - let _scrollIndex = Number.parseInt(this.currentPageNum) | ||
| 83 | - console.log(TAG, "aboutToAppear _scrollIndex:", _scrollIndex) | ||
| 84 | - this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | 90 | + // let _scrollIndex = Number.parseInt(this.currentPageNum) |
| 91 | + // console.log(TAG, "aboutToAppear _scrollIndex:", _scrollIndex) | ||
| 92 | + // this.scrollIndex = _scrollIndex > 0 ? _scrollIndex - 1 : _scrollIndex | ||
| 85 | // this.listScroller.scrollToIndex(this.scrollIndex) | 93 | // this.listScroller.scrollToIndex(this.scrollIndex) |
| 94 | + | ||
| 95 | + this.scrollIndex = this.newspaperListBean?.list.findIndex(_item => _item?.pageNum === this.currentPageNum) | ||
| 86 | } | 96 | } |
| 87 | 97 | ||
| 88 | aboutToDisappear() { | 98 | aboutToDisappear() { |
| @@ -147,7 +157,7 @@ export struct ENewspaperListDialog { | @@ -147,7 +157,7 @@ export struct ENewspaperListDialog { | ||
| 147 | .gesture( | 157 | .gesture( |
| 148 | PanGesture(this.panOption) | 158 | PanGesture(this.panOption) |
| 149 | .onActionStart((event: GestureEvent) => { | 159 | .onActionStart((event: GestureEvent) => { |
| 150 | - Logger.debug('ENewspaperListDialog','Pan start') | 160 | + Logger.debug('ENewspaperListDialog', 'Pan start') |
| 151 | }) | 161 | }) |
| 152 | .onActionUpdate((event: GestureEvent) => { | 162 | .onActionUpdate((event: GestureEvent) => { |
| 153 | if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) { | 163 | if (this.topFixedHeight + event.offsetY >= this.topFixedHeight) { |
| @@ -186,8 +196,7 @@ export struct ENewspaperListDialog { | @@ -186,8 +196,7 @@ export struct ENewspaperListDialog { | ||
| 186 | Text(positionItem.shortTitle) | 196 | Text(positionItem.shortTitle) |
| 187 | .fontSize($r('app.float.font_size_13')) | 197 | .fontSize($r('app.float.font_size_13')) |
| 188 | .fontColor($r('app.color.color_222222')) | 198 | .fontColor($r('app.color.color_222222')) |
| 189 | - .fontWeight(600) | ||
| 190 | - // .maxLines(2) | 199 | + .fontWeight(600)// .maxLines(2) |
| 191 | .margin({ | 200 | .margin({ |
| 192 | bottom: 8 | 201 | bottom: 8 |
| 193 | }) | 202 | }) |
| @@ -291,30 +300,29 @@ export struct ENewspaperListDialog { | @@ -291,30 +300,29 @@ export struct ENewspaperListDialog { | ||
| 291 | console.info('ENewspaperListDialog::first' + firstIndex) | 300 | console.info('ENewspaperListDialog::first' + firstIndex) |
| 292 | console.info('ENewspaperListDialog::last' + lastIndex) | 301 | console.info('ENewspaperListDialog::last' + lastIndex) |
| 293 | console.info('ENewspaperListDialog::center' + centerIndex) | 302 | console.info('ENewspaperListDialog::center' + centerIndex) |
| 294 | - // this.updateCurrentPageNum(firstIndex) | ||
| 295 | - // const tempIndex = this.findClassIndex(firstIndex) | ||
| 296 | - // if (firstIndex !== centerIndex) { | ||
| 297 | - // return | ||
| 298 | - // } | ||
| 299 | - // console.info(`this.scrollOffset:` + this.scrollOffset) | ||
| 300 | - // if (this.scrollOffset == 0) { | ||
| 301 | - if(this.firstFlag){ | ||
| 302 | - this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` | 303 | + |
| 304 | + // this.currentPageNum = `${firstIndex < 9 ? '0' + (firstIndex + 1) : firstIndex + 1}` | ||
| 305 | + | ||
| 306 | + if(this.selectPageNum){ | ||
| 307 | + if (this.newspaperListBean != undefined) { | ||
| 308 | + this.currentPageNum = this.newspaperListBean?.list[lastIndex].pageNum | ||
| 309 | + } | ||
| 303 | }else { | 310 | }else { |
| 304 | - this.firstFlag = true | 311 | + this.selectPageNum = true |
| 305 | } | 312 | } |
| 306 | 313 | ||
| 307 | - // } | 314 | + |
| 308 | }) | 315 | }) |
| 309 | } | 316 | } |
| 310 | .margin({ top: this.topHeight }) | 317 | .margin({ top: this.topHeight }) |
| 311 | .width('100%') | 318 | .width('100%') |
| 312 | .backgroundColor(Color.White) | 319 | .backgroundColor(Color.White) |
| 313 | 320 | ||
| 314 | - }.width('100%') | 321 | + } |
| 322 | + .width('100%') | ||
| 315 | .height('100%') | 323 | .height('100%') |
| 316 | .backgroundColor('#80000000') | 324 | .backgroundColor('#80000000') |
| 317 | - .margin({bottom:50}) | 325 | + .margin({ bottom: 50 }) |
| 318 | .onClick(() => { | 326 | .onClick(() => { |
| 319 | if (this.closeDialog) { | 327 | if (this.closeDialog) { |
| 320 | this.closeDialog() | 328 | this.closeDialog() |
| @@ -323,7 +331,7 @@ export struct ENewspaperListDialog { | @@ -323,7 +331,7 @@ export struct ENewspaperListDialog { | ||
| 323 | .gesture( | 331 | .gesture( |
| 324 | PanGesture(this.panOption) | 332 | PanGesture(this.panOption) |
| 325 | .onActionStart((event: GestureEvent) => { | 333 | .onActionStart((event: GestureEvent) => { |
| 326 | - Logger.debug('ENewspaperListDialog','Pan start') | 334 | + Logger.debug('ENewspaperListDialog', 'Pan start') |
| 327 | }) | 335 | }) |
| 328 | .onActionUpdate((event: GestureEvent) => { | 336 | .onActionUpdate((event: GestureEvent) => { |
| 329 | if (event) { | 337 | if (event) { |
| @@ -340,7 +348,7 @@ export struct ENewspaperListDialog { | @@ -340,7 +348,7 @@ export struct ENewspaperListDialog { | ||
| 340 | } | 348 | } |
| 341 | 349 | ||
| 342 | onCloseGestureDialog() { | 350 | onCloseGestureDialog() { |
| 343 | - if (this.topHeight >= this.deviceHeight ) { | 351 | + if (this.topHeight >= this.deviceHeight) { |
| 344 | if (this.closeDialog) { | 352 | if (this.closeDialog) { |
| 345 | this.closeDialog() | 353 | this.closeDialog() |
| 346 | } | 354 | } |
| @@ -383,10 +383,11 @@ export struct PlayUIComponent { | @@ -383,10 +383,11 @@ export struct PlayUIComponent { | ||
| 383 | step: 1, | 383 | step: 1, |
| 384 | style: SliderStyle.OutSet | 384 | style: SliderStyle.OutSet |
| 385 | }) | 385 | }) |
| 386 | - .blockSize({ | ||
| 387 | - width: 18, | ||
| 388 | - height: 12 | ||
| 389 | - })// .blockStyle({ | 386 | + // .blockSize({ |
| 387 | + // width: 18, | ||
| 388 | + // height: 12 | ||
| 389 | + // }) | ||
| 390 | + // .blockStyle({ | ||
| 390 | // type: SliderBlockType.IMAGE, | 391 | // type: SliderBlockType.IMAGE, |
| 391 | // image: $r('app.media.ic_player_block') | 392 | // image: $r('app.media.ic_player_block') |
| 392 | // }) | 393 | // }) |
| @@ -394,8 +395,14 @@ export struct PlayUIComponent { | @@ -394,8 +395,14 @@ export struct PlayUIComponent { | ||
| 394 | .trackColor('#4DFFFFFF') | 395 | .trackColor('#4DFFFFFF') |
| 395 | .selectedColor('#FFED2800') | 396 | .selectedColor('#FFED2800') |
| 396 | .height(14) | 397 | .height(14) |
| 397 | - .trackThickness(1) | 398 | + .trackThickness(2) |
| 399 | + .blockStyle({ | ||
| 400 | + type: SliderBlockType.IMAGE, | ||
| 401 | + image: $r('app.media.ic_player_block') | ||
| 402 | + }) | ||
| 403 | + .blockSize({ width: 18, height: 12 }) | ||
| 398 | .layoutWeight(1) | 404 | .layoutWeight(1) |
| 405 | + .height(14) | ||
| 399 | .margin({ | 406 | .margin({ |
| 400 | left: 8, | 407 | left: 8, |
| 401 | right: 8 | 408 | right: 8 |
| @@ -123,10 +123,10 @@ export struct PlayerVideoControlComponent { | @@ -123,10 +123,10 @@ export struct PlayerVideoControlComponent { | ||
| 123 | step: 1, | 123 | step: 1, |
| 124 | style: SliderStyle.OutSet | 124 | style: SliderStyle.OutSet |
| 125 | }) | 125 | }) |
| 126 | - .blockSize({ | ||
| 127 | - width: 18, | ||
| 128 | - height: 12 | ||
| 129 | - }) | 126 | + // .blockSize({ |
| 127 | + // width: 18, | ||
| 128 | + // height: 12 | ||
| 129 | + // }) | ||
| 130 | .trackColor('#4DFFFFFF') | 130 | .trackColor('#4DFFFFFF') |
| 131 | .selectedColor('#FFED2800') | 131 | .selectedColor('#FFED2800') |
| 132 | .trackThickness(2) | 132 | .trackThickness(2) |
-
Please register or login to post a comment