gxd-uni-library-editx 1.0.83-beta8 → 1.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="xd-custom-bar" v-if="initDone">
|
|
2
|
+
<view class="xd-custom-bar" v-if="initDone" :style="{height: barNavHeight + barStatusHeight + 'rpx'}">
|
|
3
3
|
<view
|
|
4
4
|
class="xd-custom-bar__fixed"
|
|
5
5
|
:style="{
|
|
@@ -181,6 +181,11 @@
|
|
|
181
181
|
created(){
|
|
182
182
|
this.noPrevToIndex = this.$settings['noPrevPageToIndex'] === undefined ? false : this.$settings['noPrevPageToIndex'];
|
|
183
183
|
|
|
184
|
+
// #ifdef MP-WEIXIN
|
|
185
|
+
this.uiIconSize = 36;
|
|
186
|
+
this.uiFontSize = 24;
|
|
187
|
+
// #endif
|
|
188
|
+
|
|
184
189
|
//背景颜色设置
|
|
185
190
|
this.uiBgColor = this.bgColor || this.$mainColor;
|
|
186
191
|
if(this.color) this.uiTextColor = this.color;
|
|
@@ -7,16 +7,15 @@
|
|
|
7
7
|
<!--topBar-->
|
|
8
8
|
<view class="xd-Layout__top-height"
|
|
9
9
|
:style="{
|
|
10
|
-
height: (topHeight +navBarHeight + statusBarHeight) +'rpx',
|
|
10
|
+
height: (topHeight + navBarHeight + statusBarHeight) +'rpx',
|
|
11
11
|
backgroundImage: getNavBackImage,
|
|
12
12
|
backgroundPosition: 'top center',
|
|
13
13
|
backgroundSize: '100%',
|
|
14
14
|
backgroundRepeat: 'no-repeat',
|
|
15
15
|
}"
|
|
16
16
|
></view>
|
|
17
|
-
<!--topBar-->
|
|
18
17
|
<view class="xd-Layout__bar"
|
|
19
|
-
v-show="showBar || isPreviewShowBar"
|
|
18
|
+
v-show="showBar || isPreviewShowBar || isCustomNavigation"
|
|
20
19
|
:class="{isPreviewShowBar: isPreviewShowBar}"
|
|
21
20
|
:style="{
|
|
22
21
|
height: navBarHeight + statusBarHeight + 'rpx',
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
:bar-nav-height="navBarHeight"
|
|
32
31
|
:bar-status-height="statusBarHeight"
|
|
33
32
|
:title="getTitle"
|
|
34
|
-
:show-back="
|
|
33
|
+
:show-back="isShowBack"
|
|
35
34
|
:color="getBarTextColor"
|
|
36
35
|
:bg-color="getBarBgColor"
|
|
37
36
|
:bg-image="!wiewType && navigationStyle ? bgImage: ''"
|
|
@@ -42,6 +41,7 @@
|
|
|
42
41
|
<slot name="topBar" v-if="isSlotTopBar"></slot>
|
|
43
42
|
</xd-bar>
|
|
44
43
|
</view>
|
|
44
|
+
<!--topBar-->
|
|
45
45
|
<!--top-->
|
|
46
46
|
<view class="xd-Layout__top animation-top"
|
|
47
47
|
v-show="contentStatus"
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
<slot name="footer"></slot>
|
|
95
95
|
</view>
|
|
96
96
|
<!--bottom-->
|
|
97
|
-
<!--
|
|
97
|
+
<!--tabBar-->
|
|
98
98
|
<view class="xd-Layout__tabbar"
|
|
99
99
|
v-show="showFooter"
|
|
100
100
|
:style="{
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</template>
|
|
112
112
|
<slot name="footerBar" v-else></slot>
|
|
113
113
|
</view>
|
|
114
|
-
<!--
|
|
114
|
+
<!--tabBar-->
|
|
115
115
|
<view class="xd-Layout__footer-height" :style="{height: (bottomHeight + (isFooterSolt ? footerHeight: 110)) + 'rpx' }"></view>
|
|
116
116
|
</view>
|
|
117
117
|
<view v-if="websiteStatus === false && this.mpSiteLoading" class="website-disable">
|
|
@@ -348,8 +348,21 @@
|
|
|
348
348
|
'siteInfo'
|
|
349
349
|
]),
|
|
350
350
|
|
|
351
|
+
isShowBack(){
|
|
352
|
+
return this.showBack || this.isCustomNavigation
|
|
353
|
+
},
|
|
354
|
+
|
|
355
|
+
//微信小程序自定义不显示头处理
|
|
356
|
+
isCustomNavigation(){
|
|
357
|
+
// #ifdef MP-WEIXIN || APP-PLUS || MP-ALIPAY
|
|
358
|
+
return !this.wiewType && this.navigationStyle && !this.showBar
|
|
359
|
+
// #endif
|
|
360
|
+
return false
|
|
361
|
+
|
|
362
|
+
},
|
|
363
|
+
|
|
351
364
|
isPreviewShowBar(){
|
|
352
|
-
|
|
365
|
+
return this.wiewType && this.navigationStyle && !this.showBar;
|
|
353
366
|
},
|
|
354
367
|
getTitle(){
|
|
355
368
|
if(this.isPreviewShowBar) return '该模块只有在预览模式显示';
|
|
@@ -679,13 +692,13 @@
|
|
|
679
692
|
// 设置状态栏高度
|
|
680
693
|
this.statusBarHeight = this.getRpx(this.systemInfoSyn.statusBarHeight);
|
|
681
694
|
|
|
682
|
-
//
|
|
683
|
-
// #
|
|
695
|
+
// MP-WEIXIN|APP-PLUS|mp-alipay
|
|
696
|
+
// #ifdef MP-WEIXIN || APP-PLUS || MP-ALIPAY
|
|
684
697
|
// 获取胶囊的位置
|
|
685
698
|
const menuButtonInfo = uni.getMenuButtonBoundingClientRect();
|
|
686
699
|
// (胶囊底部高度 - 状态栏的高度) + (胶囊顶部高度 - 状态栏内的高度) = 导航栏的高度
|
|
687
700
|
//开启自定义导航
|
|
688
|
-
if(this.navigationStyle === 'custom'){
|
|
701
|
+
if(this.navigationStyle === 'custom' || this.navigationStyle === true){
|
|
689
702
|
this.navBarHeight = this.getRpx((menuButtonInfo.bottom - this.systemInfoSyn.statusBarHeight) + (menuButtonInfo.top - this.systemInfoSyn.statusBarHeight));
|
|
690
703
|
}
|
|
691
704
|
else{
|
|
@@ -694,10 +707,10 @@
|
|
|
694
707
|
}
|
|
695
708
|
// #endif
|
|
696
709
|
|
|
710
|
+
//底部设置
|
|
697
711
|
if(!this.showFooter) {
|
|
698
712
|
this.tabbarHeigth = 0;
|
|
699
713
|
}
|
|
700
|
-
|
|
701
714
|
this.createTime = new Date().getTime() - this.startTime;
|
|
702
715
|
},
|
|
703
716
|
|
|
@@ -798,6 +811,12 @@
|
|
|
798
811
|
},
|
|
799
812
|
|
|
800
813
|
backEvent() {
|
|
814
|
+
// #ifdef MP-WEIXIN || APP-PLUS || MP-ALIPAY
|
|
815
|
+
if(this.isCustomNavigation) {
|
|
816
|
+
this.$xdUniHelper.navigateBack();
|
|
817
|
+
return
|
|
818
|
+
}
|
|
819
|
+
// #endif
|
|
801
820
|
this.$emit('onBack');
|
|
802
821
|
this.$emit('back');
|
|
803
822
|
},
|