1
1
import { isFunction , isObject , isString } from '@tarojs/shared'
2
+ import { TARO_TABBAR_PAGE_PATH } from '@tarojs/vite-runner/dist/harmony/page'
2
3
import { escapePath } from '@tarojs/vite-runner/dist/utils'
3
4
4
5
import { getProjectId } from '../../utils'
@@ -481,24 +482,24 @@ export default function (this: Harmony): PluginOption {
481
482
? [
482
483
`if (this.pageStack[0].path !== this.entryPagePath && this.navigationBarHomeBtn && this.pageStack.length === 1) {` ,
483
484
` Image($r('app.media.taro_home'))` ,
484
- // FIXME ` .height(convertNumber2VP(40 / 7.5, 'vw'))`,
485
- // FIXME ` .width(convertNumber2VP(40 / 7.5, 'vw'))`,
486
- // FIXME ` .margin({ left: convertNumber2VP(40 / 7.5, 'vw'), right: convertNumber2VP(-20 / 7.5, 'vw') })`,
485
+ ` .height(convertNumber2VP(40 / 7.5, 'vw'))` ,
486
+ ` .width(convertNumber2VP(40 / 7.5, 'vw'))` ,
487
+ ` .margin({ left: convertNumber2VP(40 / 7.5, 'vw'), right: convertNumber2VP(-20 / 7.5, 'vw') })` ,
487
488
` .fillColor((this.navigationBarTextStyle || '${ this . appConfig . window ?. navigationBarTextStyle } ') !== 'black' ? Color.White : Color.Black)` ,
488
489
` .objectFit(ImageFit.Contain)` ,
489
490
` .onClick(() => {` ,
490
- // FIXME ` router.replaceUrl({`,
491
- // FIXME ` url: this.tabBarList.find(e => e.pagePath === this.entryPagePath) ? '${TARO_TABBAR_PAGE_PATH}' : this.entryPagePath,`,
492
- // FIXME ` params: {`,
493
- // FIXME ` '$page': this.entryPagePath,`,
494
- // FIXME ` },`,
495
- // FIXME ` })`,
491
+ ` router.replaceUrl({` ,
492
+ ` url: this.tabBarList.find(e => e.pagePath === this.entryPagePath) ? '${ TARO_TABBAR_PAGE_PATH } ' : this.entryPagePath,` ,
493
+ ` params: {` ,
494
+ ` '$page': this.entryPagePath,` ,
495
+ ` },` ,
496
+ ` })` ,
496
497
` })` ,
497
498
` } else if (this.pageStack.length > 1) {` ,
498
499
` Image($r('app.media.taro_arrow_left'))` ,
499
- // FIXME ` .height(convertNumber2VP(40 / 7.5, 'vw'))`,
500
- // FIXME ` .width(convertNumber2VP(40 / 7.5, 'vw'))`,
501
- // FIXME ` .margin({ left: convertNumber2VP(40 / 7.5, 'vw'), right: convertNumber2VP(-20 / 7.5, 'vw') })`,
500
+ ` .height(convertNumber2VP(40 / 7.5, 'vw'))` ,
501
+ ` .width(convertNumber2VP(40 / 7.5, 'vw'))` ,
502
+ ` .margin({ left: convertNumber2VP(40 / 7.5, 'vw'), right: convertNumber2VP(-20 / 7.5, 'vw') })` ,
502
503
` .fillColor((this.navigationBarTextStyle || '${ this . appConfig . window ?. navigationBarTextStyle } ') !== 'black' ? Color.White : Color.Black)` ,
503
504
` .objectFit(ImageFit.Contain)` ,
504
505
` .onClick(() => {` ,
@@ -507,14 +508,14 @@ export default function (this: Harmony): PluginOption {
507
508
` }` ,
508
509
] : [ ] , 2 ) } `,
509
510
` Text(this.navigationBarTitleText${ this . isTabbarPage ? '[this.tabBarCurrentIndex]' : '' } || '${ this . appConfig . window ?. navigationBarTitleText || '' } ')` ,
510
- // FIXME ` .margin({ left: convertNumber2VP(40 / 7.5, 'vw') })`,
511
- // FIXME ` .fontSize(convertNumber2VP(32 / 7.5, 'vw'))`,
511
+ ` .margin({ left: convertNumber2VP(40 / 7.5, 'vw') })` ,
512
+ ` .fontSize(convertNumber2VP(32 / 7.5, 'vw'))` ,
512
513
` .fontColor((this.navigationBarTextStyle${ this . isTabbarPage ? '[this.tabBarCurrentIndex]' : '' } || '${ this . appConfig . window ?. navigationBarTextStyle } ') !== 'black' ? Color.White : Color.Black)` ,
513
514
` if (this.navigationBarLoading${ this . isTabbarPage ? '[this.tabBarCurrentIndex]' : '' } ) {` ,
514
515
` LoadingProgress()` ,
515
- // FIXME ` .margin({ left: convertNumber2VP(10 / 7.5, 'vw') })`,
516
- // FIXME ` .height(convertNumber2VP(40 / 7.5, 'vw'))`,
517
- // FIXME ` .width(convertNumber2VP(40 / 7.5, 'vw'))`,
516
+ ` .margin({ left: convertNumber2VP(10 / 7.5, 'vw') })` ,
517
+ ` .height(convertNumber2VP(40 / 7.5, 'vw'))` ,
518
+ ` .width(convertNumber2VP(40 / 7.5, 'vw'))` ,
518
519
` .color((this.navigationBarTextStyle${ this . isTabbarPage ? '[this.tabBarCurrentIndex]' : '' } || '${ this . appConfig . window ?. navigationBarTextStyle } ') !== 'black' ? Color.White : Color.Black)` ,
519
520
` }` ,
520
521
`}` ,
@@ -525,24 +526,6 @@ export default function (this: Harmony): PluginOption {
525
526
` top: px2vp(sysInfo.safeArea?.top || 0),` ,
526
527
`})` ,
527
528
`.zIndex(1)` ,
528
- // 'NavBar({',
529
- // // ' isAdaptStatusBar: true,', 由于内置 windowStage 为 undefined 实际无效
530
- // ' isAutoDark: true,',
531
- // ` statusBarHeight: this.statusBarHeight,`,
532
- // ` bgColor: this.navigationBarBackgroundColor || '${
533
- // this.appConfig.window?.navigationBarBackgroundColor || '#000000'
534
- // }',`,
535
- // ` mainTitleText: new TextParam(this.navigationBarTitleText || '${
536
- // this.appConfig.window?.navigationBarTitleText || ''
537
- // }', null, this.navigationBarTextStyle || '${
538
- // this.appConfig.window?.navigationBarTextStyle || 'white'
539
- // }', null),`,
540
- // ' useBackIcon: true,',
541
- // ' onBackClick: () => {',
542
- // ' navigateBack()', // 需要拦截适配返回,组件提供的返回与 NavDestination 不兼容
543
- // ' return true',
544
- // ' },',
545
- // '})',
546
529
] ) ,
547
530
} )
548
531
0 commit comments