cms-chenhj-ui 2.0.26 → 2.0.28
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/cms-chenhj-ui.common.js +1071 -1071
- package/cms-chenhj-ui.common.js.map +1 -1
- package/cms-chenhj-ui.css +1 -1
- package/cms-chenhj-ui.umd.js +714 -714
- package/cms-chenhj-ui.umd.js.map +1 -1
- package/cms-chenhj-ui.umd.min.js +3 -3
- package/cms-chenhj-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
package/cms-chenhj-ui.common.js
CHANGED
|
@@ -546,384 +546,6 @@ Function.prototype.toString = makeBuiltIn(function toString() {
|
|
|
546
546
|
}, 'toString');
|
|
547
547
|
|
|
548
548
|
|
|
549
|
-
/***/ }),
|
|
550
|
-
|
|
551
|
-
/***/ 343:
|
|
552
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
553
|
-
|
|
554
|
-
"use strict";
|
|
555
|
-
// ESM COMPAT FLAG
|
|
556
|
-
__webpack_require__.r(__webpack_exports__);
|
|
557
|
-
|
|
558
|
-
// EXPORTS
|
|
559
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
560
|
-
"default": function() { return /* binding */ View; }
|
|
561
|
-
});
|
|
562
|
-
|
|
563
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-via-storedValueCard/View.vue?vue&type=template&id=25771ea8&scoped=true
|
|
564
|
-
var render = function render() {
|
|
565
|
-
var _vm = this,
|
|
566
|
-
_c = _vm._self._c;
|
|
567
|
-
return _c('BaseComp', _vm._b({
|
|
568
|
-
attrs: {
|
|
569
|
-
"data": _vm.data,
|
|
570
|
-
"nowCompId": _vm.nowCompId,
|
|
571
|
-
"isOpcacity": _vm.isOpcacity,
|
|
572
|
-
"lang": _vm.lang
|
|
573
|
-
},
|
|
574
|
-
on: {
|
|
575
|
-
"getConfigData": _vm.getConfigData
|
|
576
|
-
}
|
|
577
|
-
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
578
|
-
staticClass: "cmhk-home_main"
|
|
579
|
-
}, [_c('div', {
|
|
580
|
-
staticClass: "wrap"
|
|
581
|
-
}, [_c('div', {
|
|
582
|
-
ref: "cardList",
|
|
583
|
-
staticClass: "cardList"
|
|
584
|
-
}, [_vm.viewList.length === 0 ? [_c('div', {
|
|
585
|
-
staticClass: "card-box"
|
|
586
|
-
}, [_c('div', {
|
|
587
|
-
staticClass: "card"
|
|
588
|
-
}, [_c('div', {
|
|
589
|
-
staticClass: "img-box"
|
|
590
|
-
}, [_c('div', {
|
|
591
|
-
staticClass: "card-img",
|
|
592
|
-
class: {
|
|
593
|
-
'is-cms': _vm.$EventBus
|
|
594
|
-
}
|
|
595
|
-
}, [_c('img', {
|
|
596
|
-
staticStyle: {
|
|
597
|
-
"height": "200px"
|
|
598
|
-
},
|
|
599
|
-
attrs: {
|
|
600
|
-
"src": _vm.placeholderImg,
|
|
601
|
-
"alt": ""
|
|
602
|
-
}
|
|
603
|
-
})])]), _c('div', {
|
|
604
|
-
staticClass: "content-box"
|
|
605
|
-
}, [_c('div', {
|
|
606
|
-
staticClass: "card-name"
|
|
607
|
-
}, [_vm._v(_vm._s(_vm.langText.productName))]), _c('div', {
|
|
608
|
-
staticClass: "text-box"
|
|
609
|
-
}, [_c('div', {
|
|
610
|
-
staticClass: "card-refPrice"
|
|
611
|
-
}, [_vm._v(" " + _vm._s(_vm.langText.Price) + " HK$XXXX ")]), _c('div', {
|
|
612
|
-
staticClass: "card-pice-text"
|
|
613
|
-
}, [_vm._v(_vm._s(_vm.langText.onlinePrice))])]), _c('div', {
|
|
614
|
-
staticClass: "card-pice"
|
|
615
|
-
}, [_c('span', [_vm._v("HK$")]), _vm._v("XXXX")]), _c('div', {
|
|
616
|
-
staticClass: "card-btn"
|
|
617
|
-
}, [_vm._v(_vm._s(_vm.langText.buyNow))])])])])] : _vm._e(), _vm._l(_vm.viewList, function (item, index) {
|
|
618
|
-
return _c('div', {
|
|
619
|
-
key: `${index}-${item.commodityId || index}`,
|
|
620
|
-
staticClass: "card-box"
|
|
621
|
-
}, [_c('div', {
|
|
622
|
-
staticClass: "card"
|
|
623
|
-
}, [_c('div', {
|
|
624
|
-
staticClass: "tag-box-left"
|
|
625
|
-
}, [_vm._l(item.malltCommodityLeft, function (ele, i) {
|
|
626
|
-
return [_c('img', {
|
|
627
|
-
key: i,
|
|
628
|
-
attrs: {
|
|
629
|
-
"src": _vm.compBaseUrl + ele.pictureUrl,
|
|
630
|
-
"alt": ""
|
|
631
|
-
}
|
|
632
|
-
})];
|
|
633
|
-
})], 2), _c('div', {
|
|
634
|
-
staticClass: "tag-box-right"
|
|
635
|
-
}, [_vm._l(item.malltCommodityRight, function (ele, i) {
|
|
636
|
-
return [_c('img', {
|
|
637
|
-
key: i,
|
|
638
|
-
attrs: {
|
|
639
|
-
"src": _vm.compBaseUrl + ele.pictureUrl,
|
|
640
|
-
"alt": ""
|
|
641
|
-
}
|
|
642
|
-
})];
|
|
643
|
-
})], 2), _c('div', {
|
|
644
|
-
staticClass: "img-box"
|
|
645
|
-
}, [_vm.isNotActive(item) ? _c('div', {
|
|
646
|
-
staticClass: "mask"
|
|
647
|
-
}, [_vm._v(" " + _vm._s(new Date(item.upTime).getTime() > _vm.nowTs ? _vm.langText.comingSoon : _vm.langText.expired) + " ")]) : _vm._e(), _c('div', {
|
|
648
|
-
staticClass: "card-img",
|
|
649
|
-
class: {
|
|
650
|
-
'is-cms': _vm.$EventBus
|
|
651
|
-
}
|
|
652
|
-
}, [_c('img', {
|
|
653
|
-
attrs: {
|
|
654
|
-
"src": _vm.compBaseUrl + item.maxPicId,
|
|
655
|
-
"alt": ""
|
|
656
|
-
}
|
|
657
|
-
})])]), _c('div', {
|
|
658
|
-
staticClass: "content-box"
|
|
659
|
-
}, [_vm.isNotActive(item) ? _c('div', {
|
|
660
|
-
staticClass: "content-mask"
|
|
661
|
-
}) : _vm._e(), _c('div', {
|
|
662
|
-
staticClass: "card-name"
|
|
663
|
-
}, [_vm._v(_vm._s(item.commodityName))]), _c('div', {
|
|
664
|
-
staticClass: "text-box"
|
|
665
|
-
}, [item.price !== item.refPrice ? _c('div', {
|
|
666
|
-
staticClass: "card-refPrice"
|
|
667
|
-
}, [_vm._v(" " + _vm._s(_vm.langText.Price) + " HK$" + _vm._s(_vm.convertCentsToYuan(item.refPrice)) + " ")]) : _c('div', {
|
|
668
|
-
staticClass: "card-refPrice"
|
|
669
|
-
}), _c('div', {
|
|
670
|
-
staticClass: "card-pice-text"
|
|
671
|
-
}, [_vm._v(" " + _vm._s(item.price !== item.refPrice ? _vm.langText.onlinePrice : _vm.langText.Price) + " ")])]), _c('div', {
|
|
672
|
-
staticClass: "card-pice spc-font"
|
|
673
|
-
}, [_c('span', [_vm._v("HK$")]), _vm._v(_vm._s(_vm.convertCentsToYuan(item.price)) + " ")]), _vm.isActive(item) ? _c('div', {
|
|
674
|
-
staticClass: "card-btn",
|
|
675
|
-
on: {
|
|
676
|
-
"click": function ($event) {
|
|
677
|
-
return _vm.goDetail(item);
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}, [_vm._v(" " + _vm._s(_vm.langText.buyNow)), _c('img', {
|
|
681
|
-
attrs: {
|
|
682
|
-
"src": _vm.arrowRightImg
|
|
683
|
-
}
|
|
684
|
-
})]) : _c('div', {
|
|
685
|
-
staticClass: "card-btn"
|
|
686
|
-
}, [_vm._v(" " + _vm._s(new Date(item.upTime).getTime() > _vm.nowTs ? (_vm.langText.launch || "").replace("NNN", item.upTime) : _vm.langText.Offer) + " ")])])])]);
|
|
687
|
-
})], 2), !_vm.seeMore && _vm.configList.length > 9 ? _c('div', {
|
|
688
|
-
ref: "seeMoreRef",
|
|
689
|
-
staticClass: "seeMore",
|
|
690
|
-
on: {
|
|
691
|
-
"click": function ($event) {
|
|
692
|
-
_vm.seeMore = true;
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
}, [_vm._v(" " + _vm._s(_vm.langText.more) + " "), _c('img', {
|
|
696
|
-
staticClass: "btm",
|
|
697
|
-
attrs: {
|
|
698
|
-
"src": _vm.arrowDownImg
|
|
699
|
-
}
|
|
700
|
-
})]) : _vm._e()])])]);
|
|
701
|
-
};
|
|
702
|
-
var staticRenderFns = [];
|
|
703
|
-
|
|
704
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
705
|
-
var es_iterator_constructor = __webpack_require__(8111);
|
|
706
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
|
|
707
|
-
var es_iterator_filter = __webpack_require__(2489);
|
|
708
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
709
|
-
var es_iterator_for_each = __webpack_require__(7588);
|
|
710
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
711
|
-
var baseComp = __webpack_require__(4128);
|
|
712
|
-
// EXTERNAL MODULE: ./src/api/index.js
|
|
713
|
-
var api = __webpack_require__(929);
|
|
714
|
-
// EXTERNAL MODULE: ./package/patch.js
|
|
715
|
-
var patch = __webpack_require__(1618);
|
|
716
|
-
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
|
717
|
-
var lib = __webpack_require__(9122);
|
|
718
|
-
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
719
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-via-storedValueCard/View.vue?vue&type=script&lang=js
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
731
|
-
name: "cms-via-storedValueCard",
|
|
732
|
-
components: {
|
|
733
|
-
BaseComp: baseComp["default"]
|
|
734
|
-
},
|
|
735
|
-
props: {
|
|
736
|
-
data: {
|
|
737
|
-
type: Object,
|
|
738
|
-
default: () => {
|
|
739
|
-
return {};
|
|
740
|
-
}
|
|
741
|
-
},
|
|
742
|
-
nowCompId: {
|
|
743
|
-
type: [String, Number],
|
|
744
|
-
default: ""
|
|
745
|
-
},
|
|
746
|
-
isOpcacity: {
|
|
747
|
-
type: Boolean,
|
|
748
|
-
default: true
|
|
749
|
-
},
|
|
750
|
-
lang: {
|
|
751
|
-
type: String,
|
|
752
|
-
default: "zh-HK"
|
|
753
|
-
}
|
|
754
|
-
},
|
|
755
|
-
data() {
|
|
756
|
-
return {
|
|
757
|
-
langConfig: {
|
|
758
|
-
"zh-HK": {
|
|
759
|
-
productName: "產品名稱",
|
|
760
|
-
Price: "建議零售價",
|
|
761
|
-
onlinePrice: "網上優惠價",
|
|
762
|
-
buyNow: "立即選購",
|
|
763
|
-
comingSoon: "即將推出",
|
|
764
|
-
expired: "優惠已過期",
|
|
765
|
-
more: "查看更多",
|
|
766
|
-
launch: "NNN 上線",
|
|
767
|
-
Offer: "優惠即將推出"
|
|
768
|
-
},
|
|
769
|
-
"zh-CN": {
|
|
770
|
-
productName: "产品名称",
|
|
771
|
-
Price: "建议零售价",
|
|
772
|
-
onlinePrice: "网上优惠价",
|
|
773
|
-
buyNow: "立即选购",
|
|
774
|
-
comingSoon: "即将推出",
|
|
775
|
-
expired: "优惠已过期",
|
|
776
|
-
more: "查看更多",
|
|
777
|
-
launch: "NNN 上线",
|
|
778
|
-
Offer: "优惠即将推出"
|
|
779
|
-
},
|
|
780
|
-
"en-US": {
|
|
781
|
-
productName: "Product Name",
|
|
782
|
-
Price: "SRP",
|
|
783
|
-
onlinePrice: "Online Price",
|
|
784
|
-
buyNow: "Buy Now",
|
|
785
|
-
comingSoon: "Coming Soon",
|
|
786
|
-
expired: "Expired",
|
|
787
|
-
more: "See more",
|
|
788
|
-
launch: "Launch at NNN",
|
|
789
|
-
Offer: "Offer Coming"
|
|
790
|
-
}
|
|
791
|
-
},
|
|
792
|
-
configList: [],
|
|
793
|
-
seeMore: false,
|
|
794
|
-
nowTs: Date.now(),
|
|
795
|
-
compBaseUrl: "https://omniapi.hk.chinamobile.com",
|
|
796
|
-
// images
|
|
797
|
-
placeholderImg: __webpack_require__(5335),
|
|
798
|
-
arrowRightImg: __webpack_require__(4860),
|
|
799
|
-
arrowDownImg: __webpack_require__(1861),
|
|
800
|
-
arrowHoverImg: __webpack_require__(4116),
|
|
801
|
-
arrowActiveImg: __webpack_require__(9670),
|
|
802
|
-
shopList: []
|
|
803
|
-
};
|
|
804
|
-
},
|
|
805
|
-
computed: {
|
|
806
|
-
langText() {
|
|
807
|
-
return this.langConfig[this.lang] ? this.langConfig[this.lang] : this.langConfig["zh-HK"];
|
|
808
|
-
},
|
|
809
|
-
viewList() {
|
|
810
|
-
if (this.seeMore) return this.shopList;
|
|
811
|
-
return this.shopList.slice(0, 9);
|
|
812
|
-
}
|
|
813
|
-
},
|
|
814
|
-
mounted() {
|
|
815
|
-
if (!this.$EventBus) {
|
|
816
|
-
this.compBaseUrl = (0,patch.getCompBaseUrl)();
|
|
817
|
-
}
|
|
818
|
-
},
|
|
819
|
-
beforeDestroy() {},
|
|
820
|
-
methods: {
|
|
821
|
-
getConfigData(configData) {
|
|
822
|
-
this.configList = configData.configList;
|
|
823
|
-
console.log("getConfigData", this.configList);
|
|
824
|
-
this.getValue();
|
|
825
|
-
},
|
|
826
|
-
async getValue() {
|
|
827
|
-
await this.getCommodityDetails();
|
|
828
|
-
},
|
|
829
|
-
// 拉取已选商品详情
|
|
830
|
-
async getCommodityDetails() {
|
|
831
|
-
// try {
|
|
832
|
-
let req = {
|
|
833
|
-
busInfo: JSON.stringify({
|
|
834
|
-
commodityIds: [...this.configList],
|
|
835
|
-
commodityTypes: ["604", "605"]
|
|
836
|
-
})
|
|
837
|
-
};
|
|
838
|
-
req = lib_default().stringify(req);
|
|
839
|
-
const json = await (0,api/* getCommodityDetails */.yX)(req, this.lang);
|
|
840
|
-
let dataResult = json && json.busiResp && json.busiResp.busiDataResp;
|
|
841
|
-
if (Array.isArray(dataResult)) {
|
|
842
|
-
dataResult.forEach(item => {
|
|
843
|
-
if (Array.isArray(item.malltCommodityTags)) {
|
|
844
|
-
const left = item.malltCommodityTags.filter(ele => ele.tagType == 5001).sort((a, b) => a.sort - b.sort);
|
|
845
|
-
const right = item.malltCommodityTags.filter(ele => ele.tagType == 5002).sort((a, b) => a.sort - b.sort);
|
|
846
|
-
item.malltCommodityLeft = left.slice(0, 2);
|
|
847
|
-
item.malltCommodityRight = right.slice(0, 4);
|
|
848
|
-
} else {
|
|
849
|
-
item.malltCommodityLeft = [];
|
|
850
|
-
item.malltCommodityRight = [];
|
|
851
|
-
}
|
|
852
|
-
});
|
|
853
|
-
// 按选择顺序排序
|
|
854
|
-
this.shopList = dataResult.sort((a, b) => {
|
|
855
|
-
return this.configList.indexOf(a.commodityId) - this.configList.indexOf(b.commodityId);
|
|
856
|
-
});
|
|
857
|
-
} else {
|
|
858
|
-
this.shopList = [];
|
|
859
|
-
}
|
|
860
|
-
// } catch (e) {
|
|
861
|
-
// this.shopList = [];
|
|
862
|
-
// }
|
|
863
|
-
},
|
|
864
|
-
isActive(item) {
|
|
865
|
-
const now = Date.now();
|
|
866
|
-
return new Date(item.upTime).getTime() < now && new Date(item.downTime).getTime() > now;
|
|
867
|
-
},
|
|
868
|
-
isNotActive(item) {
|
|
869
|
-
const now = Date.now();
|
|
870
|
-
return new Date(item.upTime).getTime() > now || new Date(item.downTime).getTime() < now;
|
|
871
|
-
},
|
|
872
|
-
convertCentsToYuan(cents) {
|
|
873
|
-
const yuan = (Number(cents || 0) / 100).toFixed(2);
|
|
874
|
-
return parseFloat(yuan);
|
|
875
|
-
},
|
|
876
|
-
goDetail(item) {
|
|
877
|
-
const base = this.$EventBus ? this.compBaseUrl : window.location.origin;
|
|
878
|
-
const langMap = {
|
|
879
|
-
"zh-CN": "sc",
|
|
880
|
-
"zh-HK": "tc",
|
|
881
|
-
"en-US": "en"
|
|
882
|
-
};
|
|
883
|
-
const routeLang = langMap[this.lang];
|
|
884
|
-
if (item.commodityType === "604") {
|
|
885
|
-
if ((item.commodityName || "").includes("MySIM")) {
|
|
886
|
-
window.parent.location.href = `${base}/${routeLang}/home/prepaid-card/mysim/detail?commodityId=${item.commodityId}&mysim=${item.commodityName}`;
|
|
887
|
-
} else {
|
|
888
|
-
window.parent.location.href = `${base}/${routeLang}/home/prepaid-card/detail?commodityId=${item.commodityId}&commodityType=604&commodityName=${item.commodityName}`;
|
|
889
|
-
}
|
|
890
|
-
} else if (item.commodityType === "605") {
|
|
891
|
-
window.parent.location.href = `${base}/${routeLang}/home/prepaid/refill-voucher/detail?commodityId=${item.commodityId}&commodityType=605&commodityName=${item.commodityName}`;
|
|
892
|
-
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
});
|
|
896
|
-
;// ./package/cms-via-storedValueCard/View.vue?vue&type=script&lang=js
|
|
897
|
-
/* harmony default export */ var cms_via_storedValueCard_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
898
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-via-storedValueCard/View.vue?vue&type=style&index=0&id=25771ea8&prod&lang=scss&scoped=true
|
|
899
|
-
// extracted by mini-css-extract-plugin
|
|
900
|
-
|
|
901
|
-
;// ./package/cms-via-storedValueCard/View.vue?vue&type=style&index=0&id=25771ea8&prod&lang=scss&scoped=true
|
|
902
|
-
|
|
903
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
904
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
905
|
-
;// ./package/cms-via-storedValueCard/View.vue
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
;
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
/* normalize component */
|
|
913
|
-
|
|
914
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
915
|
-
cms_via_storedValueCard_Viewvue_type_script_lang_js,
|
|
916
|
-
render,
|
|
917
|
-
staticRenderFns,
|
|
918
|
-
false,
|
|
919
|
-
null,
|
|
920
|
-
"25771ea8",
|
|
921
|
-
null
|
|
922
|
-
|
|
923
|
-
)
|
|
924
|
-
|
|
925
|
-
/* harmony default export */ var View = (component.exports);
|
|
926
|
-
|
|
927
549
|
/***/ }),
|
|
928
550
|
|
|
929
551
|
/***/ 350:
|
|
@@ -959,7 +581,7 @@ module.exports = {
|
|
|
959
581
|
__webpack_require__.r(__webpack_exports__);
|
|
960
582
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
|
|
961
583
|
|
|
962
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
584
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 1765));
|
|
963
585
|
const langData = {
|
|
964
586
|
// 内容编辑
|
|
965
587
|
textContent: "请输入文本内容",
|
|
@@ -974,7 +596,8 @@ const langData = {
|
|
|
974
596
|
fontWeight: "normal",
|
|
975
597
|
fontStyle: "normal",
|
|
976
598
|
textDecoration: "none",
|
|
977
|
-
fontFamily: "Microsoft YaHei",
|
|
599
|
+
// fontFamily: "Microsoft YaHei",
|
|
600
|
+
|
|
978
601
|
// 布局设置
|
|
979
602
|
paddingTop: 0,
|
|
980
603
|
paddingBottom: 0,
|
|
@@ -1947,6 +1570,384 @@ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSc
|
|
|
1947
1570
|
|
|
1948
1571
|
/***/ }),
|
|
1949
1572
|
|
|
1573
|
+
/***/ 626:
|
|
1574
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1575
|
+
|
|
1576
|
+
"use strict";
|
|
1577
|
+
// ESM COMPAT FLAG
|
|
1578
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1579
|
+
|
|
1580
|
+
// EXPORTS
|
|
1581
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
1582
|
+
"default": function() { return /* binding */ View; }
|
|
1583
|
+
});
|
|
1584
|
+
|
|
1585
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-via-storedValueCard/View.vue?vue&type=template&id=ff44e87c&scoped=true
|
|
1586
|
+
var render = function render() {
|
|
1587
|
+
var _vm = this,
|
|
1588
|
+
_c = _vm._self._c;
|
|
1589
|
+
return _c('BaseComp', _vm._b({
|
|
1590
|
+
attrs: {
|
|
1591
|
+
"data": _vm.data,
|
|
1592
|
+
"nowCompId": _vm.nowCompId,
|
|
1593
|
+
"isOpcacity": _vm.isOpcacity,
|
|
1594
|
+
"lang": _vm.lang
|
|
1595
|
+
},
|
|
1596
|
+
on: {
|
|
1597
|
+
"getConfigData": _vm.getConfigData
|
|
1598
|
+
}
|
|
1599
|
+
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
1600
|
+
staticClass: "cmhk-home_main"
|
|
1601
|
+
}, [_c('div', {
|
|
1602
|
+
staticClass: "wrap"
|
|
1603
|
+
}, [_c('div', {
|
|
1604
|
+
ref: "cardList",
|
|
1605
|
+
staticClass: "cardList"
|
|
1606
|
+
}, [_vm.viewList.length === 0 ? [_c('div', {
|
|
1607
|
+
staticClass: "card-box"
|
|
1608
|
+
}, [_c('div', {
|
|
1609
|
+
staticClass: "card"
|
|
1610
|
+
}, [_c('div', {
|
|
1611
|
+
staticClass: "img-box"
|
|
1612
|
+
}, [_c('div', {
|
|
1613
|
+
staticClass: "card-img",
|
|
1614
|
+
class: {
|
|
1615
|
+
'is-cms': _vm.$EventBus
|
|
1616
|
+
}
|
|
1617
|
+
}, [_c('img', {
|
|
1618
|
+
staticStyle: {
|
|
1619
|
+
"height": "200px"
|
|
1620
|
+
},
|
|
1621
|
+
attrs: {
|
|
1622
|
+
"src": _vm.placeholderImg,
|
|
1623
|
+
"alt": ""
|
|
1624
|
+
}
|
|
1625
|
+
})])]), _c('div', {
|
|
1626
|
+
staticClass: "content-box"
|
|
1627
|
+
}, [_c('div', {
|
|
1628
|
+
staticClass: "card-name"
|
|
1629
|
+
}, [_vm._v(_vm._s(_vm.langText.productName))]), _c('div', {
|
|
1630
|
+
staticClass: "text-box"
|
|
1631
|
+
}, [_c('div', {
|
|
1632
|
+
staticClass: "card-refPrice"
|
|
1633
|
+
}, [_vm._v(" " + _vm._s(_vm.langText.Price) + " HK$XXXX ")]), _c('div', {
|
|
1634
|
+
staticClass: "card-pice-text"
|
|
1635
|
+
}, [_vm._v(_vm._s(_vm.langText.onlinePrice))])]), _c('div', {
|
|
1636
|
+
staticClass: "card-pice"
|
|
1637
|
+
}, [_c('span', [_vm._v("HK$")]), _vm._v("XXXX")]), _c('div', {
|
|
1638
|
+
staticClass: "card-btn"
|
|
1639
|
+
}, [_vm._v(_vm._s(_vm.langText.buyNow))])])])])] : _vm._e(), _vm._l(_vm.viewList, function (item, index) {
|
|
1640
|
+
return _c('div', {
|
|
1641
|
+
key: `${index}-${item.commodityId || index}`,
|
|
1642
|
+
staticClass: "card-box"
|
|
1643
|
+
}, [_c('div', {
|
|
1644
|
+
staticClass: "card"
|
|
1645
|
+
}, [_c('div', {
|
|
1646
|
+
staticClass: "tag-box-left"
|
|
1647
|
+
}, [_vm._l(item.malltCommodityLeft, function (ele, i) {
|
|
1648
|
+
return [_c('img', {
|
|
1649
|
+
key: i,
|
|
1650
|
+
attrs: {
|
|
1651
|
+
"src": _vm.compBaseUrl + ele.pictureUrl,
|
|
1652
|
+
"alt": ""
|
|
1653
|
+
}
|
|
1654
|
+
})];
|
|
1655
|
+
})], 2), _c('div', {
|
|
1656
|
+
staticClass: "tag-box-right"
|
|
1657
|
+
}, [_vm._l(item.malltCommodityRight, function (ele, i) {
|
|
1658
|
+
return [_c('img', {
|
|
1659
|
+
key: i,
|
|
1660
|
+
attrs: {
|
|
1661
|
+
"src": _vm.compBaseUrl + ele.pictureUrl,
|
|
1662
|
+
"alt": ""
|
|
1663
|
+
}
|
|
1664
|
+
})];
|
|
1665
|
+
})], 2), _c('div', {
|
|
1666
|
+
staticClass: "img-box"
|
|
1667
|
+
}, [_vm.isNotActive(item) ? _c('div', {
|
|
1668
|
+
staticClass: "mask"
|
|
1669
|
+
}, [_vm._v(" " + _vm._s(new Date(item.upTime).getTime() > _vm.nowTs ? _vm.langText.comingSoon : _vm.langText.expired) + " ")]) : _vm._e(), _c('div', {
|
|
1670
|
+
staticClass: "card-img",
|
|
1671
|
+
class: {
|
|
1672
|
+
'is-cms': _vm.$EventBus
|
|
1673
|
+
}
|
|
1674
|
+
}, [_c('img', {
|
|
1675
|
+
attrs: {
|
|
1676
|
+
"src": _vm.compBaseUrl + item.maxPicId,
|
|
1677
|
+
"alt": ""
|
|
1678
|
+
}
|
|
1679
|
+
})])]), _c('div', {
|
|
1680
|
+
staticClass: "content-box"
|
|
1681
|
+
}, [_vm.isNotActive(item) ? _c('div', {
|
|
1682
|
+
staticClass: "content-mask"
|
|
1683
|
+
}) : _vm._e(), _c('div', {
|
|
1684
|
+
staticClass: "card-name"
|
|
1685
|
+
}, [_vm._v(_vm._s(item.commodityName))]), _c('div', {
|
|
1686
|
+
staticClass: "text-box"
|
|
1687
|
+
}, [item.price !== item.refPrice ? _c('div', {
|
|
1688
|
+
staticClass: "card-refPrice"
|
|
1689
|
+
}, [_vm._v(" " + _vm._s(_vm.langText.Price) + " HK$" + _vm._s(_vm.convertCentsToYuan(item.refPrice)) + " ")]) : _c('div', {
|
|
1690
|
+
staticClass: "card-refPrice"
|
|
1691
|
+
}), _c('div', {
|
|
1692
|
+
staticClass: "card-pice-text"
|
|
1693
|
+
}, [_vm._v(" " + _vm._s(item.price !== item.refPrice ? _vm.langText.onlinePrice : _vm.langText.Price) + " ")])]), _c('div', {
|
|
1694
|
+
staticClass: "card-pice spc-font"
|
|
1695
|
+
}, [_c('span', [_vm._v("HK$")]), _vm._v(_vm._s(_vm.convertCentsToYuan(item.price)) + " ")]), _vm.isActive(item) ? _c('div', {
|
|
1696
|
+
staticClass: "card-btn",
|
|
1697
|
+
on: {
|
|
1698
|
+
"click": function ($event) {
|
|
1699
|
+
return _vm.goDetail(item);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
}, [_vm._v(" " + _vm._s(_vm.langText.buyNow)), _c('img', {
|
|
1703
|
+
attrs: {
|
|
1704
|
+
"src": _vm.arrowRightImg
|
|
1705
|
+
}
|
|
1706
|
+
})]) : _c('div', {
|
|
1707
|
+
staticClass: "card-btn"
|
|
1708
|
+
}, [_vm._v(" " + _vm._s(new Date(item.upTime).getTime() > _vm.nowTs ? (_vm.langText.launch || "").replace("NNN", item.upTime) : _vm.langText.Offer) + " ")])])])]);
|
|
1709
|
+
})], 2), !_vm.seeMore && _vm.configList.length > 9 ? _c('div', {
|
|
1710
|
+
ref: "seeMoreRef",
|
|
1711
|
+
staticClass: "seeMore",
|
|
1712
|
+
on: {
|
|
1713
|
+
"click": function ($event) {
|
|
1714
|
+
_vm.seeMore = true;
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
}, [_vm._v(" " + _vm._s(_vm.langText.more) + " "), _c('img', {
|
|
1718
|
+
staticClass: "btm",
|
|
1719
|
+
attrs: {
|
|
1720
|
+
"src": _vm.arrowDownImg
|
|
1721
|
+
}
|
|
1722
|
+
})]) : _vm._e()])])]);
|
|
1723
|
+
};
|
|
1724
|
+
var staticRenderFns = [];
|
|
1725
|
+
|
|
1726
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
1727
|
+
var es_iterator_constructor = __webpack_require__(8111);
|
|
1728
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
|
|
1729
|
+
var es_iterator_filter = __webpack_require__(2489);
|
|
1730
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
1731
|
+
var es_iterator_for_each = __webpack_require__(7588);
|
|
1732
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
1733
|
+
var baseComp = __webpack_require__(4128);
|
|
1734
|
+
// EXTERNAL MODULE: ./src/api/index.js
|
|
1735
|
+
var api = __webpack_require__(929);
|
|
1736
|
+
// EXTERNAL MODULE: ./package/patch.js
|
|
1737
|
+
var patch = __webpack_require__(1618);
|
|
1738
|
+
// EXTERNAL MODULE: ./node_modules/qs/lib/index.js
|
|
1739
|
+
var lib = __webpack_require__(9122);
|
|
1740
|
+
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
1741
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-via-storedValueCard/View.vue?vue&type=script&lang=js
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
|
|
1745
|
+
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
1753
|
+
name: "cms-via-storedValueCard",
|
|
1754
|
+
components: {
|
|
1755
|
+
BaseComp: baseComp["default"]
|
|
1756
|
+
},
|
|
1757
|
+
props: {
|
|
1758
|
+
data: {
|
|
1759
|
+
type: Object,
|
|
1760
|
+
default: () => {
|
|
1761
|
+
return {};
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
nowCompId: {
|
|
1765
|
+
type: [String, Number],
|
|
1766
|
+
default: ""
|
|
1767
|
+
},
|
|
1768
|
+
isOpcacity: {
|
|
1769
|
+
type: Boolean,
|
|
1770
|
+
default: true
|
|
1771
|
+
},
|
|
1772
|
+
lang: {
|
|
1773
|
+
type: String,
|
|
1774
|
+
default: "zh-HK"
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
data() {
|
|
1778
|
+
return {
|
|
1779
|
+
langConfig: {
|
|
1780
|
+
"zh-HK": {
|
|
1781
|
+
productName: "產品名稱",
|
|
1782
|
+
Price: "建議零售價",
|
|
1783
|
+
onlinePrice: "網上優惠價",
|
|
1784
|
+
buyNow: "立即購買",
|
|
1785
|
+
comingSoon: "即將推出",
|
|
1786
|
+
expired: "優惠已過期",
|
|
1787
|
+
more: "查看更多",
|
|
1788
|
+
launch: "NNN 上線",
|
|
1789
|
+
Offer: "優惠即將推出"
|
|
1790
|
+
},
|
|
1791
|
+
"zh-CN": {
|
|
1792
|
+
productName: "产品名称",
|
|
1793
|
+
Price: "建议零售价",
|
|
1794
|
+
onlinePrice: "网上优惠价",
|
|
1795
|
+
buyNow: "立即购买",
|
|
1796
|
+
comingSoon: "即将推出",
|
|
1797
|
+
expired: "优惠已过期",
|
|
1798
|
+
more: "查看更多",
|
|
1799
|
+
launch: "NNN 上线",
|
|
1800
|
+
Offer: "优惠即将推出"
|
|
1801
|
+
},
|
|
1802
|
+
"en-US": {
|
|
1803
|
+
productName: "Product Name",
|
|
1804
|
+
Price: "SRP",
|
|
1805
|
+
onlinePrice: "Online Price",
|
|
1806
|
+
buyNow: "Buy Now",
|
|
1807
|
+
comingSoon: "Coming Soon",
|
|
1808
|
+
expired: "Expired",
|
|
1809
|
+
more: "See more",
|
|
1810
|
+
launch: "Launch at NNN",
|
|
1811
|
+
Offer: "Offer Coming"
|
|
1812
|
+
}
|
|
1813
|
+
},
|
|
1814
|
+
configList: [],
|
|
1815
|
+
seeMore: false,
|
|
1816
|
+
nowTs: Date.now(),
|
|
1817
|
+
compBaseUrl: "https://omniapi.hk.chinamobile.com",
|
|
1818
|
+
// images
|
|
1819
|
+
placeholderImg: __webpack_require__(5335),
|
|
1820
|
+
arrowRightImg: __webpack_require__(4860),
|
|
1821
|
+
arrowDownImg: __webpack_require__(1861),
|
|
1822
|
+
arrowHoverImg: __webpack_require__(4116),
|
|
1823
|
+
arrowActiveImg: __webpack_require__(9670),
|
|
1824
|
+
shopList: []
|
|
1825
|
+
};
|
|
1826
|
+
},
|
|
1827
|
+
computed: {
|
|
1828
|
+
langText() {
|
|
1829
|
+
return this.langConfig[this.lang] ? this.langConfig[this.lang] : this.langConfig["zh-HK"];
|
|
1830
|
+
},
|
|
1831
|
+
viewList() {
|
|
1832
|
+
if (this.seeMore) return this.shopList;
|
|
1833
|
+
return this.shopList.slice(0, 9);
|
|
1834
|
+
}
|
|
1835
|
+
},
|
|
1836
|
+
mounted() {
|
|
1837
|
+
if (!this.$EventBus) {
|
|
1838
|
+
this.compBaseUrl = (0,patch.getCompBaseUrl)();
|
|
1839
|
+
}
|
|
1840
|
+
},
|
|
1841
|
+
beforeDestroy() {},
|
|
1842
|
+
methods: {
|
|
1843
|
+
getConfigData(configData) {
|
|
1844
|
+
this.configList = configData.configList;
|
|
1845
|
+
console.log("getConfigData", this.configList);
|
|
1846
|
+
this.getValue();
|
|
1847
|
+
},
|
|
1848
|
+
async getValue() {
|
|
1849
|
+
await this.getCommodityDetails();
|
|
1850
|
+
},
|
|
1851
|
+
// 拉取已选商品详情
|
|
1852
|
+
async getCommodityDetails() {
|
|
1853
|
+
// try {
|
|
1854
|
+
let req = {
|
|
1855
|
+
busInfo: JSON.stringify({
|
|
1856
|
+
commodityIds: [...this.configList],
|
|
1857
|
+
commodityTypes: ["604", "605"]
|
|
1858
|
+
})
|
|
1859
|
+
};
|
|
1860
|
+
req = lib_default().stringify(req);
|
|
1861
|
+
const json = await (0,api/* getCommodityDetails */.yX)(req, this.lang);
|
|
1862
|
+
let dataResult = json && json.busiResp && json.busiResp.busiDataResp;
|
|
1863
|
+
if (Array.isArray(dataResult)) {
|
|
1864
|
+
dataResult.forEach(item => {
|
|
1865
|
+
if (Array.isArray(item.malltCommodityTags)) {
|
|
1866
|
+
const left = item.malltCommodityTags.filter(ele => ele.tagType == 5001).sort((a, b) => a.sort - b.sort);
|
|
1867
|
+
const right = item.malltCommodityTags.filter(ele => ele.tagType == 5002).sort((a, b) => a.sort - b.sort);
|
|
1868
|
+
item.malltCommodityLeft = left.slice(0, 2);
|
|
1869
|
+
item.malltCommodityRight = right.slice(0, 4);
|
|
1870
|
+
} else {
|
|
1871
|
+
item.malltCommodityLeft = [];
|
|
1872
|
+
item.malltCommodityRight = [];
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1875
|
+
// 按选择顺序排序
|
|
1876
|
+
this.shopList = dataResult.sort((a, b) => {
|
|
1877
|
+
return this.configList.indexOf(a.commodityId) - this.configList.indexOf(b.commodityId);
|
|
1878
|
+
});
|
|
1879
|
+
} else {
|
|
1880
|
+
this.shopList = [];
|
|
1881
|
+
}
|
|
1882
|
+
// } catch (e) {
|
|
1883
|
+
// this.shopList = [];
|
|
1884
|
+
// }
|
|
1885
|
+
},
|
|
1886
|
+
isActive(item) {
|
|
1887
|
+
const now = Date.now();
|
|
1888
|
+
return new Date(item.upTime).getTime() < now && new Date(item.downTime).getTime() > now;
|
|
1889
|
+
},
|
|
1890
|
+
isNotActive(item) {
|
|
1891
|
+
const now = Date.now();
|
|
1892
|
+
return new Date(item.upTime).getTime() > now || new Date(item.downTime).getTime() < now;
|
|
1893
|
+
},
|
|
1894
|
+
convertCentsToYuan(cents) {
|
|
1895
|
+
const yuan = (Number(cents || 0) / 100).toFixed(2);
|
|
1896
|
+
return parseFloat(yuan);
|
|
1897
|
+
},
|
|
1898
|
+
goDetail(item) {
|
|
1899
|
+
const base = this.$EventBus ? this.compBaseUrl : window.location.origin;
|
|
1900
|
+
const langMap = {
|
|
1901
|
+
"zh-CN": "sc",
|
|
1902
|
+
"zh-HK": "tc",
|
|
1903
|
+
"en-US": "en"
|
|
1904
|
+
};
|
|
1905
|
+
const routeLang = langMap[this.lang];
|
|
1906
|
+
if (item.commodityType === "604") {
|
|
1907
|
+
if ((item.commodityName || "").includes("MySIM")) {
|
|
1908
|
+
window.parent.location.href = `${base}/${routeLang}/home/prepaid-card/mysim/detail?commodityId=${item.commodityId}&mysim=${item.commodityName}`;
|
|
1909
|
+
} else {
|
|
1910
|
+
window.parent.location.href = `${base}/${routeLang}/home/prepaid-card/detail?commodityId=${item.commodityId}&commodityType=604&commodityName=${item.commodityName}`;
|
|
1911
|
+
}
|
|
1912
|
+
} else if (item.commodityType === "605") {
|
|
1913
|
+
window.parent.location.href = `${base}/${routeLang}/home/prepaid/refill-voucher/detail?commodityId=${item.commodityId}&commodityType=605&commodityName=${item.commodityName}`;
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
});
|
|
1918
|
+
;// ./package/cms-via-storedValueCard/View.vue?vue&type=script&lang=js
|
|
1919
|
+
/* harmony default export */ var cms_via_storedValueCard_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
1920
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-via-storedValueCard/View.vue?vue&type=style&index=0&id=ff44e87c&prod&lang=scss&scoped=true
|
|
1921
|
+
// extracted by mini-css-extract-plugin
|
|
1922
|
+
|
|
1923
|
+
;// ./package/cms-via-storedValueCard/View.vue?vue&type=style&index=0&id=ff44e87c&prod&lang=scss&scoped=true
|
|
1924
|
+
|
|
1925
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
1926
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
1927
|
+
;// ./package/cms-via-storedValueCard/View.vue
|
|
1928
|
+
|
|
1929
|
+
|
|
1930
|
+
|
|
1931
|
+
;
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
/* normalize component */
|
|
1935
|
+
|
|
1936
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
1937
|
+
cms_via_storedValueCard_Viewvue_type_script_lang_js,
|
|
1938
|
+
render,
|
|
1939
|
+
staticRenderFns,
|
|
1940
|
+
false,
|
|
1941
|
+
null,
|
|
1942
|
+
"ff44e87c",
|
|
1943
|
+
null
|
|
1944
|
+
|
|
1945
|
+
)
|
|
1946
|
+
|
|
1947
|
+
/* harmony default export */ var View = (component.exports);
|
|
1948
|
+
|
|
1949
|
+
/***/ }),
|
|
1950
|
+
|
|
1950
1951
|
/***/ 649:
|
|
1951
1952
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1952
1953
|
|
|
@@ -4551,420 +4552,6 @@ module.exports = function transformData(data, headers, fns) {
|
|
|
4551
4552
|
|
|
4552
4553
|
/***/ }),
|
|
4553
4554
|
|
|
4554
|
-
/***/ 1452:
|
|
4555
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
4556
|
-
|
|
4557
|
-
"use strict";
|
|
4558
|
-
// ESM COMPAT FLAG
|
|
4559
|
-
__webpack_require__.r(__webpack_exports__);
|
|
4560
|
-
|
|
4561
|
-
// EXPORTS
|
|
4562
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
4563
|
-
"default": function() { return /* binding */ View; }
|
|
4564
|
-
});
|
|
4565
|
-
|
|
4566
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=template&id=7fe7dfef&scoped=true
|
|
4567
|
-
var render = function render() {
|
|
4568
|
-
var _vm = this,
|
|
4569
|
-
_c = _vm._self._c;
|
|
4570
|
-
return _c('BaseComp', _vm._b({
|
|
4571
|
-
attrs: {
|
|
4572
|
-
"data": _vm.data,
|
|
4573
|
-
"nowCompId": _vm.nowCompId,
|
|
4574
|
-
"isOpcacity": _vm.isOpcacity,
|
|
4575
|
-
"lang": _vm.lang
|
|
4576
|
-
},
|
|
4577
|
-
on: {
|
|
4578
|
-
"getConfigData": _vm.getConfigData
|
|
4579
|
-
}
|
|
4580
|
-
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
4581
|
-
staticClass: "cms-text-container",
|
|
4582
|
-
class: [`align-${_vm.configData.textAlign || 'left'}`, _vm.configData.customClass || '', {
|
|
4583
|
-
'has-link': _vm.configData.linkUrl,
|
|
4584
|
-
'hover-effect': _vm.configData.hoverEffect && _vm.configData.linkUrl
|
|
4585
|
-
}],
|
|
4586
|
-
style: _vm.containerStyle,
|
|
4587
|
-
attrs: {
|
|
4588
|
-
"aria-label": _vm.configData.ariaLabel,
|
|
4589
|
-
"tabindex": _vm.configData.tabIndex,
|
|
4590
|
-
"role": _vm.configData.role,
|
|
4591
|
-
"title": _vm.configData.seoTitle || _vm.configData.seoDescription
|
|
4592
|
-
},
|
|
4593
|
-
on: {
|
|
4594
|
-
"click": _vm.handleClick
|
|
4595
|
-
}
|
|
4596
|
-
}, [_c('div', {
|
|
4597
|
-
staticClass: "text-content",
|
|
4598
|
-
style: _vm.textStyle
|
|
4599
|
-
}, _vm._l(_vm.textLines, function (line, index) {
|
|
4600
|
-
return _c('p', {
|
|
4601
|
-
key: index,
|
|
4602
|
-
staticClass: "text-line",
|
|
4603
|
-
style: _vm.lineStyle
|
|
4604
|
-
}, [_vm._v(" " + _vm._s(line) + " ")]);
|
|
4605
|
-
}), 0), _vm.configData.linkUrl && _vm.configData.showLinkIcon ? _c('div', {
|
|
4606
|
-
staticClass: "link-indicator"
|
|
4607
|
-
}, [_c('i', {
|
|
4608
|
-
staticClass: "el-icon-link"
|
|
4609
|
-
})]) : _vm._e()])]);
|
|
4610
|
-
};
|
|
4611
|
-
var staticRenderFns = [];
|
|
4612
|
-
|
|
4613
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
4614
|
-
var es_iterator_constructor = __webpack_require__(8111);
|
|
4615
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
|
|
4616
|
-
var es_iterator_filter = __webpack_require__(2489);
|
|
4617
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
4618
|
-
var es_iterator_for_each = __webpack_require__(7588);
|
|
4619
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
4620
|
-
var baseComp = __webpack_require__(4128);
|
|
4621
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=script&lang=js
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
4630
|
-
name: "cms-text",
|
|
4631
|
-
components: {
|
|
4632
|
-
BaseComp: baseComp["default"]
|
|
4633
|
-
},
|
|
4634
|
-
props: {
|
|
4635
|
-
data: {
|
|
4636
|
-
type: Object,
|
|
4637
|
-
default: () => {
|
|
4638
|
-
return {};
|
|
4639
|
-
}
|
|
4640
|
-
},
|
|
4641
|
-
nowCompId: {
|
|
4642
|
-
type: [String, Number],
|
|
4643
|
-
default: ""
|
|
4644
|
-
},
|
|
4645
|
-
isOpcacity: {
|
|
4646
|
-
type: Boolean,
|
|
4647
|
-
default: true
|
|
4648
|
-
},
|
|
4649
|
-
lang: {
|
|
4650
|
-
type: String,
|
|
4651
|
-
default: "zh-HK"
|
|
4652
|
-
}
|
|
4653
|
-
},
|
|
4654
|
-
data() {
|
|
4655
|
-
return {
|
|
4656
|
-
configData: {},
|
|
4657
|
-
// 默认配置数据
|
|
4658
|
-
defaultConfig: {
|
|
4659
|
-
// 内容编辑
|
|
4660
|
-
textContent: "请输入文本内容",
|
|
4661
|
-
enableLineBreak: true,
|
|
4662
|
-
// 排版控制
|
|
4663
|
-
textAlign: "left",
|
|
4664
|
-
fontSize: 16,
|
|
4665
|
-
lineHeight: 1.5,
|
|
4666
|
-
letterSpacing: 0,
|
|
4667
|
-
// 样式美化
|
|
4668
|
-
fontColor: "#333333",
|
|
4669
|
-
fontWeight: "normal",
|
|
4670
|
-
fontStyle: "normal",
|
|
4671
|
-
textDecoration: "none",
|
|
4672
|
-
fontFamily: "inherit",
|
|
4673
|
-
// 布局设置
|
|
4674
|
-
paddingTop: 0,
|
|
4675
|
-
paddingBottom: 0,
|
|
4676
|
-
paddingLeft: 0,
|
|
4677
|
-
paddingRight: 0,
|
|
4678
|
-
marginTop: 0,
|
|
4679
|
-
marginBottom: 0,
|
|
4680
|
-
marginLeft: 0,
|
|
4681
|
-
marginRight: 0,
|
|
4682
|
-
backgroundColor: "",
|
|
4683
|
-
// 视觉效果
|
|
4684
|
-
borderWidth: 0,
|
|
4685
|
-
borderStyle: "solid",
|
|
4686
|
-
borderColor: "#dcdfe6",
|
|
4687
|
-
borderRadius: 0,
|
|
4688
|
-
boxShadow: "",
|
|
4689
|
-
// 交互功能
|
|
4690
|
-
linkUrl: "",
|
|
4691
|
-
linkTarget: "_self",
|
|
4692
|
-
showLinkIcon: false,
|
|
4693
|
-
hoverEffect: false,
|
|
4694
|
-
// 高级配置
|
|
4695
|
-
customClass: "",
|
|
4696
|
-
customStyle: "",
|
|
4697
|
-
enableAnimation: false,
|
|
4698
|
-
animationType: "fadeIn",
|
|
4699
|
-
animationDuration: 300,
|
|
4700
|
-
// 可访问性配置
|
|
4701
|
-
ariaLabel: "",
|
|
4702
|
-
tabIndex: 0,
|
|
4703
|
-
role: "",
|
|
4704
|
-
// SEO配置
|
|
4705
|
-
seoTitle: "",
|
|
4706
|
-
seoDescription: "",
|
|
4707
|
-
// 响应式配置
|
|
4708
|
-
mobileTextAlign: "",
|
|
4709
|
-
mobileFontSize: 0,
|
|
4710
|
-
tabletFontSize: 0
|
|
4711
|
-
}
|
|
4712
|
-
};
|
|
4713
|
-
},
|
|
4714
|
-
mounted() {
|
|
4715
|
-
this.initConfigData();
|
|
4716
|
-
this.setCSSVariables();
|
|
4717
|
-
},
|
|
4718
|
-
watch: {
|
|
4719
|
-
configData: {
|
|
4720
|
-
handler() {
|
|
4721
|
-
this.updateStyles();
|
|
4722
|
-
},
|
|
4723
|
-
deep: true
|
|
4724
|
-
}
|
|
4725
|
-
},
|
|
4726
|
-
computed: {
|
|
4727
|
-
// 文本行数组(支持换行)
|
|
4728
|
-
textLines() {
|
|
4729
|
-
if (!this.configData.textContent) return [];
|
|
4730
|
-
if (!this.configData.enableLineBreak) {
|
|
4731
|
-
return [this.configData.textContent];
|
|
4732
|
-
}
|
|
4733
|
-
return this.configData.textContent.split("\n").filter(line => line.trim() !== "");
|
|
4734
|
-
},
|
|
4735
|
-
// 容器样式
|
|
4736
|
-
containerStyle() {
|
|
4737
|
-
const config = {
|
|
4738
|
-
...this.defaultConfig,
|
|
4739
|
-
...this.configData
|
|
4740
|
-
};
|
|
4741
|
-
return {
|
|
4742
|
-
padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
|
|
4743
|
-
margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
|
|
4744
|
-
backgroundColor: config.backgroundColor || "transparent",
|
|
4745
|
-
border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
|
|
4746
|
-
borderRadius: `${config.borderRadius}px`,
|
|
4747
|
-
boxShadow: config.boxShadow || "none",
|
|
4748
|
-
cursor: config.linkUrl ? "pointer" : "default",
|
|
4749
|
-
transition: config.hoverEffect ? "all 0.3s ease" : "none",
|
|
4750
|
-
animation: config.enableAnimation ? this.getAnimationStyle() : "none",
|
|
4751
|
-
...this.parseCustomStyle(config.customStyle)
|
|
4752
|
-
};
|
|
4753
|
-
},
|
|
4754
|
-
// 文本样式
|
|
4755
|
-
textStyle() {
|
|
4756
|
-
const config = {
|
|
4757
|
-
...this.defaultConfig,
|
|
4758
|
-
...this.configData
|
|
4759
|
-
};
|
|
4760
|
-
return {
|
|
4761
|
-
color: config.fontColor,
|
|
4762
|
-
fontSize: `${config.fontSize}px`,
|
|
4763
|
-
fontWeight: config.fontWeight,
|
|
4764
|
-
fontStyle: config.fontStyle,
|
|
4765
|
-
textDecoration: config.textDecoration,
|
|
4766
|
-
fontFamily: config.fontFamily,
|
|
4767
|
-
lineHeight: config.lineHeight,
|
|
4768
|
-
letterSpacing: `${config.letterSpacing}px`,
|
|
4769
|
-
textAlign: config.textAlign,
|
|
4770
|
-
wordBreak: "break-word",
|
|
4771
|
-
wordWrap: "break-word",
|
|
4772
|
-
cursor: config.linkUrl ? "pointer" : "default"
|
|
4773
|
-
};
|
|
4774
|
-
},
|
|
4775
|
-
// 行样式
|
|
4776
|
-
lineStyle() {
|
|
4777
|
-
return {
|
|
4778
|
-
margin: "0",
|
|
4779
|
-
padding: "0"
|
|
4780
|
-
};
|
|
4781
|
-
}
|
|
4782
|
-
},
|
|
4783
|
-
methods: {
|
|
4784
|
-
// 初始化配置数据
|
|
4785
|
-
initConfigData() {
|
|
4786
|
-
this.configData = {
|
|
4787
|
-
...this.defaultConfig,
|
|
4788
|
-
...this.configData
|
|
4789
|
-
};
|
|
4790
|
-
},
|
|
4791
|
-
// 获取配置数据
|
|
4792
|
-
getConfigData(configData) {
|
|
4793
|
-
this.configData = {
|
|
4794
|
-
...this.defaultConfig,
|
|
4795
|
-
...configData
|
|
4796
|
-
};
|
|
4797
|
-
this.updateStyles();
|
|
4798
|
-
},
|
|
4799
|
-
// 更新样式
|
|
4800
|
-
updateStyles() {
|
|
4801
|
-
this.$nextTick(() => {
|
|
4802
|
-
this.setCSSVariables();
|
|
4803
|
-
this.$forceUpdate();
|
|
4804
|
-
});
|
|
4805
|
-
},
|
|
4806
|
-
// 设置CSS变量
|
|
4807
|
-
setCSSVariables() {
|
|
4808
|
-
if (!this.$el) return;
|
|
4809
|
-
const config = {
|
|
4810
|
-
...this.defaultConfig,
|
|
4811
|
-
...this.configData
|
|
4812
|
-
};
|
|
4813
|
-
|
|
4814
|
-
// 设置响应式字体大小
|
|
4815
|
-
if (config.mobileFontSize > 0) {
|
|
4816
|
-
this.$el.style.setProperty("--mobile-font-size", `${config.mobileFontSize}px`);
|
|
4817
|
-
}
|
|
4818
|
-
if (config.tabletFontSize > 0) {
|
|
4819
|
-
this.$el.style.setProperty("--tablet-font-size", `${config.tabletFontSize}px`);
|
|
4820
|
-
}
|
|
4821
|
-
|
|
4822
|
-
// 设置移动端文本对齐
|
|
4823
|
-
if (config.mobileTextAlign) {
|
|
4824
|
-
this.$el.style.setProperty("--mobile-text-align", config.mobileTextAlign);
|
|
4825
|
-
}
|
|
4826
|
-
},
|
|
4827
|
-
// 处理点击事件
|
|
4828
|
-
handleClick() {
|
|
4829
|
-
if (this.configData.linkUrl) {
|
|
4830
|
-
const target = this.configData.linkTarget || "_self";
|
|
4831
|
-
if (target === "_blank") {
|
|
4832
|
-
window.open(this.configData.linkUrl, "_blank");
|
|
4833
|
-
} else {
|
|
4834
|
-
window.location.href = this.configData.linkUrl;
|
|
4835
|
-
}
|
|
4836
|
-
}
|
|
4837
|
-
},
|
|
4838
|
-
// 获取动画样式
|
|
4839
|
-
getAnimationStyle() {
|
|
4840
|
-
const animationType = this.configData.animationType || this.defaultConfig.animationType;
|
|
4841
|
-
const duration = this.configData.animationDuration || this.defaultConfig.animationDuration;
|
|
4842
|
-
if (!this.configData.enableAnimation || animationType === "none") return "";
|
|
4843
|
-
return `${animationType} ${duration}ms ease-in-out`;
|
|
4844
|
-
},
|
|
4845
|
-
// 解析自定义样式
|
|
4846
|
-
parseCustomStyle(customStyle) {
|
|
4847
|
-
if (!customStyle) return {};
|
|
4848
|
-
try {
|
|
4849
|
-
// 简单的CSS样式解析
|
|
4850
|
-
const styles = {};
|
|
4851
|
-
const declarations = customStyle.split(";");
|
|
4852
|
-
declarations.forEach(declaration => {
|
|
4853
|
-
const [property, value] = declaration.split(":");
|
|
4854
|
-
if (property && value) {
|
|
4855
|
-
const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
4856
|
-
styles[camelCaseProperty] = value.trim();
|
|
4857
|
-
}
|
|
4858
|
-
});
|
|
4859
|
-
return styles;
|
|
4860
|
-
} catch (error) {
|
|
4861
|
-
console.warn("解析自定义样式失败:", error);
|
|
4862
|
-
return {};
|
|
4863
|
-
}
|
|
4864
|
-
},
|
|
4865
|
-
// 文本内容验证
|
|
4866
|
-
validateTextContent() {
|
|
4867
|
-
const content = this.configData.textContent;
|
|
4868
|
-
if (!content || content.trim() === "") {
|
|
4869
|
-
console.warn("文本内容为空");
|
|
4870
|
-
return false;
|
|
4871
|
-
}
|
|
4872
|
-
return true;
|
|
4873
|
-
},
|
|
4874
|
-
// 获取纯文本内容
|
|
4875
|
-
getPlainTextContent() {
|
|
4876
|
-
return this.configData.textContent || "";
|
|
4877
|
-
},
|
|
4878
|
-
// 获取文本长度
|
|
4879
|
-
getTextLength() {
|
|
4880
|
-
return this.getPlainTextContent().length;
|
|
4881
|
-
},
|
|
4882
|
-
// 复制文本内容到剪贴板
|
|
4883
|
-
copyTextToClipboard() {
|
|
4884
|
-
const text = this.getPlainTextContent();
|
|
4885
|
-
if (navigator.clipboard && window.isSecureContext) {
|
|
4886
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
4887
|
-
var _this$$message;
|
|
4888
|
-
(_this$$message = this.$message) === null || _this$$message === void 0 ? void 0 : _this$$message.success("文本已复制到剪贴板");
|
|
4889
|
-
}).catch(err => {
|
|
4890
|
-
console.error("复制失败:", err);
|
|
4891
|
-
});
|
|
4892
|
-
} else {
|
|
4893
|
-
// 降级方案
|
|
4894
|
-
const textArea = document.createElement("textarea");
|
|
4895
|
-
textArea.value = text;
|
|
4896
|
-
document.body.appendChild(textArea);
|
|
4897
|
-
textArea.select();
|
|
4898
|
-
try {
|
|
4899
|
-
var _this$$message2;
|
|
4900
|
-
document.execCommand("copy");
|
|
4901
|
-
(_this$$message2 = this.$message) === null || _this$$message2 === void 0 ? void 0 : _this$$message2.success("文本已复制到剪贴板");
|
|
4902
|
-
} catch (err) {
|
|
4903
|
-
console.error("复制失败:", err);
|
|
4904
|
-
}
|
|
4905
|
-
document.body.removeChild(textArea);
|
|
4906
|
-
}
|
|
4907
|
-
},
|
|
4908
|
-
// 文本搜索高亮
|
|
4909
|
-
highlightText(searchTerm) {
|
|
4910
|
-
if (!searchTerm) return;
|
|
4911
|
-
const content = this.getPlainTextContent();
|
|
4912
|
-
const regex = new RegExp(`(${searchTerm})`, "gi");
|
|
4913
|
-
const highlightedContent = content.replace(regex, "<mark>$1</mark>");
|
|
4914
|
-
|
|
4915
|
-
// 这里可以根据需要实现高亮显示逻辑
|
|
4916
|
-
console.log("高亮内容:", highlightedContent);
|
|
4917
|
-
},
|
|
4918
|
-
// 文本统计信息
|
|
4919
|
-
getTextStats() {
|
|
4920
|
-
const text = this.getPlainTextContent();
|
|
4921
|
-
const words = text.split(/\s+/).filter(word => word.length > 0);
|
|
4922
|
-
const lines = text.split("\n").length;
|
|
4923
|
-
const characters = text.length;
|
|
4924
|
-
const charactersNoSpaces = text.replace(/\s/g, "").length;
|
|
4925
|
-
return {
|
|
4926
|
-
characters,
|
|
4927
|
-
charactersNoSpaces,
|
|
4928
|
-
words: words.length,
|
|
4929
|
-
lines,
|
|
4930
|
-
paragraphs: text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length
|
|
4931
|
-
};
|
|
4932
|
-
}
|
|
4933
|
-
}
|
|
4934
|
-
});
|
|
4935
|
-
;// ./package/cms-text/View.vue?vue&type=script&lang=js
|
|
4936
|
-
/* harmony default export */ var cms_text_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
4937
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=style&index=0&id=7fe7dfef&prod&lang=scss&scoped=true
|
|
4938
|
-
// extracted by mini-css-extract-plugin
|
|
4939
|
-
|
|
4940
|
-
;// ./package/cms-text/View.vue?vue&type=style&index=0&id=7fe7dfef&prod&lang=scss&scoped=true
|
|
4941
|
-
|
|
4942
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
4943
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
4944
|
-
;// ./package/cms-text/View.vue
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
;
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
/* normalize component */
|
|
4952
|
-
|
|
4953
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
4954
|
-
cms_text_Viewvue_type_script_lang_js,
|
|
4955
|
-
render,
|
|
4956
|
-
staticRenderFns,
|
|
4957
|
-
false,
|
|
4958
|
-
null,
|
|
4959
|
-
"7fe7dfef",
|
|
4960
|
-
null
|
|
4961
|
-
|
|
4962
|
-
)
|
|
4963
|
-
|
|
4964
|
-
/* harmony default export */ var View = (component.exports);
|
|
4965
|
-
|
|
4966
|
-
/***/ }),
|
|
4967
|
-
|
|
4968
4555
|
/***/ 1453:
|
|
4969
4556
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
4970
4557
|
|
|
@@ -11089,8 +10676,8 @@ var map = {
|
|
|
11089
10676
|
"./cms-column-card/index": 5340,
|
|
11090
10677
|
"./cms-column-card/index.js": 5340,
|
|
11091
10678
|
"./cms-column/": 3923,
|
|
11092
|
-
"./cms-column/View":
|
|
11093
|
-
"./cms-column/View.vue":
|
|
10679
|
+
"./cms-column/View": 7855,
|
|
10680
|
+
"./cms-column/View.vue": 7855,
|
|
11094
10681
|
"./cms-column/index": 3923,
|
|
11095
10682
|
"./cms-column/index.js": 3923,
|
|
11096
10683
|
"./cms-description": 1921,
|
|
@@ -11208,8 +10795,8 @@ var map = {
|
|
|
11208
10795
|
"./cms-termsAndConditions/index.js": 9387,
|
|
11209
10796
|
"./cms-text": 394,
|
|
11210
10797
|
"./cms-text/": 394,
|
|
11211
|
-
"./cms-text/View":
|
|
11212
|
-
"./cms-text/View.vue":
|
|
10798
|
+
"./cms-text/View": 1765,
|
|
10799
|
+
"./cms-text/View.vue": 1765,
|
|
11213
10800
|
"./cms-text/index": 394,
|
|
11214
10801
|
"./cms-text/index.js": 394,
|
|
11215
10802
|
"./cms-threeScroll": 4670,
|
|
@@ -11232,8 +10819,8 @@ var map = {
|
|
|
11232
10819
|
"./cms-titleLeft/index.js": 7804,
|
|
11233
10820
|
"./cms-via-storedValueCard": 4400,
|
|
11234
10821
|
"./cms-via-storedValueCard/": 4400,
|
|
11235
|
-
"./cms-via-storedValueCard/View":
|
|
11236
|
-
"./cms-via-storedValueCard/View.vue":
|
|
10822
|
+
"./cms-via-storedValueCard/View": 626,
|
|
10823
|
+
"./cms-via-storedValueCard/View.vue": 626,
|
|
11237
10824
|
"./cms-via-storedValueCard/index": 4400,
|
|
11238
10825
|
"./cms-via-storedValueCard/index copy": 6023,
|
|
11239
10826
|
"./cms-via-storedValueCard/index copy.js": 6023,
|
|
@@ -11620,6 +11207,421 @@ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSc
|
|
|
11620
11207
|
|
|
11621
11208
|
/***/ }),
|
|
11622
11209
|
|
|
11210
|
+
/***/ 1765:
|
|
11211
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
11212
|
+
|
|
11213
|
+
"use strict";
|
|
11214
|
+
// ESM COMPAT FLAG
|
|
11215
|
+
__webpack_require__.r(__webpack_exports__);
|
|
11216
|
+
|
|
11217
|
+
// EXPORTS
|
|
11218
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
11219
|
+
"default": function() { return /* binding */ View; }
|
|
11220
|
+
});
|
|
11221
|
+
|
|
11222
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=template&id=1854eb12&scoped=true
|
|
11223
|
+
var render = function render() {
|
|
11224
|
+
var _vm = this,
|
|
11225
|
+
_c = _vm._self._c;
|
|
11226
|
+
return _c('BaseComp', _vm._b({
|
|
11227
|
+
attrs: {
|
|
11228
|
+
"data": _vm.data,
|
|
11229
|
+
"nowCompId": _vm.nowCompId,
|
|
11230
|
+
"isOpcacity": _vm.isOpcacity,
|
|
11231
|
+
"lang": _vm.lang
|
|
11232
|
+
},
|
|
11233
|
+
on: {
|
|
11234
|
+
"getConfigData": _vm.getConfigData
|
|
11235
|
+
}
|
|
11236
|
+
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
11237
|
+
staticClass: "cms-text-container",
|
|
11238
|
+
class: [`align-${_vm.configData.textAlign || 'left'}`, _vm.configData.customClass || '', {
|
|
11239
|
+
'has-link': _vm.configData.linkUrl,
|
|
11240
|
+
'hover-effect': _vm.configData.hoverEffect && _vm.configData.linkUrl
|
|
11241
|
+
}],
|
|
11242
|
+
style: _vm.containerStyle,
|
|
11243
|
+
attrs: {
|
|
11244
|
+
"aria-label": _vm.configData.ariaLabel,
|
|
11245
|
+
"tabindex": _vm.configData.tabIndex,
|
|
11246
|
+
"role": _vm.configData.role,
|
|
11247
|
+
"title": _vm.configData.seoTitle || _vm.configData.seoDescription
|
|
11248
|
+
},
|
|
11249
|
+
on: {
|
|
11250
|
+
"click": _vm.handleClick
|
|
11251
|
+
}
|
|
11252
|
+
}, [_c('div', {
|
|
11253
|
+
staticClass: "text-content",
|
|
11254
|
+
style: _vm.textStyle
|
|
11255
|
+
}, _vm._l(_vm.textLines, function (line, index) {
|
|
11256
|
+
return _c('p', {
|
|
11257
|
+
key: index,
|
|
11258
|
+
staticClass: "text-line",
|
|
11259
|
+
style: _vm.lineStyle
|
|
11260
|
+
}, [_vm._v(" " + _vm._s(line) + " ")]);
|
|
11261
|
+
}), 0), _vm.configData.linkUrl && _vm.configData.showLinkIcon ? _c('div', {
|
|
11262
|
+
staticClass: "link-indicator"
|
|
11263
|
+
}, [_c('i', {
|
|
11264
|
+
staticClass: "el-icon-link"
|
|
11265
|
+
})]) : _vm._e()])]);
|
|
11266
|
+
};
|
|
11267
|
+
var staticRenderFns = [];
|
|
11268
|
+
|
|
11269
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
11270
|
+
var es_iterator_constructor = __webpack_require__(8111);
|
|
11271
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
|
|
11272
|
+
var es_iterator_filter = __webpack_require__(2489);
|
|
11273
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
11274
|
+
var es_iterator_for_each = __webpack_require__(7588);
|
|
11275
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
11276
|
+
var baseComp = __webpack_require__(4128);
|
|
11277
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=script&lang=js
|
|
11278
|
+
|
|
11279
|
+
|
|
11280
|
+
|
|
11281
|
+
|
|
11282
|
+
|
|
11283
|
+
|
|
11284
|
+
|
|
11285
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
11286
|
+
name: "cms-text",
|
|
11287
|
+
components: {
|
|
11288
|
+
BaseComp: baseComp["default"]
|
|
11289
|
+
},
|
|
11290
|
+
props: {
|
|
11291
|
+
data: {
|
|
11292
|
+
type: Object,
|
|
11293
|
+
default: () => {
|
|
11294
|
+
return {};
|
|
11295
|
+
}
|
|
11296
|
+
},
|
|
11297
|
+
nowCompId: {
|
|
11298
|
+
type: [String, Number],
|
|
11299
|
+
default: ""
|
|
11300
|
+
},
|
|
11301
|
+
isOpcacity: {
|
|
11302
|
+
type: Boolean,
|
|
11303
|
+
default: true
|
|
11304
|
+
},
|
|
11305
|
+
lang: {
|
|
11306
|
+
type: String,
|
|
11307
|
+
default: "zh-HK"
|
|
11308
|
+
}
|
|
11309
|
+
},
|
|
11310
|
+
data() {
|
|
11311
|
+
return {
|
|
11312
|
+
configData: {},
|
|
11313
|
+
// 默认配置数据
|
|
11314
|
+
defaultConfig: {
|
|
11315
|
+
// 内容编辑
|
|
11316
|
+
textContent: "请输入文本内容",
|
|
11317
|
+
enableLineBreak: true,
|
|
11318
|
+
// 排版控制
|
|
11319
|
+
textAlign: "left",
|
|
11320
|
+
fontSize: 16,
|
|
11321
|
+
lineHeight: 1.5,
|
|
11322
|
+
letterSpacing: 0,
|
|
11323
|
+
// 样式美化
|
|
11324
|
+
fontColor: "#333333",
|
|
11325
|
+
fontWeight: "normal",
|
|
11326
|
+
fontStyle: "normal",
|
|
11327
|
+
textDecoration: "none",
|
|
11328
|
+
// fontFamily: "inherit",
|
|
11329
|
+
|
|
11330
|
+
// 布局设置
|
|
11331
|
+
paddingTop: 0,
|
|
11332
|
+
paddingBottom: 0,
|
|
11333
|
+
paddingLeft: 0,
|
|
11334
|
+
paddingRight: 0,
|
|
11335
|
+
marginTop: 0,
|
|
11336
|
+
marginBottom: 0,
|
|
11337
|
+
marginLeft: 0,
|
|
11338
|
+
marginRight: 0,
|
|
11339
|
+
backgroundColor: "",
|
|
11340
|
+
// 视觉效果
|
|
11341
|
+
borderWidth: 0,
|
|
11342
|
+
borderStyle: "solid",
|
|
11343
|
+
borderColor: "#dcdfe6",
|
|
11344
|
+
borderRadius: 0,
|
|
11345
|
+
boxShadow: "",
|
|
11346
|
+
// 交互功能
|
|
11347
|
+
linkUrl: "",
|
|
11348
|
+
linkTarget: "_self",
|
|
11349
|
+
showLinkIcon: false,
|
|
11350
|
+
hoverEffect: false,
|
|
11351
|
+
// 高级配置
|
|
11352
|
+
customClass: "",
|
|
11353
|
+
customStyle: "",
|
|
11354
|
+
enableAnimation: false,
|
|
11355
|
+
animationType: "fadeIn",
|
|
11356
|
+
animationDuration: 300,
|
|
11357
|
+
// 可访问性配置
|
|
11358
|
+
ariaLabel: "",
|
|
11359
|
+
tabIndex: 0,
|
|
11360
|
+
role: "",
|
|
11361
|
+
// SEO配置
|
|
11362
|
+
seoTitle: "",
|
|
11363
|
+
seoDescription: "",
|
|
11364
|
+
// 响应式配置
|
|
11365
|
+
mobileTextAlign: "",
|
|
11366
|
+
mobileFontSize: 0,
|
|
11367
|
+
tabletFontSize: 0
|
|
11368
|
+
}
|
|
11369
|
+
};
|
|
11370
|
+
},
|
|
11371
|
+
mounted() {
|
|
11372
|
+
this.initConfigData();
|
|
11373
|
+
this.setCSSVariables();
|
|
11374
|
+
},
|
|
11375
|
+
watch: {
|
|
11376
|
+
configData: {
|
|
11377
|
+
handler() {
|
|
11378
|
+
this.updateStyles();
|
|
11379
|
+
},
|
|
11380
|
+
deep: true
|
|
11381
|
+
}
|
|
11382
|
+
},
|
|
11383
|
+
computed: {
|
|
11384
|
+
// 文本行数组(支持换行)
|
|
11385
|
+
textLines() {
|
|
11386
|
+
if (!this.configData.textContent) return [];
|
|
11387
|
+
if (!this.configData.enableLineBreak) {
|
|
11388
|
+
return [this.configData.textContent];
|
|
11389
|
+
}
|
|
11390
|
+
return this.configData.textContent.split("\n").filter(line => line.trim() !== "");
|
|
11391
|
+
},
|
|
11392
|
+
// 容器样式
|
|
11393
|
+
containerStyle() {
|
|
11394
|
+
const config = {
|
|
11395
|
+
...this.defaultConfig,
|
|
11396
|
+
...this.configData
|
|
11397
|
+
};
|
|
11398
|
+
return {
|
|
11399
|
+
padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
|
|
11400
|
+
margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
|
|
11401
|
+
backgroundColor: config.backgroundColor || "transparent",
|
|
11402
|
+
border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
|
|
11403
|
+
borderRadius: `${config.borderRadius}px`,
|
|
11404
|
+
boxShadow: config.boxShadow || "none",
|
|
11405
|
+
cursor: config.linkUrl ? "pointer" : "default",
|
|
11406
|
+
transition: config.hoverEffect ? "all 0.3s ease" : "none",
|
|
11407
|
+
animation: config.enableAnimation ? this.getAnimationStyle() : "none",
|
|
11408
|
+
...this.parseCustomStyle(config.customStyle)
|
|
11409
|
+
};
|
|
11410
|
+
},
|
|
11411
|
+
// 文本样式
|
|
11412
|
+
textStyle() {
|
|
11413
|
+
const config = {
|
|
11414
|
+
...this.defaultConfig,
|
|
11415
|
+
...this.configData
|
|
11416
|
+
};
|
|
11417
|
+
return {
|
|
11418
|
+
color: config.fontColor,
|
|
11419
|
+
fontSize: `${config.fontSize}px`,
|
|
11420
|
+
fontWeight: config.fontWeight,
|
|
11421
|
+
fontStyle: config.fontStyle,
|
|
11422
|
+
textDecoration: config.textDecoration,
|
|
11423
|
+
// fontFamily: config.fontFamily,
|
|
11424
|
+
lineHeight: config.lineHeight,
|
|
11425
|
+
letterSpacing: `${config.letterSpacing}px`,
|
|
11426
|
+
textAlign: config.textAlign,
|
|
11427
|
+
wordBreak: "break-word",
|
|
11428
|
+
wordWrap: "break-word",
|
|
11429
|
+
cursor: config.linkUrl ? "pointer" : "default"
|
|
11430
|
+
};
|
|
11431
|
+
},
|
|
11432
|
+
// 行样式
|
|
11433
|
+
lineStyle() {
|
|
11434
|
+
return {
|
|
11435
|
+
margin: "0",
|
|
11436
|
+
padding: "0"
|
|
11437
|
+
};
|
|
11438
|
+
}
|
|
11439
|
+
},
|
|
11440
|
+
methods: {
|
|
11441
|
+
// 初始化配置数据
|
|
11442
|
+
initConfigData() {
|
|
11443
|
+
this.configData = {
|
|
11444
|
+
...this.defaultConfig,
|
|
11445
|
+
...this.configData
|
|
11446
|
+
};
|
|
11447
|
+
},
|
|
11448
|
+
// 获取配置数据
|
|
11449
|
+
getConfigData(configData) {
|
|
11450
|
+
this.configData = {
|
|
11451
|
+
...this.defaultConfig,
|
|
11452
|
+
...configData
|
|
11453
|
+
};
|
|
11454
|
+
this.updateStyles();
|
|
11455
|
+
},
|
|
11456
|
+
// 更新样式
|
|
11457
|
+
updateStyles() {
|
|
11458
|
+
this.$nextTick(() => {
|
|
11459
|
+
this.setCSSVariables();
|
|
11460
|
+
this.$forceUpdate();
|
|
11461
|
+
});
|
|
11462
|
+
},
|
|
11463
|
+
// 设置CSS变量
|
|
11464
|
+
setCSSVariables() {
|
|
11465
|
+
if (!this.$el) return;
|
|
11466
|
+
const config = {
|
|
11467
|
+
...this.defaultConfig,
|
|
11468
|
+
...this.configData
|
|
11469
|
+
};
|
|
11470
|
+
|
|
11471
|
+
// 设置响应式字体大小
|
|
11472
|
+
if (config.mobileFontSize > 0) {
|
|
11473
|
+
this.$el.style.setProperty("--mobile-font-size", `${config.mobileFontSize}px`);
|
|
11474
|
+
}
|
|
11475
|
+
if (config.tabletFontSize > 0) {
|
|
11476
|
+
this.$el.style.setProperty("--tablet-font-size", `${config.tabletFontSize}px`);
|
|
11477
|
+
}
|
|
11478
|
+
|
|
11479
|
+
// 设置移动端文本对齐
|
|
11480
|
+
if (config.mobileTextAlign) {
|
|
11481
|
+
this.$el.style.setProperty("--mobile-text-align", config.mobileTextAlign);
|
|
11482
|
+
}
|
|
11483
|
+
},
|
|
11484
|
+
// 处理点击事件
|
|
11485
|
+
handleClick() {
|
|
11486
|
+
if (this.configData.linkUrl) {
|
|
11487
|
+
const target = this.configData.linkTarget || "_self";
|
|
11488
|
+
if (target === "_blank") {
|
|
11489
|
+
window.open(this.configData.linkUrl, "_blank");
|
|
11490
|
+
} else {
|
|
11491
|
+
window.location.href = this.configData.linkUrl;
|
|
11492
|
+
}
|
|
11493
|
+
}
|
|
11494
|
+
},
|
|
11495
|
+
// 获取动画样式
|
|
11496
|
+
getAnimationStyle() {
|
|
11497
|
+
const animationType = this.configData.animationType || this.defaultConfig.animationType;
|
|
11498
|
+
const duration = this.configData.animationDuration || this.defaultConfig.animationDuration;
|
|
11499
|
+
if (!this.configData.enableAnimation || animationType === "none") return "";
|
|
11500
|
+
return `${animationType} ${duration}ms ease-in-out`;
|
|
11501
|
+
},
|
|
11502
|
+
// 解析自定义样式
|
|
11503
|
+
parseCustomStyle(customStyle) {
|
|
11504
|
+
if (!customStyle) return {};
|
|
11505
|
+
try {
|
|
11506
|
+
// 简单的CSS样式解析
|
|
11507
|
+
const styles = {};
|
|
11508
|
+
const declarations = customStyle.split(";");
|
|
11509
|
+
declarations.forEach(declaration => {
|
|
11510
|
+
const [property, value] = declaration.split(":");
|
|
11511
|
+
if (property && value) {
|
|
11512
|
+
const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
11513
|
+
styles[camelCaseProperty] = value.trim();
|
|
11514
|
+
}
|
|
11515
|
+
});
|
|
11516
|
+
return styles;
|
|
11517
|
+
} catch (error) {
|
|
11518
|
+
console.warn("解析自定义样式失败:", error);
|
|
11519
|
+
return {};
|
|
11520
|
+
}
|
|
11521
|
+
},
|
|
11522
|
+
// 文本内容验证
|
|
11523
|
+
validateTextContent() {
|
|
11524
|
+
const content = this.configData.textContent;
|
|
11525
|
+
if (!content || content.trim() === "") {
|
|
11526
|
+
console.warn("文本内容为空");
|
|
11527
|
+
return false;
|
|
11528
|
+
}
|
|
11529
|
+
return true;
|
|
11530
|
+
},
|
|
11531
|
+
// 获取纯文本内容
|
|
11532
|
+
getPlainTextContent() {
|
|
11533
|
+
return this.configData.textContent || "";
|
|
11534
|
+
},
|
|
11535
|
+
// 获取文本长度
|
|
11536
|
+
getTextLength() {
|
|
11537
|
+
return this.getPlainTextContent().length;
|
|
11538
|
+
},
|
|
11539
|
+
// 复制文本内容到剪贴板
|
|
11540
|
+
copyTextToClipboard() {
|
|
11541
|
+
const text = this.getPlainTextContent();
|
|
11542
|
+
if (navigator.clipboard && window.isSecureContext) {
|
|
11543
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
11544
|
+
var _this$$message;
|
|
11545
|
+
(_this$$message = this.$message) === null || _this$$message === void 0 ? void 0 : _this$$message.success("文本已复制到剪贴板");
|
|
11546
|
+
}).catch(err => {
|
|
11547
|
+
console.error("复制失败:", err);
|
|
11548
|
+
});
|
|
11549
|
+
} else {
|
|
11550
|
+
// 降级方案
|
|
11551
|
+
const textArea = document.createElement("textarea");
|
|
11552
|
+
textArea.value = text;
|
|
11553
|
+
document.body.appendChild(textArea);
|
|
11554
|
+
textArea.select();
|
|
11555
|
+
try {
|
|
11556
|
+
var _this$$message2;
|
|
11557
|
+
document.execCommand("copy");
|
|
11558
|
+
(_this$$message2 = this.$message) === null || _this$$message2 === void 0 ? void 0 : _this$$message2.success("文本已复制到剪贴板");
|
|
11559
|
+
} catch (err) {
|
|
11560
|
+
console.error("复制失败:", err);
|
|
11561
|
+
}
|
|
11562
|
+
document.body.removeChild(textArea);
|
|
11563
|
+
}
|
|
11564
|
+
},
|
|
11565
|
+
// 文本搜索高亮
|
|
11566
|
+
highlightText(searchTerm) {
|
|
11567
|
+
if (!searchTerm) return;
|
|
11568
|
+
const content = this.getPlainTextContent();
|
|
11569
|
+
const regex = new RegExp(`(${searchTerm})`, "gi");
|
|
11570
|
+
const highlightedContent = content.replace(regex, "<mark>$1</mark>");
|
|
11571
|
+
|
|
11572
|
+
// 这里可以根据需要实现高亮显示逻辑
|
|
11573
|
+
console.log("高亮内容:", highlightedContent);
|
|
11574
|
+
},
|
|
11575
|
+
// 文本统计信息
|
|
11576
|
+
getTextStats() {
|
|
11577
|
+
const text = this.getPlainTextContent();
|
|
11578
|
+
const words = text.split(/\s+/).filter(word => word.length > 0);
|
|
11579
|
+
const lines = text.split("\n").length;
|
|
11580
|
+
const characters = text.length;
|
|
11581
|
+
const charactersNoSpaces = text.replace(/\s/g, "").length;
|
|
11582
|
+
return {
|
|
11583
|
+
characters,
|
|
11584
|
+
charactersNoSpaces,
|
|
11585
|
+
words: words.length,
|
|
11586
|
+
lines,
|
|
11587
|
+
paragraphs: text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length
|
|
11588
|
+
};
|
|
11589
|
+
}
|
|
11590
|
+
}
|
|
11591
|
+
});
|
|
11592
|
+
;// ./package/cms-text/View.vue?vue&type=script&lang=js
|
|
11593
|
+
/* harmony default export */ var cms_text_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
11594
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=style&index=0&id=1854eb12&prod&lang=scss&scoped=true
|
|
11595
|
+
// extracted by mini-css-extract-plugin
|
|
11596
|
+
|
|
11597
|
+
;// ./package/cms-text/View.vue?vue&type=style&index=0&id=1854eb12&prod&lang=scss&scoped=true
|
|
11598
|
+
|
|
11599
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
11600
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
11601
|
+
;// ./package/cms-text/View.vue
|
|
11602
|
+
|
|
11603
|
+
|
|
11604
|
+
|
|
11605
|
+
;
|
|
11606
|
+
|
|
11607
|
+
|
|
11608
|
+
/* normalize component */
|
|
11609
|
+
|
|
11610
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
11611
|
+
cms_text_Viewvue_type_script_lang_js,
|
|
11612
|
+
render,
|
|
11613
|
+
staticRenderFns,
|
|
11614
|
+
false,
|
|
11615
|
+
null,
|
|
11616
|
+
"1854eb12",
|
|
11617
|
+
null
|
|
11618
|
+
|
|
11619
|
+
)
|
|
11620
|
+
|
|
11621
|
+
/* harmony default export */ var View = (component.exports);
|
|
11622
|
+
|
|
11623
|
+
/***/ }),
|
|
11624
|
+
|
|
11623
11625
|
/***/ 1767:
|
|
11624
11626
|
/***/ (function(module) {
|
|
11625
11627
|
|
|
@@ -26403,270 +26405,6 @@ var POLYFILL = isForced.POLYFILL = 'P';
|
|
|
26403
26405
|
module.exports = isForced;
|
|
26404
26406
|
|
|
26405
26407
|
|
|
26406
|
-
/***/ }),
|
|
26407
|
-
|
|
26408
|
-
/***/ 2802:
|
|
26409
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
26410
|
-
|
|
26411
|
-
"use strict";
|
|
26412
|
-
// ESM COMPAT FLAG
|
|
26413
|
-
__webpack_require__.r(__webpack_exports__);
|
|
26414
|
-
|
|
26415
|
-
// EXPORTS
|
|
26416
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
26417
|
-
"default": function() { return /* binding */ View; }
|
|
26418
|
-
});
|
|
26419
|
-
|
|
26420
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column/View.vue?vue&type=template&id=f2ba72e8&scoped=true
|
|
26421
|
-
var render = function render() {
|
|
26422
|
-
var _vm = this,
|
|
26423
|
-
_c = _vm._self._c;
|
|
26424
|
-
return _c('BaseComp', _vm._b({
|
|
26425
|
-
attrs: {
|
|
26426
|
-
"data": _vm.data,
|
|
26427
|
-
"nowCompId": _vm.nowCompId,
|
|
26428
|
-
"isOpcacity": _vm.isOpcacity,
|
|
26429
|
-
"isMask": false,
|
|
26430
|
-
"lang": _vm.lang
|
|
26431
|
-
},
|
|
26432
|
-
on: {
|
|
26433
|
-
"getConfigData": _vm.getConfigData
|
|
26434
|
-
},
|
|
26435
|
-
scopedSlots: _vm._u([{
|
|
26436
|
-
key: "default",
|
|
26437
|
-
fn: function (slotProps) {
|
|
26438
|
-
return [_c('section', {
|
|
26439
|
-
class: (_vm.configData.widthType === 'full' ? 'width-full' : 'cmhk-home_main', {
|
|
26440
|
-
hoverBorderClass: _vm.isConfigPage
|
|
26441
|
-
}),
|
|
26442
|
-
style: _vm.containerStyle
|
|
26443
|
-
}, [_c('div', {
|
|
26444
|
-
staticClass: "column-setting",
|
|
26445
|
-
class: [`layout-${_vm.configData.layoutType || 'default'}`, `${slotProps.isMobile && _vm.configData.mobileLayout === 'vertical' ? 'mobile-vertical' : 'mobile-horizontal'}`],
|
|
26446
|
-
style: _vm.columnStyle
|
|
26447
|
-
}, _vm._l(_vm.data.childList, function (item, index) {
|
|
26448
|
-
return _c('cms-column-card', _vm._b({
|
|
26449
|
-
key: item.componentId,
|
|
26450
|
-
class: _vm.getColumnItemClass(index),
|
|
26451
|
-
style: _vm.getColumnItemStyle(index),
|
|
26452
|
-
attrs: {
|
|
26453
|
-
"data": item,
|
|
26454
|
-
"nowCompId": _vm.nowCompId,
|
|
26455
|
-
"isOpcacity": _vm.isOpcacity,
|
|
26456
|
-
"isMask": false,
|
|
26457
|
-
"lang": _vm.lang,
|
|
26458
|
-
"isMobile": slotProps.isMobile,
|
|
26459
|
-
"mobileLayout": _vm.configData.mobileLayout
|
|
26460
|
-
}
|
|
26461
|
-
}, 'cms-column-card', _vm.$attrs, false));
|
|
26462
|
-
}), 1)])];
|
|
26463
|
-
}
|
|
26464
|
-
}])
|
|
26465
|
-
}, 'BaseComp', _vm.$attrs, false));
|
|
26466
|
-
};
|
|
26467
|
-
var staticRenderFns = [];
|
|
26468
|
-
|
|
26469
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
26470
|
-
var baseComp = __webpack_require__(4128);
|
|
26471
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column/View.vue?vue&type=script&lang=js
|
|
26472
|
-
|
|
26473
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
26474
|
-
name: "cms-column",
|
|
26475
|
-
components: {
|
|
26476
|
-
BaseComp: baseComp["default"]
|
|
26477
|
-
},
|
|
26478
|
-
props: {
|
|
26479
|
-
data: {
|
|
26480
|
-
type: Object,
|
|
26481
|
-
default: () => {
|
|
26482
|
-
return {};
|
|
26483
|
-
}
|
|
26484
|
-
},
|
|
26485
|
-
nowCompId: {
|
|
26486
|
-
type: [String, Number],
|
|
26487
|
-
default: ""
|
|
26488
|
-
},
|
|
26489
|
-
isOpcacity: {
|
|
26490
|
-
type: Boolean,
|
|
26491
|
-
default: true
|
|
26492
|
-
},
|
|
26493
|
-
lang: {
|
|
26494
|
-
type: String,
|
|
26495
|
-
default: "zh-HK"
|
|
26496
|
-
}
|
|
26497
|
-
},
|
|
26498
|
-
data() {
|
|
26499
|
-
return {
|
|
26500
|
-
configData: {},
|
|
26501
|
-
messFold: true,
|
|
26502
|
-
// 默认配置数据
|
|
26503
|
-
defaultConfig: {
|
|
26504
|
-
layoutType: "100",
|
|
26505
|
-
heightType: "auto",
|
|
26506
|
-
widthType: "auto",
|
|
26507
|
-
mobileLayout: "vertical",
|
|
26508
|
-
fixedHeight: 300,
|
|
26509
|
-
borderWidth: 0,
|
|
26510
|
-
borderStyle: "solid",
|
|
26511
|
-
borderColor: "",
|
|
26512
|
-
backgroundColor: "#FFF",
|
|
26513
|
-
backgroundImage: "",
|
|
26514
|
-
boxShadow: "",
|
|
26515
|
-
borderRadius: 0,
|
|
26516
|
-
columnGap: 0,
|
|
26517
|
-
rowGap: 0,
|
|
26518
|
-
title: "",
|
|
26519
|
-
description: "",
|
|
26520
|
-
input1: "",
|
|
26521
|
-
showTitle: true,
|
|
26522
|
-
showDescription: true,
|
|
26523
|
-
animationDuration: 300,
|
|
26524
|
-
responsiveBreakpoint: 768
|
|
26525
|
-
}
|
|
26526
|
-
};
|
|
26527
|
-
},
|
|
26528
|
-
mounted() {},
|
|
26529
|
-
watch: {
|
|
26530
|
-
configData: {
|
|
26531
|
-
handler() {
|
|
26532
|
-
this.updateStyles();
|
|
26533
|
-
},
|
|
26534
|
-
immediate: true,
|
|
26535
|
-
deep: true
|
|
26536
|
-
}
|
|
26537
|
-
},
|
|
26538
|
-
computed: {
|
|
26539
|
-
isConfigPage() {
|
|
26540
|
-
return this.$EventBus && this.isOpcacity;
|
|
26541
|
-
},
|
|
26542
|
-
// 容器样式
|
|
26543
|
-
containerStyle() {
|
|
26544
|
-
return {
|
|
26545
|
-
backgroundColor: this.configData.backgroundColor || this.defaultConfig.backgroundColor,
|
|
26546
|
-
backgroundImage: this.configData.backgroundImage ? `url(${this.configData.backgroundImage})` : "",
|
|
26547
|
-
backgroundSize: "cover",
|
|
26548
|
-
backgroundRepeat: "no-repeat",
|
|
26549
|
-
backgroundPosition: "center center",
|
|
26550
|
-
boxShadow: this.configData.boxShadow || this.defaultConfig.boxShadow,
|
|
26551
|
-
borderRadius: `${this.configData.borderRadius || this.defaultConfig.borderRadius}px`,
|
|
26552
|
-
minHeight: this.configData.heightType === "fixed" ? `${this.configData.fixedHeight}px` : "auto"
|
|
26553
|
-
};
|
|
26554
|
-
},
|
|
26555
|
-
// 分栏容器样式
|
|
26556
|
-
columnStyle() {
|
|
26557
|
-
// const gap = this.configData.rowGap || this.defaultConfig.rowGap;
|
|
26558
|
-
return {
|
|
26559
|
-
// gap: `${gap}px`,
|
|
26560
|
-
border: this.configData.borderWidth ? `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}` : "none"
|
|
26561
|
-
};
|
|
26562
|
-
}
|
|
26563
|
-
},
|
|
26564
|
-
methods: {
|
|
26565
|
-
// 获取配置数据
|
|
26566
|
-
getConfigData(configData) {
|
|
26567
|
-
this.configData = configData;
|
|
26568
|
-
this.updateStyles();
|
|
26569
|
-
},
|
|
26570
|
-
// 更新样式
|
|
26571
|
-
updateStyles() {
|
|
26572
|
-
this.$nextTick(() => {
|
|
26573
|
-
// 触发样式更新
|
|
26574
|
-
this.$forceUpdate();
|
|
26575
|
-
});
|
|
26576
|
-
},
|
|
26577
|
-
// 获取分栏项的类名
|
|
26578
|
-
getColumnItemClass(index) {
|
|
26579
|
-
const layoutType = this.configData.layoutType || this.defaultConfig.layoutType;
|
|
26580
|
-
return ["column-item", `column-item-${index}`, `layout-${layoutType}`, {
|
|
26581
|
-
"min-h": this.$EventBus && this.isOpcacity,
|
|
26582
|
-
"first-item": index === 0,
|
|
26583
|
-
"last-item": index === this.data.childList.length - 1
|
|
26584
|
-
}];
|
|
26585
|
-
},
|
|
26586
|
-
// 获取分栏项的样式
|
|
26587
|
-
getColumnItemStyle(index) {
|
|
26588
|
-
const layoutType = this.configData.layoutType || this.defaultConfig.layoutType;
|
|
26589
|
-
const gap = this.configData.rowGap || this.defaultConfig.rowGap;
|
|
26590
|
-
let flexBasis = "100%";
|
|
26591
|
-
let marginRight = "0";
|
|
26592
|
-
|
|
26593
|
-
// 根据布局类型设置宽度
|
|
26594
|
-
switch (layoutType) {
|
|
26595
|
-
case "50-50":
|
|
26596
|
-
flexBasis = `calc(50% - ${gap / 2}px)`;
|
|
26597
|
-
marginRight = index % 2 === 0 ? `${gap}px` : "0";
|
|
26598
|
-
break;
|
|
26599
|
-
case "33-66":
|
|
26600
|
-
flexBasis = index === 0 ? `calc(33.33% - ${gap / 2}px)` : `calc(66.67% - ${gap / 2}px)`;
|
|
26601
|
-
marginRight = index === 0 ? `${gap}px` : "0";
|
|
26602
|
-
break;
|
|
26603
|
-
case "66-33":
|
|
26604
|
-
flexBasis = index === 0 ? `calc(66.67% - ${gap / 2}px)` : `calc(33.33% - ${gap / 2}px)`;
|
|
26605
|
-
marginRight = index === 0 ? `${gap}px` : "0";
|
|
26606
|
-
break;
|
|
26607
|
-
case "33-33-33":
|
|
26608
|
-
flexBasis = `calc(33.33% - ${gap * 2 / 3}px)`;
|
|
26609
|
-
marginRight = index < 2 ? `${gap}px` : "0";
|
|
26610
|
-
break;
|
|
26611
|
-
case "25-50-25":
|
|
26612
|
-
if (index === 0 || index === 2) {
|
|
26613
|
-
flexBasis = `calc(25% - ${gap * 2 / 3}px)`;
|
|
26614
|
-
} else {
|
|
26615
|
-
flexBasis = `calc(50% - ${gap * 2 / 3}px)`;
|
|
26616
|
-
}
|
|
26617
|
-
marginRight = index < 2 ? `${gap}px` : "0";
|
|
26618
|
-
break;
|
|
26619
|
-
default:
|
|
26620
|
-
flexBasis = "100%";
|
|
26621
|
-
}
|
|
26622
|
-
return {
|
|
26623
|
-
flexBasis,
|
|
26624
|
-
marginRight,
|
|
26625
|
-
marginBottom: `${this.configData.columnGap || this.defaultConfig.columnGap}px`
|
|
26626
|
-
};
|
|
26627
|
-
},
|
|
26628
|
-
// 折叠/展开文本
|
|
26629
|
-
foldMessText() {
|
|
26630
|
-
this.messFold = !this.messFold;
|
|
26631
|
-
},
|
|
26632
|
-
// 处理跳转链接
|
|
26633
|
-
decodeJumpUrl(url) {
|
|
26634
|
-
if (!url) return;
|
|
26635
|
-
top.location.href = url;
|
|
26636
|
-
}
|
|
26637
|
-
}
|
|
26638
|
-
});
|
|
26639
|
-
;// ./package/cms-column/View.vue?vue&type=script&lang=js
|
|
26640
|
-
/* harmony default export */ var cms_column_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
26641
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column/View.vue?vue&type=style&index=0&id=f2ba72e8&prod&lang=scss&scoped=true
|
|
26642
|
-
// extracted by mini-css-extract-plugin
|
|
26643
|
-
|
|
26644
|
-
;// ./package/cms-column/View.vue?vue&type=style&index=0&id=f2ba72e8&prod&lang=scss&scoped=true
|
|
26645
|
-
|
|
26646
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
26647
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
26648
|
-
;// ./package/cms-column/View.vue
|
|
26649
|
-
|
|
26650
|
-
|
|
26651
|
-
|
|
26652
|
-
;
|
|
26653
|
-
|
|
26654
|
-
|
|
26655
|
-
/* normalize component */
|
|
26656
|
-
|
|
26657
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
26658
|
-
cms_column_Viewvue_type_script_lang_js,
|
|
26659
|
-
render,
|
|
26660
|
-
staticRenderFns,
|
|
26661
|
-
false,
|
|
26662
|
-
null,
|
|
26663
|
-
"f2ba72e8",
|
|
26664
|
-
null
|
|
26665
|
-
|
|
26666
|
-
)
|
|
26667
|
-
|
|
26668
|
-
/* harmony default export */ var View = (component.exports);
|
|
26669
|
-
|
|
26670
26408
|
/***/ }),
|
|
26671
26409
|
|
|
26672
26410
|
/***/ 2806:
|
|
@@ -28422,7 +28160,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28422
28160
|
__webpack_require__.r(__webpack_exports__);
|
|
28423
28161
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
|
|
28424
28162
|
|
|
28425
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
28163
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 7855));
|
|
28426
28164
|
const langData = {
|
|
28427
28165
|
// 布局配置
|
|
28428
28166
|
layoutType: "100",
|
|
@@ -29533,7 +29271,7 @@ module.exports = Array.isArray || function isArray(argument) {
|
|
|
29533
29271
|
__webpack_require__.r(__webpack_exports__);
|
|
29534
29272
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
|
|
29535
29273
|
|
|
29536
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
29274
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 626));
|
|
29537
29275
|
const langData = {
|
|
29538
29276
|
configList: [
|
|
29539
29277
|
// {
|
|
@@ -40698,7 +40436,7 @@ var map = {
|
|
|
40698
40436
|
"./cms-button/View.vue": 2404,
|
|
40699
40437
|
"./cms-cells/View.vue": 5700,
|
|
40700
40438
|
"./cms-column-card/View.vue": 2328,
|
|
40701
|
-
"./cms-column/View.vue":
|
|
40439
|
+
"./cms-column/View.vue": 7855,
|
|
40702
40440
|
"./cms-description/View.vue": 3203,
|
|
40703
40441
|
"./cms-dynamic-comp/View.vue": 2809,
|
|
40704
40442
|
"./cms-iconFour/View.vue": 8235,
|
|
@@ -40717,11 +40455,11 @@ var map = {
|
|
|
40717
40455
|
"./cms-servePlan-tab/View.vue": 8757,
|
|
40718
40456
|
"./cms-servePlan-text/View.vue": 9487,
|
|
40719
40457
|
"./cms-termsAndConditions/View.vue": 8073,
|
|
40720
|
-
"./cms-text/View.vue":
|
|
40458
|
+
"./cms-text/View.vue": 1765,
|
|
40721
40459
|
"./cms-threeScroll/View.vue": 517,
|
|
40722
40460
|
"./cms-titleCenter/View.vue": 1429,
|
|
40723
40461
|
"./cms-titleLeft/View.vue": 428,
|
|
40724
|
-
"./cms-via-storedValueCard/View.vue":
|
|
40462
|
+
"./cms-via-storedValueCard/View.vue": 626,
|
|
40725
40463
|
"./cms-video-group/View.vue": 8216,
|
|
40726
40464
|
"./cms-video/View.vue": 8573,
|
|
40727
40465
|
"./cms-view/View.vue": 1380
|
|
@@ -42275,7 +42013,7 @@ module.exports = function (V, P) {
|
|
|
42275
42013
|
__webpack_require__.r(__webpack_exports__);
|
|
42276
42014
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
|
|
42277
42015
|
|
|
42278
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
42016
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 626));
|
|
42279
42017
|
const langData = {};
|
|
42280
42018
|
const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataType)(langData, {});
|
|
42281
42019
|
const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSchema)(langData);
|
|
@@ -52954,7 +52692,7 @@ function getShopproGroup(data) {
|
|
|
52954
52692
|
function columnQuery(params) {
|
|
52955
52693
|
return request({
|
|
52956
52694
|
method: "post",
|
|
52957
|
-
url: "/ecosp-console/columnCategory/
|
|
52695
|
+
url: "/ecosp-console/columnCategory/queryByCommodityType",
|
|
52958
52696
|
data: params
|
|
52959
52697
|
});
|
|
52960
52698
|
}
|
|
@@ -53573,6 +53311,268 @@ module.exports = Math.round;
|
|
|
53573
53311
|
|
|
53574
53312
|
/***/ }),
|
|
53575
53313
|
|
|
53314
|
+
/***/ 7855:
|
|
53315
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
53316
|
+
|
|
53317
|
+
"use strict";
|
|
53318
|
+
// ESM COMPAT FLAG
|
|
53319
|
+
__webpack_require__.r(__webpack_exports__);
|
|
53320
|
+
|
|
53321
|
+
// EXPORTS
|
|
53322
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
53323
|
+
"default": function() { return /* binding */ View; }
|
|
53324
|
+
});
|
|
53325
|
+
|
|
53326
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column/View.vue?vue&type=template&id=033e8b60&scoped=true
|
|
53327
|
+
var render = function render() {
|
|
53328
|
+
var _vm = this,
|
|
53329
|
+
_c = _vm._self._c;
|
|
53330
|
+
return _c('BaseComp', _vm._b({
|
|
53331
|
+
attrs: {
|
|
53332
|
+
"data": _vm.data,
|
|
53333
|
+
"nowCompId": _vm.nowCompId,
|
|
53334
|
+
"isOpcacity": _vm.isOpcacity,
|
|
53335
|
+
"isMask": false,
|
|
53336
|
+
"lang": _vm.lang
|
|
53337
|
+
},
|
|
53338
|
+
on: {
|
|
53339
|
+
"getConfigData": _vm.getConfigData
|
|
53340
|
+
},
|
|
53341
|
+
scopedSlots: _vm._u([{
|
|
53342
|
+
key: "default",
|
|
53343
|
+
fn: function (slotProps) {
|
|
53344
|
+
return [_c('section', {
|
|
53345
|
+
class: [_vm.configData.widthType === 'full' ? 'width-full' : 'cmhk-home_main', _vm.isConfigPage ? 'hoverBorderClass' : ''],
|
|
53346
|
+
style: _vm.containerStyle
|
|
53347
|
+
}, [_c('div', {
|
|
53348
|
+
staticClass: "column-setting",
|
|
53349
|
+
class: [`layout-${_vm.configData.layoutType || 'default'}`, `${slotProps.isMobile && _vm.configData.mobileLayout === 'vertical' ? 'mobile-vertical' : 'mobile-horizontal'}`],
|
|
53350
|
+
style: _vm.columnStyle
|
|
53351
|
+
}, _vm._l(_vm.data.childList, function (item, index) {
|
|
53352
|
+
return _c('cms-column-card', _vm._b({
|
|
53353
|
+
key: item.componentId,
|
|
53354
|
+
class: _vm.getColumnItemClass(index),
|
|
53355
|
+
style: _vm.getColumnItemStyle(index),
|
|
53356
|
+
attrs: {
|
|
53357
|
+
"data": item,
|
|
53358
|
+
"nowCompId": _vm.nowCompId,
|
|
53359
|
+
"isOpcacity": _vm.isOpcacity,
|
|
53360
|
+
"isMask": false,
|
|
53361
|
+
"lang": _vm.lang,
|
|
53362
|
+
"isMobile": slotProps.isMobile,
|
|
53363
|
+
"mobileLayout": _vm.configData.mobileLayout
|
|
53364
|
+
}
|
|
53365
|
+
}, 'cms-column-card', _vm.$attrs, false));
|
|
53366
|
+
}), 1)])];
|
|
53367
|
+
}
|
|
53368
|
+
}])
|
|
53369
|
+
}, 'BaseComp', _vm.$attrs, false));
|
|
53370
|
+
};
|
|
53371
|
+
var staticRenderFns = [];
|
|
53372
|
+
|
|
53373
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
53374
|
+
var baseComp = __webpack_require__(4128);
|
|
53375
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column/View.vue?vue&type=script&lang=js
|
|
53376
|
+
|
|
53377
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
53378
|
+
name: "cms-column",
|
|
53379
|
+
components: {
|
|
53380
|
+
BaseComp: baseComp["default"]
|
|
53381
|
+
},
|
|
53382
|
+
props: {
|
|
53383
|
+
data: {
|
|
53384
|
+
type: Object,
|
|
53385
|
+
default: () => {
|
|
53386
|
+
return {};
|
|
53387
|
+
}
|
|
53388
|
+
},
|
|
53389
|
+
nowCompId: {
|
|
53390
|
+
type: [String, Number],
|
|
53391
|
+
default: ""
|
|
53392
|
+
},
|
|
53393
|
+
isOpcacity: {
|
|
53394
|
+
type: Boolean,
|
|
53395
|
+
default: true
|
|
53396
|
+
},
|
|
53397
|
+
lang: {
|
|
53398
|
+
type: String,
|
|
53399
|
+
default: "zh-HK"
|
|
53400
|
+
}
|
|
53401
|
+
},
|
|
53402
|
+
data() {
|
|
53403
|
+
return {
|
|
53404
|
+
configData: {},
|
|
53405
|
+
messFold: true,
|
|
53406
|
+
// 默认配置数据
|
|
53407
|
+
defaultConfig: {
|
|
53408
|
+
layoutType: "100",
|
|
53409
|
+
heightType: "auto",
|
|
53410
|
+
widthType: "auto",
|
|
53411
|
+
mobileLayout: "vertical",
|
|
53412
|
+
fixedHeight: 300,
|
|
53413
|
+
borderWidth: 0,
|
|
53414
|
+
borderStyle: "solid",
|
|
53415
|
+
borderColor: "",
|
|
53416
|
+
backgroundColor: "#FFF",
|
|
53417
|
+
backgroundImage: "",
|
|
53418
|
+
boxShadow: "",
|
|
53419
|
+
borderRadius: 0,
|
|
53420
|
+
columnGap: 0,
|
|
53421
|
+
rowGap: 0,
|
|
53422
|
+
title: "",
|
|
53423
|
+
description: "",
|
|
53424
|
+
input1: "",
|
|
53425
|
+
showTitle: true,
|
|
53426
|
+
showDescription: true,
|
|
53427
|
+
animationDuration: 300,
|
|
53428
|
+
responsiveBreakpoint: 768
|
|
53429
|
+
}
|
|
53430
|
+
};
|
|
53431
|
+
},
|
|
53432
|
+
mounted() {},
|
|
53433
|
+
watch: {
|
|
53434
|
+
configData: {
|
|
53435
|
+
handler() {
|
|
53436
|
+
this.updateStyles();
|
|
53437
|
+
},
|
|
53438
|
+
immediate: true,
|
|
53439
|
+
deep: true
|
|
53440
|
+
}
|
|
53441
|
+
},
|
|
53442
|
+
computed: {
|
|
53443
|
+
isConfigPage() {
|
|
53444
|
+
return this.$EventBus && this.isOpcacity;
|
|
53445
|
+
},
|
|
53446
|
+
// 容器样式
|
|
53447
|
+
containerStyle() {
|
|
53448
|
+
return {
|
|
53449
|
+
backgroundColor: this.configData.backgroundColor || this.defaultConfig.backgroundColor,
|
|
53450
|
+
backgroundImage: this.configData.backgroundImage ? `url(${this.configData.backgroundImage})` : "",
|
|
53451
|
+
backgroundSize: "cover",
|
|
53452
|
+
backgroundRepeat: "no-repeat",
|
|
53453
|
+
backgroundPosition: "center center",
|
|
53454
|
+
boxShadow: this.configData.boxShadow || this.defaultConfig.boxShadow,
|
|
53455
|
+
borderRadius: `${this.configData.borderRadius || this.defaultConfig.borderRadius}px`,
|
|
53456
|
+
minHeight: this.configData.heightType === "fixed" ? `${this.configData.fixedHeight}px` : "auto"
|
|
53457
|
+
};
|
|
53458
|
+
},
|
|
53459
|
+
// 分栏容器样式
|
|
53460
|
+
columnStyle() {
|
|
53461
|
+
// const gap = this.configData.rowGap || this.defaultConfig.rowGap;
|
|
53462
|
+
return {
|
|
53463
|
+
// gap: `${gap}px`,
|
|
53464
|
+
border: this.configData.borderWidth ? `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}` : "none"
|
|
53465
|
+
};
|
|
53466
|
+
}
|
|
53467
|
+
},
|
|
53468
|
+
methods: {
|
|
53469
|
+
// 获取配置数据
|
|
53470
|
+
getConfigData(configData) {
|
|
53471
|
+
this.configData = configData;
|
|
53472
|
+
this.updateStyles();
|
|
53473
|
+
},
|
|
53474
|
+
// 更新样式
|
|
53475
|
+
updateStyles() {
|
|
53476
|
+
this.$nextTick(() => {
|
|
53477
|
+
// 触发样式更新
|
|
53478
|
+
this.$forceUpdate();
|
|
53479
|
+
});
|
|
53480
|
+
},
|
|
53481
|
+
// 获取分栏项的类名
|
|
53482
|
+
getColumnItemClass(index) {
|
|
53483
|
+
const layoutType = this.configData.layoutType || this.defaultConfig.layoutType;
|
|
53484
|
+
return ["column-item", `column-item-${index}`, `layout-${layoutType}`, {
|
|
53485
|
+
"min-h": this.$EventBus && this.isOpcacity,
|
|
53486
|
+
"first-item": index === 0,
|
|
53487
|
+
"last-item": index === this.data.childList.length - 1
|
|
53488
|
+
}];
|
|
53489
|
+
},
|
|
53490
|
+
// 获取分栏项的样式
|
|
53491
|
+
getColumnItemStyle(index) {
|
|
53492
|
+
const layoutType = this.configData.layoutType || this.defaultConfig.layoutType;
|
|
53493
|
+
const gap = this.configData.rowGap || this.defaultConfig.rowGap;
|
|
53494
|
+
let flexBasis = "100%";
|
|
53495
|
+
let marginRight = "0";
|
|
53496
|
+
|
|
53497
|
+
// 根据布局类型设置宽度
|
|
53498
|
+
switch (layoutType) {
|
|
53499
|
+
case "50-50":
|
|
53500
|
+
flexBasis = `calc(50% - ${gap / 2}px)`;
|
|
53501
|
+
marginRight = index % 2 === 0 ? `${gap}px` : "0";
|
|
53502
|
+
break;
|
|
53503
|
+
case "33-66":
|
|
53504
|
+
flexBasis = index === 0 ? `calc(33.33% - ${gap / 2}px)` : `calc(66.67% - ${gap / 2}px)`;
|
|
53505
|
+
marginRight = index === 0 ? `${gap}px` : "0";
|
|
53506
|
+
break;
|
|
53507
|
+
case "66-33":
|
|
53508
|
+
flexBasis = index === 0 ? `calc(66.67% - ${gap / 2}px)` : `calc(33.33% - ${gap / 2}px)`;
|
|
53509
|
+
marginRight = index === 0 ? `${gap}px` : "0";
|
|
53510
|
+
break;
|
|
53511
|
+
case "33-33-33":
|
|
53512
|
+
flexBasis = `calc(33.33% - ${gap * 2 / 3}px)`;
|
|
53513
|
+
marginRight = index < 2 ? `${gap}px` : "0";
|
|
53514
|
+
break;
|
|
53515
|
+
case "25-50-25":
|
|
53516
|
+
if (index === 0 || index === 2) {
|
|
53517
|
+
flexBasis = `calc(25% - ${gap * 2 / 3}px)`;
|
|
53518
|
+
} else {
|
|
53519
|
+
flexBasis = `calc(50% - ${gap * 2 / 3}px)`;
|
|
53520
|
+
}
|
|
53521
|
+
marginRight = index < 2 ? `${gap}px` : "0";
|
|
53522
|
+
break;
|
|
53523
|
+
default:
|
|
53524
|
+
flexBasis = "100%";
|
|
53525
|
+
}
|
|
53526
|
+
return {
|
|
53527
|
+
flexBasis,
|
|
53528
|
+
marginRight,
|
|
53529
|
+
marginBottom: `${this.configData.columnGap || this.defaultConfig.columnGap}px`
|
|
53530
|
+
};
|
|
53531
|
+
},
|
|
53532
|
+
// 折叠/展开文本
|
|
53533
|
+
foldMessText() {
|
|
53534
|
+
this.messFold = !this.messFold;
|
|
53535
|
+
},
|
|
53536
|
+
// 处理跳转链接
|
|
53537
|
+
decodeJumpUrl(url) {
|
|
53538
|
+
if (!url) return;
|
|
53539
|
+
top.location.href = url;
|
|
53540
|
+
}
|
|
53541
|
+
}
|
|
53542
|
+
});
|
|
53543
|
+
;// ./package/cms-column/View.vue?vue&type=script&lang=js
|
|
53544
|
+
/* harmony default export */ var cms_column_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
53545
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column/View.vue?vue&type=style&index=0&id=033e8b60&prod&lang=scss&scoped=true
|
|
53546
|
+
// extracted by mini-css-extract-plugin
|
|
53547
|
+
|
|
53548
|
+
;// ./package/cms-column/View.vue?vue&type=style&index=0&id=033e8b60&prod&lang=scss&scoped=true
|
|
53549
|
+
|
|
53550
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
53551
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
53552
|
+
;// ./package/cms-column/View.vue
|
|
53553
|
+
|
|
53554
|
+
|
|
53555
|
+
|
|
53556
|
+
;
|
|
53557
|
+
|
|
53558
|
+
|
|
53559
|
+
/* normalize component */
|
|
53560
|
+
|
|
53561
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
53562
|
+
cms_column_Viewvue_type_script_lang_js,
|
|
53563
|
+
render,
|
|
53564
|
+
staticRenderFns,
|
|
53565
|
+
false,
|
|
53566
|
+
null,
|
|
53567
|
+
"033e8b60",
|
|
53568
|
+
null
|
|
53569
|
+
|
|
53570
|
+
)
|
|
53571
|
+
|
|
53572
|
+
/* harmony default export */ var View = (component.exports);
|
|
53573
|
+
|
|
53574
|
+
/***/ }),
|
|
53575
|
+
|
|
53576
53576
|
/***/ 7936:
|
|
53577
53577
|
/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
53578
53578
|
|