cms-chenhj-ui 2.0.35 → 2.0.36
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 +1680 -1669
- package/cms-chenhj-ui.common.js.map +1 -1
- package/cms-chenhj-ui.css +1 -1
- package/cms-chenhj-ui.umd.js +1530 -1519
- 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.umd.js
CHANGED
|
@@ -715,7 +715,7 @@ Function.prototype.toString = makeBuiltIn(function toString() {
|
|
|
715
715
|
__webpack_require__.r(__webpack_exports__);
|
|
716
716
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
|
|
717
717
|
|
|
718
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
718
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 342));
|
|
719
719
|
const langData = {
|
|
720
720
|
input1: "请输入富文本内容"
|
|
721
721
|
};
|
|
@@ -741,6 +741,140 @@ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSc
|
|
|
741
741
|
|
|
742
742
|
/***/ }),
|
|
743
743
|
|
|
744
|
+
/***/ 342:
|
|
745
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
746
|
+
|
|
747
|
+
"use strict";
|
|
748
|
+
// ESM COMPAT FLAG
|
|
749
|
+
__webpack_require__.r(__webpack_exports__);
|
|
750
|
+
|
|
751
|
+
// EXPORTS
|
|
752
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
753
|
+
"default": function() { return /* binding */ View; }
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-richText/View.vue?vue&type=template&id=982cf5e8&scoped=true
|
|
757
|
+
var render = function render() {
|
|
758
|
+
var _vm = this,
|
|
759
|
+
_c = _vm._self._c;
|
|
760
|
+
return _c('BaseComp', _vm._b({
|
|
761
|
+
attrs: {
|
|
762
|
+
"data": _vm.data,
|
|
763
|
+
"nowCompId": _vm.nowCompId,
|
|
764
|
+
"isOpcacity": _vm.isOpcacity,
|
|
765
|
+
"lang": _vm.lang
|
|
766
|
+
},
|
|
767
|
+
on: {
|
|
768
|
+
"getConfigData": _vm.getConfigData
|
|
769
|
+
}
|
|
770
|
+
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
771
|
+
class: {
|
|
772
|
+
'cmhk-home_main': _vm.showCmhkMain
|
|
773
|
+
}
|
|
774
|
+
}, [_c('div', [_c('div', {
|
|
775
|
+
staticClass: "inner"
|
|
776
|
+
}, [_c('p', {
|
|
777
|
+
staticClass: "cms-ht",
|
|
778
|
+
domProps: {
|
|
779
|
+
"innerHTML": _vm._s(_vm.configData.input1)
|
|
780
|
+
}
|
|
781
|
+
})])])])]);
|
|
782
|
+
};
|
|
783
|
+
var staticRenderFns = [];
|
|
784
|
+
|
|
785
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
786
|
+
var baseComp = __webpack_require__(677);
|
|
787
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-richText/View.vue?vue&type=script&lang=js
|
|
788
|
+
|
|
789
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
790
|
+
name: "cms-richText",
|
|
791
|
+
components: {
|
|
792
|
+
BaseComp: baseComp["default"]
|
|
793
|
+
},
|
|
794
|
+
props: {
|
|
795
|
+
data: {
|
|
796
|
+
type: Object,
|
|
797
|
+
default: () => {
|
|
798
|
+
return {};
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
nowCompId: {
|
|
802
|
+
type: [String, Number],
|
|
803
|
+
default: ""
|
|
804
|
+
},
|
|
805
|
+
isOpcacity: {
|
|
806
|
+
type: Boolean,
|
|
807
|
+
default: true
|
|
808
|
+
},
|
|
809
|
+
lang: {
|
|
810
|
+
type: String,
|
|
811
|
+
default: "zh-HK"
|
|
812
|
+
},
|
|
813
|
+
showCmhkMain: {
|
|
814
|
+
type: Boolean,
|
|
815
|
+
default: true
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
data() {
|
|
819
|
+
return {
|
|
820
|
+
configData: {},
|
|
821
|
+
messFold: false
|
|
822
|
+
};
|
|
823
|
+
},
|
|
824
|
+
mounted() {},
|
|
825
|
+
watch: {},
|
|
826
|
+
methods: {
|
|
827
|
+
getConfigData(configData) {
|
|
828
|
+
this.configData = configData;
|
|
829
|
+
},
|
|
830
|
+
foldMessText() {
|
|
831
|
+
this.messFold = !this.messFold;
|
|
832
|
+
},
|
|
833
|
+
decodeJumpUrl(url) {
|
|
834
|
+
if (!url) return;
|
|
835
|
+
top.location.href = url;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
;// ./package/cms-richText/View.vue?vue&type=script&lang=js
|
|
840
|
+
/* harmony default export */ var cms_richText_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
841
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-richText/View.vue?vue&type=style&index=0&id=982cf5e8&prod&lang=scss&scoped=true
|
|
842
|
+
// extracted by mini-css-extract-plugin
|
|
843
|
+
|
|
844
|
+
;// ./package/cms-richText/View.vue?vue&type=style&index=0&id=982cf5e8&prod&lang=scss&scoped=true
|
|
845
|
+
|
|
846
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-richText/View.vue?vue&type=style&index=1&id=982cf5e8&prod&lang=scss
|
|
847
|
+
// extracted by mini-css-extract-plugin
|
|
848
|
+
|
|
849
|
+
;// ./package/cms-richText/View.vue?vue&type=style&index=1&id=982cf5e8&prod&lang=scss
|
|
850
|
+
|
|
851
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
852
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
853
|
+
;// ./package/cms-richText/View.vue
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
;
|
|
858
|
+
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
/* normalize component */
|
|
862
|
+
|
|
863
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
864
|
+
cms_richText_Viewvue_type_script_lang_js,
|
|
865
|
+
render,
|
|
866
|
+
staticRenderFns,
|
|
867
|
+
false,
|
|
868
|
+
null,
|
|
869
|
+
"982cf5e8",
|
|
870
|
+
null
|
|
871
|
+
|
|
872
|
+
)
|
|
873
|
+
|
|
874
|
+
/* harmony default export */ var View = (component.exports);
|
|
875
|
+
|
|
876
|
+
/***/ }),
|
|
877
|
+
|
|
744
878
|
/***/ 343:
|
|
745
879
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
746
880
|
|
|
@@ -22304,8 +22438,8 @@ var map = {
|
|
|
22304
22438
|
"./cms-banner/index.js": 5342,
|
|
22305
22439
|
"./cms-button": 6656,
|
|
22306
22440
|
"./cms-button/": 6656,
|
|
22307
|
-
"./cms-button/View":
|
|
22308
|
-
"./cms-button/View.vue":
|
|
22441
|
+
"./cms-button/View": 3735,
|
|
22442
|
+
"./cms-button/View.vue": 3735,
|
|
22309
22443
|
"./cms-button/index": 6656,
|
|
22310
22444
|
"./cms-button/index.js": 6656,
|
|
22311
22445
|
"./cms-cells": 649,
|
|
@@ -22317,8 +22451,8 @@ var map = {
|
|
|
22317
22451
|
"./cms-column": 3154,
|
|
22318
22452
|
"./cms-column-card": 3583,
|
|
22319
22453
|
"./cms-column-card/": 3583,
|
|
22320
|
-
"./cms-column-card/View":
|
|
22321
|
-
"./cms-column-card/View.vue":
|
|
22454
|
+
"./cms-column-card/View": 4552,
|
|
22455
|
+
"./cms-column-card/View.vue": 4552,
|
|
22322
22456
|
"./cms-column-card/index": 3583,
|
|
22323
22457
|
"./cms-column-card/index.js": 3583,
|
|
22324
22458
|
"./cms-column/": 3154,
|
|
@@ -22412,8 +22546,8 @@ var map = {
|
|
|
22412
22546
|
"./cms-question/index.js": 9704,
|
|
22413
22547
|
"./cms-richText": 289,
|
|
22414
22548
|
"./cms-richText/": 289,
|
|
22415
|
-
"./cms-richText/View":
|
|
22416
|
-
"./cms-richText/View.vue":
|
|
22549
|
+
"./cms-richText/View": 342,
|
|
22550
|
+
"./cms-richText/View.vue": 342,
|
|
22417
22551
|
"./cms-richText/index": 289,
|
|
22418
22552
|
"./cms-richText/index.js": 289,
|
|
22419
22553
|
"./cms-servePlan-tab": 5786,
|
|
@@ -22447,8 +22581,8 @@ var map = {
|
|
|
22447
22581
|
"./cms-termsAndConditions/index.js": 8806,
|
|
22448
22582
|
"./cms-text": 4759,
|
|
22449
22583
|
"./cms-text/": 4759,
|
|
22450
|
-
"./cms-text/View":
|
|
22451
|
-
"./cms-text/View.vue":
|
|
22584
|
+
"./cms-text/View": 4057,
|
|
22585
|
+
"./cms-text/View.vue": 4057,
|
|
22452
22586
|
"./cms-text/index": 4759,
|
|
22453
22587
|
"./cms-text/index.js": 4759,
|
|
22454
22588
|
"./cms-threeScroll": 1661,
|
|
@@ -35717,7 +35851,7 @@ $({ target: 'Iterator', proto: true, real: true }, {
|
|
|
35717
35851
|
__webpack_require__.r(__webpack_exports__);
|
|
35718
35852
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
|
|
35719
35853
|
|
|
35720
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
35854
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 4552));
|
|
35721
35855
|
|
|
35722
35856
|
// 默认配置数据
|
|
35723
35857
|
const langData = {
|
|
@@ -36460,7 +36594,7 @@ module.exports = !fails(function () {
|
|
|
36460
36594
|
|
|
36461
36595
|
/***/ }),
|
|
36462
36596
|
|
|
36463
|
-
/***/
|
|
36597
|
+
/***/ 3735:
|
|
36464
36598
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
36465
36599
|
|
|
36466
36600
|
"use strict";
|
|
@@ -36472,149 +36606,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
36472
36606
|
"default": function() { return /* binding */ View; }
|
|
36473
36607
|
});
|
|
36474
36608
|
|
|
36475
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-
|
|
36476
|
-
var render = function render() {
|
|
36477
|
-
var _vm = this,
|
|
36478
|
-
_c = _vm._self._c;
|
|
36479
|
-
return _c('div', {
|
|
36480
|
-
staticClass: "view-container"
|
|
36481
|
-
}, [_vm._l(_vm.data, function (item) {
|
|
36482
|
-
return [_c(item.cmsCompName, {
|
|
36483
|
-
key: item.componentId,
|
|
36484
|
-
tag: "component",
|
|
36485
|
-
attrs: {
|
|
36486
|
-
"data": item,
|
|
36487
|
-
"lang": _vm.lang,
|
|
36488
|
-
"timeline": _vm.timeline,
|
|
36489
|
-
"cmhkChannel": _vm.cmhkChannel,
|
|
36490
|
-
"isOpcacity": false
|
|
36491
|
-
}
|
|
36492
|
-
})];
|
|
36493
|
-
})], 2);
|
|
36494
|
-
};
|
|
36495
|
-
var staticRenderFns = [];
|
|
36496
|
-
|
|
36497
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-view/View.vue?vue&type=script&lang=js
|
|
36498
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
36499
|
-
name: "cms-view",
|
|
36500
|
-
props: {
|
|
36501
|
-
data: {
|
|
36502
|
-
type: Array,
|
|
36503
|
-
default: () => {
|
|
36504
|
-
return [];
|
|
36505
|
-
}
|
|
36506
|
-
},
|
|
36507
|
-
lang: {
|
|
36508
|
-
type: String,
|
|
36509
|
-
default: "zh-HK"
|
|
36510
|
-
},
|
|
36511
|
-
timeline: {
|
|
36512
|
-
type: String,
|
|
36513
|
-
default: ""
|
|
36514
|
-
},
|
|
36515
|
-
cmhkChannel: {
|
|
36516
|
-
type: String,
|
|
36517
|
-
default: "WWW"
|
|
36518
|
-
}
|
|
36519
|
-
},
|
|
36520
|
-
created() {
|
|
36521
|
-
this.$i18n.locale = this.lang;
|
|
36522
|
-
}
|
|
36523
|
-
});
|
|
36524
|
-
;// ./package/cms-view/View.vue?vue&type=script&lang=js
|
|
36525
|
-
/* harmony default export */ var cms_view_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
36526
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-57.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-57.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-57.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-view/View.vue?vue&type=style&index=0&id=e4796b30&prod&scoped=true&lang=css
|
|
36527
|
-
// extracted by mini-css-extract-plugin
|
|
36528
|
-
|
|
36529
|
-
;// ./package/cms-view/View.vue?vue&type=style&index=0&id=e4796b30&prod&scoped=true&lang=css
|
|
36530
|
-
|
|
36531
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
36532
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
36533
|
-
;// ./package/cms-view/View.vue
|
|
36534
|
-
|
|
36535
|
-
|
|
36536
|
-
|
|
36537
|
-
;
|
|
36538
|
-
|
|
36539
|
-
|
|
36540
|
-
/* normalize component */
|
|
36541
|
-
|
|
36542
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
36543
|
-
cms_view_Viewvue_type_script_lang_js,
|
|
36544
|
-
render,
|
|
36545
|
-
staticRenderFns,
|
|
36546
|
-
false,
|
|
36547
|
-
null,
|
|
36548
|
-
"e4796b30",
|
|
36549
|
-
null
|
|
36550
|
-
|
|
36551
|
-
)
|
|
36552
|
-
|
|
36553
|
-
/* harmony default export */ var View = (component.exports);
|
|
36554
|
-
|
|
36555
|
-
/***/ }),
|
|
36556
|
-
|
|
36557
|
-
/***/ 3789:
|
|
36558
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
36559
|
-
|
|
36560
|
-
"use strict";
|
|
36561
|
-
|
|
36562
|
-
var aCallable = __webpack_require__(9306);
|
|
36563
|
-
var anObject = __webpack_require__(8551);
|
|
36564
|
-
var call = __webpack_require__(9565);
|
|
36565
|
-
var toIntegerOrInfinity = __webpack_require__(1291);
|
|
36566
|
-
var getIteratorDirect = __webpack_require__(1767);
|
|
36567
|
-
|
|
36568
|
-
var INVALID_SIZE = 'Invalid size';
|
|
36569
|
-
var $RangeError = RangeError;
|
|
36570
|
-
var $TypeError = TypeError;
|
|
36571
|
-
var max = Math.max;
|
|
36572
|
-
|
|
36573
|
-
var SetRecord = function (set, intSize) {
|
|
36574
|
-
this.set = set;
|
|
36575
|
-
this.size = max(intSize, 0);
|
|
36576
|
-
this.has = aCallable(set.has);
|
|
36577
|
-
this.keys = aCallable(set.keys);
|
|
36578
|
-
};
|
|
36579
|
-
|
|
36580
|
-
SetRecord.prototype = {
|
|
36581
|
-
getIterator: function () {
|
|
36582
|
-
return getIteratorDirect(anObject(call(this.keys, this.set)));
|
|
36583
|
-
},
|
|
36584
|
-
includes: function (it) {
|
|
36585
|
-
return call(this.has, this.set, it);
|
|
36586
|
-
}
|
|
36587
|
-
};
|
|
36588
|
-
|
|
36589
|
-
// `GetSetRecord` abstract operation
|
|
36590
|
-
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
36591
|
-
module.exports = function (obj) {
|
|
36592
|
-
anObject(obj);
|
|
36593
|
-
var numSize = +obj.size;
|
|
36594
|
-
// NOTE: If size is undefined, then numSize will be NaN
|
|
36595
|
-
// eslint-disable-next-line no-self-compare -- NaN check
|
|
36596
|
-
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
|
|
36597
|
-
var intSize = toIntegerOrInfinity(numSize);
|
|
36598
|
-
if (intSize < 0) throw new $RangeError(INVALID_SIZE);
|
|
36599
|
-
return new SetRecord(obj, intSize);
|
|
36600
|
-
};
|
|
36601
|
-
|
|
36602
|
-
|
|
36603
|
-
/***/ }),
|
|
36604
|
-
|
|
36605
|
-
/***/ 3823:
|
|
36606
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
36607
|
-
|
|
36608
|
-
"use strict";
|
|
36609
|
-
// ESM COMPAT FLAG
|
|
36610
|
-
__webpack_require__.r(__webpack_exports__);
|
|
36611
|
-
|
|
36612
|
-
// EXPORTS
|
|
36613
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
36614
|
-
"default": function() { return /* binding */ View; }
|
|
36615
|
-
});
|
|
36616
|
-
|
|
36617
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-image/View.vue?vue&type=template&id=5dac7dea&scoped=true
|
|
36609
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-button/View.vue?vue&type=template&id=12ff304e&scoped=true
|
|
36618
36610
|
var render = function render() {
|
|
36619
36611
|
var _vm = this,
|
|
36620
36612
|
_c = _vm._self._c;
|
|
@@ -36629,63 +36621,485 @@ var render = function render() {
|
|
|
36629
36621
|
"getConfigData": _vm.getConfigData
|
|
36630
36622
|
}
|
|
36631
36623
|
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
36632
|
-
staticClass: "cms-
|
|
36633
|
-
class: [_vm.configData.customClass || '',
|
|
36634
|
-
'has-link': _vm.configData.linkUrl
|
|
36635
|
-
}],
|
|
36624
|
+
staticClass: "cms-button-container",
|
|
36625
|
+
class: [`align-${_vm.configData.textAlign || 'center'}`, _vm.configData.customClass || ''],
|
|
36636
36626
|
style: _vm.containerStyle
|
|
36637
|
-
}, [_c('
|
|
36638
|
-
staticClass: "
|
|
36639
|
-
|
|
36640
|
-
|
|
36641
|
-
|
|
36642
|
-
}
|
|
36643
|
-
|
|
36644
|
-
staticClass: "cms-image",
|
|
36645
|
-
style: _vm.imageStyle,
|
|
36627
|
+
}, [_c('button', {
|
|
36628
|
+
staticClass: "cms-button",
|
|
36629
|
+
class: ['cms-button-element', {
|
|
36630
|
+
'has-link': _vm.configData.linkUrl,
|
|
36631
|
+
'hover-effect': _vm.configData.hoverEffect
|
|
36632
|
+
}],
|
|
36633
|
+
style: _vm.buttonStyle,
|
|
36646
36634
|
attrs: {
|
|
36647
|
-
"
|
|
36648
|
-
"alt": _vm.configData.altText || '图片',
|
|
36649
|
-
"title": _vm.configData.title
|
|
36635
|
+
"disabled": _vm.configData.disabled
|
|
36650
36636
|
},
|
|
36651
36637
|
on: {
|
|
36652
|
-
"
|
|
36653
|
-
"error": _vm.onImageError
|
|
36654
|
-
}
|
|
36655
|
-
}) : _c('div', {
|
|
36656
|
-
staticClass: "image-placeholder",
|
|
36657
|
-
style: _vm.placeholderStyle
|
|
36658
|
-
}, [_c('img', {
|
|
36659
|
-
staticStyle: {
|
|
36660
|
-
"width": "200px",
|
|
36661
|
-
"height": "200px"
|
|
36662
|
-
},
|
|
36663
|
-
attrs: {
|
|
36664
|
-
"src": __webpack_require__(4806),
|
|
36665
|
-
"alt": "Picture"
|
|
36638
|
+
"click": _vm.handleClick
|
|
36666
36639
|
}
|
|
36667
|
-
})
|
|
36668
|
-
staticClass: "
|
|
36669
|
-
}
|
|
36640
|
+
}, [_vm._v(" " + _vm._s(_vm.configData.buttonText) + " "), _c('i', {
|
|
36641
|
+
staticClass: "el-icon-arrow-right el-icon--right"
|
|
36642
|
+
})])])]);
|
|
36670
36643
|
};
|
|
36671
36644
|
var staticRenderFns = [];
|
|
36672
36645
|
|
|
36673
|
-
;// ./package/cms-image/View.vue?vue&type=template&id=5dac7dea&scoped=true
|
|
36674
|
-
|
|
36675
36646
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
36676
36647
|
var es_iterator_constructor = __webpack_require__(8111);
|
|
36677
36648
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
36678
36649
|
var es_iterator_for_each = __webpack_require__(7588);
|
|
36679
36650
|
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
36680
36651
|
var baseComp = __webpack_require__(677);
|
|
36681
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-
|
|
36652
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-button/View.vue?vue&type=script&lang=js
|
|
36682
36653
|
|
|
36683
36654
|
|
|
36684
36655
|
|
|
36685
36656
|
|
|
36686
36657
|
|
|
36687
36658
|
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
36688
|
-
name: "cms-
|
|
36659
|
+
name: "cms-button",
|
|
36660
|
+
components: {
|
|
36661
|
+
BaseComp: baseComp["default"]
|
|
36662
|
+
},
|
|
36663
|
+
props: {
|
|
36664
|
+
data: {
|
|
36665
|
+
type: Object,
|
|
36666
|
+
default: () => {
|
|
36667
|
+
return {};
|
|
36668
|
+
}
|
|
36669
|
+
},
|
|
36670
|
+
nowCompId: {
|
|
36671
|
+
type: [String, Number],
|
|
36672
|
+
default: ""
|
|
36673
|
+
},
|
|
36674
|
+
isOpcacity: {
|
|
36675
|
+
type: Boolean,
|
|
36676
|
+
default: true
|
|
36677
|
+
},
|
|
36678
|
+
lang: {
|
|
36679
|
+
type: String,
|
|
36680
|
+
default: "zh-HK"
|
|
36681
|
+
}
|
|
36682
|
+
},
|
|
36683
|
+
data() {
|
|
36684
|
+
return {
|
|
36685
|
+
configData: {},
|
|
36686
|
+
// 默认配置数据
|
|
36687
|
+
defaultConfig: {
|
|
36688
|
+
// 文字设置
|
|
36689
|
+
buttonText: "按钮文字",
|
|
36690
|
+
textAlign: "center",
|
|
36691
|
+
fontSize: 16,
|
|
36692
|
+
fontColor: "#ffffff",
|
|
36693
|
+
fontWeight: "normal",
|
|
36694
|
+
// 样式控制
|
|
36695
|
+
backgroundColor: "#2f85ff",
|
|
36696
|
+
borderRadius: 30,
|
|
36697
|
+
borderWidth: 1,
|
|
36698
|
+
borderStyle: "solid",
|
|
36699
|
+
borderColor: "#409eff",
|
|
36700
|
+
// 空间布局
|
|
36701
|
+
paddingTop: 12,
|
|
36702
|
+
paddingBottom: 12,
|
|
36703
|
+
paddingLeft: 20,
|
|
36704
|
+
paddingRight: 20,
|
|
36705
|
+
marginTop: 0,
|
|
36706
|
+
marginBottom: 0,
|
|
36707
|
+
marginLeft: 0,
|
|
36708
|
+
marginRight: 0,
|
|
36709
|
+
// 交互功能
|
|
36710
|
+
linkUrl: "",
|
|
36711
|
+
linkTarget: "_self",
|
|
36712
|
+
disabled: false,
|
|
36713
|
+
// 高级配置
|
|
36714
|
+
customClass: "",
|
|
36715
|
+
customStyle: "",
|
|
36716
|
+
hoverEffect: false,
|
|
36717
|
+
// 尺寸设置
|
|
36718
|
+
buttonWidth: "300",
|
|
36719
|
+
buttonHeight: "48",
|
|
36720
|
+
minWidth: 80,
|
|
36721
|
+
minHeight: 36
|
|
36722
|
+
}
|
|
36723
|
+
};
|
|
36724
|
+
},
|
|
36725
|
+
mounted() {
|
|
36726
|
+
this.initConfigData();
|
|
36727
|
+
},
|
|
36728
|
+
watch: {
|
|
36729
|
+
configData: {
|
|
36730
|
+
handler() {
|
|
36731
|
+
this.updateStyles();
|
|
36732
|
+
},
|
|
36733
|
+
deep: true
|
|
36734
|
+
}
|
|
36735
|
+
},
|
|
36736
|
+
computed: {
|
|
36737
|
+
// 容器样式
|
|
36738
|
+
containerStyle() {
|
|
36739
|
+
const config = {
|
|
36740
|
+
...this.defaultConfig,
|
|
36741
|
+
...this.configData
|
|
36742
|
+
};
|
|
36743
|
+
return {
|
|
36744
|
+
backgroundColor: config.wrapperBackgroundColor,
|
|
36745
|
+
textAlign: config.textAlign,
|
|
36746
|
+
margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
|
|
36747
|
+
...this.parseCustomStyle(config.customStyle)
|
|
36748
|
+
};
|
|
36749
|
+
},
|
|
36750
|
+
// 按钮样式
|
|
36751
|
+
buttonStyle() {
|
|
36752
|
+
const config = {
|
|
36753
|
+
...this.defaultConfig,
|
|
36754
|
+
...this.configData
|
|
36755
|
+
};
|
|
36756
|
+
return {
|
|
36757
|
+
// 文字样式
|
|
36758
|
+
fontSize: `${config.fontSize}px`,
|
|
36759
|
+
color: config.fontColor,
|
|
36760
|
+
fontWeight: config.fontWeight,
|
|
36761
|
+
// 背景和边框
|
|
36762
|
+
backgroundColor: config.backgroundColor ? config.backgroundColor : "transparent",
|
|
36763
|
+
borderRadius: `${config.borderRadius}px`,
|
|
36764
|
+
border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
|
|
36765
|
+
// 内边距
|
|
36766
|
+
padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
|
|
36767
|
+
// 尺寸
|
|
36768
|
+
width: config.buttonWidth === "auto" ? "auto" : `${config.buttonWidth}px`,
|
|
36769
|
+
height: config.buttonHeight === "auto" ? "auto" : `${config.buttonHeight}px`,
|
|
36770
|
+
minWidth: `${config.minWidth}px`,
|
|
36771
|
+
minHeight: `${config.minHeight}px`,
|
|
36772
|
+
// 交互效果
|
|
36773
|
+
cursor: config.linkUrl ? "pointer" : "default",
|
|
36774
|
+
opacity: config.disabled ? 0.6 : 1,
|
|
36775
|
+
transition: config.hoverEffect ? "all 0.3s ease" : "none",
|
|
36776
|
+
// 基础样式
|
|
36777
|
+
outline: "none",
|
|
36778
|
+
textDecoration: "none",
|
|
36779
|
+
display: "inline-block",
|
|
36780
|
+
textAlign: "center",
|
|
36781
|
+
verticalAlign: "middle",
|
|
36782
|
+
userSelect: "none",
|
|
36783
|
+
whiteSpace: "nowrap"
|
|
36784
|
+
};
|
|
36785
|
+
}
|
|
36786
|
+
},
|
|
36787
|
+
methods: {
|
|
36788
|
+
// 初始化配置数据
|
|
36789
|
+
initConfigData() {
|
|
36790
|
+
this.configData = {
|
|
36791
|
+
...this.defaultConfig,
|
|
36792
|
+
...this.configData
|
|
36793
|
+
};
|
|
36794
|
+
},
|
|
36795
|
+
// 获取配置数据
|
|
36796
|
+
getConfigData(configData) {
|
|
36797
|
+
this.configData = {
|
|
36798
|
+
...this.defaultConfig,
|
|
36799
|
+
...configData
|
|
36800
|
+
};
|
|
36801
|
+
this.updateStyles();
|
|
36802
|
+
},
|
|
36803
|
+
// 更新样式
|
|
36804
|
+
updateStyles() {
|
|
36805
|
+
this.$nextTick(() => {
|
|
36806
|
+
this.$forceUpdate();
|
|
36807
|
+
});
|
|
36808
|
+
},
|
|
36809
|
+
// 处理点击事件
|
|
36810
|
+
handleClick() {
|
|
36811
|
+
if (this.configData.disabled) {
|
|
36812
|
+
return;
|
|
36813
|
+
}
|
|
36814
|
+
if (this.configData.linkUrl) {
|
|
36815
|
+
const target = this.configData.linkTarget || "_self";
|
|
36816
|
+
if (target === "_blank") {
|
|
36817
|
+
window.open(this.configData.linkUrl, "_blank");
|
|
36818
|
+
} else {
|
|
36819
|
+
window.location.href = this.configData.linkUrl;
|
|
36820
|
+
}
|
|
36821
|
+
}
|
|
36822
|
+
},
|
|
36823
|
+
// 解析自定义样式
|
|
36824
|
+
parseCustomStyle(customStyle) {
|
|
36825
|
+
if (!customStyle) return {};
|
|
36826
|
+
try {
|
|
36827
|
+
const styles = {};
|
|
36828
|
+
const declarations = customStyle.split(";");
|
|
36829
|
+
declarations.forEach(declaration => {
|
|
36830
|
+
const [property, value] = declaration.split(":");
|
|
36831
|
+
if (property && value) {
|
|
36832
|
+
const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
36833
|
+
styles[camelCaseProperty] = value.trim();
|
|
36834
|
+
}
|
|
36835
|
+
});
|
|
36836
|
+
return styles;
|
|
36837
|
+
} catch (error) {
|
|
36838
|
+
console.warn("解析自定义样式失败:", error);
|
|
36839
|
+
return {};
|
|
36840
|
+
}
|
|
36841
|
+
}
|
|
36842
|
+
}
|
|
36843
|
+
});
|
|
36844
|
+
;// ./package/cms-button/View.vue?vue&type=script&lang=js
|
|
36845
|
+
/* harmony default export */ var cms_button_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
36846
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-button/View.vue?vue&type=style&index=0&id=12ff304e&prod&lang=scss&scoped=true
|
|
36847
|
+
// extracted by mini-css-extract-plugin
|
|
36848
|
+
|
|
36849
|
+
;// ./package/cms-button/View.vue?vue&type=style&index=0&id=12ff304e&prod&lang=scss&scoped=true
|
|
36850
|
+
|
|
36851
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
36852
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
36853
|
+
;// ./package/cms-button/View.vue
|
|
36854
|
+
|
|
36855
|
+
|
|
36856
|
+
|
|
36857
|
+
;
|
|
36858
|
+
|
|
36859
|
+
|
|
36860
|
+
/* normalize component */
|
|
36861
|
+
|
|
36862
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
36863
|
+
cms_button_Viewvue_type_script_lang_js,
|
|
36864
|
+
render,
|
|
36865
|
+
staticRenderFns,
|
|
36866
|
+
false,
|
|
36867
|
+
null,
|
|
36868
|
+
"12ff304e",
|
|
36869
|
+
null
|
|
36870
|
+
|
|
36871
|
+
)
|
|
36872
|
+
|
|
36873
|
+
/* harmony default export */ var View = (component.exports);
|
|
36874
|
+
|
|
36875
|
+
/***/ }),
|
|
36876
|
+
|
|
36877
|
+
/***/ 3774:
|
|
36878
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
36879
|
+
|
|
36880
|
+
"use strict";
|
|
36881
|
+
// ESM COMPAT FLAG
|
|
36882
|
+
__webpack_require__.r(__webpack_exports__);
|
|
36883
|
+
|
|
36884
|
+
// EXPORTS
|
|
36885
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
36886
|
+
"default": function() { return /* binding */ View; }
|
|
36887
|
+
});
|
|
36888
|
+
|
|
36889
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-view/View.vue?vue&type=template&id=e4796b30&scoped=true
|
|
36890
|
+
var render = function render() {
|
|
36891
|
+
var _vm = this,
|
|
36892
|
+
_c = _vm._self._c;
|
|
36893
|
+
return _c('div', {
|
|
36894
|
+
staticClass: "view-container"
|
|
36895
|
+
}, [_vm._l(_vm.data, function (item) {
|
|
36896
|
+
return [_c(item.cmsCompName, {
|
|
36897
|
+
key: item.componentId,
|
|
36898
|
+
tag: "component",
|
|
36899
|
+
attrs: {
|
|
36900
|
+
"data": item,
|
|
36901
|
+
"lang": _vm.lang,
|
|
36902
|
+
"timeline": _vm.timeline,
|
|
36903
|
+
"cmhkChannel": _vm.cmhkChannel,
|
|
36904
|
+
"isOpcacity": false
|
|
36905
|
+
}
|
|
36906
|
+
})];
|
|
36907
|
+
})], 2);
|
|
36908
|
+
};
|
|
36909
|
+
var staticRenderFns = [];
|
|
36910
|
+
|
|
36911
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-view/View.vue?vue&type=script&lang=js
|
|
36912
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
36913
|
+
name: "cms-view",
|
|
36914
|
+
props: {
|
|
36915
|
+
data: {
|
|
36916
|
+
type: Array,
|
|
36917
|
+
default: () => {
|
|
36918
|
+
return [];
|
|
36919
|
+
}
|
|
36920
|
+
},
|
|
36921
|
+
lang: {
|
|
36922
|
+
type: String,
|
|
36923
|
+
default: "zh-HK"
|
|
36924
|
+
},
|
|
36925
|
+
timeline: {
|
|
36926
|
+
type: String,
|
|
36927
|
+
default: ""
|
|
36928
|
+
},
|
|
36929
|
+
cmhkChannel: {
|
|
36930
|
+
type: String,
|
|
36931
|
+
default: "WWW"
|
|
36932
|
+
}
|
|
36933
|
+
},
|
|
36934
|
+
created() {
|
|
36935
|
+
this.$i18n.locale = this.lang;
|
|
36936
|
+
}
|
|
36937
|
+
});
|
|
36938
|
+
;// ./package/cms-view/View.vue?vue&type=script&lang=js
|
|
36939
|
+
/* harmony default export */ var cms_view_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
36940
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-57.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-57.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-57.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-view/View.vue?vue&type=style&index=0&id=e4796b30&prod&scoped=true&lang=css
|
|
36941
|
+
// extracted by mini-css-extract-plugin
|
|
36942
|
+
|
|
36943
|
+
;// ./package/cms-view/View.vue?vue&type=style&index=0&id=e4796b30&prod&scoped=true&lang=css
|
|
36944
|
+
|
|
36945
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
36946
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
36947
|
+
;// ./package/cms-view/View.vue
|
|
36948
|
+
|
|
36949
|
+
|
|
36950
|
+
|
|
36951
|
+
;
|
|
36952
|
+
|
|
36953
|
+
|
|
36954
|
+
/* normalize component */
|
|
36955
|
+
|
|
36956
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
36957
|
+
cms_view_Viewvue_type_script_lang_js,
|
|
36958
|
+
render,
|
|
36959
|
+
staticRenderFns,
|
|
36960
|
+
false,
|
|
36961
|
+
null,
|
|
36962
|
+
"e4796b30",
|
|
36963
|
+
null
|
|
36964
|
+
|
|
36965
|
+
)
|
|
36966
|
+
|
|
36967
|
+
/* harmony default export */ var View = (component.exports);
|
|
36968
|
+
|
|
36969
|
+
/***/ }),
|
|
36970
|
+
|
|
36971
|
+
/***/ 3789:
|
|
36972
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
36973
|
+
|
|
36974
|
+
"use strict";
|
|
36975
|
+
|
|
36976
|
+
var aCallable = __webpack_require__(9306);
|
|
36977
|
+
var anObject = __webpack_require__(8551);
|
|
36978
|
+
var call = __webpack_require__(9565);
|
|
36979
|
+
var toIntegerOrInfinity = __webpack_require__(1291);
|
|
36980
|
+
var getIteratorDirect = __webpack_require__(1767);
|
|
36981
|
+
|
|
36982
|
+
var INVALID_SIZE = 'Invalid size';
|
|
36983
|
+
var $RangeError = RangeError;
|
|
36984
|
+
var $TypeError = TypeError;
|
|
36985
|
+
var max = Math.max;
|
|
36986
|
+
|
|
36987
|
+
var SetRecord = function (set, intSize) {
|
|
36988
|
+
this.set = set;
|
|
36989
|
+
this.size = max(intSize, 0);
|
|
36990
|
+
this.has = aCallable(set.has);
|
|
36991
|
+
this.keys = aCallable(set.keys);
|
|
36992
|
+
};
|
|
36993
|
+
|
|
36994
|
+
SetRecord.prototype = {
|
|
36995
|
+
getIterator: function () {
|
|
36996
|
+
return getIteratorDirect(anObject(call(this.keys, this.set)));
|
|
36997
|
+
},
|
|
36998
|
+
includes: function (it) {
|
|
36999
|
+
return call(this.has, this.set, it);
|
|
37000
|
+
}
|
|
37001
|
+
};
|
|
37002
|
+
|
|
37003
|
+
// `GetSetRecord` abstract operation
|
|
37004
|
+
// https://tc39.es/proposal-set-methods/#sec-getsetrecord
|
|
37005
|
+
module.exports = function (obj) {
|
|
37006
|
+
anObject(obj);
|
|
37007
|
+
var numSize = +obj.size;
|
|
37008
|
+
// NOTE: If size is undefined, then numSize will be NaN
|
|
37009
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
37010
|
+
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
|
|
37011
|
+
var intSize = toIntegerOrInfinity(numSize);
|
|
37012
|
+
if (intSize < 0) throw new $RangeError(INVALID_SIZE);
|
|
37013
|
+
return new SetRecord(obj, intSize);
|
|
37014
|
+
};
|
|
37015
|
+
|
|
37016
|
+
|
|
37017
|
+
/***/ }),
|
|
37018
|
+
|
|
37019
|
+
/***/ 3823:
|
|
37020
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37021
|
+
|
|
37022
|
+
"use strict";
|
|
37023
|
+
// ESM COMPAT FLAG
|
|
37024
|
+
__webpack_require__.r(__webpack_exports__);
|
|
37025
|
+
|
|
37026
|
+
// EXPORTS
|
|
37027
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
37028
|
+
"default": function() { return /* binding */ View; }
|
|
37029
|
+
});
|
|
37030
|
+
|
|
37031
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-image/View.vue?vue&type=template&id=5dac7dea&scoped=true
|
|
37032
|
+
var render = function render() {
|
|
37033
|
+
var _vm = this,
|
|
37034
|
+
_c = _vm._self._c;
|
|
37035
|
+
return _c('BaseComp', _vm._b({
|
|
37036
|
+
attrs: {
|
|
37037
|
+
"data": _vm.data,
|
|
37038
|
+
"nowCompId": _vm.nowCompId,
|
|
37039
|
+
"isOpcacity": _vm.isOpcacity,
|
|
37040
|
+
"lang": _vm.lang
|
|
37041
|
+
},
|
|
37042
|
+
on: {
|
|
37043
|
+
"getConfigData": _vm.getConfigData
|
|
37044
|
+
}
|
|
37045
|
+
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
37046
|
+
staticClass: "cms-image-container",
|
|
37047
|
+
class: [_vm.configData.customClass || '', {
|
|
37048
|
+
'has-link': _vm.configData.linkUrl
|
|
37049
|
+
}],
|
|
37050
|
+
style: _vm.containerStyle
|
|
37051
|
+
}, [_c('div', {
|
|
37052
|
+
staticClass: "image-wrapper",
|
|
37053
|
+
style: _vm.wrapperStyle,
|
|
37054
|
+
on: {
|
|
37055
|
+
"click": _vm.handleClick
|
|
37056
|
+
}
|
|
37057
|
+
}, [_vm.configData.imageUrl ? _c('img', {
|
|
37058
|
+
staticClass: "cms-image",
|
|
37059
|
+
style: _vm.imageStyle,
|
|
37060
|
+
attrs: {
|
|
37061
|
+
"src": _vm.configData.imageUrl,
|
|
37062
|
+
"alt": _vm.configData.altText || '图片',
|
|
37063
|
+
"title": _vm.configData.title
|
|
37064
|
+
},
|
|
37065
|
+
on: {
|
|
37066
|
+
"load": _vm.onImageLoad,
|
|
37067
|
+
"error": _vm.onImageError
|
|
37068
|
+
}
|
|
37069
|
+
}) : _c('div', {
|
|
37070
|
+
staticClass: "image-placeholder",
|
|
37071
|
+
style: _vm.placeholderStyle
|
|
37072
|
+
}, [_c('img', {
|
|
37073
|
+
staticStyle: {
|
|
37074
|
+
"width": "200px",
|
|
37075
|
+
"height": "200px"
|
|
37076
|
+
},
|
|
37077
|
+
attrs: {
|
|
37078
|
+
"src": __webpack_require__(4806),
|
|
37079
|
+
"alt": "Picture"
|
|
37080
|
+
}
|
|
37081
|
+
})])])]), _c('div', {
|
|
37082
|
+
staticClass: "f-c-c"
|
|
37083
|
+
}, [_vm._v(_vm._s(_vm.configData.remark))])]);
|
|
37084
|
+
};
|
|
37085
|
+
var staticRenderFns = [];
|
|
37086
|
+
|
|
37087
|
+
;// ./package/cms-image/View.vue?vue&type=template&id=5dac7dea&scoped=true
|
|
37088
|
+
|
|
37089
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
37090
|
+
var es_iterator_constructor = __webpack_require__(8111);
|
|
37091
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
37092
|
+
var es_iterator_for_each = __webpack_require__(7588);
|
|
37093
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
37094
|
+
var baseComp = __webpack_require__(677);
|
|
37095
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-image/View.vue?vue&type=script&lang=js
|
|
37096
|
+
|
|
37097
|
+
|
|
37098
|
+
|
|
37099
|
+
|
|
37100
|
+
|
|
37101
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
37102
|
+
name: "cms-image",
|
|
36689
37103
|
components: {
|
|
36690
37104
|
BaseComp: baseComp["default"]
|
|
36691
37105
|
},
|
|
@@ -37013,43 +37427,468 @@ module.exports = function (argument) {
|
|
|
37013
37427
|
"use strict";
|
|
37014
37428
|
|
|
37015
37429
|
|
|
37016
|
-
var reflectGetProto = __webpack_require__(2730);
|
|
37017
|
-
var originalGetProto = __webpack_require__(1810);
|
|
37018
|
-
var getDunderProto = __webpack_require__(1650);
|
|
37430
|
+
var reflectGetProto = __webpack_require__(2730);
|
|
37431
|
+
var originalGetProto = __webpack_require__(1810);
|
|
37432
|
+
var getDunderProto = __webpack_require__(1650);
|
|
37433
|
+
|
|
37434
|
+
/** @type {import('.')} */
|
|
37435
|
+
module.exports = reflectGetProto ? function getProto(O) {
|
|
37436
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
37437
|
+
return reflectGetProto(O);
|
|
37438
|
+
} : originalGetProto ? function getProto(O) {
|
|
37439
|
+
if (!O || typeof O !== 'object' && typeof O !== 'function') {
|
|
37440
|
+
throw new TypeError('getProto: not an object');
|
|
37441
|
+
}
|
|
37442
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
37443
|
+
return originalGetProto(O);
|
|
37444
|
+
} : getDunderProto ? function getProto(O) {
|
|
37445
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
37446
|
+
return getDunderProto(O);
|
|
37447
|
+
} : null;
|
|
37448
|
+
|
|
37449
|
+
/***/ }),
|
|
37450
|
+
|
|
37451
|
+
/***/ 4055:
|
|
37452
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
37453
|
+
|
|
37454
|
+
"use strict";
|
|
37455
|
+
|
|
37456
|
+
var globalThis = __webpack_require__(4576);
|
|
37457
|
+
var isObject = __webpack_require__(34);
|
|
37458
|
+
|
|
37459
|
+
var document = globalThis.document;
|
|
37460
|
+
// typeof document.createElement is 'object' in old IE
|
|
37461
|
+
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
37462
|
+
|
|
37463
|
+
module.exports = function (it) {
|
|
37464
|
+
return EXISTS ? document.createElement(it) : {};
|
|
37465
|
+
};
|
|
37466
|
+
|
|
37467
|
+
|
|
37468
|
+
/***/ }),
|
|
37469
|
+
|
|
37470
|
+
/***/ 4057:
|
|
37471
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37472
|
+
|
|
37473
|
+
"use strict";
|
|
37474
|
+
// ESM COMPAT FLAG
|
|
37475
|
+
__webpack_require__.r(__webpack_exports__);
|
|
37476
|
+
|
|
37477
|
+
// EXPORTS
|
|
37478
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
37479
|
+
"default": function() { return /* binding */ View; }
|
|
37480
|
+
});
|
|
37481
|
+
|
|
37482
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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=0914066e&scoped=true
|
|
37483
|
+
var render = function render() {
|
|
37484
|
+
var _vm = this,
|
|
37485
|
+
_c = _vm._self._c;
|
|
37486
|
+
return _c('BaseComp', _vm._b({
|
|
37487
|
+
attrs: {
|
|
37488
|
+
"data": _vm.data,
|
|
37489
|
+
"nowCompId": _vm.nowCompId,
|
|
37490
|
+
"isOpcacity": _vm.isOpcacity,
|
|
37491
|
+
"lang": _vm.lang
|
|
37492
|
+
},
|
|
37493
|
+
on: {
|
|
37494
|
+
"getConfigData": _vm.getConfigData
|
|
37495
|
+
}
|
|
37496
|
+
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
37497
|
+
staticClass: "cms-text-container",
|
|
37498
|
+
class: [`align-${_vm.configData.textAlign || 'left'}`, _vm.configData.customClass || '', {
|
|
37499
|
+
'has-link': _vm.configData.linkUrl,
|
|
37500
|
+
'cmhk-home_main': _vm.showCmhkMain,
|
|
37501
|
+
'hover-effect': _vm.configData.hoverEffect && _vm.configData.linkUrl
|
|
37502
|
+
}],
|
|
37503
|
+
style: _vm.containerStyle,
|
|
37504
|
+
attrs: {
|
|
37505
|
+
"aria-label": _vm.configData.ariaLabel,
|
|
37506
|
+
"tabindex": _vm.configData.tabIndex,
|
|
37507
|
+
"role": _vm.configData.role,
|
|
37508
|
+
"title": _vm.configData.seoTitle || _vm.configData.seoDescription
|
|
37509
|
+
},
|
|
37510
|
+
on: {
|
|
37511
|
+
"click": _vm.handleClick
|
|
37512
|
+
}
|
|
37513
|
+
}, [_c('div', {
|
|
37514
|
+
staticClass: "text-content",
|
|
37515
|
+
class: _vm.configData.textType,
|
|
37516
|
+
style: _vm.textStyle
|
|
37517
|
+
}, _vm._l(_vm.textLines, function (line, index) {
|
|
37518
|
+
return _c('p', {
|
|
37519
|
+
key: index,
|
|
37520
|
+
staticClass: "text-line",
|
|
37521
|
+
style: _vm.lineStyle
|
|
37522
|
+
}, [_vm._v(" " + _vm._s(line) + " ")]);
|
|
37523
|
+
}), 0), _vm.configData.linkUrl && _vm.configData.showLinkIcon ? _c('div', {
|
|
37524
|
+
staticClass: "link-indicator"
|
|
37525
|
+
}, [_c('i', {
|
|
37526
|
+
staticClass: "el-icon-link"
|
|
37527
|
+
})]) : _vm._e()])]);
|
|
37528
|
+
};
|
|
37529
|
+
var staticRenderFns = [];
|
|
37530
|
+
|
|
37531
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
37532
|
+
var es_iterator_constructor = __webpack_require__(8111);
|
|
37533
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
|
|
37534
|
+
var es_iterator_filter = __webpack_require__(2489);
|
|
37535
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
37536
|
+
var es_iterator_for_each = __webpack_require__(7588);
|
|
37537
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
37538
|
+
var baseComp = __webpack_require__(677);
|
|
37539
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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
|
|
37540
|
+
|
|
37541
|
+
|
|
37542
|
+
|
|
37543
|
+
|
|
37544
|
+
|
|
37545
|
+
|
|
37546
|
+
|
|
37547
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
37548
|
+
name: "cms-text",
|
|
37549
|
+
components: {
|
|
37550
|
+
BaseComp: baseComp["default"]
|
|
37551
|
+
},
|
|
37552
|
+
props: {
|
|
37553
|
+
data: {
|
|
37554
|
+
type: Object,
|
|
37555
|
+
default: () => {
|
|
37556
|
+
return {};
|
|
37557
|
+
}
|
|
37558
|
+
},
|
|
37559
|
+
nowCompId: {
|
|
37560
|
+
type: [String, Number],
|
|
37561
|
+
default: ""
|
|
37562
|
+
},
|
|
37563
|
+
isOpcacity: {
|
|
37564
|
+
type: Boolean,
|
|
37565
|
+
default: true
|
|
37566
|
+
},
|
|
37567
|
+
lang: {
|
|
37568
|
+
type: String,
|
|
37569
|
+
default: "zh-HK"
|
|
37570
|
+
},
|
|
37571
|
+
showCmhkMain: {
|
|
37572
|
+
type: Boolean,
|
|
37573
|
+
default: true
|
|
37574
|
+
}
|
|
37575
|
+
},
|
|
37576
|
+
data() {
|
|
37577
|
+
return {
|
|
37578
|
+
configData: {},
|
|
37579
|
+
// 默认配置数据
|
|
37580
|
+
defaultConfig: {
|
|
37581
|
+
// 内容编辑
|
|
37582
|
+
textContent: "请输入文本内容",
|
|
37583
|
+
enableLineBreak: true,
|
|
37584
|
+
// 排版控制
|
|
37585
|
+
textAlign: "left",
|
|
37586
|
+
// fontSize: 16,
|
|
37587
|
+
// lineHeight: 1.5,
|
|
37588
|
+
letterSpacing: 0,
|
|
37589
|
+
// 样式美化
|
|
37590
|
+
fontColor: "#333333",
|
|
37591
|
+
// fontWeight: "normal",
|
|
37592
|
+
fontStyle: "normal",
|
|
37593
|
+
textDecoration: "none",
|
|
37594
|
+
// fontFamily: "inherit",
|
|
37595
|
+
|
|
37596
|
+
// 布局设置
|
|
37597
|
+
paddingTop: 0,
|
|
37598
|
+
paddingBottom: 0,
|
|
37599
|
+
paddingLeft: 0,
|
|
37600
|
+
paddingRight: 0,
|
|
37601
|
+
marginTop: 0,
|
|
37602
|
+
marginBottom: 0,
|
|
37603
|
+
marginLeft: 0,
|
|
37604
|
+
marginRight: 0,
|
|
37605
|
+
backgroundColor: "",
|
|
37606
|
+
// 视觉效果
|
|
37607
|
+
borderWidth: 0,
|
|
37608
|
+
borderStyle: "solid",
|
|
37609
|
+
borderColor: "#dcdfe6",
|
|
37610
|
+
borderRadius: 0,
|
|
37611
|
+
boxShadow: "",
|
|
37612
|
+
// 交互功能
|
|
37613
|
+
linkUrl: "",
|
|
37614
|
+
linkTarget: "_self",
|
|
37615
|
+
showLinkIcon: false,
|
|
37616
|
+
hoverEffect: false,
|
|
37617
|
+
// 高级配置
|
|
37618
|
+
customClass: "",
|
|
37619
|
+
customStyle: "",
|
|
37620
|
+
enableAnimation: false,
|
|
37621
|
+
animationType: "fadeIn",
|
|
37622
|
+
animationDuration: 300,
|
|
37623
|
+
// 可访问性配置
|
|
37624
|
+
ariaLabel: "",
|
|
37625
|
+
tabIndex: 0,
|
|
37626
|
+
role: "",
|
|
37627
|
+
// SEO配置
|
|
37628
|
+
seoTitle: "",
|
|
37629
|
+
seoDescription: "",
|
|
37630
|
+
// 响应式配置
|
|
37631
|
+
mobileTextAlign: "",
|
|
37632
|
+
mobileFontSize: 0,
|
|
37633
|
+
tabletFontSize: 0
|
|
37634
|
+
}
|
|
37635
|
+
};
|
|
37636
|
+
},
|
|
37637
|
+
mounted() {
|
|
37638
|
+
this.initConfigData();
|
|
37639
|
+
this.setCSSVariables();
|
|
37640
|
+
},
|
|
37641
|
+
watch: {
|
|
37642
|
+
configData: {
|
|
37643
|
+
handler() {
|
|
37644
|
+
this.updateStyles();
|
|
37645
|
+
},
|
|
37646
|
+
deep: true
|
|
37647
|
+
}
|
|
37648
|
+
},
|
|
37649
|
+
computed: {
|
|
37650
|
+
// 文本行数组(支持换行)
|
|
37651
|
+
textLines() {
|
|
37652
|
+
if (!this.configData.textContent) return [];
|
|
37653
|
+
if (!this.configData.enableLineBreak) {
|
|
37654
|
+
return [this.configData.textContent];
|
|
37655
|
+
}
|
|
37656
|
+
return this.configData.textContent.split("\n").filter(line => line.trim() !== "");
|
|
37657
|
+
},
|
|
37658
|
+
// 容器样式
|
|
37659
|
+
containerStyle() {
|
|
37660
|
+
const config = {
|
|
37661
|
+
...this.defaultConfig,
|
|
37662
|
+
...this.configData
|
|
37663
|
+
};
|
|
37664
|
+
let marginSettting = `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`;
|
|
37665
|
+
if (this.showCmhkMain && !(parseInt(config.marginTop) || parseInt(config.marginRight) || parseInt(config.marginBottom) || parseInt(config.marginLeft))) {
|
|
37666
|
+
marginSettting = "0 auto";
|
|
37667
|
+
}
|
|
37668
|
+
return {
|
|
37669
|
+
padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
|
|
37670
|
+
margin: marginSettting,
|
|
37671
|
+
backgroundColor: config.backgroundColor || "transparent",
|
|
37672
|
+
border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
|
|
37673
|
+
borderRadius: `${config.borderRadius}px`,
|
|
37674
|
+
boxShadow: config.boxShadow || "none",
|
|
37675
|
+
cursor: config.linkUrl ? "pointer" : "default",
|
|
37676
|
+
transition: config.hoverEffect ? "all 0.3s ease" : "none",
|
|
37677
|
+
animation: config.enableAnimation ? this.getAnimationStyle() : "none",
|
|
37678
|
+
...this.parseCustomStyle(config.customStyle)
|
|
37679
|
+
};
|
|
37680
|
+
},
|
|
37681
|
+
// 文本样式
|
|
37682
|
+
textStyle() {
|
|
37683
|
+
const config = {
|
|
37684
|
+
...this.defaultConfig,
|
|
37685
|
+
...this.configData
|
|
37686
|
+
};
|
|
37687
|
+
return {
|
|
37688
|
+
color: config.fontColor,
|
|
37689
|
+
// fontSize: `${config.fontSize}px`,
|
|
37690
|
+
// fontWeight: config.fontWeight,
|
|
37691
|
+
fontStyle: config.fontStyle,
|
|
37692
|
+
textDecoration: config.textDecoration,
|
|
37693
|
+
// fontFamily: config.fontFamily,
|
|
37694
|
+
// lineHeight: config.lineHeight,
|
|
37695
|
+
letterSpacing: `${config.letterSpacing}px`,
|
|
37696
|
+
textAlign: config.textAlign,
|
|
37697
|
+
wordBreak: "break-word",
|
|
37698
|
+
wordWrap: "break-word",
|
|
37699
|
+
cursor: config.linkUrl ? "pointer" : "default"
|
|
37700
|
+
};
|
|
37701
|
+
},
|
|
37702
|
+
// 行样式
|
|
37703
|
+
lineStyle() {
|
|
37704
|
+
return {
|
|
37705
|
+
margin: "0",
|
|
37706
|
+
padding: "0"
|
|
37707
|
+
};
|
|
37708
|
+
}
|
|
37709
|
+
},
|
|
37710
|
+
methods: {
|
|
37711
|
+
// 初始化配置数据
|
|
37712
|
+
initConfigData() {
|
|
37713
|
+
this.configData = {
|
|
37714
|
+
...this.defaultConfig,
|
|
37715
|
+
...this.configData
|
|
37716
|
+
};
|
|
37717
|
+
},
|
|
37718
|
+
// 获取配置数据
|
|
37719
|
+
getConfigData(configData) {
|
|
37720
|
+
this.configData = {
|
|
37721
|
+
...this.defaultConfig,
|
|
37722
|
+
...configData
|
|
37723
|
+
};
|
|
37724
|
+
this.updateStyles();
|
|
37725
|
+
},
|
|
37726
|
+
// 更新样式
|
|
37727
|
+
updateStyles() {
|
|
37728
|
+
this.$nextTick(() => {
|
|
37729
|
+
this.setCSSVariables();
|
|
37730
|
+
this.$forceUpdate();
|
|
37731
|
+
});
|
|
37732
|
+
},
|
|
37733
|
+
// 设置CSS变量
|
|
37734
|
+
setCSSVariables() {
|
|
37735
|
+
if (!this.$el) return;
|
|
37736
|
+
const config = {
|
|
37737
|
+
...this.defaultConfig,
|
|
37738
|
+
...this.configData
|
|
37739
|
+
};
|
|
37740
|
+
|
|
37741
|
+
// 设置响应式字体大小
|
|
37742
|
+
if (config.mobileFontSize > 0) {
|
|
37743
|
+
this.$el.style.setProperty("--mobile-font-size", `${config.mobileFontSize}px`);
|
|
37744
|
+
}
|
|
37745
|
+
if (config.tabletFontSize > 0) {
|
|
37746
|
+
this.$el.style.setProperty("--tablet-font-size", `${config.tabletFontSize}px`);
|
|
37747
|
+
}
|
|
37748
|
+
|
|
37749
|
+
// 设置移动端文本对齐
|
|
37750
|
+
if (config.mobileTextAlign) {
|
|
37751
|
+
this.$el.style.setProperty("--mobile-text-align", config.mobileTextAlign);
|
|
37752
|
+
}
|
|
37753
|
+
},
|
|
37754
|
+
// 处理点击事件
|
|
37755
|
+
handleClick() {
|
|
37756
|
+
if (this.configData.linkUrl) {
|
|
37757
|
+
const target = this.configData.linkTarget || "_self";
|
|
37758
|
+
if (target === "_blank") {
|
|
37759
|
+
window.open(this.configData.linkUrl, "_blank");
|
|
37760
|
+
} else {
|
|
37761
|
+
window.location.href = this.configData.linkUrl;
|
|
37762
|
+
}
|
|
37763
|
+
}
|
|
37764
|
+
},
|
|
37765
|
+
// 获取动画样式
|
|
37766
|
+
getAnimationStyle() {
|
|
37767
|
+
const animationType = this.configData.animationType || this.defaultConfig.animationType;
|
|
37768
|
+
const duration = this.configData.animationDuration || this.defaultConfig.animationDuration;
|
|
37769
|
+
if (!this.configData.enableAnimation || animationType === "none") return "";
|
|
37770
|
+
return `${animationType} ${duration}ms ease-in-out`;
|
|
37771
|
+
},
|
|
37772
|
+
// 解析自定义样式
|
|
37773
|
+
parseCustomStyle(customStyle) {
|
|
37774
|
+
if (!customStyle) return {};
|
|
37775
|
+
try {
|
|
37776
|
+
// 简单的CSS样式解析
|
|
37777
|
+
const styles = {};
|
|
37778
|
+
const declarations = customStyle.split(";");
|
|
37779
|
+
declarations.forEach(declaration => {
|
|
37780
|
+
const [property, value] = declaration.split(":");
|
|
37781
|
+
if (property && value) {
|
|
37782
|
+
const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
37783
|
+
styles[camelCaseProperty] = value.trim();
|
|
37784
|
+
}
|
|
37785
|
+
});
|
|
37786
|
+
return styles;
|
|
37787
|
+
} catch (error) {
|
|
37788
|
+
console.warn("解析自定义样式失败:", error);
|
|
37789
|
+
return {};
|
|
37790
|
+
}
|
|
37791
|
+
},
|
|
37792
|
+
// 文本内容验证
|
|
37793
|
+
validateTextContent() {
|
|
37794
|
+
const content = this.configData.textContent;
|
|
37795
|
+
if (!content || content.trim() === "") {
|
|
37796
|
+
console.warn("文本内容为空");
|
|
37797
|
+
return false;
|
|
37798
|
+
}
|
|
37799
|
+
return true;
|
|
37800
|
+
},
|
|
37801
|
+
// 获取纯文本内容
|
|
37802
|
+
getPlainTextContent() {
|
|
37803
|
+
return this.configData.textContent || "";
|
|
37804
|
+
},
|
|
37805
|
+
// 获取文本长度
|
|
37806
|
+
getTextLength() {
|
|
37807
|
+
return this.getPlainTextContent().length;
|
|
37808
|
+
},
|
|
37809
|
+
// 复制文本内容到剪贴板
|
|
37810
|
+
copyTextToClipboard() {
|
|
37811
|
+
const text = this.getPlainTextContent();
|
|
37812
|
+
if (navigator.clipboard && window.isSecureContext) {
|
|
37813
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
37814
|
+
var _this$$message;
|
|
37815
|
+
(_this$$message = this.$message) === null || _this$$message === void 0 ? void 0 : _this$$message.success("文本已复制到剪贴板");
|
|
37816
|
+
}).catch(err => {
|
|
37817
|
+
console.error("复制失败:", err);
|
|
37818
|
+
});
|
|
37819
|
+
} else {
|
|
37820
|
+
// 降级方案
|
|
37821
|
+
const textArea = document.createElement("textarea");
|
|
37822
|
+
textArea.value = text;
|
|
37823
|
+
document.body.appendChild(textArea);
|
|
37824
|
+
textArea.select();
|
|
37825
|
+
try {
|
|
37826
|
+
var _this$$message2;
|
|
37827
|
+
document.execCommand("copy");
|
|
37828
|
+
(_this$$message2 = this.$message) === null || _this$$message2 === void 0 ? void 0 : _this$$message2.success("文本已复制到剪贴板");
|
|
37829
|
+
} catch (err) {
|
|
37830
|
+
console.error("复制失败:", err);
|
|
37831
|
+
}
|
|
37832
|
+
document.body.removeChild(textArea);
|
|
37833
|
+
}
|
|
37834
|
+
},
|
|
37835
|
+
// 文本搜索高亮
|
|
37836
|
+
highlightText(searchTerm) {
|
|
37837
|
+
if (!searchTerm) return;
|
|
37838
|
+
const content = this.getPlainTextContent();
|
|
37839
|
+
const regex = new RegExp(`(${searchTerm})`, "gi");
|
|
37840
|
+
const highlightedContent = content.replace(regex, "<mark>$1</mark>");
|
|
37841
|
+
|
|
37842
|
+
// 这里可以根据需要实现高亮显示逻辑
|
|
37843
|
+
console.log("高亮内容:", highlightedContent);
|
|
37844
|
+
},
|
|
37845
|
+
// 文本统计信息
|
|
37846
|
+
getTextStats() {
|
|
37847
|
+
const text = this.getPlainTextContent();
|
|
37848
|
+
const words = text.split(/\s+/).filter(word => word.length > 0);
|
|
37849
|
+
const lines = text.split("\n").length;
|
|
37850
|
+
const characters = text.length;
|
|
37851
|
+
const charactersNoSpaces = text.replace(/\s/g, "").length;
|
|
37852
|
+
return {
|
|
37853
|
+
characters,
|
|
37854
|
+
charactersNoSpaces,
|
|
37855
|
+
words: words.length,
|
|
37856
|
+
lines,
|
|
37857
|
+
paragraphs: text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length
|
|
37858
|
+
};
|
|
37859
|
+
}
|
|
37860
|
+
}
|
|
37861
|
+
});
|
|
37862
|
+
;// ./package/cms-text/View.vue?vue&type=script&lang=js
|
|
37863
|
+
/* harmony default export */ var cms_text_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
37864
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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=0914066e&prod&lang=scss&scoped=true
|
|
37865
|
+
// extracted by mini-css-extract-plugin
|
|
37866
|
+
|
|
37867
|
+
;// ./package/cms-text/View.vue?vue&type=style&index=0&id=0914066e&prod&lang=scss&scoped=true
|
|
37019
37868
|
|
|
37020
|
-
|
|
37021
|
-
|
|
37022
|
-
|
|
37023
|
-
return reflectGetProto(O);
|
|
37024
|
-
} : originalGetProto ? function getProto(O) {
|
|
37025
|
-
if (!O || typeof O !== 'object' && typeof O !== 'function') {
|
|
37026
|
-
throw new TypeError('getProto: not an object');
|
|
37027
|
-
}
|
|
37028
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
37029
|
-
return originalGetProto(O);
|
|
37030
|
-
} : getDunderProto ? function getProto(O) {
|
|
37031
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
37032
|
-
return getDunderProto(O);
|
|
37033
|
-
} : null;
|
|
37869
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
37870
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
37871
|
+
;// ./package/cms-text/View.vue
|
|
37034
37872
|
|
|
37035
|
-
/***/ }),
|
|
37036
37873
|
|
|
37037
|
-
/***/ 4055:
|
|
37038
|
-
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
37039
37874
|
|
|
37040
|
-
|
|
37875
|
+
;
|
|
37041
37876
|
|
|
37042
|
-
var globalThis = __webpack_require__(4576);
|
|
37043
|
-
var isObject = __webpack_require__(34);
|
|
37044
37877
|
|
|
37045
|
-
|
|
37046
|
-
// typeof document.createElement is 'object' in old IE
|
|
37047
|
-
var EXISTS = isObject(document) && isObject(document.createElement);
|
|
37878
|
+
/* normalize component */
|
|
37048
37879
|
|
|
37049
|
-
|
|
37050
|
-
|
|
37051
|
-
|
|
37880
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
37881
|
+
cms_text_Viewvue_type_script_lang_js,
|
|
37882
|
+
render,
|
|
37883
|
+
staticRenderFns,
|
|
37884
|
+
false,
|
|
37885
|
+
null,
|
|
37886
|
+
"0914066e",
|
|
37887
|
+
null
|
|
37888
|
+
|
|
37889
|
+
)
|
|
37052
37890
|
|
|
37891
|
+
/* harmony default export */ var View = (component.exports);
|
|
37053
37892
|
|
|
37054
37893
|
/***/ }),
|
|
37055
37894
|
|
|
@@ -37633,469 +38472,6 @@ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSc
|
|
|
37633
38472
|
|
|
37634
38473
|
/***/ }),
|
|
37635
38474
|
|
|
37636
|
-
/***/ 4306:
|
|
37637
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
37638
|
-
|
|
37639
|
-
"use strict";
|
|
37640
|
-
// ESM COMPAT FLAG
|
|
37641
|
-
__webpack_require__.r(__webpack_exports__);
|
|
37642
|
-
|
|
37643
|
-
// EXPORTS
|
|
37644
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
37645
|
-
"default": function() { return /* binding */ View; }
|
|
37646
|
-
});
|
|
37647
|
-
|
|
37648
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
37649
|
-
var es_iterator_constructor = __webpack_require__(8111);
|
|
37650
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.drop.js
|
|
37651
|
-
var es_iterator_drop = __webpack_require__(9314);
|
|
37652
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-card/View.vue?vue&type=template&id=2380364b&scoped=true
|
|
37653
|
-
|
|
37654
|
-
|
|
37655
|
-
|
|
37656
|
-
|
|
37657
|
-
var render = function render() {
|
|
37658
|
-
var _vm = this,
|
|
37659
|
-
_c = _vm._self._c;
|
|
37660
|
-
return _c('BaseComp', _vm._b({
|
|
37661
|
-
attrs: {
|
|
37662
|
-
"data": _vm.data,
|
|
37663
|
-
"nowCompId": _vm.nowCompId,
|
|
37664
|
-
"isOpcacity": _vm.isOpcacity,
|
|
37665
|
-
"isMask": false,
|
|
37666
|
-
"lang": _vm.lang,
|
|
37667
|
-
"showDel": false
|
|
37668
|
-
},
|
|
37669
|
-
on: {
|
|
37670
|
-
"getConfigData": _vm.getConfigData
|
|
37671
|
-
}
|
|
37672
|
-
}, 'BaseComp', _vm.$attrs, false), [_vm.isConfigPage ? _c('div', {
|
|
37673
|
-
staticClass: "main_drag hoverBorderClass",
|
|
37674
|
-
style: _vm.cardContainerStyle,
|
|
37675
|
-
attrs: {
|
|
37676
|
-
"id": `cardTarget${_vm.data.componentId}`
|
|
37677
|
-
},
|
|
37678
|
-
on: {
|
|
37679
|
-
"dragover": _vm.dragover,
|
|
37680
|
-
"dragend": function ($event) {
|
|
37681
|
-
_vm.showAddCom = false;
|
|
37682
|
-
},
|
|
37683
|
-
"drop": _vm.drop
|
|
37684
|
-
}
|
|
37685
|
-
}, [_c('Draggable', {
|
|
37686
|
-
staticStyle: {
|
|
37687
|
-
"position": "relative"
|
|
37688
|
-
},
|
|
37689
|
-
attrs: {
|
|
37690
|
-
"group": _vm.groupConfigForMain,
|
|
37691
|
-
"chosen-class": "chosen",
|
|
37692
|
-
"force-fallback": "true",
|
|
37693
|
-
"animation": "1000",
|
|
37694
|
-
"move": _vm.onMove
|
|
37695
|
-
},
|
|
37696
|
-
on: {
|
|
37697
|
-
"start": _vm.onStart,
|
|
37698
|
-
"end": function ($event) {
|
|
37699
|
-
_vm.showAddCom = false;
|
|
37700
|
-
}
|
|
37701
|
-
},
|
|
37702
|
-
model: {
|
|
37703
|
-
value: _vm.data.childList,
|
|
37704
|
-
callback: function ($$v) {
|
|
37705
|
-
_vm.$set(_vm.data, "childList", $$v);
|
|
37706
|
-
},
|
|
37707
|
-
expression: "data.childList"
|
|
37708
|
-
}
|
|
37709
|
-
}, [_vm._l(_vm.data.childList, function (item, index) {
|
|
37710
|
-
return _c('div', {
|
|
37711
|
-
key: item.componentId,
|
|
37712
|
-
staticStyle: {
|
|
37713
|
-
"position": "relative"
|
|
37714
|
-
}
|
|
37715
|
-
}, [_vm.showAddCom ? _c('div', {
|
|
37716
|
-
staticClass: "up_insert",
|
|
37717
|
-
attrs: {
|
|
37718
|
-
"id": `${item.componentId}-cardTargetup`
|
|
37719
|
-
}
|
|
37720
|
-
}, [_c('i', {
|
|
37721
|
-
staticClass: "icon-up",
|
|
37722
|
-
attrs: {
|
|
37723
|
-
"id": `${item.componentId}-upi`
|
|
37724
|
-
}
|
|
37725
|
-
}), _c('span', {
|
|
37726
|
-
attrs: {
|
|
37727
|
-
"id": `${item.componentId}-upspan`
|
|
37728
|
-
}
|
|
37729
|
-
}, [_vm._v("插入组件")])]) : _vm._e(), _c(item.cmsCompName, {
|
|
37730
|
-
tag: "component",
|
|
37731
|
-
style: {
|
|
37732
|
-
marginTop: _vm.showAddCom && index == 0 ? '20px' : '0px'
|
|
37733
|
-
},
|
|
37734
|
-
attrs: {
|
|
37735
|
-
"data": item,
|
|
37736
|
-
"lang": _vm.lang,
|
|
37737
|
-
"isOpcacity": _vm.isOpcacity,
|
|
37738
|
-
"nowCompId": _vm.nowCompId
|
|
37739
|
-
}
|
|
37740
|
-
})], 1);
|
|
37741
|
-
}), _vm.showAddCom ? _c('div', {
|
|
37742
|
-
staticClass: "up_insert insert_bottom",
|
|
37743
|
-
style: {
|
|
37744
|
-
bottom: _vm.data.childList.length ? '0px' : '-24px'
|
|
37745
|
-
},
|
|
37746
|
-
attrs: {
|
|
37747
|
-
"id": `-cardTargetdown`
|
|
37748
|
-
}
|
|
37749
|
-
}, [_c('i', {
|
|
37750
|
-
staticClass: "icon-up"
|
|
37751
|
-
}), _c('span', [_vm._v("插入组件")])]) : _vm._e()], 2)], 1) : _c('cms-view', _vm._b({
|
|
37752
|
-
style: _vm.cardContainerStyle,
|
|
37753
|
-
attrs: {
|
|
37754
|
-
"data": _vm.data.childList,
|
|
37755
|
-
"lang": _vm.lang,
|
|
37756
|
-
"isOpcacity": false,
|
|
37757
|
-
"showCmhkMain": false
|
|
37758
|
-
}
|
|
37759
|
-
}, 'cms-view', _vm.$attrs, false))], 1);
|
|
37760
|
-
};
|
|
37761
|
-
var staticRenderFns = [];
|
|
37762
|
-
|
|
37763
|
-
;// ./package/cms-column-card/View.vue?vue&type=template&id=2380364b&scoped=true
|
|
37764
|
-
|
|
37765
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
37766
|
-
var es_array_push = __webpack_require__(4114);
|
|
37767
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
37768
|
-
var baseComp = __webpack_require__(677);
|
|
37769
|
-
// EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
|
|
37770
|
-
var vuedraggable_umd = __webpack_require__(9014);
|
|
37771
|
-
var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
|
|
37772
|
-
// EXTERNAL MODULE: ./package/baseConfig.js
|
|
37773
|
-
var baseConfig = __webpack_require__(2128);
|
|
37774
|
-
// EXTERNAL MODULE: ./src/views/standard_page.js
|
|
37775
|
-
var standard_page = __webpack_require__(521);
|
|
37776
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-card/View.vue?vue&type=script&lang=js
|
|
37777
|
-
|
|
37778
|
-
|
|
37779
|
-
|
|
37780
|
-
|
|
37781
|
-
|
|
37782
|
-
|
|
37783
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
37784
|
-
name: "cms-column-card",
|
|
37785
|
-
components: {
|
|
37786
|
-
BaseComp: baseComp["default"],
|
|
37787
|
-
Draggable: (vuedraggable_umd_default())
|
|
37788
|
-
},
|
|
37789
|
-
props: {
|
|
37790
|
-
data: {
|
|
37791
|
-
type: Object,
|
|
37792
|
-
default: () => {
|
|
37793
|
-
return {};
|
|
37794
|
-
}
|
|
37795
|
-
},
|
|
37796
|
-
nowCompId: {
|
|
37797
|
-
type: [String, Number],
|
|
37798
|
-
default: ""
|
|
37799
|
-
},
|
|
37800
|
-
isOpcacity: {
|
|
37801
|
-
type: Boolean,
|
|
37802
|
-
default: true
|
|
37803
|
-
},
|
|
37804
|
-
lang: {
|
|
37805
|
-
type: String,
|
|
37806
|
-
default: "zh-HK"
|
|
37807
|
-
},
|
|
37808
|
-
isMobile: {
|
|
37809
|
-
type: Boolean,
|
|
37810
|
-
default: false
|
|
37811
|
-
},
|
|
37812
|
-
mobileLayout: {
|
|
37813
|
-
type: String,
|
|
37814
|
-
default: ""
|
|
37815
|
-
}
|
|
37816
|
-
},
|
|
37817
|
-
data() {
|
|
37818
|
-
return {
|
|
37819
|
-
configData: {},
|
|
37820
|
-
messFold: true,
|
|
37821
|
-
showAddCom: false,
|
|
37822
|
-
temporaryList: []
|
|
37823
|
-
};
|
|
37824
|
-
},
|
|
37825
|
-
computed: {
|
|
37826
|
-
isConfigPage() {
|
|
37827
|
-
return this.$EventBus && this.isOpcacity;
|
|
37828
|
-
},
|
|
37829
|
-
groupConfigForMain() {
|
|
37830
|
-
return {
|
|
37831
|
-
name: "task",
|
|
37832
|
-
pull: true,
|
|
37833
|
-
// A列表的元素可以被拖出
|
|
37834
|
-
put: (to, from, dragEl) => {
|
|
37835
|
-
console.log(from.el.classList);
|
|
37836
|
-
if (from.el.classList.contains("main_drag")) {
|
|
37837
|
-
const dataId = this.findFirstComponentKey(dragEl);
|
|
37838
|
-
const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column"];
|
|
37839
|
-
console.log("allowedComponents", dataId);
|
|
37840
|
-
if (dataId === "cms-column") {
|
|
37841
|
-
if (!this.checkColumnNestingLevel()) {
|
|
37842
|
-
console.log("cms-column 嵌套层级超出限制");
|
|
37843
|
-
return false;
|
|
37844
|
-
}
|
|
37845
|
-
}
|
|
37846
|
-
return allowedComponents.includes(dataId);
|
|
37847
|
-
}
|
|
37848
|
-
return true;
|
|
37849
|
-
}
|
|
37850
|
-
};
|
|
37851
|
-
},
|
|
37852
|
-
// 卡片容器样式
|
|
37853
|
-
cardContainerStyle() {
|
|
37854
|
-
return {
|
|
37855
|
-
backgroundImage: this.configData.backgroundImage ? `url('${this.configData.backgroundImage}')` : "none",
|
|
37856
|
-
backgroundSize: "cover",
|
|
37857
|
-
backgroundRepeat: "no-repeat",
|
|
37858
|
-
backgroundPosition: "center center",
|
|
37859
|
-
height: this.getContainerHeight(),
|
|
37860
|
-
border: this.getContainerBorder(),
|
|
37861
|
-
borderRadius: this.getContainerBorderRadius(),
|
|
37862
|
-
backgroundColor: this.configData.backgroundColor || "transparent",
|
|
37863
|
-
boxShadow: this.configData.boxShadow || "none"
|
|
37864
|
-
};
|
|
37865
|
-
}
|
|
37866
|
-
},
|
|
37867
|
-
mounted() {
|
|
37868
|
-
if (this.$EventBus) {
|
|
37869
|
-
this.$EventBus.$on("handleDragEnd", () => {
|
|
37870
|
-
this.showAddCom = false;
|
|
37871
|
-
});
|
|
37872
|
-
}
|
|
37873
|
-
},
|
|
37874
|
-
watch: {},
|
|
37875
|
-
methods: {
|
|
37876
|
-
findFirstComponentKey(root) {
|
|
37877
|
-
var _root$querySelector;
|
|
37878
|
-
if (!root) return null;
|
|
37879
|
-
|
|
37880
|
-
// 若起点自身就有
|
|
37881
|
-
if (root.nodeType === 1 && root.hasAttribute("component-key")) {
|
|
37882
|
-
return root.getAttribute("component-key");
|
|
37883
|
-
}
|
|
37884
|
-
|
|
37885
|
-
// 向下查找第一个匹配的后代
|
|
37886
|
-
const el = (_root$querySelector = root.querySelector) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.call(root, "[component-key]");
|
|
37887
|
-
return el ? el.getAttribute("component-key") : null;
|
|
37888
|
-
},
|
|
37889
|
-
// 获取容器高度
|
|
37890
|
-
getContainerHeight() {
|
|
37891
|
-
if (this.configData.heightType === "fixed") {
|
|
37892
|
-
return `${this.configData.fixedHeight}px`;
|
|
37893
|
-
}
|
|
37894
|
-
return this.isMobile && this.mobileLayout == "vertical" ? "auto" : "100%";
|
|
37895
|
-
},
|
|
37896
|
-
// 获取容器边框
|
|
37897
|
-
getContainerBorder() {
|
|
37898
|
-
if (this.configData.borderWidth) {
|
|
37899
|
-
return `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}`;
|
|
37900
|
-
}
|
|
37901
|
-
return "none";
|
|
37902
|
-
},
|
|
37903
|
-
// 获取容器圆角
|
|
37904
|
-
getContainerBorderRadius() {
|
|
37905
|
-
if (this.configData.borderRadius) {
|
|
37906
|
-
return `${this.configData.borderRadius}px`;
|
|
37907
|
-
}
|
|
37908
|
-
return "0";
|
|
37909
|
-
},
|
|
37910
|
-
getConfigData(configData) {
|
|
37911
|
-
this.configData = configData;
|
|
37912
|
-
},
|
|
37913
|
-
foldMessText() {
|
|
37914
|
-
this.messFold = !this.messFold;
|
|
37915
|
-
},
|
|
37916
|
-
decodeJumpUrl(url) {
|
|
37917
|
-
if (!url) return;
|
|
37918
|
-
top.location.href = url;
|
|
37919
|
-
},
|
|
37920
|
-
onStart(evt) {
|
|
37921
|
-
console.log("drag start in column-card", evt);
|
|
37922
|
-
this.showAddCom = true;
|
|
37923
|
-
},
|
|
37924
|
-
// 限制拖拽的组件类型
|
|
37925
|
-
onMove(evt) {
|
|
37926
|
-
const {
|
|
37927
|
-
draggedContext
|
|
37928
|
-
} = evt;
|
|
37929
|
-
|
|
37930
|
-
// 允许的组件类型
|
|
37931
|
-
const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
|
|
37932
|
-
];
|
|
37933
|
-
|
|
37934
|
-
// 如果是从外部拖入的组件
|
|
37935
|
-
if (draggedContext && draggedContext.element) {
|
|
37936
|
-
const componentType = draggedContext.element.cmsCompName;
|
|
37937
|
-
if (componentType && !allowedComponents.includes(componentType)) {
|
|
37938
|
-
console.log("draggedContext.element", draggedContext.element);
|
|
37939
|
-
console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
|
|
37940
|
-
return false;
|
|
37941
|
-
}
|
|
37942
|
-
|
|
37943
|
-
// 特殊处理 cms-column:检查嵌套层级
|
|
37944
|
-
if (componentType === "cms-column") {
|
|
37945
|
-
if (!this.checkColumnNestingLevel()) {
|
|
37946
|
-
console.log("cms-column 嵌套层级超出限制");
|
|
37947
|
-
return false;
|
|
37948
|
-
}
|
|
37949
|
-
}
|
|
37950
|
-
}
|
|
37951
|
-
return true;
|
|
37952
|
-
},
|
|
37953
|
-
// 检查 cms-column 嵌套层级
|
|
37954
|
-
checkColumnNestingLevel() {
|
|
37955
|
-
// 检查当前 column-card 是否已经在 cms-column 内部
|
|
37956
|
-
let parent = this.$parent;
|
|
37957
|
-
let columnDepth = 0;
|
|
37958
|
-
while (parent) {
|
|
37959
|
-
// 检查父组件是否是 cms-column 或包含 cms-column
|
|
37960
|
-
if (parent.$options.name === "cms-column" || parent.$data && parent.$data.data && parent.$data.data.cmsCompName === "cms-column") {
|
|
37961
|
-
columnDepth++;
|
|
37962
|
-
}
|
|
37963
|
-
|
|
37964
|
-
// 如果已经有一层 cms-column,则不允许再嵌套
|
|
37965
|
-
if (columnDepth >= 2) {
|
|
37966
|
-
console.log(`检测到 cms-column 嵌套层级: ${columnDepth}, 超出限制`);
|
|
37967
|
-
return false;
|
|
37968
|
-
}
|
|
37969
|
-
parent = parent.$parent;
|
|
37970
|
-
}
|
|
37971
|
-
console.log(`cms-column 嵌套层级检查通过: ${columnDepth}`);
|
|
37972
|
-
return true;
|
|
37973
|
-
},
|
|
37974
|
-
// 处理拖拽悬停
|
|
37975
|
-
dragover(e) {
|
|
37976
|
-
e.preventDefault();
|
|
37977
|
-
this.showAddCom = true;
|
|
37978
|
-
},
|
|
37979
|
-
// 处理拖拽放置
|
|
37980
|
-
drop(e) {
|
|
37981
|
-
e.preventDefault();
|
|
37982
|
-
const componentKey = e.dataTransfer.getData("componentKey");
|
|
37983
|
-
let temporaryId = "";
|
|
37984
|
-
this.temporaryList = e.dataTransfer.getData("temporaryList") ? JSON.parse(e.dataTransfer.getData("temporaryList")) : [];
|
|
37985
|
-
console.log("cms-colum-card-drop", componentKey, this.temporaryList);
|
|
37986
|
-
if (!componentKey) return;
|
|
37987
|
-
const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
|
|
37988
|
-
const isTemporary = isTemporaryItem === "true";
|
|
37989
|
-
if (isTemporary) {
|
|
37990
|
-
temporaryId = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey).cmsCompName;
|
|
37991
|
-
}
|
|
37992
|
-
const componentType = isTemporary ? temporaryId : componentKey;
|
|
37993
|
-
// 允许的组件类型
|
|
37994
|
-
const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
|
|
37995
|
-
];
|
|
37996
|
-
|
|
37997
|
-
// 检查组件类型是否允许
|
|
37998
|
-
if (!allowedComponents.includes(componentType)) {
|
|
37999
|
-
console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
|
|
38000
|
-
this.$message && this.$message.warning(`该组件类型不支持拖入卡片容器`);
|
|
38001
|
-
this.showAddCom = false;
|
|
38002
|
-
return;
|
|
38003
|
-
}
|
|
38004
|
-
|
|
38005
|
-
// 特殊处理 cms-column:检查嵌套层级
|
|
38006
|
-
if (componentType === "cms-column") {
|
|
38007
|
-
if (!this.checkColumnNestingLevel()) {
|
|
38008
|
-
console.log("cms-column 嵌套层级超出限制");
|
|
38009
|
-
this.$message && this.$message.warning(`cms-column 只能嵌套一层`);
|
|
38010
|
-
this.showAddCom = false;
|
|
38011
|
-
return;
|
|
38012
|
-
}
|
|
38013
|
-
}
|
|
38014
|
-
this.addOneComp(e, componentKey);
|
|
38015
|
-
},
|
|
38016
|
-
// 添加组件到卡片容器
|
|
38017
|
-
addOneComp(e, componentKey) {
|
|
38018
|
-
this.showAddCom = false;
|
|
38019
|
-
console.log("drop to column-card", componentKey);
|
|
38020
|
-
|
|
38021
|
-
// 动态导入组件配置
|
|
38022
|
-
let initCompData;
|
|
38023
|
-
try {
|
|
38024
|
-
const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
|
|
38025
|
-
const isTemporary = isTemporaryItem === "true";
|
|
38026
|
-
if (isTemporary) {
|
|
38027
|
-
initCompData = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey);
|
|
38028
|
-
} else {
|
|
38029
|
-
initCompData = __webpack_require__(1640)(`./${componentKey}`).default.settings(componentKey);
|
|
38030
|
-
}
|
|
38031
|
-
if (!isTemporary) {
|
|
38032
|
-
initCompData = {
|
|
38033
|
-
...initCompData,
|
|
38034
|
-
styleConfig: {
|
|
38035
|
-
pc: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(16, 16, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")],
|
|
38036
|
-
mb: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(12, 12, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")]
|
|
38037
|
-
}
|
|
38038
|
-
};
|
|
38039
|
-
}
|
|
38040
|
-
} catch (error) {
|
|
38041
|
-
console.error(`无法加载组件 ${componentKey}:`, error);
|
|
38042
|
-
this.$message && this.$message.error(`组件加载失败`);
|
|
38043
|
-
return;
|
|
38044
|
-
}
|
|
38045
|
-
const toElementId = e.toElement.id;
|
|
38046
|
-
if (toElementId === `cardTarget${this.data.componentId}` || toElementId.includes("cardTargetdown")) {
|
|
38047
|
-
// 添加到卡片容器末尾
|
|
38048
|
-
this.data.childList.push(initCompData);
|
|
38049
|
-
} else if (toElementId.includes("cardTargetup")) {
|
|
38050
|
-
// 插入到指定位置
|
|
38051
|
-
const underComponentId = toElementId.split("-cardTargetup")[0];
|
|
38052
|
-
const index = this.data.childList.findIndex(item => item.componentId === underComponentId);
|
|
38053
|
-
if (index !== -1) {
|
|
38054
|
-
this.data.childList.splice(index, 0, initCompData);
|
|
38055
|
-
}
|
|
38056
|
-
}
|
|
38057
|
-
|
|
38058
|
-
// 触发数据更新
|
|
38059
|
-
this.$emit("update:data", this.data);
|
|
38060
|
-
if (componentKey === "cms-column") {
|
|
38061
|
-
this.$EventBus.$emit("handleNowComp", initCompData);
|
|
38062
|
-
}
|
|
38063
|
-
}
|
|
38064
|
-
}
|
|
38065
|
-
});
|
|
38066
|
-
;// ./package/cms-column-card/View.vue?vue&type=script&lang=js
|
|
38067
|
-
/* harmony default export */ var cms_column_card_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
38068
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-card/View.vue?vue&type=style&index=0&id=2380364b&prod&lang=scss&scoped=true
|
|
38069
|
-
// extracted by mini-css-extract-plugin
|
|
38070
|
-
|
|
38071
|
-
;// ./package/cms-column-card/View.vue?vue&type=style&index=0&id=2380364b&prod&lang=scss&scoped=true
|
|
38072
|
-
|
|
38073
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
38074
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
38075
|
-
;// ./package/cms-column-card/View.vue
|
|
38076
|
-
|
|
38077
|
-
|
|
38078
|
-
|
|
38079
|
-
;
|
|
38080
|
-
|
|
38081
|
-
|
|
38082
|
-
/* normalize component */
|
|
38083
|
-
|
|
38084
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
38085
|
-
cms_column_card_Viewvue_type_script_lang_js,
|
|
38086
|
-
render,
|
|
38087
|
-
staticRenderFns,
|
|
38088
|
-
false,
|
|
38089
|
-
null,
|
|
38090
|
-
"2380364b",
|
|
38091
|
-
null
|
|
38092
|
-
|
|
38093
|
-
)
|
|
38094
|
-
|
|
38095
|
-
/* harmony default export */ var View = (component.exports);
|
|
38096
|
-
|
|
38097
|
-
/***/ }),
|
|
38098
|
-
|
|
38099
38475
|
/***/ 4326:
|
|
38100
38476
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
38101
38477
|
|
|
@@ -39531,6 +39907,470 @@ var component = (0,componentNormalizer/* default */.A)(
|
|
|
39531
39907
|
|
|
39532
39908
|
/***/ }),
|
|
39533
39909
|
|
|
39910
|
+
/***/ 4552:
|
|
39911
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39912
|
+
|
|
39913
|
+
"use strict";
|
|
39914
|
+
// ESM COMPAT FLAG
|
|
39915
|
+
__webpack_require__.r(__webpack_exports__);
|
|
39916
|
+
|
|
39917
|
+
// EXPORTS
|
|
39918
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
39919
|
+
"default": function() { return /* binding */ View; }
|
|
39920
|
+
});
|
|
39921
|
+
|
|
39922
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
39923
|
+
var es_iterator_constructor = __webpack_require__(8111);
|
|
39924
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.drop.js
|
|
39925
|
+
var es_iterator_drop = __webpack_require__(9314);
|
|
39926
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-card/View.vue?vue&type=template&id=155a8242&scoped=true
|
|
39927
|
+
|
|
39928
|
+
|
|
39929
|
+
|
|
39930
|
+
|
|
39931
|
+
var render = function render() {
|
|
39932
|
+
var _vm = this,
|
|
39933
|
+
_c = _vm._self._c;
|
|
39934
|
+
return _c('BaseComp', _vm._b({
|
|
39935
|
+
attrs: {
|
|
39936
|
+
"data": _vm.data,
|
|
39937
|
+
"nowCompId": _vm.nowCompId,
|
|
39938
|
+
"isOpcacity": _vm.isOpcacity,
|
|
39939
|
+
"isMask": false,
|
|
39940
|
+
"lang": _vm.lang,
|
|
39941
|
+
"showDel": false
|
|
39942
|
+
},
|
|
39943
|
+
on: {
|
|
39944
|
+
"getConfigData": _vm.getConfigData
|
|
39945
|
+
}
|
|
39946
|
+
}, 'BaseComp', _vm.$attrs, false), [_vm.isConfigPage ? _c('div', {
|
|
39947
|
+
staticClass: "main_drag hoverBorderClass",
|
|
39948
|
+
style: _vm.cardContainerStyle,
|
|
39949
|
+
attrs: {
|
|
39950
|
+
"id": `cardTarget${_vm.data.componentId}`
|
|
39951
|
+
},
|
|
39952
|
+
on: {
|
|
39953
|
+
"dragover": _vm.dragover,
|
|
39954
|
+
"dragend": function ($event) {
|
|
39955
|
+
_vm.showAddCom = false;
|
|
39956
|
+
},
|
|
39957
|
+
"drop": _vm.drop
|
|
39958
|
+
}
|
|
39959
|
+
}, [_c('Draggable', {
|
|
39960
|
+
staticStyle: {
|
|
39961
|
+
"position": "relative"
|
|
39962
|
+
},
|
|
39963
|
+
attrs: {
|
|
39964
|
+
"group": _vm.groupConfigForMain,
|
|
39965
|
+
"chosen-class": "chosen",
|
|
39966
|
+
"force-fallback": "true",
|
|
39967
|
+
"animation": "1000",
|
|
39968
|
+
"move": _vm.onMove
|
|
39969
|
+
},
|
|
39970
|
+
on: {
|
|
39971
|
+
"start": _vm.onStart,
|
|
39972
|
+
"end": function ($event) {
|
|
39973
|
+
_vm.showAddCom = false;
|
|
39974
|
+
}
|
|
39975
|
+
},
|
|
39976
|
+
model: {
|
|
39977
|
+
value: _vm.data.childList,
|
|
39978
|
+
callback: function ($$v) {
|
|
39979
|
+
_vm.$set(_vm.data, "childList", $$v);
|
|
39980
|
+
},
|
|
39981
|
+
expression: "data.childList"
|
|
39982
|
+
}
|
|
39983
|
+
}, [_vm._l(_vm.data.childList, function (item, index) {
|
|
39984
|
+
return _c('div', {
|
|
39985
|
+
key: item.componentId,
|
|
39986
|
+
staticStyle: {
|
|
39987
|
+
"position": "relative"
|
|
39988
|
+
}
|
|
39989
|
+
}, [_vm.showAddCom ? _c('div', {
|
|
39990
|
+
staticClass: "up_insert",
|
|
39991
|
+
attrs: {
|
|
39992
|
+
"id": `${item.componentId}-cardTargetup`
|
|
39993
|
+
}
|
|
39994
|
+
}, [_c('i', {
|
|
39995
|
+
staticClass: "icon-up",
|
|
39996
|
+
attrs: {
|
|
39997
|
+
"id": `${item.componentId}-upi`
|
|
39998
|
+
}
|
|
39999
|
+
}), _c('span', {
|
|
40000
|
+
attrs: {
|
|
40001
|
+
"id": `${item.componentId}-upspan`
|
|
40002
|
+
}
|
|
40003
|
+
}, [_vm._v("插入组件")])]) : _vm._e(), _c(item.cmsCompName, {
|
|
40004
|
+
tag: "component",
|
|
40005
|
+
style: {
|
|
40006
|
+
marginTop: _vm.showAddCom && index == 0 ? '20px' : '0px'
|
|
40007
|
+
},
|
|
40008
|
+
attrs: {
|
|
40009
|
+
"data": item,
|
|
40010
|
+
"lang": _vm.lang,
|
|
40011
|
+
"isOpcacity": _vm.isOpcacity,
|
|
40012
|
+
"nowCompId": _vm.nowCompId,
|
|
40013
|
+
"showCmhkMain": false
|
|
40014
|
+
}
|
|
40015
|
+
})], 1);
|
|
40016
|
+
}), _vm.showAddCom ? _c('div', {
|
|
40017
|
+
staticClass: "up_insert insert_bottom",
|
|
40018
|
+
style: {
|
|
40019
|
+
bottom: _vm.data.childList.length ? '0px' : '-24px'
|
|
40020
|
+
},
|
|
40021
|
+
attrs: {
|
|
40022
|
+
"id": `-cardTargetdown`
|
|
40023
|
+
}
|
|
40024
|
+
}, [_c('i', {
|
|
40025
|
+
staticClass: "icon-up"
|
|
40026
|
+
}), _c('span', [_vm._v("插入组件")])]) : _vm._e()], 2)], 1) : _c('cms-view', _vm._b({
|
|
40027
|
+
style: _vm.cardContainerStyle,
|
|
40028
|
+
attrs: {
|
|
40029
|
+
"data": _vm.data.childList,
|
|
40030
|
+
"lang": _vm.lang,
|
|
40031
|
+
"isOpcacity": false,
|
|
40032
|
+
"showCmhkMain": false
|
|
40033
|
+
}
|
|
40034
|
+
}, 'cms-view', _vm.$attrs, false))], 1);
|
|
40035
|
+
};
|
|
40036
|
+
var staticRenderFns = [];
|
|
40037
|
+
|
|
40038
|
+
;// ./package/cms-column-card/View.vue?vue&type=template&id=155a8242&scoped=true
|
|
40039
|
+
|
|
40040
|
+
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
|
|
40041
|
+
var es_array_push = __webpack_require__(4114);
|
|
40042
|
+
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
40043
|
+
var baseComp = __webpack_require__(677);
|
|
40044
|
+
// EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
|
|
40045
|
+
var vuedraggable_umd = __webpack_require__(9014);
|
|
40046
|
+
var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
|
|
40047
|
+
// EXTERNAL MODULE: ./package/baseConfig.js
|
|
40048
|
+
var baseConfig = __webpack_require__(2128);
|
|
40049
|
+
// EXTERNAL MODULE: ./src/views/standard_page.js
|
|
40050
|
+
var standard_page = __webpack_require__(521);
|
|
40051
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-card/View.vue?vue&type=script&lang=js
|
|
40052
|
+
|
|
40053
|
+
|
|
40054
|
+
|
|
40055
|
+
|
|
40056
|
+
|
|
40057
|
+
|
|
40058
|
+
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
40059
|
+
name: "cms-column-card",
|
|
40060
|
+
components: {
|
|
40061
|
+
BaseComp: baseComp["default"],
|
|
40062
|
+
Draggable: (vuedraggable_umd_default())
|
|
40063
|
+
},
|
|
40064
|
+
props: {
|
|
40065
|
+
data: {
|
|
40066
|
+
type: Object,
|
|
40067
|
+
default: () => {
|
|
40068
|
+
return {};
|
|
40069
|
+
}
|
|
40070
|
+
},
|
|
40071
|
+
nowCompId: {
|
|
40072
|
+
type: [String, Number],
|
|
40073
|
+
default: ""
|
|
40074
|
+
},
|
|
40075
|
+
isOpcacity: {
|
|
40076
|
+
type: Boolean,
|
|
40077
|
+
default: true
|
|
40078
|
+
},
|
|
40079
|
+
lang: {
|
|
40080
|
+
type: String,
|
|
40081
|
+
default: "zh-HK"
|
|
40082
|
+
},
|
|
40083
|
+
isMobile: {
|
|
40084
|
+
type: Boolean,
|
|
40085
|
+
default: false
|
|
40086
|
+
},
|
|
40087
|
+
mobileLayout: {
|
|
40088
|
+
type: String,
|
|
40089
|
+
default: ""
|
|
40090
|
+
}
|
|
40091
|
+
},
|
|
40092
|
+
data() {
|
|
40093
|
+
return {
|
|
40094
|
+
configData: {},
|
|
40095
|
+
messFold: true,
|
|
40096
|
+
showAddCom: false,
|
|
40097
|
+
temporaryList: []
|
|
40098
|
+
};
|
|
40099
|
+
},
|
|
40100
|
+
computed: {
|
|
40101
|
+
isConfigPage() {
|
|
40102
|
+
return this.$EventBus && this.isOpcacity;
|
|
40103
|
+
},
|
|
40104
|
+
groupConfigForMain() {
|
|
40105
|
+
return {
|
|
40106
|
+
name: "task",
|
|
40107
|
+
pull: true,
|
|
40108
|
+
// A列表的元素可以被拖出
|
|
40109
|
+
put: (to, from, dragEl) => {
|
|
40110
|
+
console.log(from.el.classList);
|
|
40111
|
+
if (from.el.classList.contains("main_drag")) {
|
|
40112
|
+
const dataId = this.findFirstComponentKey(dragEl);
|
|
40113
|
+
const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column"];
|
|
40114
|
+
console.log("allowedComponents", dataId);
|
|
40115
|
+
if (dataId === "cms-column") {
|
|
40116
|
+
if (!this.checkColumnNestingLevel()) {
|
|
40117
|
+
console.log("cms-column 嵌套层级超出限制");
|
|
40118
|
+
return false;
|
|
40119
|
+
}
|
|
40120
|
+
}
|
|
40121
|
+
return allowedComponents.includes(dataId);
|
|
40122
|
+
}
|
|
40123
|
+
return true;
|
|
40124
|
+
}
|
|
40125
|
+
};
|
|
40126
|
+
},
|
|
40127
|
+
// 卡片容器样式
|
|
40128
|
+
cardContainerStyle() {
|
|
40129
|
+
return {
|
|
40130
|
+
backgroundImage: this.configData.backgroundImage ? `url('${this.configData.backgroundImage}')` : "none",
|
|
40131
|
+
backgroundSize: "cover",
|
|
40132
|
+
backgroundRepeat: "no-repeat",
|
|
40133
|
+
backgroundPosition: "center center",
|
|
40134
|
+
height: this.getContainerHeight(),
|
|
40135
|
+
border: this.getContainerBorder(),
|
|
40136
|
+
borderRadius: this.getContainerBorderRadius(),
|
|
40137
|
+
backgroundColor: this.configData.backgroundColor || "transparent",
|
|
40138
|
+
boxShadow: this.configData.boxShadow || "none"
|
|
40139
|
+
};
|
|
40140
|
+
}
|
|
40141
|
+
},
|
|
40142
|
+
mounted() {
|
|
40143
|
+
if (this.$EventBus) {
|
|
40144
|
+
this.$EventBus.$on("handleDragEnd", () => {
|
|
40145
|
+
this.showAddCom = false;
|
|
40146
|
+
});
|
|
40147
|
+
}
|
|
40148
|
+
},
|
|
40149
|
+
watch: {},
|
|
40150
|
+
methods: {
|
|
40151
|
+
findFirstComponentKey(root) {
|
|
40152
|
+
var _root$querySelector;
|
|
40153
|
+
if (!root) return null;
|
|
40154
|
+
|
|
40155
|
+
// 若起点自身就有
|
|
40156
|
+
if (root.nodeType === 1 && root.hasAttribute("component-key")) {
|
|
40157
|
+
return root.getAttribute("component-key");
|
|
40158
|
+
}
|
|
40159
|
+
|
|
40160
|
+
// 向下查找第一个匹配的后代
|
|
40161
|
+
const el = (_root$querySelector = root.querySelector) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.call(root, "[component-key]");
|
|
40162
|
+
return el ? el.getAttribute("component-key") : null;
|
|
40163
|
+
},
|
|
40164
|
+
// 获取容器高度
|
|
40165
|
+
getContainerHeight() {
|
|
40166
|
+
if (this.configData.heightType === "fixed") {
|
|
40167
|
+
return `${this.configData.fixedHeight}px`;
|
|
40168
|
+
}
|
|
40169
|
+
return this.isMobile && this.mobileLayout == "vertical" ? "auto" : "100%";
|
|
40170
|
+
},
|
|
40171
|
+
// 获取容器边框
|
|
40172
|
+
getContainerBorder() {
|
|
40173
|
+
if (this.configData.borderWidth) {
|
|
40174
|
+
return `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}`;
|
|
40175
|
+
}
|
|
40176
|
+
return "none";
|
|
40177
|
+
},
|
|
40178
|
+
// 获取容器圆角
|
|
40179
|
+
getContainerBorderRadius() {
|
|
40180
|
+
if (this.configData.borderRadius) {
|
|
40181
|
+
return `${this.configData.borderRadius}px`;
|
|
40182
|
+
}
|
|
40183
|
+
return "0";
|
|
40184
|
+
},
|
|
40185
|
+
getConfigData(configData) {
|
|
40186
|
+
this.configData = configData;
|
|
40187
|
+
},
|
|
40188
|
+
foldMessText() {
|
|
40189
|
+
this.messFold = !this.messFold;
|
|
40190
|
+
},
|
|
40191
|
+
decodeJumpUrl(url) {
|
|
40192
|
+
if (!url) return;
|
|
40193
|
+
top.location.href = url;
|
|
40194
|
+
},
|
|
40195
|
+
onStart(evt) {
|
|
40196
|
+
console.log("drag start in column-card", evt);
|
|
40197
|
+
this.showAddCom = true;
|
|
40198
|
+
},
|
|
40199
|
+
// 限制拖拽的组件类型
|
|
40200
|
+
onMove(evt) {
|
|
40201
|
+
const {
|
|
40202
|
+
draggedContext
|
|
40203
|
+
} = evt;
|
|
40204
|
+
|
|
40205
|
+
// 允许的组件类型
|
|
40206
|
+
const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
|
|
40207
|
+
];
|
|
40208
|
+
|
|
40209
|
+
// 如果是从外部拖入的组件
|
|
40210
|
+
if (draggedContext && draggedContext.element) {
|
|
40211
|
+
const componentType = draggedContext.element.cmsCompName;
|
|
40212
|
+
if (componentType && !allowedComponents.includes(componentType)) {
|
|
40213
|
+
console.log("draggedContext.element", draggedContext.element);
|
|
40214
|
+
console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
|
|
40215
|
+
return false;
|
|
40216
|
+
}
|
|
40217
|
+
|
|
40218
|
+
// 特殊处理 cms-column:检查嵌套层级
|
|
40219
|
+
if (componentType === "cms-column") {
|
|
40220
|
+
if (!this.checkColumnNestingLevel()) {
|
|
40221
|
+
console.log("cms-column 嵌套层级超出限制");
|
|
40222
|
+
return false;
|
|
40223
|
+
}
|
|
40224
|
+
}
|
|
40225
|
+
}
|
|
40226
|
+
return true;
|
|
40227
|
+
},
|
|
40228
|
+
// 检查 cms-column 嵌套层级
|
|
40229
|
+
checkColumnNestingLevel() {
|
|
40230
|
+
// 检查当前 column-card 是否已经在 cms-column 内部
|
|
40231
|
+
let parent = this.$parent;
|
|
40232
|
+
let columnDepth = 0;
|
|
40233
|
+
while (parent) {
|
|
40234
|
+
// 检查父组件是否是 cms-column 或包含 cms-column
|
|
40235
|
+
if (parent.$options.name === "cms-column" || parent.$data && parent.$data.data && parent.$data.data.cmsCompName === "cms-column") {
|
|
40236
|
+
columnDepth++;
|
|
40237
|
+
}
|
|
40238
|
+
|
|
40239
|
+
// 如果已经有一层 cms-column,则不允许再嵌套
|
|
40240
|
+
if (columnDepth >= 2) {
|
|
40241
|
+
console.log(`检测到 cms-column 嵌套层级: ${columnDepth}, 超出限制`);
|
|
40242
|
+
return false;
|
|
40243
|
+
}
|
|
40244
|
+
parent = parent.$parent;
|
|
40245
|
+
}
|
|
40246
|
+
console.log(`cms-column 嵌套层级检查通过: ${columnDepth}`);
|
|
40247
|
+
return true;
|
|
40248
|
+
},
|
|
40249
|
+
// 处理拖拽悬停
|
|
40250
|
+
dragover(e) {
|
|
40251
|
+
e.preventDefault();
|
|
40252
|
+
this.showAddCom = true;
|
|
40253
|
+
},
|
|
40254
|
+
// 处理拖拽放置
|
|
40255
|
+
drop(e) {
|
|
40256
|
+
e.preventDefault();
|
|
40257
|
+
const componentKey = e.dataTransfer.getData("componentKey");
|
|
40258
|
+
let temporaryId = "";
|
|
40259
|
+
this.temporaryList = e.dataTransfer.getData("temporaryList") ? JSON.parse(e.dataTransfer.getData("temporaryList")) : [];
|
|
40260
|
+
console.log("cms-colum-card-drop", componentKey, this.temporaryList);
|
|
40261
|
+
if (!componentKey) return;
|
|
40262
|
+
const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
|
|
40263
|
+
const isTemporary = isTemporaryItem === "true";
|
|
40264
|
+
if (isTemporary) {
|
|
40265
|
+
temporaryId = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey).cmsCompName;
|
|
40266
|
+
}
|
|
40267
|
+
const componentType = isTemporary ? temporaryId : componentKey;
|
|
40268
|
+
// 允许的组件类型
|
|
40269
|
+
const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
|
|
40270
|
+
];
|
|
40271
|
+
|
|
40272
|
+
// 检查组件类型是否允许
|
|
40273
|
+
if (!allowedComponents.includes(componentType)) {
|
|
40274
|
+
console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
|
|
40275
|
+
this.$message && this.$message.warning(`该组件类型不支持拖入卡片容器`);
|
|
40276
|
+
this.showAddCom = false;
|
|
40277
|
+
return;
|
|
40278
|
+
}
|
|
40279
|
+
|
|
40280
|
+
// 特殊处理 cms-column:检查嵌套层级
|
|
40281
|
+
if (componentType === "cms-column") {
|
|
40282
|
+
if (!this.checkColumnNestingLevel()) {
|
|
40283
|
+
console.log("cms-column 嵌套层级超出限制");
|
|
40284
|
+
this.$message && this.$message.warning(`cms-column 只能嵌套一层`);
|
|
40285
|
+
this.showAddCom = false;
|
|
40286
|
+
return;
|
|
40287
|
+
}
|
|
40288
|
+
}
|
|
40289
|
+
this.addOneComp(e, componentKey);
|
|
40290
|
+
},
|
|
40291
|
+
// 添加组件到卡片容器
|
|
40292
|
+
addOneComp(e, componentKey) {
|
|
40293
|
+
this.showAddCom = false;
|
|
40294
|
+
console.log("drop to column-card", componentKey);
|
|
40295
|
+
|
|
40296
|
+
// 动态导入组件配置
|
|
40297
|
+
let initCompData;
|
|
40298
|
+
try {
|
|
40299
|
+
const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
|
|
40300
|
+
const isTemporary = isTemporaryItem === "true";
|
|
40301
|
+
if (isTemporary) {
|
|
40302
|
+
initCompData = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey);
|
|
40303
|
+
} else {
|
|
40304
|
+
initCompData = __webpack_require__(1640)(`./${componentKey}`).default.settings(componentKey);
|
|
40305
|
+
}
|
|
40306
|
+
if (!isTemporary) {
|
|
40307
|
+
initCompData = {
|
|
40308
|
+
...initCompData,
|
|
40309
|
+
styleConfig: {
|
|
40310
|
+
pc: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(16, 16, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")],
|
|
40311
|
+
mb: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(12, 12, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")]
|
|
40312
|
+
}
|
|
40313
|
+
};
|
|
40314
|
+
}
|
|
40315
|
+
} catch (error) {
|
|
40316
|
+
console.error(`无法加载组件 ${componentKey}:`, error);
|
|
40317
|
+
this.$message && this.$message.error(`组件加载失败`);
|
|
40318
|
+
return;
|
|
40319
|
+
}
|
|
40320
|
+
const toElementId = e.toElement.id;
|
|
40321
|
+
if (toElementId === `cardTarget${this.data.componentId}` || toElementId.includes("cardTargetdown")) {
|
|
40322
|
+
// 添加到卡片容器末尾
|
|
40323
|
+
this.data.childList.push(initCompData);
|
|
40324
|
+
} else if (toElementId.includes("cardTargetup")) {
|
|
40325
|
+
// 插入到指定位置
|
|
40326
|
+
const underComponentId = toElementId.split("-cardTargetup")[0];
|
|
40327
|
+
const index = this.data.childList.findIndex(item => item.componentId === underComponentId);
|
|
40328
|
+
if (index !== -1) {
|
|
40329
|
+
this.data.childList.splice(index, 0, initCompData);
|
|
40330
|
+
}
|
|
40331
|
+
}
|
|
40332
|
+
|
|
40333
|
+
// 触发数据更新
|
|
40334
|
+
this.$emit("update:data", this.data);
|
|
40335
|
+
if (componentKey === "cms-column") {
|
|
40336
|
+
this.$EventBus.$emit("handleNowComp", initCompData);
|
|
40337
|
+
}
|
|
40338
|
+
}
|
|
40339
|
+
}
|
|
40340
|
+
});
|
|
40341
|
+
;// ./package/cms-column-card/View.vue?vue&type=script&lang=js
|
|
40342
|
+
/* harmony default export */ var cms_column_card_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
40343
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-card/View.vue?vue&type=style&index=0&id=155a8242&prod&lang=scss&scoped=true
|
|
40344
|
+
// extracted by mini-css-extract-plugin
|
|
40345
|
+
|
|
40346
|
+
;// ./package/cms-column-card/View.vue?vue&type=style&index=0&id=155a8242&prod&lang=scss&scoped=true
|
|
40347
|
+
|
|
40348
|
+
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
40349
|
+
var componentNormalizer = __webpack_require__(1656);
|
|
40350
|
+
;// ./package/cms-column-card/View.vue
|
|
40351
|
+
|
|
40352
|
+
|
|
40353
|
+
|
|
40354
|
+
;
|
|
40355
|
+
|
|
40356
|
+
|
|
40357
|
+
/* normalize component */
|
|
40358
|
+
|
|
40359
|
+
var component = (0,componentNormalizer/* default */.A)(
|
|
40360
|
+
cms_column_card_Viewvue_type_script_lang_js,
|
|
40361
|
+
render,
|
|
40362
|
+
staticRenderFns,
|
|
40363
|
+
false,
|
|
40364
|
+
null,
|
|
40365
|
+
"155a8242",
|
|
40366
|
+
null
|
|
40367
|
+
|
|
40368
|
+
)
|
|
40369
|
+
|
|
40370
|
+
/* harmony default export */ var View = (component.exports);
|
|
40371
|
+
|
|
40372
|
+
/***/ }),
|
|
40373
|
+
|
|
39534
40374
|
/***/ 4576:
|
|
39535
40375
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
39536
40376
|
|
|
@@ -39882,7 +40722,7 @@ exportTypedArrayMethod('toSorted', function toSorted(compareFn) {
|
|
|
39882
40722
|
__webpack_require__.r(__webpack_exports__);
|
|
39883
40723
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
|
|
39884
40724
|
|
|
39885
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
40725
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 4057));
|
|
39886
40726
|
const langData = {
|
|
39887
40727
|
// 内容编辑
|
|
39888
40728
|
textContent: "请输入文本内容",
|
|
@@ -41430,427 +42270,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41430
42270
|
|
|
41431
42271
|
/***/ }),
|
|
41432
42272
|
|
|
41433
|
-
/***/ 5086:
|
|
41434
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
41435
|
-
|
|
41436
|
-
"use strict";
|
|
41437
|
-
// ESM COMPAT FLAG
|
|
41438
|
-
__webpack_require__.r(__webpack_exports__);
|
|
41439
|
-
|
|
41440
|
-
// EXPORTS
|
|
41441
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
41442
|
-
"default": function() { return /* binding */ View; }
|
|
41443
|
-
});
|
|
41444
|
-
|
|
41445
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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=877468fe&scoped=true
|
|
41446
|
-
var render = function render() {
|
|
41447
|
-
var _vm = this,
|
|
41448
|
-
_c = _vm._self._c;
|
|
41449
|
-
return _c('BaseComp', _vm._b({
|
|
41450
|
-
attrs: {
|
|
41451
|
-
"data": _vm.data,
|
|
41452
|
-
"nowCompId": _vm.nowCompId,
|
|
41453
|
-
"isOpcacity": _vm.isOpcacity,
|
|
41454
|
-
"lang": _vm.lang
|
|
41455
|
-
},
|
|
41456
|
-
on: {
|
|
41457
|
-
"getConfigData": _vm.getConfigData
|
|
41458
|
-
}
|
|
41459
|
-
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
41460
|
-
staticClass: "cms-text-container",
|
|
41461
|
-
class: [`align-${_vm.configData.textAlign || 'left'}`, _vm.configData.customClass || '', {
|
|
41462
|
-
'has-link': _vm.configData.linkUrl,
|
|
41463
|
-
'cmhk-home_main': _vm.showCmhkMain,
|
|
41464
|
-
'hover-effect': _vm.configData.hoverEffect && _vm.configData.linkUrl
|
|
41465
|
-
}],
|
|
41466
|
-
style: _vm.containerStyle,
|
|
41467
|
-
attrs: {
|
|
41468
|
-
"aria-label": _vm.configData.ariaLabel,
|
|
41469
|
-
"tabindex": _vm.configData.tabIndex,
|
|
41470
|
-
"role": _vm.configData.role,
|
|
41471
|
-
"title": _vm.configData.seoTitle || _vm.configData.seoDescription
|
|
41472
|
-
},
|
|
41473
|
-
on: {
|
|
41474
|
-
"click": _vm.handleClick
|
|
41475
|
-
}
|
|
41476
|
-
}, [_c('div', {
|
|
41477
|
-
staticClass: "text-content",
|
|
41478
|
-
class: _vm.configData.textType,
|
|
41479
|
-
style: _vm.textStyle
|
|
41480
|
-
}, _vm._l(_vm.textLines, function (line, index) {
|
|
41481
|
-
return _c('p', {
|
|
41482
|
-
key: index,
|
|
41483
|
-
staticClass: "text-line",
|
|
41484
|
-
style: _vm.lineStyle
|
|
41485
|
-
}, [_vm._v(" " + _vm._s(line) + " ")]);
|
|
41486
|
-
}), 0), _vm.configData.linkUrl && _vm.configData.showLinkIcon ? _c('div', {
|
|
41487
|
-
staticClass: "link-indicator"
|
|
41488
|
-
}, [_c('i', {
|
|
41489
|
-
staticClass: "el-icon-link"
|
|
41490
|
-
})]) : _vm._e()])]);
|
|
41491
|
-
};
|
|
41492
|
-
var staticRenderFns = [];
|
|
41493
|
-
|
|
41494
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
41495
|
-
var es_iterator_constructor = __webpack_require__(8111);
|
|
41496
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
|
|
41497
|
-
var es_iterator_filter = __webpack_require__(2489);
|
|
41498
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
41499
|
-
var es_iterator_for_each = __webpack_require__(7588);
|
|
41500
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
41501
|
-
var baseComp = __webpack_require__(677);
|
|
41502
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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
|
|
41503
|
-
|
|
41504
|
-
|
|
41505
|
-
|
|
41506
|
-
|
|
41507
|
-
|
|
41508
|
-
|
|
41509
|
-
|
|
41510
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
41511
|
-
name: "cms-text",
|
|
41512
|
-
components: {
|
|
41513
|
-
BaseComp: baseComp["default"]
|
|
41514
|
-
},
|
|
41515
|
-
props: {
|
|
41516
|
-
data: {
|
|
41517
|
-
type: Object,
|
|
41518
|
-
default: () => {
|
|
41519
|
-
return {};
|
|
41520
|
-
}
|
|
41521
|
-
},
|
|
41522
|
-
nowCompId: {
|
|
41523
|
-
type: [String, Number],
|
|
41524
|
-
default: ""
|
|
41525
|
-
},
|
|
41526
|
-
isOpcacity: {
|
|
41527
|
-
type: Boolean,
|
|
41528
|
-
default: true
|
|
41529
|
-
},
|
|
41530
|
-
lang: {
|
|
41531
|
-
type: String,
|
|
41532
|
-
default: "zh-HK"
|
|
41533
|
-
},
|
|
41534
|
-
showCmhkMain: {
|
|
41535
|
-
type: Boolean,
|
|
41536
|
-
default: true
|
|
41537
|
-
}
|
|
41538
|
-
},
|
|
41539
|
-
data() {
|
|
41540
|
-
return {
|
|
41541
|
-
configData: {},
|
|
41542
|
-
// 默认配置数据
|
|
41543
|
-
defaultConfig: {
|
|
41544
|
-
// 内容编辑
|
|
41545
|
-
textContent: "请输入文本内容",
|
|
41546
|
-
enableLineBreak: true,
|
|
41547
|
-
// 排版控制
|
|
41548
|
-
textAlign: "left",
|
|
41549
|
-
// fontSize: 16,
|
|
41550
|
-
// lineHeight: 1.5,
|
|
41551
|
-
letterSpacing: 0,
|
|
41552
|
-
// 样式美化
|
|
41553
|
-
fontColor: "#333333",
|
|
41554
|
-
// fontWeight: "normal",
|
|
41555
|
-
fontStyle: "normal",
|
|
41556
|
-
textDecoration: "none",
|
|
41557
|
-
// fontFamily: "inherit",
|
|
41558
|
-
|
|
41559
|
-
// 布局设置
|
|
41560
|
-
paddingTop: 0,
|
|
41561
|
-
paddingBottom: 0,
|
|
41562
|
-
paddingLeft: 0,
|
|
41563
|
-
paddingRight: 0,
|
|
41564
|
-
marginTop: 0,
|
|
41565
|
-
marginBottom: 0,
|
|
41566
|
-
marginLeft: 0,
|
|
41567
|
-
marginRight: 0,
|
|
41568
|
-
backgroundColor: "",
|
|
41569
|
-
// 视觉效果
|
|
41570
|
-
borderWidth: 0,
|
|
41571
|
-
borderStyle: "solid",
|
|
41572
|
-
borderColor: "#dcdfe6",
|
|
41573
|
-
borderRadius: 0,
|
|
41574
|
-
boxShadow: "",
|
|
41575
|
-
// 交互功能
|
|
41576
|
-
linkUrl: "",
|
|
41577
|
-
linkTarget: "_self",
|
|
41578
|
-
showLinkIcon: false,
|
|
41579
|
-
hoverEffect: false,
|
|
41580
|
-
// 高级配置
|
|
41581
|
-
customClass: "",
|
|
41582
|
-
customStyle: "",
|
|
41583
|
-
enableAnimation: false,
|
|
41584
|
-
animationType: "fadeIn",
|
|
41585
|
-
animationDuration: 300,
|
|
41586
|
-
// 可访问性配置
|
|
41587
|
-
ariaLabel: "",
|
|
41588
|
-
tabIndex: 0,
|
|
41589
|
-
role: "",
|
|
41590
|
-
// SEO配置
|
|
41591
|
-
seoTitle: "",
|
|
41592
|
-
seoDescription: "",
|
|
41593
|
-
// 响应式配置
|
|
41594
|
-
mobileTextAlign: "",
|
|
41595
|
-
mobileFontSize: 0,
|
|
41596
|
-
tabletFontSize: 0
|
|
41597
|
-
}
|
|
41598
|
-
};
|
|
41599
|
-
},
|
|
41600
|
-
mounted() {
|
|
41601
|
-
this.initConfigData();
|
|
41602
|
-
this.setCSSVariables();
|
|
41603
|
-
},
|
|
41604
|
-
watch: {
|
|
41605
|
-
configData: {
|
|
41606
|
-
handler() {
|
|
41607
|
-
this.updateStyles();
|
|
41608
|
-
},
|
|
41609
|
-
deep: true
|
|
41610
|
-
}
|
|
41611
|
-
},
|
|
41612
|
-
computed: {
|
|
41613
|
-
// 文本行数组(支持换行)
|
|
41614
|
-
textLines() {
|
|
41615
|
-
if (!this.configData.textContent) return [];
|
|
41616
|
-
if (!this.configData.enableLineBreak) {
|
|
41617
|
-
return [this.configData.textContent];
|
|
41618
|
-
}
|
|
41619
|
-
return this.configData.textContent.split("\n").filter(line => line.trim() !== "");
|
|
41620
|
-
},
|
|
41621
|
-
// 容器样式
|
|
41622
|
-
containerStyle() {
|
|
41623
|
-
const config = {
|
|
41624
|
-
...this.defaultConfig,
|
|
41625
|
-
...this.configData
|
|
41626
|
-
};
|
|
41627
|
-
return {
|
|
41628
|
-
padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
|
|
41629
|
-
margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
|
|
41630
|
-
backgroundColor: config.backgroundColor || "transparent",
|
|
41631
|
-
border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
|
|
41632
|
-
borderRadius: `${config.borderRadius}px`,
|
|
41633
|
-
boxShadow: config.boxShadow || "none",
|
|
41634
|
-
cursor: config.linkUrl ? "pointer" : "default",
|
|
41635
|
-
transition: config.hoverEffect ? "all 0.3s ease" : "none",
|
|
41636
|
-
animation: config.enableAnimation ? this.getAnimationStyle() : "none",
|
|
41637
|
-
...this.parseCustomStyle(config.customStyle)
|
|
41638
|
-
};
|
|
41639
|
-
},
|
|
41640
|
-
// 文本样式
|
|
41641
|
-
textStyle() {
|
|
41642
|
-
const config = {
|
|
41643
|
-
...this.defaultConfig,
|
|
41644
|
-
...this.configData
|
|
41645
|
-
};
|
|
41646
|
-
return {
|
|
41647
|
-
color: config.fontColor,
|
|
41648
|
-
// fontSize: `${config.fontSize}px`,
|
|
41649
|
-
// fontWeight: config.fontWeight,
|
|
41650
|
-
fontStyle: config.fontStyle,
|
|
41651
|
-
textDecoration: config.textDecoration,
|
|
41652
|
-
// fontFamily: config.fontFamily,
|
|
41653
|
-
// lineHeight: config.lineHeight,
|
|
41654
|
-
letterSpacing: `${config.letterSpacing}px`,
|
|
41655
|
-
textAlign: config.textAlign,
|
|
41656
|
-
wordBreak: "break-word",
|
|
41657
|
-
wordWrap: "break-word",
|
|
41658
|
-
cursor: config.linkUrl ? "pointer" : "default"
|
|
41659
|
-
};
|
|
41660
|
-
},
|
|
41661
|
-
// 行样式
|
|
41662
|
-
lineStyle() {
|
|
41663
|
-
return {
|
|
41664
|
-
margin: "0",
|
|
41665
|
-
padding: "0"
|
|
41666
|
-
};
|
|
41667
|
-
}
|
|
41668
|
-
},
|
|
41669
|
-
methods: {
|
|
41670
|
-
// 初始化配置数据
|
|
41671
|
-
initConfigData() {
|
|
41672
|
-
this.configData = {
|
|
41673
|
-
...this.defaultConfig,
|
|
41674
|
-
...this.configData
|
|
41675
|
-
};
|
|
41676
|
-
},
|
|
41677
|
-
// 获取配置数据
|
|
41678
|
-
getConfigData(configData) {
|
|
41679
|
-
this.configData = {
|
|
41680
|
-
...this.defaultConfig,
|
|
41681
|
-
...configData
|
|
41682
|
-
};
|
|
41683
|
-
this.updateStyles();
|
|
41684
|
-
},
|
|
41685
|
-
// 更新样式
|
|
41686
|
-
updateStyles() {
|
|
41687
|
-
this.$nextTick(() => {
|
|
41688
|
-
this.setCSSVariables();
|
|
41689
|
-
this.$forceUpdate();
|
|
41690
|
-
});
|
|
41691
|
-
},
|
|
41692
|
-
// 设置CSS变量
|
|
41693
|
-
setCSSVariables() {
|
|
41694
|
-
if (!this.$el) return;
|
|
41695
|
-
const config = {
|
|
41696
|
-
...this.defaultConfig,
|
|
41697
|
-
...this.configData
|
|
41698
|
-
};
|
|
41699
|
-
|
|
41700
|
-
// 设置响应式字体大小
|
|
41701
|
-
if (config.mobileFontSize > 0) {
|
|
41702
|
-
this.$el.style.setProperty("--mobile-font-size", `${config.mobileFontSize}px`);
|
|
41703
|
-
}
|
|
41704
|
-
if (config.tabletFontSize > 0) {
|
|
41705
|
-
this.$el.style.setProperty("--tablet-font-size", `${config.tabletFontSize}px`);
|
|
41706
|
-
}
|
|
41707
|
-
|
|
41708
|
-
// 设置移动端文本对齐
|
|
41709
|
-
if (config.mobileTextAlign) {
|
|
41710
|
-
this.$el.style.setProperty("--mobile-text-align", config.mobileTextAlign);
|
|
41711
|
-
}
|
|
41712
|
-
},
|
|
41713
|
-
// 处理点击事件
|
|
41714
|
-
handleClick() {
|
|
41715
|
-
if (this.configData.linkUrl) {
|
|
41716
|
-
const target = this.configData.linkTarget || "_self";
|
|
41717
|
-
if (target === "_blank") {
|
|
41718
|
-
window.open(this.configData.linkUrl, "_blank");
|
|
41719
|
-
} else {
|
|
41720
|
-
window.location.href = this.configData.linkUrl;
|
|
41721
|
-
}
|
|
41722
|
-
}
|
|
41723
|
-
},
|
|
41724
|
-
// 获取动画样式
|
|
41725
|
-
getAnimationStyle() {
|
|
41726
|
-
const animationType = this.configData.animationType || this.defaultConfig.animationType;
|
|
41727
|
-
const duration = this.configData.animationDuration || this.defaultConfig.animationDuration;
|
|
41728
|
-
if (!this.configData.enableAnimation || animationType === "none") return "";
|
|
41729
|
-
return `${animationType} ${duration}ms ease-in-out`;
|
|
41730
|
-
},
|
|
41731
|
-
// 解析自定义样式
|
|
41732
|
-
parseCustomStyle(customStyle) {
|
|
41733
|
-
if (!customStyle) return {};
|
|
41734
|
-
try {
|
|
41735
|
-
// 简单的CSS样式解析
|
|
41736
|
-
const styles = {};
|
|
41737
|
-
const declarations = customStyle.split(";");
|
|
41738
|
-
declarations.forEach(declaration => {
|
|
41739
|
-
const [property, value] = declaration.split(":");
|
|
41740
|
-
if (property && value) {
|
|
41741
|
-
const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
41742
|
-
styles[camelCaseProperty] = value.trim();
|
|
41743
|
-
}
|
|
41744
|
-
});
|
|
41745
|
-
return styles;
|
|
41746
|
-
} catch (error) {
|
|
41747
|
-
console.warn("解析自定义样式失败:", error);
|
|
41748
|
-
return {};
|
|
41749
|
-
}
|
|
41750
|
-
},
|
|
41751
|
-
// 文本内容验证
|
|
41752
|
-
validateTextContent() {
|
|
41753
|
-
const content = this.configData.textContent;
|
|
41754
|
-
if (!content || content.trim() === "") {
|
|
41755
|
-
console.warn("文本内容为空");
|
|
41756
|
-
return false;
|
|
41757
|
-
}
|
|
41758
|
-
return true;
|
|
41759
|
-
},
|
|
41760
|
-
// 获取纯文本内容
|
|
41761
|
-
getPlainTextContent() {
|
|
41762
|
-
return this.configData.textContent || "";
|
|
41763
|
-
},
|
|
41764
|
-
// 获取文本长度
|
|
41765
|
-
getTextLength() {
|
|
41766
|
-
return this.getPlainTextContent().length;
|
|
41767
|
-
},
|
|
41768
|
-
// 复制文本内容到剪贴板
|
|
41769
|
-
copyTextToClipboard() {
|
|
41770
|
-
const text = this.getPlainTextContent();
|
|
41771
|
-
if (navigator.clipboard && window.isSecureContext) {
|
|
41772
|
-
navigator.clipboard.writeText(text).then(() => {
|
|
41773
|
-
var _this$$message;
|
|
41774
|
-
(_this$$message = this.$message) === null || _this$$message === void 0 ? void 0 : _this$$message.success("文本已复制到剪贴板");
|
|
41775
|
-
}).catch(err => {
|
|
41776
|
-
console.error("复制失败:", err);
|
|
41777
|
-
});
|
|
41778
|
-
} else {
|
|
41779
|
-
// 降级方案
|
|
41780
|
-
const textArea = document.createElement("textarea");
|
|
41781
|
-
textArea.value = text;
|
|
41782
|
-
document.body.appendChild(textArea);
|
|
41783
|
-
textArea.select();
|
|
41784
|
-
try {
|
|
41785
|
-
var _this$$message2;
|
|
41786
|
-
document.execCommand("copy");
|
|
41787
|
-
(_this$$message2 = this.$message) === null || _this$$message2 === void 0 ? void 0 : _this$$message2.success("文本已复制到剪贴板");
|
|
41788
|
-
} catch (err) {
|
|
41789
|
-
console.error("复制失败:", err);
|
|
41790
|
-
}
|
|
41791
|
-
document.body.removeChild(textArea);
|
|
41792
|
-
}
|
|
41793
|
-
},
|
|
41794
|
-
// 文本搜索高亮
|
|
41795
|
-
highlightText(searchTerm) {
|
|
41796
|
-
if (!searchTerm) return;
|
|
41797
|
-
const content = this.getPlainTextContent();
|
|
41798
|
-
const regex = new RegExp(`(${searchTerm})`, "gi");
|
|
41799
|
-
const highlightedContent = content.replace(regex, "<mark>$1</mark>");
|
|
41800
|
-
|
|
41801
|
-
// 这里可以根据需要实现高亮显示逻辑
|
|
41802
|
-
console.log("高亮内容:", highlightedContent);
|
|
41803
|
-
},
|
|
41804
|
-
// 文本统计信息
|
|
41805
|
-
getTextStats() {
|
|
41806
|
-
const text = this.getPlainTextContent();
|
|
41807
|
-
const words = text.split(/\s+/).filter(word => word.length > 0);
|
|
41808
|
-
const lines = text.split("\n").length;
|
|
41809
|
-
const characters = text.length;
|
|
41810
|
-
const charactersNoSpaces = text.replace(/\s/g, "").length;
|
|
41811
|
-
return {
|
|
41812
|
-
characters,
|
|
41813
|
-
charactersNoSpaces,
|
|
41814
|
-
words: words.length,
|
|
41815
|
-
lines,
|
|
41816
|
-
paragraphs: text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length
|
|
41817
|
-
};
|
|
41818
|
-
}
|
|
41819
|
-
}
|
|
41820
|
-
});
|
|
41821
|
-
;// ./package/cms-text/View.vue?vue&type=script&lang=js
|
|
41822
|
-
/* harmony default export */ var cms_text_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
41823
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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=877468fe&prod&lang=scss&scoped=true
|
|
41824
|
-
// extracted by mini-css-extract-plugin
|
|
41825
|
-
|
|
41826
|
-
;// ./package/cms-text/View.vue?vue&type=style&index=0&id=877468fe&prod&lang=scss&scoped=true
|
|
41827
|
-
|
|
41828
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
41829
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
41830
|
-
;// ./package/cms-text/View.vue
|
|
41831
|
-
|
|
41832
|
-
|
|
41833
|
-
|
|
41834
|
-
;
|
|
41835
|
-
|
|
41836
|
-
|
|
41837
|
-
/* normalize component */
|
|
41838
|
-
|
|
41839
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
41840
|
-
cms_text_Viewvue_type_script_lang_js,
|
|
41841
|
-
render,
|
|
41842
|
-
staticRenderFns,
|
|
41843
|
-
false,
|
|
41844
|
-
null,
|
|
41845
|
-
"877468fe",
|
|
41846
|
-
null
|
|
41847
|
-
|
|
41848
|
-
)
|
|
41849
|
-
|
|
41850
|
-
/* harmony default export */ var View = (component.exports);
|
|
41851
|
-
|
|
41852
|
-
/***/ }),
|
|
41853
|
-
|
|
41854
42273
|
/***/ 5122:
|
|
41855
42274
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
41856
42275
|
|
|
@@ -41954,9 +42373,9 @@ var map = {
|
|
|
41954
42373
|
"./cms-activityCountdown/View.vue": 5985,
|
|
41955
42374
|
"./cms-activityTime/View.vue": 2620,
|
|
41956
42375
|
"./cms-banner/View.vue": 9894,
|
|
41957
|
-
"./cms-button/View.vue":
|
|
42376
|
+
"./cms-button/View.vue": 3735,
|
|
41958
42377
|
"./cms-cells/View.vue": 983,
|
|
41959
|
-
"./cms-column-card/View.vue":
|
|
42378
|
+
"./cms-column-card/View.vue": 4552,
|
|
41960
42379
|
"./cms-column/View.vue": 7473,
|
|
41961
42380
|
"./cms-description/View.vue": 6296,
|
|
41962
42381
|
"./cms-dynamic-comp/View.vue": 471,
|
|
@@ -41972,12 +42391,12 @@ var map = {
|
|
|
41972
42391
|
"./cms-prodCustomization/View.vue": 1054,
|
|
41973
42392
|
"./cms-productDetails/View.vue": 7979,
|
|
41974
42393
|
"./cms-question/View.vue": 2519,
|
|
41975
|
-
"./cms-richText/View.vue":
|
|
42394
|
+
"./cms-richText/View.vue": 342,
|
|
41976
42395
|
"./cms-servePlan-tab/View.vue": 9051,
|
|
41977
42396
|
"./cms-servePlan-text/View.vue": 5865,
|
|
41978
42397
|
"./cms-tab/View.vue": 3591,
|
|
41979
42398
|
"./cms-termsAndConditions/View.vue": 2961,
|
|
41980
|
-
"./cms-text/View.vue":
|
|
42399
|
+
"./cms-text/View.vue": 4057,
|
|
41981
42400
|
"./cms-threeScroll/View.vue": 38,
|
|
41982
42401
|
"./cms-titleCenter/View.vue": 788,
|
|
41983
42402
|
"./cms-titleLeft/View.vue": 6946,
|
|
@@ -47965,286 +48384,6 @@ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSc
|
|
|
47965
48384
|
|
|
47966
48385
|
/***/ }),
|
|
47967
48386
|
|
|
47968
|
-
/***/ 6446:
|
|
47969
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
47970
|
-
|
|
47971
|
-
"use strict";
|
|
47972
|
-
// ESM COMPAT FLAG
|
|
47973
|
-
__webpack_require__.r(__webpack_exports__);
|
|
47974
|
-
|
|
47975
|
-
// EXPORTS
|
|
47976
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
47977
|
-
"default": function() { return /* binding */ View; }
|
|
47978
|
-
});
|
|
47979
|
-
|
|
47980
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-button/View.vue?vue&type=template&id=d7712dd2&scoped=true
|
|
47981
|
-
var render = function render() {
|
|
47982
|
-
var _vm = this,
|
|
47983
|
-
_c = _vm._self._c;
|
|
47984
|
-
return _c('BaseComp', _vm._b({
|
|
47985
|
-
attrs: {
|
|
47986
|
-
"data": _vm.data,
|
|
47987
|
-
"nowCompId": _vm.nowCompId,
|
|
47988
|
-
"isOpcacity": _vm.isOpcacity,
|
|
47989
|
-
"lang": _vm.lang
|
|
47990
|
-
},
|
|
47991
|
-
on: {
|
|
47992
|
-
"getConfigData": _vm.getConfigData
|
|
47993
|
-
}
|
|
47994
|
-
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
47995
|
-
staticClass: "cms-button-container",
|
|
47996
|
-
class: [`align-${_vm.configData.textAlign || 'center'}`, _vm.configData.customClass || ''],
|
|
47997
|
-
style: _vm.containerStyle
|
|
47998
|
-
}, [_c('button', {
|
|
47999
|
-
staticClass: "cms-button",
|
|
48000
|
-
class: ['cms-button-element', {
|
|
48001
|
-
'has-link': _vm.configData.linkUrl,
|
|
48002
|
-
'hover-effect': _vm.configData.hoverEffect
|
|
48003
|
-
}],
|
|
48004
|
-
style: _vm.buttonStyle,
|
|
48005
|
-
attrs: {
|
|
48006
|
-
"disabled": _vm.configData.disabled
|
|
48007
|
-
},
|
|
48008
|
-
on: {
|
|
48009
|
-
"click": _vm.handleClick
|
|
48010
|
-
}
|
|
48011
|
-
}, [_vm._v(" " + _vm._s(_vm.configData.buttonText) + " "), _c('i', {
|
|
48012
|
-
staticClass: "el-icon-arrow-right el-icon--right"
|
|
48013
|
-
})])])]);
|
|
48014
|
-
};
|
|
48015
|
-
var staticRenderFns = [];
|
|
48016
|
-
|
|
48017
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
|
|
48018
|
-
var es_iterator_constructor = __webpack_require__(8111);
|
|
48019
|
-
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
|
|
48020
|
-
var es_iterator_for_each = __webpack_require__(7588);
|
|
48021
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
48022
|
-
var baseComp = __webpack_require__(677);
|
|
48023
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-button/View.vue?vue&type=script&lang=js
|
|
48024
|
-
|
|
48025
|
-
|
|
48026
|
-
|
|
48027
|
-
|
|
48028
|
-
|
|
48029
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
48030
|
-
name: "cms-button",
|
|
48031
|
-
components: {
|
|
48032
|
-
BaseComp: baseComp["default"]
|
|
48033
|
-
},
|
|
48034
|
-
props: {
|
|
48035
|
-
data: {
|
|
48036
|
-
type: Object,
|
|
48037
|
-
default: () => {
|
|
48038
|
-
return {};
|
|
48039
|
-
}
|
|
48040
|
-
},
|
|
48041
|
-
nowCompId: {
|
|
48042
|
-
type: [String, Number],
|
|
48043
|
-
default: ""
|
|
48044
|
-
},
|
|
48045
|
-
isOpcacity: {
|
|
48046
|
-
type: Boolean,
|
|
48047
|
-
default: true
|
|
48048
|
-
},
|
|
48049
|
-
lang: {
|
|
48050
|
-
type: String,
|
|
48051
|
-
default: "zh-HK"
|
|
48052
|
-
}
|
|
48053
|
-
},
|
|
48054
|
-
data() {
|
|
48055
|
-
return {
|
|
48056
|
-
configData: {},
|
|
48057
|
-
// 默认配置数据
|
|
48058
|
-
defaultConfig: {
|
|
48059
|
-
// 文字设置
|
|
48060
|
-
buttonText: "按钮文字",
|
|
48061
|
-
textAlign: "center",
|
|
48062
|
-
fontSize: 16,
|
|
48063
|
-
fontColor: "#ffffff",
|
|
48064
|
-
fontWeight: "normal",
|
|
48065
|
-
// 样式控制
|
|
48066
|
-
backgroundColor: "#409eff",
|
|
48067
|
-
borderRadius: 30,
|
|
48068
|
-
borderWidth: 1,
|
|
48069
|
-
borderStyle: "solid",
|
|
48070
|
-
borderColor: "#409eff",
|
|
48071
|
-
// 空间布局
|
|
48072
|
-
paddingTop: 12,
|
|
48073
|
-
paddingBottom: 12,
|
|
48074
|
-
paddingLeft: 20,
|
|
48075
|
-
paddingRight: 20,
|
|
48076
|
-
marginTop: 0,
|
|
48077
|
-
marginBottom: 0,
|
|
48078
|
-
marginLeft: 0,
|
|
48079
|
-
marginRight: 0,
|
|
48080
|
-
// 交互功能
|
|
48081
|
-
linkUrl: "",
|
|
48082
|
-
linkTarget: "_self",
|
|
48083
|
-
disabled: false,
|
|
48084
|
-
// 高级配置
|
|
48085
|
-
customClass: "",
|
|
48086
|
-
customStyle: "",
|
|
48087
|
-
hoverEffect: false,
|
|
48088
|
-
// 尺寸设置
|
|
48089
|
-
buttonWidth: "300",
|
|
48090
|
-
buttonHeight: "48",
|
|
48091
|
-
minWidth: 80,
|
|
48092
|
-
minHeight: 36
|
|
48093
|
-
}
|
|
48094
|
-
};
|
|
48095
|
-
},
|
|
48096
|
-
mounted() {
|
|
48097
|
-
this.initConfigData();
|
|
48098
|
-
},
|
|
48099
|
-
watch: {
|
|
48100
|
-
configData: {
|
|
48101
|
-
handler() {
|
|
48102
|
-
this.updateStyles();
|
|
48103
|
-
},
|
|
48104
|
-
deep: true
|
|
48105
|
-
}
|
|
48106
|
-
},
|
|
48107
|
-
computed: {
|
|
48108
|
-
// 容器样式
|
|
48109
|
-
containerStyle() {
|
|
48110
|
-
const config = {
|
|
48111
|
-
...this.defaultConfig,
|
|
48112
|
-
...this.configData
|
|
48113
|
-
};
|
|
48114
|
-
return {
|
|
48115
|
-
backgroundColor: config.wrapperBackgroundColor,
|
|
48116
|
-
textAlign: config.textAlign,
|
|
48117
|
-
margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
|
|
48118
|
-
...this.parseCustomStyle(config.customStyle)
|
|
48119
|
-
};
|
|
48120
|
-
},
|
|
48121
|
-
// 按钮样式
|
|
48122
|
-
buttonStyle() {
|
|
48123
|
-
const config = {
|
|
48124
|
-
...this.defaultConfig,
|
|
48125
|
-
...this.configData
|
|
48126
|
-
};
|
|
48127
|
-
return {
|
|
48128
|
-
// 文字样式
|
|
48129
|
-
fontSize: `${config.fontSize}px`,
|
|
48130
|
-
color: config.fontColor,
|
|
48131
|
-
fontWeight: config.fontWeight,
|
|
48132
|
-
// 背景和边框
|
|
48133
|
-
backgroundColor: config.backgroundColor ? config.backgroundColor : "transparent",
|
|
48134
|
-
borderRadius: `${config.borderRadius}px`,
|
|
48135
|
-
border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
|
|
48136
|
-
// 内边距
|
|
48137
|
-
padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
|
|
48138
|
-
// 尺寸
|
|
48139
|
-
width: config.buttonWidth === "auto" ? "auto" : `${config.buttonWidth}px`,
|
|
48140
|
-
height: config.buttonHeight === "auto" ? "auto" : `${config.buttonHeight}px`,
|
|
48141
|
-
minWidth: `${config.minWidth}px`,
|
|
48142
|
-
minHeight: `${config.minHeight}px`,
|
|
48143
|
-
// 交互效果
|
|
48144
|
-
cursor: config.linkUrl ? "pointer" : "default",
|
|
48145
|
-
opacity: config.disabled ? 0.6 : 1,
|
|
48146
|
-
transition: config.hoverEffect ? "all 0.3s ease" : "none",
|
|
48147
|
-
// 基础样式
|
|
48148
|
-
outline: "none",
|
|
48149
|
-
textDecoration: "none",
|
|
48150
|
-
display: "inline-block",
|
|
48151
|
-
textAlign: "center",
|
|
48152
|
-
verticalAlign: "middle",
|
|
48153
|
-
userSelect: "none",
|
|
48154
|
-
whiteSpace: "nowrap"
|
|
48155
|
-
};
|
|
48156
|
-
}
|
|
48157
|
-
},
|
|
48158
|
-
methods: {
|
|
48159
|
-
// 初始化配置数据
|
|
48160
|
-
initConfigData() {
|
|
48161
|
-
this.configData = {
|
|
48162
|
-
...this.defaultConfig,
|
|
48163
|
-
...this.configData
|
|
48164
|
-
};
|
|
48165
|
-
},
|
|
48166
|
-
// 获取配置数据
|
|
48167
|
-
getConfigData(configData) {
|
|
48168
|
-
this.configData = {
|
|
48169
|
-
...this.defaultConfig,
|
|
48170
|
-
...configData
|
|
48171
|
-
};
|
|
48172
|
-
this.updateStyles();
|
|
48173
|
-
},
|
|
48174
|
-
// 更新样式
|
|
48175
|
-
updateStyles() {
|
|
48176
|
-
this.$nextTick(() => {
|
|
48177
|
-
this.$forceUpdate();
|
|
48178
|
-
});
|
|
48179
|
-
},
|
|
48180
|
-
// 处理点击事件
|
|
48181
|
-
handleClick() {
|
|
48182
|
-
if (this.configData.disabled) {
|
|
48183
|
-
return;
|
|
48184
|
-
}
|
|
48185
|
-
if (this.configData.linkUrl) {
|
|
48186
|
-
const target = this.configData.linkTarget || "_self";
|
|
48187
|
-
if (target === "_blank") {
|
|
48188
|
-
window.open(this.configData.linkUrl, "_blank");
|
|
48189
|
-
} else {
|
|
48190
|
-
window.location.href = this.configData.linkUrl;
|
|
48191
|
-
}
|
|
48192
|
-
}
|
|
48193
|
-
},
|
|
48194
|
-
// 解析自定义样式
|
|
48195
|
-
parseCustomStyle(customStyle) {
|
|
48196
|
-
if (!customStyle) return {};
|
|
48197
|
-
try {
|
|
48198
|
-
const styles = {};
|
|
48199
|
-
const declarations = customStyle.split(";");
|
|
48200
|
-
declarations.forEach(declaration => {
|
|
48201
|
-
const [property, value] = declaration.split(":");
|
|
48202
|
-
if (property && value) {
|
|
48203
|
-
const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
|
|
48204
|
-
styles[camelCaseProperty] = value.trim();
|
|
48205
|
-
}
|
|
48206
|
-
});
|
|
48207
|
-
return styles;
|
|
48208
|
-
} catch (error) {
|
|
48209
|
-
console.warn("解析自定义样式失败:", error);
|
|
48210
|
-
return {};
|
|
48211
|
-
}
|
|
48212
|
-
}
|
|
48213
|
-
}
|
|
48214
|
-
});
|
|
48215
|
-
;// ./package/cms-button/View.vue?vue&type=script&lang=js
|
|
48216
|
-
/* harmony default export */ var cms_button_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
48217
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-button/View.vue?vue&type=style&index=0&id=d7712dd2&prod&lang=scss&scoped=true
|
|
48218
|
-
// extracted by mini-css-extract-plugin
|
|
48219
|
-
|
|
48220
|
-
;// ./package/cms-button/View.vue?vue&type=style&index=0&id=d7712dd2&prod&lang=scss&scoped=true
|
|
48221
|
-
|
|
48222
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
48223
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
48224
|
-
;// ./package/cms-button/View.vue
|
|
48225
|
-
|
|
48226
|
-
|
|
48227
|
-
|
|
48228
|
-
;
|
|
48229
|
-
|
|
48230
|
-
|
|
48231
|
-
/* normalize component */
|
|
48232
|
-
|
|
48233
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
48234
|
-
cms_button_Viewvue_type_script_lang_js,
|
|
48235
|
-
render,
|
|
48236
|
-
staticRenderFns,
|
|
48237
|
-
false,
|
|
48238
|
-
null,
|
|
48239
|
-
"d7712dd2",
|
|
48240
|
-
null
|
|
48241
|
-
|
|
48242
|
-
)
|
|
48243
|
-
|
|
48244
|
-
/* harmony default export */ var View = (component.exports);
|
|
48245
|
-
|
|
48246
|
-
/***/ }),
|
|
48247
|
-
|
|
48248
48387
|
/***/ 6467:
|
|
48249
48388
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
48250
48389
|
|
|
@@ -48372,7 +48511,7 @@ if (DESCRIPTORS && !('detached' in ArrayBufferPrototype)) {
|
|
|
48372
48511
|
__webpack_require__.r(__webpack_exports__);
|
|
48373
48512
|
/* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
|
|
48374
48513
|
|
|
48375
|
-
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__,
|
|
48514
|
+
const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 3735));
|
|
48376
48515
|
const langData = {
|
|
48377
48516
|
// 文字设置
|
|
48378
48517
|
buttonText: "按钮文字",
|
|
@@ -48383,7 +48522,7 @@ const langData = {
|
|
|
48383
48522
|
fontColor: "#ffffff",
|
|
48384
48523
|
fontWeight: "normal",
|
|
48385
48524
|
// 样式控制
|
|
48386
|
-
backgroundColor: "#
|
|
48525
|
+
backgroundColor: "#2f85ff",
|
|
48387
48526
|
borderRadius: 30,
|
|
48388
48527
|
borderWidth: 1,
|
|
48389
48528
|
borderStyle: "solid",
|
|
@@ -53969,134 +54108,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
53969
54108
|
|
|
53970
54109
|
/***/ }),
|
|
53971
54110
|
|
|
53972
|
-
/***/ 8914:
|
|
53973
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
53974
|
-
|
|
53975
|
-
"use strict";
|
|
53976
|
-
// ESM COMPAT FLAG
|
|
53977
|
-
__webpack_require__.r(__webpack_exports__);
|
|
53978
|
-
|
|
53979
|
-
// EXPORTS
|
|
53980
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
53981
|
-
"default": function() { return /* binding */ View; }
|
|
53982
|
-
});
|
|
53983
|
-
|
|
53984
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-richText/View.vue?vue&type=template&id=36ccf66e&scoped=true
|
|
53985
|
-
var render = function render() {
|
|
53986
|
-
var _vm = this,
|
|
53987
|
-
_c = _vm._self._c;
|
|
53988
|
-
return _c('BaseComp', _vm._b({
|
|
53989
|
-
attrs: {
|
|
53990
|
-
"data": _vm.data,
|
|
53991
|
-
"nowCompId": _vm.nowCompId,
|
|
53992
|
-
"isOpcacity": _vm.isOpcacity,
|
|
53993
|
-
"lang": _vm.lang
|
|
53994
|
-
},
|
|
53995
|
-
on: {
|
|
53996
|
-
"getConfigData": _vm.getConfigData
|
|
53997
|
-
}
|
|
53998
|
-
}, 'BaseComp', _vm.$attrs, false), [_c('section', {
|
|
53999
|
-
staticClass: "cmhk-home_main"
|
|
54000
|
-
}, [_c('div', [_c('div', {
|
|
54001
|
-
staticClass: "inner"
|
|
54002
|
-
}, [_c('p', {
|
|
54003
|
-
staticClass: "cms-ht",
|
|
54004
|
-
domProps: {
|
|
54005
|
-
"innerHTML": _vm._s(_vm.configData.input1)
|
|
54006
|
-
}
|
|
54007
|
-
})])])])]);
|
|
54008
|
-
};
|
|
54009
|
-
var staticRenderFns = [];
|
|
54010
|
-
|
|
54011
|
-
// EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
|
|
54012
|
-
var baseComp = __webpack_require__(677);
|
|
54013
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.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-richText/View.vue?vue&type=script&lang=js
|
|
54014
|
-
|
|
54015
|
-
/* harmony default export */ var Viewvue_type_script_lang_js = ({
|
|
54016
|
-
name: "cms-richText",
|
|
54017
|
-
components: {
|
|
54018
|
-
BaseComp: baseComp["default"]
|
|
54019
|
-
},
|
|
54020
|
-
props: {
|
|
54021
|
-
data: {
|
|
54022
|
-
type: Object,
|
|
54023
|
-
default: () => {
|
|
54024
|
-
return {};
|
|
54025
|
-
}
|
|
54026
|
-
},
|
|
54027
|
-
nowCompId: {
|
|
54028
|
-
type: [String, Number],
|
|
54029
|
-
default: ""
|
|
54030
|
-
},
|
|
54031
|
-
isOpcacity: {
|
|
54032
|
-
type: Boolean,
|
|
54033
|
-
default: true
|
|
54034
|
-
},
|
|
54035
|
-
lang: {
|
|
54036
|
-
type: String,
|
|
54037
|
-
default: "zh-HK"
|
|
54038
|
-
}
|
|
54039
|
-
},
|
|
54040
|
-
data() {
|
|
54041
|
-
return {
|
|
54042
|
-
configData: {},
|
|
54043
|
-
messFold: false
|
|
54044
|
-
};
|
|
54045
|
-
},
|
|
54046
|
-
mounted() {},
|
|
54047
|
-
watch: {},
|
|
54048
|
-
methods: {
|
|
54049
|
-
getConfigData(configData) {
|
|
54050
|
-
this.configData = configData;
|
|
54051
|
-
},
|
|
54052
|
-
foldMessText() {
|
|
54053
|
-
this.messFold = !this.messFold;
|
|
54054
|
-
},
|
|
54055
|
-
decodeJumpUrl(url) {
|
|
54056
|
-
if (!url) return;
|
|
54057
|
-
top.location.href = url;
|
|
54058
|
-
}
|
|
54059
|
-
}
|
|
54060
|
-
});
|
|
54061
|
-
;// ./package/cms-richText/View.vue?vue&type=script&lang=js
|
|
54062
|
-
/* harmony default export */ var cms_richText_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
|
|
54063
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-richText/View.vue?vue&type=style&index=0&id=36ccf66e&prod&lang=scss&scoped=true
|
|
54064
|
-
// extracted by mini-css-extract-plugin
|
|
54065
|
-
|
|
54066
|
-
;// ./package/cms-richText/View.vue?vue&type=style&index=0&id=36ccf66e&prod&lang=scss&scoped=true
|
|
54067
|
-
|
|
54068
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-67.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-67.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-67.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-67.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-richText/View.vue?vue&type=style&index=1&id=36ccf66e&prod&lang=scss
|
|
54069
|
-
// extracted by mini-css-extract-plugin
|
|
54070
|
-
|
|
54071
|
-
;// ./package/cms-richText/View.vue?vue&type=style&index=1&id=36ccf66e&prod&lang=scss
|
|
54072
|
-
|
|
54073
|
-
// EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
54074
|
-
var componentNormalizer = __webpack_require__(1656);
|
|
54075
|
-
;// ./package/cms-richText/View.vue
|
|
54076
|
-
|
|
54077
|
-
|
|
54078
|
-
|
|
54079
|
-
;
|
|
54080
|
-
|
|
54081
|
-
|
|
54082
|
-
|
|
54083
|
-
/* normalize component */
|
|
54084
|
-
|
|
54085
|
-
var component = (0,componentNormalizer/* default */.A)(
|
|
54086
|
-
cms_richText_Viewvue_type_script_lang_js,
|
|
54087
|
-
render,
|
|
54088
|
-
staticRenderFns,
|
|
54089
|
-
false,
|
|
54090
|
-
null,
|
|
54091
|
-
"36ccf66e",
|
|
54092
|
-
null
|
|
54093
|
-
|
|
54094
|
-
)
|
|
54095
|
-
|
|
54096
|
-
/* harmony default export */ var View = (component.exports);
|
|
54097
|
-
|
|
54098
|
-
/***/ }),
|
|
54099
|
-
|
|
54100
54111
|
/***/ 8918:
|
|
54101
54112
|
/***/ (function(module) {
|
|
54102
54113
|
|