gxd-uni-library-editx 1.0.16 → 1.0.17-beta2
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
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
confirmColorType: 'primary',
|
|
132
132
|
radius: '10rpx',
|
|
133
133
|
btnRadius: '',
|
|
134
|
-
|
|
134
|
+
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
},
|
|
@@ -237,11 +237,14 @@
|
|
|
237
237
|
}
|
|
238
238
|
|
|
239
239
|
&-content {
|
|
240
|
-
padding: unit(22, rpx) unit(30, rpx) unit(
|
|
240
|
+
padding: unit(22, rpx) unit(30, rpx) unit(20, rpx);
|
|
241
241
|
text-align: center;
|
|
242
242
|
font-size: unit(34, rpx);
|
|
243
243
|
line-height: unit(52, rpx);
|
|
244
244
|
color: #595656;
|
|
245
|
+
max-height: 55vh;
|
|
246
|
+
overflow-y: auto;
|
|
247
|
+
margin-bottom: unit(40, rpx);
|
|
245
248
|
}
|
|
246
249
|
|
|
247
250
|
&-btn {
|
|
@@ -16,22 +16,23 @@
|
|
|
16
16
|
></view>
|
|
17
17
|
<!--topBar-->
|
|
18
18
|
<view class="xd-Layout__bar"
|
|
19
|
-
v-show="showBar"
|
|
19
|
+
v-show="showBar || isPreviewShowBar"
|
|
20
|
+
:class="{isPreviewShowBar: isPreviewShowBar}"
|
|
20
21
|
:style="{
|
|
21
22
|
height: navBarHeight + statusBarHeight + 'rpx',
|
|
22
23
|
width: '100%',
|
|
23
|
-
backgroundColor:
|
|
24
|
+
backgroundColor: getBarBgColor,
|
|
24
25
|
backgroundImage: getNavBackImage,
|
|
25
|
-
zIndex: (
|
|
26
|
+
zIndex: ((showBar || isPreviewShowBar) ? 1300: 1000)
|
|
26
27
|
}
|
|
27
28
|
">
|
|
28
29
|
<xd-bar
|
|
29
30
|
:bar-nav-height="navBarHeight"
|
|
30
31
|
:bar-status-height="statusBarHeight"
|
|
31
|
-
:title="
|
|
32
|
+
:title="getTitle"
|
|
32
33
|
:show-back="showBack"
|
|
33
|
-
:color="
|
|
34
|
-
:bg-color="
|
|
34
|
+
:color="getBarTextColor"
|
|
35
|
+
:bg-color="getBarBgColor"
|
|
35
36
|
:bg-image="navigationStyle ? bgImage: ''"
|
|
36
37
|
:is-slot-top-bar="isSlotTopBar"
|
|
37
38
|
:text-align="barTextAlign || tabbarData.barTextAlign "
|
|
@@ -262,7 +263,6 @@
|
|
|
262
263
|
layoutLoading: false,
|
|
263
264
|
startTime: new Date().getTime(),
|
|
264
265
|
|
|
265
|
-
|
|
266
266
|
startAnimation : false, //开始动画效果
|
|
267
267
|
doneAnimation: false, //完成动画效果
|
|
268
268
|
defaultImage: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDM4QTUyMkNDRUQyMTFFQzkzRTZDOUJBNTFBNTA3RDUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDM4QTUyMkRDRUQyMTFFQzkzRTZDOUJBNTFBNTA3RDUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDozMkE3N0VGRkNFRDAxMUVDOTNFNkM5QkE1MUE1MDdENSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDozMkE3N0YwMENFRDAxMUVDOTNFNkM5QkE1MUE1MDdENSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PliHXlsAAAAQSURBVHjaYvj//z8DQIABAAj8Av7bok0WAAAAAElFTkSuQmCC',
|
|
@@ -306,6 +306,8 @@
|
|
|
306
306
|
|
|
307
307
|
//自定义背景
|
|
308
308
|
customBg: null,
|
|
309
|
+
//窗口高度
|
|
310
|
+
gWindowHeight: 0,
|
|
309
311
|
}
|
|
310
312
|
},
|
|
311
313
|
computed: {
|
|
@@ -316,6 +318,23 @@
|
|
|
316
318
|
'brandInfo'
|
|
317
319
|
]),
|
|
318
320
|
|
|
321
|
+
isPreviewShowBar(){
|
|
322
|
+
if(this.wiewType && this.navigationStyle && !this.showBar) return true
|
|
323
|
+
},
|
|
324
|
+
getTitle(){
|
|
325
|
+
if(this.isPreviewShowBar) return '该模块只有在预览模式显示';
|
|
326
|
+
return this.title
|
|
327
|
+
},
|
|
328
|
+
getBarBgColor(){
|
|
329
|
+
if(this.isPreviewShowBar) return 'rgba(255, 244, 191, 0.9)';
|
|
330
|
+
return this.barBgColor
|
|
331
|
+
},
|
|
332
|
+
getBarTextColor(){
|
|
333
|
+
if(this.isPreviewShowBar) return '#333';
|
|
334
|
+
return this.barTextColor
|
|
335
|
+
},
|
|
336
|
+
|
|
337
|
+
|
|
319
338
|
getBodyBackImage(){
|
|
320
339
|
|
|
321
340
|
//无背景返回值
|
|
@@ -348,7 +367,7 @@
|
|
|
348
367
|
let temp = 'center top'; //默认值
|
|
349
368
|
let top = this.navBarHeight + this.statusBarHeight;
|
|
350
369
|
//自定义 + 显示顶部导航
|
|
351
|
-
if (this.navigationStyle && (this.showBar)) {
|
|
370
|
+
if (this.navigationStyle && (this.showBar || this.isPreviewShowBar)) {
|
|
352
371
|
temp = `center -${top + this.getRpx(windowTop)}rpx`;
|
|
353
372
|
}
|
|
354
373
|
return temp;
|
|
@@ -360,7 +379,7 @@
|
|
|
360
379
|
let top = this.topHeight + this.navBarHeight + this.statusBarHeight;
|
|
361
380
|
|
|
362
381
|
//自定义 + 显示顶部导航
|
|
363
|
-
if(this.navigationStyle && (this.showBar || this.topHeight) ) {
|
|
382
|
+
if(this.navigationStyle && (this.showBar || this.topHeight || this.isPreviewShowBar) ) {
|
|
364
383
|
temp = `center -${top + this.getRpx(windowTop)}rpx`;
|
|
365
384
|
}
|
|
366
385
|
return temp;
|
|
@@ -387,7 +406,7 @@
|
|
|
387
406
|
getMinHeight(){
|
|
388
407
|
if(this.initStatus) {
|
|
389
408
|
let temp = uni.getSystemInfoSync();
|
|
390
|
-
let windowHeight =
|
|
409
|
+
let windowHeight = this.gWindowHeight;
|
|
391
410
|
let windowTop = temp.windowTop || 0;
|
|
392
411
|
|
|
393
412
|
// #ifdef H5
|
|
@@ -468,6 +487,15 @@
|
|
|
468
487
|
this.wiewType = this.$configProject.isPreview;
|
|
469
488
|
this.systemInfoSyn = uni.getSystemInfoSync();
|
|
470
489
|
|
|
490
|
+
|
|
491
|
+
this.gWindowHeight = uni.getSystemInfoSync().windowHeight;
|
|
492
|
+
// #ifdef H5
|
|
493
|
+
uni.onWindowResize(()=>{
|
|
494
|
+
this.gWindowHeight = uni.getSystemInfoSync().windowHeight;
|
|
495
|
+
})
|
|
496
|
+
// #endif
|
|
497
|
+
|
|
498
|
+
|
|
471
499
|
//定位设置
|
|
472
500
|
if (this.$configProject.isPreview === false
|
|
473
501
|
&& this.$configProject.extras
|
|
@@ -528,19 +556,6 @@
|
|
|
528
556
|
|
|
529
557
|
|
|
530
558
|
},
|
|
531
|
-
mounted(){
|
|
532
|
-
//this.$nextTick(()=>{
|
|
533
|
-
// // #ifdef H5
|
|
534
|
-
// const query = uni.createSelectorQuery().in(this);
|
|
535
|
-
// let box = query.select('#xd-Layout');
|
|
536
|
-
// let config = {attributes: true, childList: true, subtree: true};
|
|
537
|
-
// this.observer = new MutationObserver(mutations => {
|
|
538
|
-
// this.doChange()
|
|
539
|
-
// });
|
|
540
|
-
// this.observer.observe(box._component.$el, config)
|
|
541
|
-
// // #endif
|
|
542
|
-
// })
|
|
543
|
-
},
|
|
544
559
|
|
|
545
560
|
beforeMount() {
|
|
546
561
|
if (this.safeHeight === null) this.getSafeBottom();
|
|
@@ -585,6 +600,7 @@
|
|
|
585
600
|
|
|
586
601
|
// #ifdef H5
|
|
587
602
|
if (!this.showBar) this.navBarHeight = 0;
|
|
603
|
+
if(this.isPreviewShowBar) this.navBarHeight = 80;
|
|
588
604
|
// #endif
|
|
589
605
|
|
|
590
606
|
// 设置状态栏高度
|
|
@@ -772,6 +788,11 @@
|
|
|
772
788
|
background: #fff;
|
|
773
789
|
top: 0;
|
|
774
790
|
right: 0;
|
|
791
|
+
|
|
792
|
+
&.isPreviewShowBar /deep/ .xd-custom-bar__fixed-content-center{
|
|
793
|
+
font-size: unit(24, rpx) !important;
|
|
794
|
+
color: #dda450!important;
|
|
795
|
+
}
|
|
775
796
|
}
|
|
776
797
|
|
|
777
798
|
&__body {
|
|
@@ -814,6 +835,11 @@
|
|
|
814
835
|
.safe-area();
|
|
815
836
|
}
|
|
816
837
|
|
|
838
|
+
&__view {
|
|
839
|
+
height: unit(100, rpx);
|
|
840
|
+
|
|
841
|
+
}
|
|
842
|
+
|
|
817
843
|
/**动画效果**/
|
|
818
844
|
&__animation {
|
|
819
845
|
width: 100vw;
|