jufubao-base 1.0.203 → 1.0.205-beta1
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 +1 -1
- package/src/components/JfbBaseAddress/XdAddress.vue +12 -6
- package/src/components/JfbBaseBackground/JfbBaseBackground.vue +6 -2
- package/src/components/JfbBaseCardEntry/Attr.js +472 -443
- package/src/components/JfbBaseCardEntry/JfbBaseCardEntry.vue +124 -98
- package/src/components/JfbBaseCardEntry/Mock.js +1 -0
- package/src/components/JfbBaseCardEntry/XdCardNew.vue +135 -0
- package/src/components/JfbBaseEntry/JfbBaseEntry.vue +49 -38
- package/src/components/JfbBaseFastLink/JfbBaseFastLink.vue +2 -4
- package/src/components/JfbBaseHeader/Attr.js +134 -51
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +118 -31
- package/src/components/JfbBaseHeaderElephant/Api.js +22 -0
- package/src/components/JfbBaseHeaderElephant/Attr.js +510 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephant.vue +464 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantLess.less +79 -0
- package/src/components/JfbBaseHeaderElephant/JfbBaseHeaderElephantMixin.js +30 -0
- package/src/components/JfbBaseHeaderElephant/Mock.js +5 -0
- package/src/components/JfbBaseNotice/Attr.js +26 -0
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +13 -1
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +11 -4
- package/src/components/JfbBasePoster/JfbBasePoster.vue +11 -2
- package/src/components/JfbBasePosterType/Attr.js +199 -81
- package/src/components/JfbBasePosterType/FourScreen.vue +115 -233
- package/src/components/JfbBasePosterType/JfbBasePosterType.vue +161 -80
- package/src/components/JfbBaseUserInfo/Attr.js +134 -33
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +89 -8
- package/src/mixins/componentsMixins.js +51 -47
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import {getContainerFnPropsValue, getContainerPropsValue,isWechat} from "@/utils/xd.base";
|
|
4
|
-
import {Base64} from 'js-base64';
|
|
5
4
|
import {mapActions,mapState, mapMutations} from "vuex";
|
|
6
5
|
import helper from "@/utils/helper";
|
|
7
6
|
import store from "@/store/index";
|
|
7
|
+
import getServiceUrl from "@/common/getServiceUrl"
|
|
8
|
+
|
|
8
9
|
|
|
9
10
|
export default {
|
|
10
11
|
props: {
|
|
@@ -209,20 +210,31 @@ export default {
|
|
|
209
210
|
|
|
210
211
|
//调试模式设置值
|
|
211
212
|
let zIndex = 4;
|
|
212
|
-
if(
|
|
213
|
+
if(this['hideMask'] === true) zIndex = -1;
|
|
213
214
|
if(this['closeMask'] === true) zIndex = -1;
|
|
214
215
|
if(this['closeMask'] === false) zIndex = 4;
|
|
215
|
-
document.querySelector(':root').style.setProperty('--preview-z-index', zIndex);
|
|
216
216
|
|
|
217
217
|
//生产元素
|
|
218
218
|
if(this.$configProject.isPreview) {
|
|
219
219
|
if(zIndex ===-1) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
this.$nextTick(()=>{
|
|
221
|
+
setTimeout(()=>{
|
|
222
|
+
let r = document.getElementsByClassName(this.cssRoot);
|
|
223
|
+
let len = r.length;
|
|
224
|
+
for (let i=0; i < len; i++) {
|
|
225
|
+
let el = r.item(i);
|
|
226
|
+
if(!el.hasAttribute('close-mask')) {
|
|
227
|
+
el.setAttribute('close-mask', '1');
|
|
228
|
+
for(let k=0; k < 4;k++) {
|
|
229
|
+
let span = document.createElement('span');
|
|
230
|
+
span.className = 'xd-preview-line xd-preview-line-' + k;
|
|
231
|
+
el.appendChild(span);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
}, 50)
|
|
237
|
+
})
|
|
226
238
|
}
|
|
227
239
|
|
|
228
240
|
}
|
|
@@ -513,6 +525,11 @@ export default {
|
|
|
513
525
|
|
|
514
526
|
//边框样式生成
|
|
515
527
|
getXdBorder(defaultObj, newObj, type='border'){
|
|
528
|
+
//使用默认值
|
|
529
|
+
if(newObj.type ==='D'){
|
|
530
|
+
if(type === 'border') return `${defaultObj.width}rpx ${defaultObj.style} ${defaultObj.color}`;
|
|
531
|
+
return `0 0 ${defaultObj.width}rpx ${defaultObj.color}`;
|
|
532
|
+
}
|
|
516
533
|
if(newObj.type === 'N' || this.$xdUniHelper.isEmpty(newObj)) return `0`;
|
|
517
534
|
let width = defaultObj.width;
|
|
518
535
|
let color = defaultObj.color;
|
|
@@ -633,6 +650,31 @@ export default {
|
|
|
633
650
|
return str
|
|
634
651
|
},
|
|
635
652
|
|
|
653
|
+
/**
|
|
654
|
+
* @description 获取边距与填充上下或者左右的值
|
|
655
|
+
* @param obj
|
|
656
|
+
* @param type
|
|
657
|
+
* @param defValue
|
|
658
|
+
* @return {*}
|
|
659
|
+
*/
|
|
660
|
+
getPMValue(obj = {},type='RL', defValue) {
|
|
661
|
+
if(this.$xdUniHelper.checkVarType(obj) !== 'object') obj = {};
|
|
662
|
+
let top = 0,right=0,bottom=0,left=0;
|
|
663
|
+
if(typeof defValue === 'number') {
|
|
664
|
+
top = right = left = bottom = defValue;
|
|
665
|
+
}
|
|
666
|
+
else if(this.$xdUniHelper.checkVarType(obj) === 'object') {
|
|
667
|
+
if(typeof defValue.top === "number") top = defValue.top;
|
|
668
|
+
if(typeof defValue.right === "number") right = defValue.right;
|
|
669
|
+
if(typeof defValue.bottom === "number") bottom = defValue.bottom;
|
|
670
|
+
if(typeof defValue.left === "number") left = defValue.left;
|
|
671
|
+
}
|
|
672
|
+
if(type === 'RL') {
|
|
673
|
+
return this.checkValue(obj.left,left) + this.checkValue(obj.right,right);
|
|
674
|
+
}
|
|
675
|
+
return this.checkValue(obj.bottom,bottom) + this.checkValue(obj.top,top);
|
|
676
|
+
},
|
|
677
|
+
|
|
636
678
|
/**
|
|
637
679
|
* @description 获取商品显示规则
|
|
638
680
|
* @param container
|
|
@@ -788,44 +830,6 @@ export default {
|
|
|
788
830
|
console.error(e);
|
|
789
831
|
return null;
|
|
790
832
|
}
|
|
791
|
-
// let content = list.filter(item=>{
|
|
792
|
-
// //预览模式
|
|
793
|
-
// if(this.$configProject.isPreview) return true;
|
|
794
|
-
//
|
|
795
|
-
// //非内部应用
|
|
796
|
-
// if(item.redirect_type !== 'INN') return true
|
|
797
|
-
//
|
|
798
|
-
// //没有配置链接
|
|
799
|
-
// if(!item.redirect_data) return true;
|
|
800
|
-
//
|
|
801
|
-
// //内部应用
|
|
802
|
-
// else {
|
|
803
|
-
// let redirect_data;
|
|
804
|
-
// try {
|
|
805
|
-
// redirect_data = JSON.parse(item.redirect_data);
|
|
806
|
-
// if(!item['app_type']) item['app_type']= 'h5';
|
|
807
|
-
//
|
|
808
|
-
// //#ifdef H5
|
|
809
|
-
// return item['app_type'] !== 'wxmp';
|
|
810
|
-
// //#endif
|
|
811
|
-
//
|
|
812
|
-
// //#ifdef MP-WEIXIN
|
|
813
|
-
// let actDir = this.$parent.projectAttr.deploy_dir;
|
|
814
|
-
// let dir = this.getPathDir(redirect_data.page);
|
|
815
|
-
// if(item['app_type'] === 'wxmp'){
|
|
816
|
-
// return actDir === dir;
|
|
817
|
-
// }
|
|
818
|
-
// else if(item['app_type'] === 'h5') return true;
|
|
819
|
-
// else return true
|
|
820
|
-
// //#endif
|
|
821
|
-
// }
|
|
822
|
-
// catch (e) {
|
|
823
|
-
// return true
|
|
824
|
-
// }
|
|
825
|
-
// }
|
|
826
|
-
// });
|
|
827
|
-
// console.warn(`PostersList:${JSON.stringify(content.map(item=>`${item.app_type}:${item.content_name}:${item.redirect_data}`), null,2)}`)
|
|
828
|
-
// return content;
|
|
829
833
|
|
|
830
834
|
},
|
|
831
835
|
}
|