cms-chenhj-ui 2.0.37 → 2.0.39

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.
@@ -741,6 +741,252 @@ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSc
741
741
 
742
742
  /***/ }),
743
743
 
744
+ /***/ 304:
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-video-group/View.vue?vue&type=template&id=279ca476&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
+ "isMask": false,
766
+ "lang": _vm.lang
767
+ },
768
+ on: {
769
+ "getConfigData": _vm.getConfigData,
770
+ "getDevice": _vm.getDevice
771
+ }
772
+ }, 'BaseComp', _vm.$attrs, false), [_c('section', {
773
+ staticClass: "cmhk-home_main"
774
+ }, [_c('div', {
775
+ staticClass: "wrap",
776
+ style: _vm.wrapStyle
777
+ }, _vm._l(_vm.showVideoList, function (item) {
778
+ return _c('cms-video', {
779
+ key: item.componentId,
780
+ staticStyle: {
781
+ "overflow": "hidden"
782
+ },
783
+ attrs: {
784
+ "data": item,
785
+ "nowCompId": _vm.nowCompId,
786
+ "isOpcacity": _vm.isOpcacity,
787
+ "isMask": false,
788
+ "lang": _vm.lang
789
+ }
790
+ });
791
+ }), 1), _vm.isShowPannel ? [_c('div', {
792
+ staticClass: "view-more-container"
793
+ }, [_c('div', {
794
+ staticClass: "view-more-btn",
795
+ on: {
796
+ "click": _vm.foldMessText
797
+ }
798
+ }, [_c('span', {
799
+ staticClass: "view-more-text"
800
+ }, [_vm._v(" " + _vm._s(_vm.messFold ? _vm.$t("roamIndex.Collpase") : _vm.$t("roamIndex.More")) + " ")]), _c('i', {
801
+ class: ['view-more-icon', _vm.messFold ? 'el-icon-arrow-up' : 'el-icon-arrow-down']
802
+ })])])] : _vm._e()], 2)]);
803
+ };
804
+ var staticRenderFns = [];
805
+
806
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
807
+ var baseComp = __webpack_require__(677);
808
+ ;// ./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-video-group/View.vue?vue&type=script&lang=js
809
+
810
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
811
+ name: "cms-video-group",
812
+ components: {
813
+ BaseComp: baseComp["default"]
814
+ },
815
+ props: {
816
+ data: {
817
+ type: Object,
818
+ default: () => {
819
+ return {};
820
+ }
821
+ },
822
+ nowCompId: {
823
+ type: [String, Number],
824
+ default: ""
825
+ },
826
+ isOpcacity: {
827
+ type: Boolean,
828
+ default: true
829
+ },
830
+ lang: {
831
+ type: String,
832
+ default: "zh-HK"
833
+ }
834
+ },
835
+ data() {
836
+ return {
837
+ configData: {},
838
+ messFold: false,
839
+ // 默认配置数据
840
+ defaultConfig: {
841
+ colNums_PC: 1,
842
+ colNums_Mobile: 1,
843
+ defaultCol: 12,
844
+ gap: 10,
845
+ cornerRadius: {
846
+ topLeft: "0",
847
+ topRight: "0",
848
+ bottomLeft: "0",
849
+ bottomRight: "0"
850
+ }
851
+ },
852
+ isShowPannel: false,
853
+ isMobile: false
854
+ };
855
+ },
856
+ mounted() {},
857
+ watch: {
858
+ configData: {
859
+ handler() {
860
+ this.updateStyles();
861
+ },
862
+ deep: true
863
+ }
864
+ },
865
+ computed: {
866
+ colNums() {
867
+ const config = {
868
+ ...this.defaultConfig,
869
+ ...this.configData
870
+ };
871
+ return this.isMobile ? config.colNums_Mobile : config.colNums_PC;
872
+ },
873
+ showVideoList() {
874
+ if (this.isShowPannel && !this.messFold) return this.data.childList.slice(0, this.colNums * this.configData.defaultCol);
875
+ return this.data.childList;
876
+ },
877
+ isConfigPage() {
878
+ return this.$EventBus && this.isOpcacity;
879
+ },
880
+ borderRadiusStyle() {
881
+ const config = {
882
+ ...this.defaultConfig,
883
+ ...this.configData
884
+ };
885
+ const radiusConfig = config.cornerRadius || {};
886
+ const formatRadius = value => {
887
+ if (value === "full") return "9999px";
888
+ if (value === undefined || value === null || value === "") {
889
+ return "0px";
890
+ }
891
+ const num = Number(value);
892
+ return Number.isNaN(num) ? "0px" : `${num}px`;
893
+ };
894
+ const resolveValue = corner => {
895
+ const value = radiusConfig[corner];
896
+ return formatRadius(value);
897
+ };
898
+ return {
899
+ topLeft: resolveValue("topLeft"),
900
+ topRight: resolveValue("topRight"),
901
+ bottomLeft: resolveValue("bottomLeft"),
902
+ bottomRight: resolveValue("bottomRight")
903
+ };
904
+ },
905
+ wrapStyle() {
906
+ const config = {
907
+ ...this.defaultConfig,
908
+ ...this.configData
909
+ };
910
+ return {
911
+ gridTemplateColumns: `repeat(${this.colNums}, 1fr)`,
912
+ gridGap: `${config.gap}px`,
913
+ borderTopLeftRadius: this.borderRadiusStyle.topLeft,
914
+ borderTopRightRadius: this.borderRadiusStyle.topRight,
915
+ borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
916
+ borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
917
+ overflow: "hidden"
918
+ };
919
+ }
920
+ },
921
+ methods: {
922
+ getDevice(val) {
923
+ this.isMobile = val;
924
+ },
925
+ // 获取配置数据
926
+ getConfigData(configData) {
927
+ this.configData = this.getMergedConfig(configData);
928
+ this.updateStyles();
929
+ this.isShowPannel = this.colNums * this.configData.defaultCol < this.data.childList.length;
930
+ },
931
+ // 更新样式
932
+ updateStyles() {
933
+ this.$nextTick(() => {
934
+ // 触发样式更新
935
+ this.$forceUpdate();
936
+ });
937
+ },
938
+ // 折叠/展开文本
939
+ foldMessText() {
940
+ this.messFold = !this.messFold;
941
+ },
942
+ getMergedConfig(configData = {}) {
943
+ const mergedCorner = {
944
+ ...(this.defaultConfig.cornerRadius || {})
945
+ };
946
+ if (configData.cornerRadius) {
947
+ Object.assign(mergedCorner, configData.cornerRadius);
948
+ }
949
+ return {
950
+ ...this.defaultConfig,
951
+ ...configData,
952
+ cornerRadius: mergedCorner
953
+ };
954
+ }
955
+ }
956
+ });
957
+ ;// ./package/cms-video-group/View.vue?vue&type=script&lang=js
958
+ /* harmony default export */ var cms_video_group_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
959
+ ;// ./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-video-group/View.vue?vue&type=style&index=0&id=279ca476&prod&lang=scss&scoped=true
960
+ // extracted by mini-css-extract-plugin
961
+
962
+ ;// ./package/cms-video-group/View.vue?vue&type=style&index=0&id=279ca476&prod&lang=scss&scoped=true
963
+
964
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
965
+ var componentNormalizer = __webpack_require__(1656);
966
+ ;// ./package/cms-video-group/View.vue
967
+
968
+
969
+
970
+ ;
971
+
972
+
973
+ /* normalize component */
974
+
975
+ var component = (0,componentNormalizer/* default */.A)(
976
+ cms_video_group_Viewvue_type_script_lang_js,
977
+ render,
978
+ staticRenderFns,
979
+ false,
980
+ null,
981
+ "279ca476",
982
+ null
983
+
984
+ )
985
+
986
+ /* harmony default export */ var View = (component.exports);
987
+
988
+ /***/ }),
989
+
744
990
  /***/ 342:
745
991
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
746
992
 
@@ -3134,6 +3380,472 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEQAAABECAMAAAAP
3134
3380
 
3135
3381
  /***/ }),
3136
3382
 
3383
+ /***/ 579:
3384
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3385
+
3386
+ "use strict";
3387
+ // ESM COMPAT FLAG
3388
+ __webpack_require__.r(__webpack_exports__);
3389
+
3390
+ // EXPORTS
3391
+ __webpack_require__.d(__webpack_exports__, {
3392
+ "default": function() { return /* binding */ View; }
3393
+ });
3394
+
3395
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
3396
+ var es_iterator_constructor = __webpack_require__(8111);
3397
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.drop.js
3398
+ var es_iterator_drop = __webpack_require__(9314);
3399
+ ;// ./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=ad0fdc1e&scoped=true
3400
+
3401
+
3402
+
3403
+
3404
+ var render = function render() {
3405
+ var _vm = this,
3406
+ _c = _vm._self._c;
3407
+ return _c('BaseComp', _vm._b({
3408
+ attrs: {
3409
+ "data": _vm.data,
3410
+ "nowCompId": _vm.nowCompId,
3411
+ "isOpcacity": _vm.isOpcacity,
3412
+ "isMask": false,
3413
+ "lang": _vm.lang,
3414
+ "showDel": false
3415
+ },
3416
+ on: {
3417
+ "getConfigData": _vm.getConfigData
3418
+ }
3419
+ }, 'BaseComp', _vm.$attrs, false), [_vm.isConfigPage ? _c('div', {
3420
+ staticClass: "main_drag hoverBorderClass",
3421
+ style: _vm.cardContainerStyle,
3422
+ attrs: {
3423
+ "id": `cardTarget${_vm.data.componentId}`
3424
+ },
3425
+ on: {
3426
+ "dragover": _vm.dragover,
3427
+ "dragend": function ($event) {
3428
+ _vm.showAddCom = false;
3429
+ },
3430
+ "drop": _vm.drop
3431
+ }
3432
+ }, [_c('Draggable', {
3433
+ staticStyle: {
3434
+ "position": "relative"
3435
+ },
3436
+ attrs: {
3437
+ "group": _vm.groupConfigForMain,
3438
+ "chosen-class": "chosen",
3439
+ "force-fallback": "true",
3440
+ "animation": "1000",
3441
+ "move": _vm.onMove
3442
+ },
3443
+ on: {
3444
+ "start": _vm.onStart,
3445
+ "end": function ($event) {
3446
+ _vm.showAddCom = false;
3447
+ }
3448
+ },
3449
+ model: {
3450
+ value: _vm.data.childList,
3451
+ callback: function ($$v) {
3452
+ _vm.$set(_vm.data, "childList", $$v);
3453
+ },
3454
+ expression: "data.childList"
3455
+ }
3456
+ }, [_vm._l(_vm.data.childList, function (item, index) {
3457
+ return _c('div', {
3458
+ key: item.componentId,
3459
+ staticStyle: {
3460
+ "position": "relative"
3461
+ }
3462
+ }, [_vm.showAddCom ? _c('div', {
3463
+ staticClass: "up_insert",
3464
+ attrs: {
3465
+ "id": `${item.componentId}-cardTargetup`
3466
+ }
3467
+ }, [_c('i', {
3468
+ staticClass: "icon-up",
3469
+ attrs: {
3470
+ "id": `${item.componentId}-upi`
3471
+ }
3472
+ }), _c('span', {
3473
+ attrs: {
3474
+ "id": `${item.componentId}-upspan`
3475
+ }
3476
+ }, [_vm._v("插入组件")])]) : _vm._e(), _c(item.cmsCompName, {
3477
+ tag: "component",
3478
+ style: {
3479
+ marginTop: _vm.showAddCom && index == 0 ? '20px' : '0px'
3480
+ },
3481
+ attrs: {
3482
+ "data": item,
3483
+ "lang": _vm.lang,
3484
+ "isOpcacity": _vm.isOpcacity,
3485
+ "nowCompId": _vm.nowCompId,
3486
+ "showCmhkMain": false
3487
+ }
3488
+ })], 1);
3489
+ }), _vm.showAddCom ? _c('div', {
3490
+ staticClass: "up_insert insert_bottom",
3491
+ style: {
3492
+ bottom: _vm.data.childList.length ? '0px' : '-24px'
3493
+ },
3494
+ attrs: {
3495
+ "id": `-cardTargetdown`
3496
+ }
3497
+ }, [_c('i', {
3498
+ staticClass: "icon-up"
3499
+ }), _c('span', [_vm._v("插入组件")])]) : _vm._e()], 2)], 1) : _c('cms-view', _vm._b({
3500
+ style: _vm.cardContainerStyle,
3501
+ attrs: {
3502
+ "data": _vm.data.childList,
3503
+ "lang": _vm.lang,
3504
+ "isOpcacity": false,
3505
+ "showCmhkMain": false
3506
+ }
3507
+ }, 'cms-view', _vm.$attrs, false))], 1);
3508
+ };
3509
+ var staticRenderFns = [];
3510
+
3511
+ ;// ./package/cms-column-card/View.vue?vue&type=template&id=ad0fdc1e&scoped=true
3512
+
3513
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
3514
+ var es_array_push = __webpack_require__(4114);
3515
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
3516
+ var baseComp = __webpack_require__(677);
3517
+ // EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
3518
+ var vuedraggable_umd = __webpack_require__(9014);
3519
+ var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
3520
+ // EXTERNAL MODULE: ./package/baseConfig.js
3521
+ var baseConfig = __webpack_require__(2128);
3522
+ // EXTERNAL MODULE: ./src/views/standard_page.js
3523
+ var standard_page = __webpack_require__(521);
3524
+ ;// ./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
3525
+
3526
+
3527
+
3528
+
3529
+
3530
+
3531
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
3532
+ name: "cms-column-card",
3533
+ components: {
3534
+ BaseComp: baseComp["default"],
3535
+ Draggable: (vuedraggable_umd_default())
3536
+ },
3537
+ props: {
3538
+ data: {
3539
+ type: Object,
3540
+ default: () => {
3541
+ return {};
3542
+ }
3543
+ },
3544
+ nowCompId: {
3545
+ type: [String, Number],
3546
+ default: ""
3547
+ },
3548
+ isOpcacity: {
3549
+ type: Boolean,
3550
+ default: true
3551
+ },
3552
+ lang: {
3553
+ type: String,
3554
+ default: "zh-HK"
3555
+ },
3556
+ isMobile: {
3557
+ type: Boolean,
3558
+ default: false
3559
+ },
3560
+ mobileLayout: {
3561
+ type: String,
3562
+ default: ""
3563
+ }
3564
+ },
3565
+ data() {
3566
+ return {
3567
+ configData: {},
3568
+ messFold: true,
3569
+ showAddCom: false,
3570
+ temporaryList: []
3571
+ };
3572
+ },
3573
+ computed: {
3574
+ isConfigPage() {
3575
+ return this.$EventBus && this.isOpcacity;
3576
+ },
3577
+ groupConfigForMain() {
3578
+ return {
3579
+ name: "task",
3580
+ pull: true,
3581
+ // A列表的元素可以被拖出
3582
+ put: (to, from, dragEl) => {
3583
+ console.log(from.el.classList);
3584
+ if (from.el.classList.contains("main_drag")) {
3585
+ const dataId = this.findFirstComponentKey(dragEl);
3586
+ const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column"];
3587
+ console.log("allowedComponents", dataId);
3588
+ if (dataId === "cms-column") {
3589
+ if (!this.checkColumnNestingLevel()) {
3590
+ console.log("cms-column 嵌套层级超出限制");
3591
+ return false;
3592
+ }
3593
+ }
3594
+ return allowedComponents.includes(dataId);
3595
+ }
3596
+ return true;
3597
+ }
3598
+ };
3599
+ },
3600
+ // 卡片容器样式
3601
+ cardContainerStyle() {
3602
+ return {
3603
+ backgroundImage: this.configData.backgroundImage ? `url('${this.configData.backgroundImage}')` : "none",
3604
+ backgroundSize: "cover",
3605
+ backgroundRepeat: "no-repeat",
3606
+ backgroundPosition: "center center",
3607
+ height: this.getContainerHeight(),
3608
+ border: this.getContainerBorder(),
3609
+ borderRadius: this.getContainerBorderRadius(),
3610
+ backgroundColor: this.configData.backgroundColor || "transparent",
3611
+ boxShadow: this.configData.boxShadow || "none"
3612
+ };
3613
+ }
3614
+ },
3615
+ mounted() {
3616
+ if (this.$EventBus) {
3617
+ this.$EventBus.$on("handleDragEnd", () => {
3618
+ this.showAddCom = false;
3619
+ });
3620
+ }
3621
+ },
3622
+ watch: {},
3623
+ methods: {
3624
+ findFirstComponentKey(root) {
3625
+ var _root$querySelector;
3626
+ if (!root) return null;
3627
+
3628
+ // 若起点自身就有
3629
+ if (root.nodeType === 1 && root.hasAttribute("component-key")) {
3630
+ return root.getAttribute("component-key");
3631
+ }
3632
+
3633
+ // 向下查找第一个匹配的后代
3634
+ const el = (_root$querySelector = root.querySelector) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.call(root, "[component-key]");
3635
+ return el ? el.getAttribute("component-key") : null;
3636
+ },
3637
+ // 获取容器高度
3638
+ getContainerHeight() {
3639
+ if (this.configData.heightType === "fixed") {
3640
+ return `${this.configData.fixedHeight}px`;
3641
+ }
3642
+ return this.isMobile && this.mobileLayout == "vertical" ? "auto" : "100%";
3643
+ },
3644
+ // 获取容器边框
3645
+ getContainerBorder() {
3646
+ if (this.configData.borderWidth) {
3647
+ return `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}`;
3648
+ }
3649
+ return "none";
3650
+ },
3651
+ // 获取容器圆角
3652
+ getContainerBorderRadius() {
3653
+ const radius = this.configData.borderRadius !== undefined && this.configData.borderRadius !== null ? this.configData.borderRadius : 0;
3654
+ if (radius === "full") {
3655
+ return "9999px";
3656
+ }
3657
+ const radiusNumber = Number(radius);
3658
+ return Number.isNaN(radiusNumber) ? "0px" : `${radiusNumber}px`;
3659
+ },
3660
+ getConfigData(configData) {
3661
+ this.configData = configData;
3662
+ },
3663
+ foldMessText() {
3664
+ this.messFold = !this.messFold;
3665
+ },
3666
+ decodeJumpUrl(url) {
3667
+ if (!url) return;
3668
+ top.location.href = url;
3669
+ },
3670
+ onStart(evt) {
3671
+ console.log("drag start in column-card", evt);
3672
+ this.showAddCom = true;
3673
+ },
3674
+ // 限制拖拽的组件类型
3675
+ onMove(evt) {
3676
+ const {
3677
+ draggedContext
3678
+ } = evt;
3679
+
3680
+ // 允许的组件类型
3681
+ const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
3682
+ ];
3683
+
3684
+ // 如果是从外部拖入的组件
3685
+ if (draggedContext && draggedContext.element) {
3686
+ const componentType = draggedContext.element.cmsCompName;
3687
+ if (componentType && !allowedComponents.includes(componentType)) {
3688
+ console.log("draggedContext.element", draggedContext.element);
3689
+ console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
3690
+ return false;
3691
+ }
3692
+
3693
+ // 特殊处理 cms-column:检查嵌套层级
3694
+ if (componentType === "cms-column") {
3695
+ if (!this.checkColumnNestingLevel()) {
3696
+ console.log("cms-column 嵌套层级超出限制");
3697
+ return false;
3698
+ }
3699
+ }
3700
+ }
3701
+ return true;
3702
+ },
3703
+ // 检查 cms-column 嵌套层级
3704
+ checkColumnNestingLevel() {
3705
+ // 检查当前 column-card 是否已经在 cms-column 内部
3706
+ let parent = this.$parent;
3707
+ let columnDepth = 0;
3708
+ while (parent) {
3709
+ // 检查父组件是否是 cms-column 或包含 cms-column
3710
+ if (parent.$options.name === "cms-column" || parent.$data && parent.$data.data && parent.$data.data.cmsCompName === "cms-column") {
3711
+ columnDepth++;
3712
+ }
3713
+
3714
+ // 如果已经有一层 cms-column,则不允许再嵌套
3715
+ if (columnDepth >= 2) {
3716
+ console.log(`检测到 cms-column 嵌套层级: ${columnDepth}, 超出限制`);
3717
+ return false;
3718
+ }
3719
+ parent = parent.$parent;
3720
+ }
3721
+ console.log(`cms-column 嵌套层级检查通过: ${columnDepth}`);
3722
+ return true;
3723
+ },
3724
+ // 处理拖拽悬停
3725
+ dragover(e) {
3726
+ e.preventDefault();
3727
+ this.showAddCom = true;
3728
+ },
3729
+ // 处理拖拽放置
3730
+ drop(e) {
3731
+ e.preventDefault();
3732
+ const componentKey = e.dataTransfer.getData("componentKey");
3733
+ let temporaryId = "";
3734
+ this.temporaryList = e.dataTransfer.getData("temporaryList") ? JSON.parse(e.dataTransfer.getData("temporaryList")) : [];
3735
+ console.log("cms-colum-card-drop", componentKey, this.temporaryList);
3736
+ if (!componentKey) return;
3737
+ const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
3738
+ const isTemporary = isTemporaryItem === "true";
3739
+ if (isTemporary) {
3740
+ temporaryId = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey).cmsCompName;
3741
+ }
3742
+ const componentType = isTemporary ? temporaryId : componentKey;
3743
+ // 允许的组件类型
3744
+ const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
3745
+ ];
3746
+
3747
+ // 检查组件类型是否允许
3748
+ if (!allowedComponents.includes(componentType)) {
3749
+ console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
3750
+ this.$message && this.$message.warning(`该组件类型不支持拖入卡片容器`);
3751
+ this.showAddCom = false;
3752
+ return;
3753
+ }
3754
+
3755
+ // 特殊处理 cms-column:检查嵌套层级
3756
+ if (componentType === "cms-column") {
3757
+ if (!this.checkColumnNestingLevel()) {
3758
+ console.log("cms-column 嵌套层级超出限制");
3759
+ this.$message && this.$message.warning(`cms-column 只能嵌套一层`);
3760
+ this.showAddCom = false;
3761
+ return;
3762
+ }
3763
+ }
3764
+ this.addOneComp(e, componentKey);
3765
+ },
3766
+ // 添加组件到卡片容器
3767
+ addOneComp(e, componentKey) {
3768
+ this.showAddCom = false;
3769
+ console.log("drop to column-card", componentKey);
3770
+
3771
+ // 动态导入组件配置
3772
+ let initCompData;
3773
+ try {
3774
+ const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
3775
+ const isTemporary = isTemporaryItem === "true";
3776
+ if (isTemporary) {
3777
+ initCompData = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey);
3778
+ } else {
3779
+ initCompData = __webpack_require__(1640)(`./${componentKey}`).default.settings(componentKey);
3780
+ }
3781
+ if (!isTemporary) {
3782
+ initCompData = {
3783
+ ...initCompData,
3784
+ styleConfig: {
3785
+ pc: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(16, 16, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")],
3786
+ mb: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(12, 12, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")]
3787
+ }
3788
+ };
3789
+ }
3790
+ } catch (error) {
3791
+ console.error(`无法加载组件 ${componentKey}:`, error);
3792
+ this.$message && this.$message.error(`组件加载失败`);
3793
+ return;
3794
+ }
3795
+ const toElementId = e.toElement.id;
3796
+ if (toElementId === `cardTarget${this.data.componentId}` || toElementId.includes("cardTargetdown")) {
3797
+ // 添加到卡片容器末尾
3798
+ this.data.childList.push(initCompData);
3799
+ } else if (toElementId.includes("cardTargetup")) {
3800
+ // 插入到指定位置
3801
+ const underComponentId = toElementId.split("-cardTargetup")[0];
3802
+ const index = this.data.childList.findIndex(item => item.componentId === underComponentId);
3803
+ if (index !== -1) {
3804
+ this.data.childList.splice(index, 0, initCompData);
3805
+ }
3806
+ }
3807
+
3808
+ // 触发数据更新
3809
+ this.$emit("update:data", this.data);
3810
+ if (componentKey === "cms-column") {
3811
+ this.$EventBus.$emit("handleNowComp", initCompData);
3812
+ }
3813
+ }
3814
+ }
3815
+ });
3816
+ ;// ./package/cms-column-card/View.vue?vue&type=script&lang=js
3817
+ /* harmony default export */ var cms_column_card_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
3818
+ ;// ./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=ad0fdc1e&prod&lang=scss&scoped=true
3819
+ // extracted by mini-css-extract-plugin
3820
+
3821
+ ;// ./package/cms-column-card/View.vue?vue&type=style&index=0&id=ad0fdc1e&prod&lang=scss&scoped=true
3822
+
3823
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
3824
+ var componentNormalizer = __webpack_require__(1656);
3825
+ ;// ./package/cms-column-card/View.vue
3826
+
3827
+
3828
+
3829
+ ;
3830
+
3831
+
3832
+ /* normalize component */
3833
+
3834
+ var component = (0,componentNormalizer/* default */.A)(
3835
+ cms_column_card_Viewvue_type_script_lang_js,
3836
+ render,
3837
+ staticRenderFns,
3838
+ false,
3839
+ null,
3840
+ "ad0fdc1e",
3841
+ null
3842
+
3843
+ )
3844
+
3845
+ /* harmony default export */ var View = (component.exports);
3846
+
3847
+ /***/ }),
3848
+
3137
3849
  /***/ 613:
3138
3850
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3139
3851
 
@@ -13927,360 +14639,6 @@ module.exports = {
13927
14639
  };
13928
14640
 
13929
14641
 
13930
- /***/ }),
13931
-
13932
- /***/ 1222:
13933
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
13934
-
13935
- "use strict";
13936
- // ESM COMPAT FLAG
13937
- __webpack_require__.r(__webpack_exports__);
13938
-
13939
- // EXPORTS
13940
- __webpack_require__.d(__webpack_exports__, {
13941
- "default": function() { return /* binding */ View; }
13942
- });
13943
-
13944
- ;// ./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=768fd2d4&scoped=true
13945
- var render = function render() {
13946
- var _vm = this,
13947
- _c = _vm._self._c;
13948
- return _c('BaseComp', _vm._b({
13949
- attrs: {
13950
- "data": _vm.data,
13951
- "nowCompId": _vm.nowCompId,
13952
- "isOpcacity": _vm.isOpcacity,
13953
- "lang": _vm.lang
13954
- },
13955
- on: {
13956
- "getConfigData": _vm.getConfigData
13957
- }
13958
- }, 'BaseComp', _vm.$attrs, false), [_c('section', {
13959
- staticClass: "cms-image-container",
13960
- class: [_vm.configData.customClass || '', {
13961
- 'has-link': _vm.configData.zoomDynamic
13962
- }],
13963
- style: _vm.containerStyle
13964
- }, [_c('div', {
13965
- staticClass: "image-wrapper",
13966
- style: _vm.wrapperStyle,
13967
- on: {
13968
- "click": _vm.handleClick
13969
- }
13970
- }, [_vm.configData.imageUrl ? _c('img', {
13971
- staticClass: "cms-image",
13972
- style: _vm.imageStyle,
13973
- attrs: {
13974
- "src": _vm.configData.imageUrl,
13975
- "alt": _vm.configData.altText || '图片',
13976
- "title": _vm.configData.title
13977
- },
13978
- on: {
13979
- "load": _vm.onImageLoad,
13980
- "error": _vm.onImageError
13981
- }
13982
- }) : _c('div', {
13983
- staticClass: "image-placeholder",
13984
- style: _vm.placeholderStyle
13985
- }, [_c('img', {
13986
- staticStyle: {
13987
- "width": "200px",
13988
- "height": "200px"
13989
- },
13990
- attrs: {
13991
- "src": __webpack_require__(4806),
13992
- "alt": "Picture"
13993
- }
13994
- })])])]), _vm.configData.remark ? _c('div', {
13995
- staticClass: "f-c-c"
13996
- }, [_vm._v(_vm._s(_vm.configData.remark))]) : _vm._e()]);
13997
- };
13998
- var staticRenderFns = [];
13999
-
14000
- ;// ./package/cms-image/View.vue?vue&type=template&id=768fd2d4&scoped=true
14001
-
14002
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
14003
- var es_iterator_constructor = __webpack_require__(8111);
14004
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
14005
- var es_iterator_for_each = __webpack_require__(7588);
14006
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
14007
- var baseComp = __webpack_require__(677);
14008
- ;// ./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
14009
-
14010
-
14011
-
14012
-
14013
-
14014
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
14015
- name: "cms-image",
14016
- components: {
14017
- BaseComp: baseComp["default"]
14018
- },
14019
- props: {
14020
- data: {
14021
- type: Object,
14022
- default: () => {
14023
- return {};
14024
- }
14025
- },
14026
- nowCompId: {
14027
- type: [String, Number],
14028
- default: ""
14029
- },
14030
- isOpcacity: {
14031
- type: Boolean,
14032
- default: true
14033
- },
14034
- lang: {
14035
- type: String,
14036
- default: "zh-HK"
14037
- }
14038
- },
14039
- data() {
14040
- return {
14041
- configData: {},
14042
- imageLoaded: false,
14043
- imageError: false,
14044
- // 默认配置数据
14045
- defaultConfig: {
14046
- // 图片设置
14047
- imageUrl: "",
14048
- altText: "图片",
14049
- title: "",
14050
- // 样式设置
14051
- borderRadius: 0,
14052
- cornerRadius: {
14053
- topLeft: "0",
14054
- topRight: "0",
14055
- bottomLeft: "0",
14056
- bottomRight: "0"
14057
- },
14058
- objectFit: "cover",
14059
- // 交互功能
14060
- linkUrl: "",
14061
- linkTarget: "_self",
14062
- // 高级配置
14063
- customClass: "",
14064
- customStyle: "",
14065
- lazyLoad: false,
14066
- zoomDynamic: false
14067
- }
14068
- };
14069
- },
14070
- mounted() {
14071
- this.initConfigData();
14072
- },
14073
- watch: {
14074
- configData: {
14075
- handler() {
14076
- this.updateStyles();
14077
- },
14078
- deep: true
14079
- }
14080
- },
14081
- computed: {
14082
- // 容器样式
14083
- containerStyle() {
14084
- const config = {
14085
- ...this.defaultConfig,
14086
- ...this.configData
14087
- };
14088
- return {
14089
- ...this.parseCustomStyle(config.customStyle)
14090
- };
14091
- },
14092
- borderRadiusStyle() {
14093
- const config = {
14094
- ...this.defaultConfig,
14095
- ...this.configData
14096
- };
14097
- const fallback = config.borderRadius !== undefined && config.borderRadius !== null ? `${config.borderRadius}px` : "0px";
14098
- const radiusConfig = config.cornerRadius || {};
14099
- const legacyMap = {
14100
- topLeft: config.borderRadiusTopLeft,
14101
- topRight: config.borderRadiusTopRight,
14102
- bottomLeft: config.borderRadiusBottomLeft,
14103
- bottomRight: config.borderRadiusBottomRight
14104
- };
14105
- const resolveValue = corner => {
14106
- const value = radiusConfig[corner] !== undefined && radiusConfig[corner] !== null ? radiusConfig[corner] : legacyMap[corner];
14107
- if (value === "full") return "9999px";
14108
- if (value === undefined || value === null || value === "") {
14109
- return fallback;
14110
- }
14111
- const num = Number(value);
14112
- return Number.isNaN(num) ? fallback : `${num}px`;
14113
- };
14114
- return {
14115
- topLeft: resolveValue("topLeft"),
14116
- topRight: resolveValue("topRight"),
14117
- bottomLeft: resolveValue("bottomLeft"),
14118
- bottomRight: resolveValue("bottomRight")
14119
- };
14120
- },
14121
- // 包装器样式
14122
- wrapperStyle() {
14123
- const config = {
14124
- ...this.defaultConfig,
14125
- ...this.configData
14126
- };
14127
- return {
14128
- width: "100%",
14129
- height: "auto",
14130
- maxWidth: "100%",
14131
- borderTopLeftRadius: this.borderRadiusStyle.topLeft,
14132
- borderTopRightRadius: this.borderRadiusStyle.topRight,
14133
- borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
14134
- borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
14135
- overflow: "hidden",
14136
- cursor: config.linkUrl ? "pointer" : "default",
14137
- display: "block"
14138
- };
14139
- },
14140
- // 图片样式
14141
- imageStyle() {
14142
- const config = {
14143
- ...this.defaultConfig,
14144
- ...this.configData
14145
- };
14146
- return {
14147
- width: "100%",
14148
- height: "auto",
14149
- objectFit: config.objectFit,
14150
- display: "block"
14151
- };
14152
- },
14153
- // 占位符样式
14154
- placeholderStyle() {
14155
- const config = {
14156
- ...this.defaultConfig,
14157
- ...this.configData
14158
- };
14159
- return {
14160
- width: "100%",
14161
- minHeight: "150px",
14162
- backgroundColor: "#F2F9FF",
14163
- border: "1px dashed #dcdfe6",
14164
- borderTopLeftRadius: this.borderRadiusStyle.topLeft,
14165
- borderTopRightRadius: this.borderRadiusStyle.topRight,
14166
- borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
14167
- borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
14168
- display: "flex",
14169
- flexDirection: "column",
14170
- alignItems: "center",
14171
- justifyContent: "center",
14172
- color: "#909399",
14173
- fontSize: "14px"
14174
- };
14175
- }
14176
- },
14177
- methods: {
14178
- // 初始化配置数据
14179
- initConfigData() {
14180
- this.configData = this.getMergedConfig(this.configData);
14181
- },
14182
- // 获取配置数据
14183
- getConfigData(configData) {
14184
- this.configData = this.getMergedConfig(configData);
14185
- this.updateStyles();
14186
- },
14187
- // 更新样式
14188
- updateStyles() {
14189
- this.$nextTick(() => {
14190
- this.$forceUpdate();
14191
- });
14192
- },
14193
- getMergedConfig(configData = {}) {
14194
- const mergedCorner = {
14195
- ...(this.defaultConfig.cornerRadius || {})
14196
- };
14197
- if (configData.cornerRadius) {
14198
- Object.assign(mergedCorner, configData.cornerRadius);
14199
- } else {
14200
- mergedCorner.topLeft = configData.borderRadiusTopLeft ?? mergedCorner.topLeft;
14201
- mergedCorner.topRight = configData.borderRadiusTopRight ?? mergedCorner.topRight;
14202
- mergedCorner.bottomLeft = configData.borderRadiusBottomLeft ?? mergedCorner.bottomLeft;
14203
- mergedCorner.bottomRight = configData.borderRadiusBottomRight ?? mergedCorner.bottomRight;
14204
- }
14205
- return {
14206
- ...this.defaultConfig,
14207
- ...configData,
14208
- cornerRadius: mergedCorner
14209
- };
14210
- },
14211
- // 处理点击事件
14212
- handleClick() {
14213
- if (this.configData.linkUrl) {
14214
- const target = this.configData.linkTarget || "_self";
14215
- if (target === "_blank") {
14216
- window.open(this.configData.linkUrl, "_blank");
14217
- } else {
14218
- window.location.href = this.configData.linkUrl;
14219
- }
14220
- }
14221
- },
14222
- // 图片加载成功
14223
- onImageLoad() {
14224
- this.imageLoaded = true;
14225
- this.imageError = false;
14226
- },
14227
- // 图片加载失败
14228
- onImageError() {
14229
- this.imageLoaded = false;
14230
- this.imageError = true;
14231
- },
14232
- // 解析自定义样式
14233
- parseCustomStyle(customStyle) {
14234
- if (!customStyle) return {};
14235
- try {
14236
- const styles = {};
14237
- const declarations = customStyle.split(";");
14238
- declarations.forEach(declaration => {
14239
- const [property, value] = declaration.split(":");
14240
- if (property && value) {
14241
- const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
14242
- styles[camelCaseProperty] = value.trim();
14243
- }
14244
- });
14245
- return styles;
14246
- } catch (error) {
14247
- console.warn("解析自定义样式失败:", error);
14248
- return {};
14249
- }
14250
- }
14251
- }
14252
- });
14253
- ;// ./package/cms-image/View.vue?vue&type=script&lang=js
14254
- /* harmony default export */ var cms_image_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
14255
- ;// ./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-image/View.vue?vue&type=style&index=0&id=768fd2d4&prod&lang=scss&scoped=true
14256
- // extracted by mini-css-extract-plugin
14257
-
14258
- ;// ./package/cms-image/View.vue?vue&type=style&index=0&id=768fd2d4&prod&lang=scss&scoped=true
14259
-
14260
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
14261
- var componentNormalizer = __webpack_require__(1656);
14262
- ;// ./package/cms-image/View.vue
14263
-
14264
-
14265
-
14266
- ;
14267
-
14268
-
14269
- /* normalize component */
14270
-
14271
- var component = (0,componentNormalizer/* default */.A)(
14272
- cms_image_Viewvue_type_script_lang_js,
14273
- render,
14274
- staticRenderFns,
14275
- false,
14276
- null,
14277
- "768fd2d4",
14278
- null
14279
-
14280
- )
14281
-
14282
- /* harmony default export */ var View = (component.exports);
14283
-
14284
14642
  /***/ }),
14285
14643
 
14286
14644
  /***/ 1291:
@@ -22767,8 +23125,8 @@ var map = {
22767
23125
  "./cms-column": 3154,
22768
23126
  "./cms-column-card": 3583,
22769
23127
  "./cms-column-card/": 3583,
22770
- "./cms-column-card/View": 4552,
22771
- "./cms-column-card/View.vue": 4552,
23128
+ "./cms-column-card/View": 579,
23129
+ "./cms-column-card/View.vue": 579,
22772
23130
  "./cms-column-card/index": 3583,
22773
23131
  "./cms-column-card/index.js": 3583,
22774
23132
  "./cms-column/": 3154,
@@ -22797,13 +23155,13 @@ var map = {
22797
23155
  "./cms-image": 3513,
22798
23156
  "./cms-image-group": 2987,
22799
23157
  "./cms-image-group/": 2987,
22800
- "./cms-image-group/View": 6867,
22801
- "./cms-image-group/View.vue": 6867,
23158
+ "./cms-image-group/View": 2578,
23159
+ "./cms-image-group/View.vue": 2578,
22802
23160
  "./cms-image-group/index": 2987,
22803
23161
  "./cms-image-group/index.js": 2987,
22804
23162
  "./cms-image/": 3513,
22805
- "./cms-image/View": 1222,
22806
- "./cms-image/View.vue": 1222,
23163
+ "./cms-image/View": 9383,
23164
+ "./cms-image/View.vue": 9383,
22807
23165
  "./cms-image/index": 3513,
22808
23166
  "./cms-image/index.js": 3513,
22809
23167
  "./cms-imgFour": 3395,
@@ -22928,13 +23286,13 @@ var map = {
22928
23286
  "./cms-video": 3275,
22929
23287
  "./cms-video-group": 2697,
22930
23288
  "./cms-video-group/": 2697,
22931
- "./cms-video-group/View": 1882,
22932
- "./cms-video-group/View.vue": 1882,
23289
+ "./cms-video-group/View": 304,
23290
+ "./cms-video-group/View.vue": 304,
22933
23291
  "./cms-video-group/index": 2697,
22934
23292
  "./cms-video-group/index.js": 2697,
22935
23293
  "./cms-video/": 3275,
22936
- "./cms-video/View": 1659,
22937
- "./cms-video/View.vue": 1659,
23294
+ "./cms-video/View": 6722,
23295
+ "./cms-video/View.vue": 6722,
22938
23296
  "./cms-video/index": 3275,
22939
23297
  "./cms-video/index.js": 3275,
22940
23298
  "./cms-view": 725,
@@ -23107,346 +23465,6 @@ function normalizeComponent(
23107
23465
  }
23108
23466
 
23109
23467
 
23110
- /***/ }),
23111
-
23112
- /***/ 1659:
23113
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
23114
-
23115
- "use strict";
23116
- // ESM COMPAT FLAG
23117
- __webpack_require__.r(__webpack_exports__);
23118
-
23119
- // EXPORTS
23120
- __webpack_require__.d(__webpack_exports__, {
23121
- "default": function() { return /* binding */ View; }
23122
- });
23123
-
23124
- ;// ./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-video/View.vue?vue&type=template&id=9d8bb9e8&scoped=true
23125
- var render = function render() {
23126
- var _vm = this,
23127
- _c = _vm._self._c;
23128
- return _c('BaseComp', _vm._b({
23129
- attrs: {
23130
- "data": _vm.data,
23131
- "nowCompId": _vm.nowCompId,
23132
- "isOpcacity": _vm.isOpcacity,
23133
- "lang": _vm.lang
23134
- },
23135
- on: {
23136
- "getConfigData": _vm.getConfigData
23137
- }
23138
- }, 'BaseComp', _vm.$attrs, false), [_c('section', {
23139
- staticClass: "cms-video-container",
23140
- class: [_vm.configData.customClass || ''],
23141
- style: _vm.containerStyle
23142
- }, [_c('div', {
23143
- staticClass: "video-wrapper",
23144
- style: _vm.wrapperStyle
23145
- }, [_vm.videoType === 'direct' && _vm.configData.videoUrl ? _c('video', {
23146
- staticClass: "cms-video direct-video",
23147
- style: _vm.videoStyle,
23148
- attrs: {
23149
- "src": _vm.configData.videoUrl,
23150
- "controls": _vm.configData.showControls,
23151
- "autoplay": _vm.configData.autoplay,
23152
- "loop": _vm.configData.loop,
23153
- "poster": _vm.configData.posterUrl
23154
- },
23155
- domProps: {
23156
- "muted": _vm.configData.muted
23157
- },
23158
- on: {
23159
- "loadstart": _vm.onVideoLoadStart,
23160
- "loadeddata": _vm.onVideoLoaded,
23161
- "error": _vm.onVideoError
23162
- }
23163
- }) : _vm.configData.embedCode ? _c('div', {
23164
- staticClass: "cms-video embed-video cms-ht",
23165
- style: _vm.videoStyle,
23166
- domProps: {
23167
- "innerHTML": _vm._s(_vm.configData.embedCode)
23168
- }
23169
- }) : _c('div', {
23170
- staticClass: "video-placeholder",
23171
- style: _vm.placeholderStyle
23172
- }, [_c('img', {
23173
- staticStyle: {
23174
- "width": "97.82px",
23175
- "height": "97.82px"
23176
- },
23177
- attrs: {
23178
- "src": __webpack_require__(6148),
23179
- "alt": "Video Camera"
23180
- }
23181
- })])]), _vm.configData.title ? _c('div', {
23182
- staticClass: "f-c-c"
23183
- }, [_vm._v(_vm._s(_vm.configData.title))]) : _vm._e()])]);
23184
- };
23185
- var staticRenderFns = [];
23186
-
23187
- ;// ./package/cms-video/View.vue?vue&type=template&id=9d8bb9e8&scoped=true
23188
-
23189
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
23190
- var es_iterator_constructor = __webpack_require__(8111);
23191
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
23192
- var es_iterator_for_each = __webpack_require__(7588);
23193
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
23194
- var baseComp = __webpack_require__(677);
23195
- ;// ./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-video/View.vue?vue&type=script&lang=js
23196
-
23197
-
23198
-
23199
-
23200
-
23201
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
23202
- name: "cms-video",
23203
- components: {
23204
- BaseComp: baseComp["default"]
23205
- },
23206
- props: {
23207
- data: {
23208
- type: Object,
23209
- default: () => {
23210
- return {};
23211
- }
23212
- },
23213
- nowCompId: {
23214
- type: [String, Number],
23215
- default: ""
23216
- },
23217
- isOpcacity: {
23218
- type: Boolean,
23219
- default: true
23220
- },
23221
- lang: {
23222
- type: String,
23223
- default: "zh-HK"
23224
- }
23225
- },
23226
- data() {
23227
- return {
23228
- configData: {},
23229
- videoLoaded: false,
23230
- videoError: false,
23231
- // 默认配置数据
23232
- defaultConfig: {
23233
- // 视频源设置
23234
- videoType: "direct",
23235
- videoUrl: "",
23236
- embedCode: "",
23237
- posterUrl: "",
23238
- // 播放控制
23239
- showControls: true,
23240
- autoplay: false,
23241
- loop: false,
23242
- muted: false,
23243
- // 尺寸控制
23244
- aspectRatio: "16:9",
23245
- // 样式设置
23246
- borderRadius: 0,
23247
- // 高级配置
23248
- customClass: "",
23249
- customStyle: ""
23250
- }
23251
- };
23252
- },
23253
- mounted() {
23254
- this.initConfigData();
23255
- },
23256
- watch: {
23257
- configData: {
23258
- handler() {
23259
- this.updateStyles();
23260
- },
23261
- deep: true
23262
- }
23263
- },
23264
- computed: {
23265
- showEmbedCode() {
23266
- return this.configData.embedCode.replace(/<iframe(.*?)width="(\d+)"(.*?)height="(\d+)"(.*?)>/gi, '<iframe$1width="100%"$3height="auto"$5 aspect-ratio="$2/$4">');
23267
- },
23268
- // 视频类型
23269
- videoType() {
23270
- return this.configData.videoType || this.defaultConfig.videoType;
23271
- },
23272
- // 实际使用的宽高比
23273
- actualAspectRatio() {
23274
- const config = {
23275
- ...this.defaultConfig,
23276
- ...this.configData
23277
- };
23278
- return config.aspectRatio || "16:9";
23279
- },
23280
- aspectRatioValue() {
23281
- const ratio = this.actualAspectRatio;
23282
- if (!ratio || ratio === "auto") {
23283
- return null;
23284
- }
23285
- return ratio.replace(":", "/");
23286
- },
23287
- // 容器样式
23288
- containerStyle() {
23289
- const config = {
23290
- ...this.defaultConfig,
23291
- ...this.configData
23292
- };
23293
- return {
23294
- ...this.parseCustomStyle(config.customStyle)
23295
- };
23296
- },
23297
- // 包装器样式
23298
- wrapperStyle() {
23299
- const config = {
23300
- ...this.defaultConfig,
23301
- ...this.configData
23302
- };
23303
- const style = {
23304
- width: "100%",
23305
- borderRadius: `${config.borderRadius}px`,
23306
- overflow: "hidden",
23307
- display: "block",
23308
- position: "relative"
23309
- };
23310
- if (this.aspectRatioValue) {
23311
- style.aspectRatio = this.aspectRatioValue;
23312
- }
23313
- return style;
23314
- },
23315
- // 视频样式
23316
- videoStyle() {
23317
- const config = {
23318
- ...this.defaultConfig,
23319
- ...this.configData
23320
- };
23321
- const style = {
23322
- width: "100%",
23323
- display: "block",
23324
- border: "none",
23325
- outline: "none"
23326
- };
23327
- if (this.aspectRatioValue) {
23328
- style.height = "100%";
23329
- style.aspectRatio = this.aspectRatioValue;
23330
- } else {
23331
- style.height = "auto";
23332
- }
23333
- return style;
23334
- },
23335
- // 占位符样式
23336
- placeholderStyle() {
23337
- const config = {
23338
- ...this.defaultConfig,
23339
- ...this.configData
23340
- };
23341
- const style = {
23342
- width: "100%",
23343
- backgroundColor: "#f5f7fa",
23344
- border: "1px dashed #dcdfe6",
23345
- borderRadius: `${config.borderRadius}px`,
23346
- display: "flex",
23347
- flexDirection: "column",
23348
- alignItems: "center",
23349
- justifyContent: "center",
23350
- color: "#909399",
23351
- fontSize: "14px"
23352
- };
23353
- if (this.aspectRatioValue) {
23354
- style.aspectRatio = this.aspectRatioValue;
23355
- } else {
23356
- style.minHeight = "160px";
23357
- }
23358
- return style;
23359
- }
23360
- },
23361
- methods: {
23362
- // 初始化配置数据
23363
- initConfigData() {
23364
- this.configData = {
23365
- ...this.defaultConfig,
23366
- ...this.configData
23367
- };
23368
- },
23369
- // 获取配置数据
23370
- getConfigData(configData) {
23371
- this.configData = {
23372
- ...this.defaultConfig,
23373
- ...configData
23374
- };
23375
- this.updateStyles();
23376
- },
23377
- // 更新样式
23378
- updateStyles() {
23379
- this.$nextTick(() => {
23380
- this.$forceUpdate();
23381
- });
23382
- },
23383
- // 视频开始加载
23384
- onVideoLoadStart() {
23385
- this.videoLoaded = false;
23386
- this.videoError = false;
23387
- },
23388
- // 视频加载完成
23389
- onVideoLoaded() {
23390
- this.videoLoaded = true;
23391
- this.videoError = false;
23392
- },
23393
- // 视频加载失败
23394
- onVideoError() {
23395
- this.videoLoaded = false;
23396
- this.videoError = true;
23397
- },
23398
- // 解析自定义样式
23399
- parseCustomStyle(customStyle) {
23400
- if (!customStyle) return {};
23401
- try {
23402
- const styles = {};
23403
- const declarations = customStyle.split(";");
23404
- declarations.forEach(declaration => {
23405
- const [property, value] = declaration.split(":");
23406
- if (property && value) {
23407
- const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
23408
- styles[camelCaseProperty] = value.trim();
23409
- }
23410
- });
23411
- return styles;
23412
- } catch (error) {
23413
- console.warn("解析自定义样式失败:", error);
23414
- return {};
23415
- }
23416
- }
23417
- }
23418
- });
23419
- ;// ./package/cms-video/View.vue?vue&type=script&lang=js
23420
- /* harmony default export */ var cms_video_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
23421
- ;// ./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-video/View.vue?vue&type=style&index=0&id=9d8bb9e8&prod&lang=scss&scoped=true
23422
- // extracted by mini-css-extract-plugin
23423
-
23424
- ;// ./package/cms-video/View.vue?vue&type=style&index=0&id=9d8bb9e8&prod&lang=scss&scoped=true
23425
-
23426
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
23427
- var componentNormalizer = __webpack_require__(1656);
23428
- ;// ./package/cms-video/View.vue
23429
-
23430
-
23431
-
23432
- ;
23433
-
23434
-
23435
- /* normalize component */
23436
-
23437
- var component = (0,componentNormalizer/* default */.A)(
23438
- cms_video_Viewvue_type_script_lang_js,
23439
- render,
23440
- staticRenderFns,
23441
- false,
23442
- null,
23443
- "9d8bb9e8",
23444
- null
23445
-
23446
- )
23447
-
23448
- /* harmony default export */ var View = (component.exports);
23449
-
23450
23468
  /***/ }),
23451
23469
 
23452
23470
  /***/ 1661:
@@ -24125,189 +24143,6 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABz
24125
24143
 
24126
24144
  /***/ }),
24127
24145
 
24128
- /***/ 1882:
24129
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
24130
-
24131
- "use strict";
24132
- // ESM COMPAT FLAG
24133
- __webpack_require__.r(__webpack_exports__);
24134
-
24135
- // EXPORTS
24136
- __webpack_require__.d(__webpack_exports__, {
24137
- "default": function() { return /* binding */ View; }
24138
- });
24139
-
24140
- ;// ./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-video-group/View.vue?vue&type=template&id=bc32924e&scoped=true
24141
- var render = function render() {
24142
- var _vm = this,
24143
- _c = _vm._self._c;
24144
- return _c('BaseComp', _vm._b({
24145
- attrs: {
24146
- "data": _vm.data,
24147
- "nowCompId": _vm.nowCompId,
24148
- "isOpcacity": _vm.isOpcacity,
24149
- "isMask": false,
24150
- "lang": _vm.lang
24151
- },
24152
- on: {
24153
- "getConfigData": _vm.getConfigData,
24154
- "getDevice": _vm.getDevice
24155
- }
24156
- }, 'BaseComp', _vm.$attrs, false), [_c('section', {
24157
- staticClass: "cmhk-home_main"
24158
- }, [_c('div', {
24159
- staticClass: "wrap",
24160
- style: {
24161
- 'grid-template-columns': `repeat(${_vm.colNums}, 1fr)`,
24162
- 'grid-gap': `${_vm.configData.gap}px`
24163
- }
24164
- }, _vm._l(_vm.showVideoList, function (item) {
24165
- return _c('cms-video', {
24166
- key: item.componentId,
24167
- staticStyle: {
24168
- "overflow": "hidden"
24169
- },
24170
- attrs: {
24171
- "data": item,
24172
- "nowCompId": _vm.nowCompId,
24173
- "isOpcacity": _vm.isOpcacity,
24174
- "isMask": false,
24175
- "lang": _vm.lang
24176
- }
24177
- });
24178
- }), 1), _vm.isShowPannel ? [_c('div', {
24179
- staticClass: "view-more-container"
24180
- }, [_c('div', {
24181
- staticClass: "view-more-btn",
24182
- on: {
24183
- "click": _vm.foldMessText
24184
- }
24185
- }, [_c('span', {
24186
- staticClass: "view-more-text"
24187
- }, [_vm._v(" " + _vm._s(_vm.messFold ? _vm.$t("roamIndex.Collpase") : _vm.$t("roamIndex.More")) + " ")]), _c('i', {
24188
- class: ['view-more-icon', _vm.messFold ? 'el-icon-arrow-up' : 'el-icon-arrow-down']
24189
- })])])] : _vm._e()], 2)]);
24190
- };
24191
- var staticRenderFns = [];
24192
-
24193
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
24194
- var baseComp = __webpack_require__(677);
24195
- ;// ./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-video-group/View.vue?vue&type=script&lang=js
24196
-
24197
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
24198
- name: "cms-video-group",
24199
- components: {
24200
- BaseComp: baseComp["default"]
24201
- },
24202
- props: {
24203
- data: {
24204
- type: Object,
24205
- default: () => {
24206
- return {};
24207
- }
24208
- },
24209
- nowCompId: {
24210
- type: [String, Number],
24211
- default: ""
24212
- },
24213
- isOpcacity: {
24214
- type: Boolean,
24215
- default: true
24216
- },
24217
- lang: {
24218
- type: String,
24219
- default: "zh-HK"
24220
- }
24221
- },
24222
- data() {
24223
- return {
24224
- configData: {},
24225
- messFold: false,
24226
- // 默认配置数据
24227
- isShowPannel: false,
24228
- isMobile: false
24229
- };
24230
- },
24231
- mounted() {},
24232
- watch: {
24233
- configData: {
24234
- handler() {
24235
- this.updateStyles();
24236
- },
24237
- deep: true
24238
- }
24239
- },
24240
- computed: {
24241
- colNums() {
24242
- return this.isMobile ? this.configData.colNums_Mobile : this.configData.colNums_PC;
24243
- },
24244
- showVideoList() {
24245
- if (this.isShowPannel && !this.messFold) return this.data.childList.slice(0, this.colNums * this.configData.defaultCol);
24246
- return this.data.childList;
24247
- },
24248
- isConfigPage() {
24249
- return this.$EventBus && this.isOpcacity;
24250
- }
24251
- },
24252
- methods: {
24253
- getDevice(val) {
24254
- this.isMobile = val;
24255
- },
24256
- // 获取配置数据
24257
- getConfigData(configData) {
24258
- this.configData = {
24259
- ...this.defaultConfig,
24260
- ...configData
24261
- };
24262
- this.updateStyles();
24263
- this.isShowPannel = this.colNums * this.configData.defaultCol < this.data.childList.length;
24264
- },
24265
- // 更新样式
24266
- updateStyles() {
24267
- this.$nextTick(() => {
24268
- // 触发样式更新
24269
- this.$forceUpdate();
24270
- });
24271
- },
24272
- // 折叠/展开文本
24273
- foldMessText() {
24274
- this.messFold = !this.messFold;
24275
- }
24276
- }
24277
- });
24278
- ;// ./package/cms-video-group/View.vue?vue&type=script&lang=js
24279
- /* harmony default export */ var cms_video_group_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
24280
- ;// ./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-video-group/View.vue?vue&type=style&index=0&id=bc32924e&prod&lang=scss&scoped=true
24281
- // extracted by mini-css-extract-plugin
24282
-
24283
- ;// ./package/cms-video-group/View.vue?vue&type=style&index=0&id=bc32924e&prod&lang=scss&scoped=true
24284
-
24285
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
24286
- var componentNormalizer = __webpack_require__(1656);
24287
- ;// ./package/cms-video-group/View.vue
24288
-
24289
-
24290
-
24291
- ;
24292
-
24293
-
24294
- /* normalize component */
24295
-
24296
- var component = (0,componentNormalizer/* default */.A)(
24297
- cms_video_group_Viewvue_type_script_lang_js,
24298
- render,
24299
- staticRenderFns,
24300
- false,
24301
- null,
24302
- "bc32924e",
24303
- null
24304
-
24305
- )
24306
-
24307
- /* harmony default export */ var View = (component.exports);
24308
-
24309
- /***/ }),
24310
-
24311
24146
  /***/ 1944:
24312
24147
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
24313
24148
 
@@ -25897,56 +25732,355 @@ var baseComp = __webpack_require__(677);
25897
25732
  },
25898
25733
  data() {
25899
25734
  return {
25900
- configList: [],
25901
- expend: "",
25902
- problemActive: 0
25735
+ configList: [],
25736
+ expend: "",
25737
+ problemActive: 0
25738
+ };
25739
+ },
25740
+ mounted() {},
25741
+ watch: {},
25742
+ methods: {
25743
+ getConfigData(configData) {
25744
+ this.configList = configData.configList;
25745
+ },
25746
+ open(item, index, event) {
25747
+ var _this$configList$this;
25748
+ console.log(event);
25749
+ this.expend = item.input1;
25750
+ (_this$configList$this = this.configList[this.problemActive]) === null || _this$configList$this === void 0 ? void 0 : _this$configList$this.contentArray.forEach((cur, curIndex) => {
25751
+ var _this$configList$this2;
25752
+ this.$set((_this$configList$this2 = this.configList[this.problemActive]) === null || _this$configList$this2 === void 0 ? void 0 : _this$configList$this2.contentArray[curIndex], "status", curIndex == index ? !item.status : false);
25753
+ });
25754
+ },
25755
+ decodeJumpUrl(url) {
25756
+ if (!url) return;
25757
+ top.location.href = url;
25758
+ }
25759
+ },
25760
+ computed: {
25761
+ _stableProblemGuide() {
25762
+ let res = this.configList || [];
25763
+ return res.map(item => {
25764
+ return {
25765
+ ...item,
25766
+ contentArray: ((item === null || item === void 0 ? void 0 : item.contentArray) || []).map(cur => ({
25767
+ ...cur,
25768
+ status: (cur === null || cur === void 0 ? void 0 : cur.status) || false
25769
+ }))
25770
+ };
25771
+ });
25772
+ }
25773
+ }
25774
+ });
25775
+ ;// ./package/cms-question/View.vue?vue&type=script&lang=js
25776
+ /* harmony default export */ var cms_question_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
25777
+ ;// ./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-question/View.vue?vue&type=style&index=0&id=06710479&prod&lang=scss&scoped=true
25778
+ // extracted by mini-css-extract-plugin
25779
+
25780
+ ;// ./package/cms-question/View.vue?vue&type=style&index=0&id=06710479&prod&lang=scss&scoped=true
25781
+
25782
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
25783
+ var componentNormalizer = __webpack_require__(1656);
25784
+ ;// ./package/cms-question/View.vue
25785
+
25786
+
25787
+
25788
+ ;
25789
+
25790
+
25791
+ /* normalize component */
25792
+
25793
+ var component = (0,componentNormalizer/* default */.A)(
25794
+ cms_question_Viewvue_type_script_lang_js,
25795
+ render,
25796
+ staticRenderFns,
25797
+ false,
25798
+ null,
25799
+ "06710479",
25800
+ null
25801
+
25802
+ )
25803
+
25804
+ /* harmony default export */ var View = (component.exports);
25805
+
25806
+ /***/ }),
25807
+
25808
+ /***/ 2520:
25809
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
25810
+
25811
+ "use strict";
25812
+ __webpack_require__.r(__webpack_exports__);
25813
+ /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
25814
+
25815
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 5865));
25816
+ const langData = {
25817
+ input1: "描述",
25818
+ input2: "标题",
25819
+ input3: "高亮标题"
25820
+ };
25821
+ const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataType)(langData, {
25822
+ input1: {
25823
+ label: "描述"
25824
+ },
25825
+ input2: {
25826
+ label: "标题"
25827
+ },
25828
+ input3: {
25829
+ label: "高亮标题"
25830
+ }
25831
+ });
25832
+ const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSchema)(langData);
25833
+ /* harmony default export */ __webpack_exports__["default"] = ({
25834
+ View,
25835
+ validateSchema,
25836
+ configDataType,
25837
+ langData,
25838
+ settings: cmsCompName => {
25839
+ return (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getInitCompData)({
25840
+ cmsCompName,
25841
+ langData
25842
+ });
25843
+ }
25844
+ });
25845
+
25846
+ /***/ }),
25847
+
25848
+ /***/ 2529:
25849
+ /***/ (function(module) {
25850
+
25851
+ "use strict";
25852
+
25853
+ // `CreateIterResultObject` abstract operation
25854
+ // https://tc39.es/ecma262/#sec-createiterresultobject
25855
+ module.exports = function (value, done) {
25856
+ return { value: value, done: done };
25857
+ };
25858
+
25859
+
25860
+ /***/ }),
25861
+
25862
+ /***/ 2578:
25863
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
25864
+
25865
+ "use strict";
25866
+ // ESM COMPAT FLAG
25867
+ __webpack_require__.r(__webpack_exports__);
25868
+
25869
+ // EXPORTS
25870
+ __webpack_require__.d(__webpack_exports__, {
25871
+ "default": function() { return /* binding */ View; }
25872
+ });
25873
+
25874
+ ;// ./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-group/View.vue?vue&type=template&id=4dee5e5e&scoped=true
25875
+ var render = function render() {
25876
+ var _vm = this,
25877
+ _c = _vm._self._c;
25878
+ return _c('BaseComp', _vm._b({
25879
+ attrs: {
25880
+ "data": _vm.data,
25881
+ "nowCompId": _vm.nowCompId,
25882
+ "isOpcacity": _vm.isOpcacity,
25883
+ "isMask": false,
25884
+ "lang": _vm.lang
25885
+ },
25886
+ on: {
25887
+ "getConfigData": _vm.getConfigData
25888
+ }
25889
+ }, 'BaseComp', _vm.$attrs, false), [_c('section', {
25890
+ staticClass: "cmhk-home_main"
25891
+ }, [_c('div', {
25892
+ staticClass: "wrap",
25893
+ style: _vm.wrapStyle
25894
+ }, _vm._l(_vm.showVideoList, function (item) {
25895
+ return _c('cms-image', {
25896
+ key: item.componentId,
25897
+ staticStyle: {
25898
+ "overflow": "hidden"
25899
+ },
25900
+ attrs: {
25901
+ "data": item,
25902
+ "nowCompId": _vm.nowCompId,
25903
+ "isOpcacity": _vm.isOpcacity,
25904
+ "isMask": false,
25905
+ "lang": _vm.lang
25906
+ }
25907
+ });
25908
+ }), 1), _vm.isShowPannel ? [_c('div', {
25909
+ staticClass: "view-more-container"
25910
+ }, [_c('div', {
25911
+ staticClass: "view-more-btn",
25912
+ on: {
25913
+ "click": _vm.foldMessText
25914
+ }
25915
+ }, [_c('span', {
25916
+ staticClass: "view-more-text"
25917
+ }, [_vm._v(" " + _vm._s(_vm.messFold ? _vm.$t("roamIndex.Collpase") : _vm.$t("roamIndex.More")) + " ")]), _c('i', {
25918
+ class: ['view-more-icon', _vm.messFold ? 'el-icon-arrow-up' : 'el-icon-arrow-down']
25919
+ })])])] : _vm._e()], 2)]);
25920
+ };
25921
+ var staticRenderFns = [];
25922
+
25923
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
25924
+ var baseComp = __webpack_require__(677);
25925
+ ;// ./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-group/View.vue?vue&type=script&lang=js
25926
+
25927
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
25928
+ name: "cms-image-group",
25929
+ components: {
25930
+ BaseComp: baseComp["default"]
25931
+ },
25932
+ props: {
25933
+ data: {
25934
+ type: Object,
25935
+ default: () => {
25936
+ return {};
25937
+ }
25938
+ },
25939
+ nowCompId: {
25940
+ type: [String, Number],
25941
+ default: ""
25942
+ },
25943
+ isOpcacity: {
25944
+ type: Boolean,
25945
+ default: true
25946
+ },
25947
+ lang: {
25948
+ type: String,
25949
+ default: "zh-HK"
25950
+ }
25951
+ },
25952
+ data() {
25953
+ return {
25954
+ configData: {},
25955
+ messFold: false,
25956
+ // 默认配置数据
25957
+ defaultConfig: {
25958
+ colNums: 1,
25959
+ defaultCol: 12,
25960
+ gap: 10,
25961
+ cornerRadius: {
25962
+ topLeft: "8",
25963
+ topRight: "8",
25964
+ bottomLeft: "8",
25965
+ bottomRight: "8"
25966
+ }
25967
+ },
25968
+ isShowPannel: false
25903
25969
  };
25904
25970
  },
25905
25971
  mounted() {},
25906
- watch: {},
25907
- methods: {
25908
- getConfigData(configData) {
25909
- this.configList = configData.configList;
25972
+ watch: {
25973
+ configData: {
25974
+ handler() {
25975
+ this.updateStyles();
25976
+ },
25977
+ deep: true
25978
+ }
25979
+ },
25980
+ computed: {
25981
+ showVideoList() {
25982
+ if (this.isShowPannel && !this.messFold) return this.data.childList.slice(0, this.configData.colNums * this.configData.defaultCol);
25983
+ return this.data.childList;
25910
25984
  },
25911
- open(item, index, event) {
25912
- var _this$configList$this;
25913
- console.log(event);
25914
- this.expend = item.input1;
25915
- (_this$configList$this = this.configList[this.problemActive]) === null || _this$configList$this === void 0 ? void 0 : _this$configList$this.contentArray.forEach((cur, curIndex) => {
25916
- var _this$configList$this2;
25917
- this.$set((_this$configList$this2 = this.configList[this.problemActive]) === null || _this$configList$this2 === void 0 ? void 0 : _this$configList$this2.contentArray[curIndex], "status", curIndex == index ? !item.status : false);
25918
- });
25985
+ isConfigPage() {
25986
+ return this.$EventBus && this.isOpcacity;
25919
25987
  },
25920
- decodeJumpUrl(url) {
25921
- if (!url) return;
25922
- top.location.href = url;
25988
+ borderRadiusStyle() {
25989
+ const config = {
25990
+ ...this.defaultConfig,
25991
+ ...this.configData
25992
+ };
25993
+ const radiusConfig = config.cornerRadius || {};
25994
+ const legacyMap = {
25995
+ topLeft: config.borderRadiusTopLeft,
25996
+ topRight: config.borderRadiusTopRight,
25997
+ bottomLeft: config.borderRadiusBottomLeft,
25998
+ bottomRight: config.borderRadiusBottomRight
25999
+ };
26000
+ const formatRadius = value => {
26001
+ if (value === "full") return "9999px";
26002
+ if (value === undefined || value === null || value === "") {
26003
+ return "0px";
26004
+ }
26005
+ const num = Number(value);
26006
+ return Number.isNaN(num) ? "0px" : `${num}px`;
26007
+ };
26008
+ const resolveValue = corner => {
26009
+ const value = radiusConfig[corner] !== undefined && radiusConfig[corner] !== null ? radiusConfig[corner] : legacyMap[corner];
26010
+ return formatRadius(value);
26011
+ };
26012
+ return {
26013
+ topLeft: resolveValue("topLeft"),
26014
+ topRight: resolveValue("topRight"),
26015
+ bottomLeft: resolveValue("bottomLeft"),
26016
+ bottomRight: resolveValue("bottomRight")
26017
+ };
26018
+ },
26019
+ wrapStyle() {
26020
+ const config = {
26021
+ ...this.defaultConfig,
26022
+ ...this.configData
26023
+ };
26024
+ return {
26025
+ gridTemplateColumns: `repeat(${config.colNums}, 1fr)`,
26026
+ gridGap: `${config.gap}px`,
26027
+ borderTopLeftRadius: this.borderRadiusStyle.topLeft,
26028
+ borderTopRightRadius: this.borderRadiusStyle.topRight,
26029
+ borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
26030
+ borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
26031
+ overflow: "hidden"
26032
+ };
25923
26033
  }
25924
26034
  },
25925
- computed: {
25926
- _stableProblemGuide() {
25927
- let res = this.configList || [];
25928
- return res.map(item => {
25929
- return {
25930
- ...item,
25931
- contentArray: ((item === null || item === void 0 ? void 0 : item.contentArray) || []).map(cur => ({
25932
- ...cur,
25933
- status: (cur === null || cur === void 0 ? void 0 : cur.status) || false
25934
- }))
25935
- };
26035
+ methods: {
26036
+ // 获取配置数据
26037
+ getConfigData(configData) {
26038
+ this.configData = this.getMergedConfig(configData);
26039
+ this.updateStyles();
26040
+ this.isShowPannel = this.configData.colNums * this.configData.defaultCol < this.data.childList.length;
26041
+ },
26042
+ // 更新样式
26043
+ updateStyles() {
26044
+ this.$nextTick(() => {
26045
+ // 触发样式更新
26046
+ this.$forceUpdate();
25936
26047
  });
26048
+ },
26049
+ // 折叠/展开文本
26050
+ foldMessText() {
26051
+ this.messFold = !this.messFold;
26052
+ },
26053
+ getMergedConfig(configData = {}) {
26054
+ const mergedCorner = {
26055
+ ...(this.defaultConfig.cornerRadius || {})
26056
+ };
26057
+ if (configData.cornerRadius) {
26058
+ Object.assign(mergedCorner, configData.cornerRadius);
26059
+ } else {
26060
+ var _configData$borderRad, _configData$borderRad2, _configData$borderRad3, _configData$borderRad4;
26061
+ mergedCorner.topLeft = (_configData$borderRad = configData.borderRadiusTopLeft) === null || _configData$borderRad === void 0 ? void 0 : _configData$borderRad.mergedCorner.topLeft;
26062
+ mergedCorner.topRight = (_configData$borderRad2 = configData.borderRadiusTopRight) === null || _configData$borderRad2 === void 0 ? void 0 : _configData$borderRad2.mergedCorner.topRight;
26063
+ mergedCorner.bottomLeft = (_configData$borderRad3 = configData.borderRadiusBottomLeft) === null || _configData$borderRad3 === void 0 ? void 0 : _configData$borderRad3.mergedCorner.bottomLeft;
26064
+ mergedCorner.bottomRight = (_configData$borderRad4 = configData.borderRadiusBottomRight) === null || _configData$borderRad4 === void 0 ? void 0 : _configData$borderRad4.mergedCorner.bottomRight;
26065
+ }
26066
+ return {
26067
+ ...this.defaultConfig,
26068
+ ...configData,
26069
+ cornerRadius: mergedCorner
26070
+ };
25937
26071
  }
25938
26072
  }
25939
26073
  });
25940
- ;// ./package/cms-question/View.vue?vue&type=script&lang=js
25941
- /* harmony default export */ var cms_question_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
25942
- ;// ./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-question/View.vue?vue&type=style&index=0&id=06710479&prod&lang=scss&scoped=true
26074
+ ;// ./package/cms-image-group/View.vue?vue&type=script&lang=js
26075
+ /* harmony default export */ var cms_image_group_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
26076
+ ;// ./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-image-group/View.vue?vue&type=style&index=0&id=4dee5e5e&prod&lang=scss&scoped=true
25943
26077
  // extracted by mini-css-extract-plugin
25944
26078
 
25945
- ;// ./package/cms-question/View.vue?vue&type=style&index=0&id=06710479&prod&lang=scss&scoped=true
26079
+ ;// ./package/cms-image-group/View.vue?vue&type=style&index=0&id=4dee5e5e&prod&lang=scss&scoped=true
25946
26080
 
25947
26081
  // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
25948
26082
  var componentNormalizer = __webpack_require__(1656);
25949
- ;// ./package/cms-question/View.vue
26083
+ ;// ./package/cms-image-group/View.vue
25950
26084
 
25951
26085
 
25952
26086
 
@@ -25956,72 +26090,18 @@ var componentNormalizer = __webpack_require__(1656);
25956
26090
  /* normalize component */
25957
26091
 
25958
26092
  var component = (0,componentNormalizer/* default */.A)(
25959
- cms_question_Viewvue_type_script_lang_js,
26093
+ cms_image_group_Viewvue_type_script_lang_js,
25960
26094
  render,
25961
26095
  staticRenderFns,
25962
26096
  false,
25963
26097
  null,
25964
- "06710479",
26098
+ "4dee5e5e",
25965
26099
  null
25966
26100
 
25967
26101
  )
25968
26102
 
25969
26103
  /* harmony default export */ var View = (component.exports);
25970
26104
 
25971
- /***/ }),
25972
-
25973
- /***/ 2520:
25974
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
25975
-
25976
- "use strict";
25977
- __webpack_require__.r(__webpack_exports__);
25978
- /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
25979
-
25980
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 5865));
25981
- const langData = {
25982
- input1: "描述",
25983
- input2: "标题",
25984
- input3: "高亮标题"
25985
- };
25986
- const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataType)(langData, {
25987
- input1: {
25988
- label: "描述"
25989
- },
25990
- input2: {
25991
- label: "标题"
25992
- },
25993
- input3: {
25994
- label: "高亮标题"
25995
- }
25996
- });
25997
- const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSchema)(langData);
25998
- /* harmony default export */ __webpack_exports__["default"] = ({
25999
- View,
26000
- validateSchema,
26001
- configDataType,
26002
- langData,
26003
- settings: cmsCompName => {
26004
- return (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getInitCompData)({
26005
- cmsCompName,
26006
- langData
26007
- });
26008
- }
26009
- });
26010
-
26011
- /***/ }),
26012
-
26013
- /***/ 2529:
26014
- /***/ (function(module) {
26015
-
26016
- "use strict";
26017
-
26018
- // `CreateIterResultObject` abstract operation
26019
- // https://tc39.es/ecma262/#sec-createiterresultobject
26020
- module.exports = function (value, done) {
26021
- return { value: value, done: done };
26022
- };
26023
-
26024
-
26025
26105
  /***/ }),
26026
26106
 
26027
26107
  /***/ 2584:
@@ -26744,13 +26824,35 @@ module.exports = function (iterable, unboundFunction, options) {
26744
26824
  __webpack_require__.r(__webpack_exports__);
26745
26825
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
26746
26826
 
26747
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 1882));
26827
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 304));
26748
26828
  const langData = {
26749
26829
  colNums_PC: 1,
26750
26830
  colNums_Mobile: 1,
26751
26831
  defaultCol: 12,
26752
- gap: 10
26832
+ gap: 10,
26833
+ cornerRadius: {
26834
+ topLeft: "8",
26835
+ topRight: "8",
26836
+ bottomLeft: "8",
26837
+ bottomRight: "8"
26838
+ }
26753
26839
  };
26840
+ const radiusOptions = [{
26841
+ label: "0",
26842
+ value: "0"
26843
+ }, {
26844
+ label: "4",
26845
+ value: "4"
26846
+ }, {
26847
+ label: "8",
26848
+ value: "8"
26849
+ }, {
26850
+ label: "16",
26851
+ value: "16"
26852
+ }, {
26853
+ label: "全圆角",
26854
+ value: "full"
26855
+ }];
26754
26856
  const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataType)(langData, {
26755
26857
  // 布局配置
26756
26858
  colNums_PC: {
@@ -26792,6 +26894,11 @@ const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataTy
26792
26894
  step: 1,
26793
26895
  isCol: true,
26794
26896
  unit: "行"
26897
+ },
26898
+ cornerRadius: {
26899
+ label: "圆角",
26900
+ widgetType: "CornerRadiusPicker",
26901
+ options: radiusOptions
26795
26902
  }
26796
26903
  });
26797
26904
  const validateSchema = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getValidateSchema)(langData);
@@ -27856,16 +27963,16 @@ module.exports = Math.pow;
27856
27963
  __webpack_require__.r(__webpack_exports__);
27857
27964
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
27858
27965
 
27859
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 6867));
27966
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 2578));
27860
27967
  const langData = {
27861
27968
  colNums: 1,
27862
27969
  defaultCol: 12,
27863
27970
  gap: 10,
27864
27971
  cornerRadius: {
27865
- topLeft: "0",
27866
- topRight: "0",
27867
- bottomLeft: "0",
27868
- bottomRight: "0"
27972
+ topLeft: "8",
27973
+ topRight: "8",
27974
+ bottomLeft: "8",
27975
+ bottomRight: "8"
27869
27976
  }
27870
27977
  };
27871
27978
  const radiusOptions = [{
@@ -28331,7 +28438,7 @@ module.exports = function (O) {
28331
28438
  __webpack_require__.r(__webpack_exports__);
28332
28439
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
28333
28440
 
28334
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 1659));
28441
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 6722));
28335
28442
  const langData = {
28336
28443
  // 视频源设置
28337
28444
  title: '',
@@ -28348,10 +28455,32 @@ const langData = {
28348
28455
  aspectRatio: "16:9",
28349
28456
  // 样式设置
28350
28457
  borderRadius: 0,
28458
+ cornerRadius: {
28459
+ topLeft: "8",
28460
+ topRight: "8",
28461
+ bottomLeft: "8",
28462
+ bottomRight: "8"
28463
+ },
28351
28464
  // 高级配置
28352
28465
  customClass: "",
28353
28466
  customStyle: ""
28354
28467
  };
28468
+ const radiusOptions = [{
28469
+ label: "0",
28470
+ value: "0"
28471
+ }, {
28472
+ label: "4",
28473
+ value: "4"
28474
+ }, {
28475
+ label: "8",
28476
+ value: "8"
28477
+ }, {
28478
+ label: "16",
28479
+ value: "16"
28480
+ }, {
28481
+ label: "全圆角",
28482
+ value: "full"
28483
+ }];
28355
28484
  const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataType)(langData, {
28356
28485
  // 视频源设置配置
28357
28486
  title: {
@@ -28429,13 +28558,10 @@ const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataTy
28429
28558
  }]
28430
28559
  },
28431
28560
  // 样式设置配置
28432
- borderRadius: {
28433
- label: "圆角(px)",
28434
- widgetType: "el-input-number",
28435
- size: "small",
28436
- min: 0,
28437
- max: 100,
28438
- step: 1
28561
+ cornerRadius: {
28562
+ label: "圆角",
28563
+ widgetType: "CornerRadiusPicker",
28564
+ options: radiusOptions
28439
28565
  }
28440
28566
 
28441
28567
  // 高级配置
@@ -28717,7 +28843,7 @@ module.exports = function (argument) {
28717
28843
  __webpack_require__.r(__webpack_exports__);
28718
28844
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
28719
28845
 
28720
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 1222));
28846
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 9383));
28721
28847
  const langData = {
28722
28848
  // 图片设置
28723
28849
  remark: "",
@@ -28727,10 +28853,10 @@ const langData = {
28727
28853
  // 样式设置
28728
28854
  borderRadius: 0,
28729
28855
  cornerRadius: {
28730
- topLeft: "0",
28731
- topRight: "0",
28732
- bottomLeft: "0",
28733
- bottomRight: "0"
28856
+ topLeft: "8",
28857
+ topRight: "8",
28858
+ bottomLeft: "8",
28859
+ bottomRight: "8"
28734
28860
  },
28735
28861
  objectFit: "cover",
28736
28862
  // 交互功能
@@ -36784,7 +36910,23 @@ $({ target: 'Iterator', proto: true, real: true }, {
36784
36910
  __webpack_require__.r(__webpack_exports__);
36785
36911
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2128);
36786
36912
 
36787
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 4552));
36913
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 579));
36914
+ const radiusOptions = [{
36915
+ label: "0",
36916
+ value: 0
36917
+ }, {
36918
+ label: "4",
36919
+ value: 4
36920
+ }, {
36921
+ label: "8",
36922
+ value: 8
36923
+ }, {
36924
+ label: "16",
36925
+ value: 16
36926
+ }, {
36927
+ label: "全圆角",
36928
+ value: "full"
36929
+ }];
36788
36930
 
36789
36931
  // 默认配置数据
36790
36932
  const langData = {
@@ -36795,7 +36937,7 @@ const langData = {
36795
36937
  borderWidth: 0,
36796
36938
  borderStyle: "solid",
36797
36939
  borderColor: "",
36798
- borderRadius: 0,
36940
+ borderRadius: 8,
36799
36941
  // 背景设置
36800
36942
  backgroundColor: "",
36801
36943
  backgroundImage: "",
@@ -36858,12 +37000,9 @@ const configDataType = (0,_baseConfig__WEBPACK_IMPORTED_MODULE_0__.getLangDataTy
36858
37000
  predefine: ["#262729", "rgb(36,38,40,0.8)", "rgb(36,38,40,0.5)", "#2F85FF", "#D6197F", "#52C41A", "#f48427", "#FFFFFF"]
36859
37001
  },
36860
37002
  borderRadius: {
36861
- label: "圆角(px)",
36862
- widgetType: "el-input-number",
36863
- size: "small",
36864
- min: 0,
36865
- max: 100,
36866
- step: 1
37003
+ label: "圆角",
37004
+ widgetType: "el-select",
37005
+ options: radiusOptions
36867
37006
  },
36868
37007
  // 背景设置配置
36869
37008
  backgroundColor: {
@@ -39801,470 +39940,6 @@ var component = (0,componentNormalizer/* default */.A)(
39801
39940
 
39802
39941
  /***/ }),
39803
39942
 
39804
- /***/ 4552:
39805
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
39806
-
39807
- "use strict";
39808
- // ESM COMPAT FLAG
39809
- __webpack_require__.r(__webpack_exports__);
39810
-
39811
- // EXPORTS
39812
- __webpack_require__.d(__webpack_exports__, {
39813
- "default": function() { return /* binding */ View; }
39814
- });
39815
-
39816
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
39817
- var es_iterator_constructor = __webpack_require__(8111);
39818
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.drop.js
39819
- var es_iterator_drop = __webpack_require__(9314);
39820
- ;// ./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
39821
-
39822
-
39823
-
39824
-
39825
- var render = function render() {
39826
- var _vm = this,
39827
- _c = _vm._self._c;
39828
- return _c('BaseComp', _vm._b({
39829
- attrs: {
39830
- "data": _vm.data,
39831
- "nowCompId": _vm.nowCompId,
39832
- "isOpcacity": _vm.isOpcacity,
39833
- "isMask": false,
39834
- "lang": _vm.lang,
39835
- "showDel": false
39836
- },
39837
- on: {
39838
- "getConfigData": _vm.getConfigData
39839
- }
39840
- }, 'BaseComp', _vm.$attrs, false), [_vm.isConfigPage ? _c('div', {
39841
- staticClass: "main_drag hoverBorderClass",
39842
- style: _vm.cardContainerStyle,
39843
- attrs: {
39844
- "id": `cardTarget${_vm.data.componentId}`
39845
- },
39846
- on: {
39847
- "dragover": _vm.dragover,
39848
- "dragend": function ($event) {
39849
- _vm.showAddCom = false;
39850
- },
39851
- "drop": _vm.drop
39852
- }
39853
- }, [_c('Draggable', {
39854
- staticStyle: {
39855
- "position": "relative"
39856
- },
39857
- attrs: {
39858
- "group": _vm.groupConfigForMain,
39859
- "chosen-class": "chosen",
39860
- "force-fallback": "true",
39861
- "animation": "1000",
39862
- "move": _vm.onMove
39863
- },
39864
- on: {
39865
- "start": _vm.onStart,
39866
- "end": function ($event) {
39867
- _vm.showAddCom = false;
39868
- }
39869
- },
39870
- model: {
39871
- value: _vm.data.childList,
39872
- callback: function ($$v) {
39873
- _vm.$set(_vm.data, "childList", $$v);
39874
- },
39875
- expression: "data.childList"
39876
- }
39877
- }, [_vm._l(_vm.data.childList, function (item, index) {
39878
- return _c('div', {
39879
- key: item.componentId,
39880
- staticStyle: {
39881
- "position": "relative"
39882
- }
39883
- }, [_vm.showAddCom ? _c('div', {
39884
- staticClass: "up_insert",
39885
- attrs: {
39886
- "id": `${item.componentId}-cardTargetup`
39887
- }
39888
- }, [_c('i', {
39889
- staticClass: "icon-up",
39890
- attrs: {
39891
- "id": `${item.componentId}-upi`
39892
- }
39893
- }), _c('span', {
39894
- attrs: {
39895
- "id": `${item.componentId}-upspan`
39896
- }
39897
- }, [_vm._v("插入组件")])]) : _vm._e(), _c(item.cmsCompName, {
39898
- tag: "component",
39899
- style: {
39900
- marginTop: _vm.showAddCom && index == 0 ? '20px' : '0px'
39901
- },
39902
- attrs: {
39903
- "data": item,
39904
- "lang": _vm.lang,
39905
- "isOpcacity": _vm.isOpcacity,
39906
- "nowCompId": _vm.nowCompId,
39907
- "showCmhkMain": false
39908
- }
39909
- })], 1);
39910
- }), _vm.showAddCom ? _c('div', {
39911
- staticClass: "up_insert insert_bottom",
39912
- style: {
39913
- bottom: _vm.data.childList.length ? '0px' : '-24px'
39914
- },
39915
- attrs: {
39916
- "id": `-cardTargetdown`
39917
- }
39918
- }, [_c('i', {
39919
- staticClass: "icon-up"
39920
- }), _c('span', [_vm._v("插入组件")])]) : _vm._e()], 2)], 1) : _c('cms-view', _vm._b({
39921
- style: _vm.cardContainerStyle,
39922
- attrs: {
39923
- "data": _vm.data.childList,
39924
- "lang": _vm.lang,
39925
- "isOpcacity": false,
39926
- "showCmhkMain": false
39927
- }
39928
- }, 'cms-view', _vm.$attrs, false))], 1);
39929
- };
39930
- var staticRenderFns = [];
39931
-
39932
- ;// ./package/cms-column-card/View.vue?vue&type=template&id=155a8242&scoped=true
39933
-
39934
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
39935
- var es_array_push = __webpack_require__(4114);
39936
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
39937
- var baseComp = __webpack_require__(677);
39938
- // EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
39939
- var vuedraggable_umd = __webpack_require__(9014);
39940
- var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
39941
- // EXTERNAL MODULE: ./package/baseConfig.js
39942
- var baseConfig = __webpack_require__(2128);
39943
- // EXTERNAL MODULE: ./src/views/standard_page.js
39944
- var standard_page = __webpack_require__(521);
39945
- ;// ./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
39946
-
39947
-
39948
-
39949
-
39950
-
39951
-
39952
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
39953
- name: "cms-column-card",
39954
- components: {
39955
- BaseComp: baseComp["default"],
39956
- Draggable: (vuedraggable_umd_default())
39957
- },
39958
- props: {
39959
- data: {
39960
- type: Object,
39961
- default: () => {
39962
- return {};
39963
- }
39964
- },
39965
- nowCompId: {
39966
- type: [String, Number],
39967
- default: ""
39968
- },
39969
- isOpcacity: {
39970
- type: Boolean,
39971
- default: true
39972
- },
39973
- lang: {
39974
- type: String,
39975
- default: "zh-HK"
39976
- },
39977
- isMobile: {
39978
- type: Boolean,
39979
- default: false
39980
- },
39981
- mobileLayout: {
39982
- type: String,
39983
- default: ""
39984
- }
39985
- },
39986
- data() {
39987
- return {
39988
- configData: {},
39989
- messFold: true,
39990
- showAddCom: false,
39991
- temporaryList: []
39992
- };
39993
- },
39994
- computed: {
39995
- isConfigPage() {
39996
- return this.$EventBus && this.isOpcacity;
39997
- },
39998
- groupConfigForMain() {
39999
- return {
40000
- name: "task",
40001
- pull: true,
40002
- // A列表的元素可以被拖出
40003
- put: (to, from, dragEl) => {
40004
- console.log(from.el.classList);
40005
- if (from.el.classList.contains("main_drag")) {
40006
- const dataId = this.findFirstComponentKey(dragEl);
40007
- const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column"];
40008
- console.log("allowedComponents", dataId);
40009
- if (dataId === "cms-column") {
40010
- if (!this.checkColumnNestingLevel()) {
40011
- console.log("cms-column 嵌套层级超出限制");
40012
- return false;
40013
- }
40014
- }
40015
- return allowedComponents.includes(dataId);
40016
- }
40017
- return true;
40018
- }
40019
- };
40020
- },
40021
- // 卡片容器样式
40022
- cardContainerStyle() {
40023
- return {
40024
- backgroundImage: this.configData.backgroundImage ? `url('${this.configData.backgroundImage}')` : "none",
40025
- backgroundSize: "cover",
40026
- backgroundRepeat: "no-repeat",
40027
- backgroundPosition: "center center",
40028
- height: this.getContainerHeight(),
40029
- border: this.getContainerBorder(),
40030
- borderRadius: this.getContainerBorderRadius(),
40031
- backgroundColor: this.configData.backgroundColor || "transparent",
40032
- boxShadow: this.configData.boxShadow || "none"
40033
- };
40034
- }
40035
- },
40036
- mounted() {
40037
- if (this.$EventBus) {
40038
- this.$EventBus.$on("handleDragEnd", () => {
40039
- this.showAddCom = false;
40040
- });
40041
- }
40042
- },
40043
- watch: {},
40044
- methods: {
40045
- findFirstComponentKey(root) {
40046
- var _root$querySelector;
40047
- if (!root) return null;
40048
-
40049
- // 若起点自身就有
40050
- if (root.nodeType === 1 && root.hasAttribute("component-key")) {
40051
- return root.getAttribute("component-key");
40052
- }
40053
-
40054
- // 向下查找第一个匹配的后代
40055
- const el = (_root$querySelector = root.querySelector) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.call(root, "[component-key]");
40056
- return el ? el.getAttribute("component-key") : null;
40057
- },
40058
- // 获取容器高度
40059
- getContainerHeight() {
40060
- if (this.configData.heightType === "fixed") {
40061
- return `${this.configData.fixedHeight}px`;
40062
- }
40063
- return this.isMobile && this.mobileLayout == "vertical" ? "auto" : "100%";
40064
- },
40065
- // 获取容器边框
40066
- getContainerBorder() {
40067
- if (this.configData.borderWidth) {
40068
- return `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}`;
40069
- }
40070
- return "none";
40071
- },
40072
- // 获取容器圆角
40073
- getContainerBorderRadius() {
40074
- if (this.configData.borderRadius) {
40075
- return `${this.configData.borderRadius}px`;
40076
- }
40077
- return "0";
40078
- },
40079
- getConfigData(configData) {
40080
- this.configData = configData;
40081
- },
40082
- foldMessText() {
40083
- this.messFold = !this.messFold;
40084
- },
40085
- decodeJumpUrl(url) {
40086
- if (!url) return;
40087
- top.location.href = url;
40088
- },
40089
- onStart(evt) {
40090
- console.log("drag start in column-card", evt);
40091
- this.showAddCom = true;
40092
- },
40093
- // 限制拖拽的组件类型
40094
- onMove(evt) {
40095
- const {
40096
- draggedContext
40097
- } = evt;
40098
-
40099
- // 允许的组件类型
40100
- const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
40101
- ];
40102
-
40103
- // 如果是从外部拖入的组件
40104
- if (draggedContext && draggedContext.element) {
40105
- const componentType = draggedContext.element.cmsCompName;
40106
- if (componentType && !allowedComponents.includes(componentType)) {
40107
- console.log("draggedContext.element", draggedContext.element);
40108
- console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
40109
- return false;
40110
- }
40111
-
40112
- // 特殊处理 cms-column:检查嵌套层级
40113
- if (componentType === "cms-column") {
40114
- if (!this.checkColumnNestingLevel()) {
40115
- console.log("cms-column 嵌套层级超出限制");
40116
- return false;
40117
- }
40118
- }
40119
- }
40120
- return true;
40121
- },
40122
- // 检查 cms-column 嵌套层级
40123
- checkColumnNestingLevel() {
40124
- // 检查当前 column-card 是否已经在 cms-column 内部
40125
- let parent = this.$parent;
40126
- let columnDepth = 0;
40127
- while (parent) {
40128
- // 检查父组件是否是 cms-column 或包含 cms-column
40129
- if (parent.$options.name === "cms-column" || parent.$data && parent.$data.data && parent.$data.data.cmsCompName === "cms-column") {
40130
- columnDepth++;
40131
- }
40132
-
40133
- // 如果已经有一层 cms-column,则不允许再嵌套
40134
- if (columnDepth >= 2) {
40135
- console.log(`检测到 cms-column 嵌套层级: ${columnDepth}, 超出限制`);
40136
- return false;
40137
- }
40138
- parent = parent.$parent;
40139
- }
40140
- console.log(`cms-column 嵌套层级检查通过: ${columnDepth}`);
40141
- return true;
40142
- },
40143
- // 处理拖拽悬停
40144
- dragover(e) {
40145
- e.preventDefault();
40146
- this.showAddCom = true;
40147
- },
40148
- // 处理拖拽放置
40149
- drop(e) {
40150
- e.preventDefault();
40151
- const componentKey = e.dataTransfer.getData("componentKey");
40152
- let temporaryId = "";
40153
- this.temporaryList = e.dataTransfer.getData("temporaryList") ? JSON.parse(e.dataTransfer.getData("temporaryList")) : [];
40154
- console.log("cms-colum-card-drop", componentKey, this.temporaryList);
40155
- if (!componentKey) return;
40156
- const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
40157
- const isTemporary = isTemporaryItem === "true";
40158
- if (isTemporary) {
40159
- temporaryId = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey).cmsCompName;
40160
- }
40161
- const componentType = isTemporary ? temporaryId : componentKey;
40162
- // 允许的组件类型
40163
- const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
40164
- ];
40165
-
40166
- // 检查组件类型是否允许
40167
- if (!allowedComponents.includes(componentType)) {
40168
- console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
40169
- this.$message && this.$message.warning(`该组件类型不支持拖入卡片容器`);
40170
- this.showAddCom = false;
40171
- return;
40172
- }
40173
-
40174
- // 特殊处理 cms-column:检查嵌套层级
40175
- if (componentType === "cms-column") {
40176
- if (!this.checkColumnNestingLevel()) {
40177
- console.log("cms-column 嵌套层级超出限制");
40178
- this.$message && this.$message.warning(`cms-column 只能嵌套一层`);
40179
- this.showAddCom = false;
40180
- return;
40181
- }
40182
- }
40183
- this.addOneComp(e, componentKey);
40184
- },
40185
- // 添加组件到卡片容器
40186
- addOneComp(e, componentKey) {
40187
- this.showAddCom = false;
40188
- console.log("drop to column-card", componentKey);
40189
-
40190
- // 动态导入组件配置
40191
- let initCompData;
40192
- try {
40193
- const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
40194
- const isTemporary = isTemporaryItem === "true";
40195
- if (isTemporary) {
40196
- initCompData = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey);
40197
- } else {
40198
- initCompData = __webpack_require__(1640)(`./${componentKey}`).default.settings(componentKey);
40199
- }
40200
- if (!isTemporary) {
40201
- initCompData = {
40202
- ...initCompData,
40203
- styleConfig: {
40204
- pc: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(16, 16, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")],
40205
- mb: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(12, 12, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")]
40206
- }
40207
- };
40208
- }
40209
- } catch (error) {
40210
- console.error(`无法加载组件 ${componentKey}:`, error);
40211
- this.$message && this.$message.error(`组件加载失败`);
40212
- return;
40213
- }
40214
- const toElementId = e.toElement.id;
40215
- if (toElementId === `cardTarget${this.data.componentId}` || toElementId.includes("cardTargetdown")) {
40216
- // 添加到卡片容器末尾
40217
- this.data.childList.push(initCompData);
40218
- } else if (toElementId.includes("cardTargetup")) {
40219
- // 插入到指定位置
40220
- const underComponentId = toElementId.split("-cardTargetup")[0];
40221
- const index = this.data.childList.findIndex(item => item.componentId === underComponentId);
40222
- if (index !== -1) {
40223
- this.data.childList.splice(index, 0, initCompData);
40224
- }
40225
- }
40226
-
40227
- // 触发数据更新
40228
- this.$emit("update:data", this.data);
40229
- if (componentKey === "cms-column") {
40230
- this.$EventBus.$emit("handleNowComp", initCompData);
40231
- }
40232
- }
40233
- }
40234
- });
40235
- ;// ./package/cms-column-card/View.vue?vue&type=script&lang=js
40236
- /* harmony default export */ var cms_column_card_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
40237
- ;// ./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
40238
- // extracted by mini-css-extract-plugin
40239
-
40240
- ;// ./package/cms-column-card/View.vue?vue&type=style&index=0&id=155a8242&prod&lang=scss&scoped=true
40241
-
40242
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
40243
- var componentNormalizer = __webpack_require__(1656);
40244
- ;// ./package/cms-column-card/View.vue
40245
-
40246
-
40247
-
40248
- ;
40249
-
40250
-
40251
- /* normalize component */
40252
-
40253
- var component = (0,componentNormalizer/* default */.A)(
40254
- cms_column_card_Viewvue_type_script_lang_js,
40255
- render,
40256
- staticRenderFns,
40257
- false,
40258
- null,
40259
- "155a8242",
40260
- null
40261
-
40262
- )
40263
-
40264
- /* harmony default export */ var View = (component.exports);
40265
-
40266
- /***/ }),
40267
-
40268
39943
  /***/ 4576:
40269
39944
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
40270
39945
 
@@ -42101,13 +41776,13 @@ var map = {
42101
41776
  "./cms-banner/View.vue": 9894,
42102
41777
  "./cms-button/View.vue": 7318,
42103
41778
  "./cms-cells/View.vue": 983,
42104
- "./cms-column-card/View.vue": 4552,
41779
+ "./cms-column-card/View.vue": 579,
42105
41780
  "./cms-column/View.vue": 4623,
42106
41781
  "./cms-description/View.vue": 6296,
42107
41782
  "./cms-dynamic-comp/View.vue": 471,
42108
41783
  "./cms-iconFour/View.vue": 2946,
42109
- "./cms-image-group/View.vue": 6867,
42110
- "./cms-image/View.vue": 1222,
41784
+ "./cms-image-group/View.vue": 2578,
41785
+ "./cms-image/View.vue": 9383,
42111
41786
  "./cms-imgFour/View.vue": 9545,
42112
41787
  "./cms-lineFive/View.vue": 1716,
42113
41788
  "./cms-lineFour/View.vue": 8067,
@@ -42127,8 +41802,8 @@ var map = {
42127
41802
  "./cms-titleCenter/View.vue": 788,
42128
41803
  "./cms-titleLeft/View.vue": 6946,
42129
41804
  "./cms-via-storedValueCard/View.vue": 5669,
42130
- "./cms-video-group/View.vue": 1882,
42131
- "./cms-video/View.vue": 1659,
41805
+ "./cms-video-group/View.vue": 304,
41806
+ "./cms-video/View.vue": 6722,
42132
41807
  "./cms-view/View.vue": 3774
42133
41808
  };
42134
41809
 
@@ -48883,106 +48558,7 @@ module.exports = function (object, key, method) {
48883
48558
 
48884
48559
  /***/ }),
48885
48560
 
48886
- /***/ 6801:
48887
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
48888
-
48889
- "use strict";
48890
-
48891
- var DESCRIPTORS = __webpack_require__(3724);
48892
- var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(8686);
48893
- var definePropertyModule = __webpack_require__(4913);
48894
- var anObject = __webpack_require__(8551);
48895
- var toIndexedObject = __webpack_require__(5397);
48896
- var objectKeys = __webpack_require__(1072);
48897
-
48898
- // `Object.defineProperties` method
48899
- // https://tc39.es/ecma262/#sec-object.defineproperties
48900
- // eslint-disable-next-line es/no-object-defineproperties -- safe
48901
- exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
48902
- anObject(O);
48903
- var props = toIndexedObject(Properties);
48904
- var keys = objectKeys(Properties);
48905
- var length = keys.length;
48906
- var index = 0;
48907
- var key;
48908
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
48909
- return O;
48910
- };
48911
-
48912
-
48913
- /***/ }),
48914
-
48915
- /***/ 6823:
48916
- /***/ (function(module) {
48917
-
48918
- "use strict";
48919
-
48920
- var $String = String;
48921
-
48922
- module.exports = function (argument) {
48923
- try {
48924
- return $String(argument);
48925
- } catch (error) {
48926
- return 'Object';
48927
- }
48928
- };
48929
-
48930
-
48931
- /***/ }),
48932
-
48933
- /***/ 6837:
48934
- /***/ (function(module) {
48935
-
48936
- "use strict";
48937
-
48938
- var $TypeError = TypeError;
48939
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
48940
-
48941
- module.exports = function (it) {
48942
- if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
48943
- return it;
48944
- };
48945
-
48946
-
48947
- /***/ }),
48948
-
48949
- /***/ 6840:
48950
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
48951
-
48952
- "use strict";
48953
-
48954
- var isCallable = __webpack_require__(4901);
48955
- var definePropertyModule = __webpack_require__(4913);
48956
- var makeBuiltIn = __webpack_require__(283);
48957
- var defineGlobalProperty = __webpack_require__(9433);
48958
-
48959
- module.exports = function (O, key, value, options) {
48960
- if (!options) options = {};
48961
- var simple = options.enumerable;
48962
- var name = options.name !== undefined ? options.name : key;
48963
- if (isCallable(value)) makeBuiltIn(value, name, options);
48964
- if (options.global) {
48965
- if (simple) O[key] = value;
48966
- else defineGlobalProperty(key, value);
48967
- } else {
48968
- try {
48969
- if (!options.unsafe) delete O[key];
48970
- else if (O[key]) simple = true;
48971
- } catch (error) { /* empty */ }
48972
- if (simple) O[key] = value;
48973
- else definePropertyModule.f(O, key, {
48974
- value: value,
48975
- enumerable: false,
48976
- configurable: !options.nonConfigurable,
48977
- writable: !options.nonWritable
48978
- });
48979
- } return O;
48980
- };
48981
-
48982
-
48983
- /***/ }),
48984
-
48985
- /***/ 6867:
48561
+ /***/ 6722:
48986
48562
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
48987
48563
 
48988
48564
  "use strict";
@@ -48994,7 +48570,7 @@ __webpack_require__.d(__webpack_exports__, {
48994
48570
  "default": function() { return /* binding */ View; }
48995
48571
  });
48996
48572
 
48997
- ;// ./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-group/View.vue?vue&type=template&id=e0f7e068&scoped=true
48573
+ ;// ./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-video/View.vue?vue&type=template&id=11fc0d9a&scoped=true
48998
48574
  var render = function render() {
48999
48575
  var _vm = this,
49000
48576
  _c = _vm._self._c;
@@ -49003,52 +48579,76 @@ var render = function render() {
49003
48579
  "data": _vm.data,
49004
48580
  "nowCompId": _vm.nowCompId,
49005
48581
  "isOpcacity": _vm.isOpcacity,
49006
- "isMask": false,
49007
48582
  "lang": _vm.lang
49008
48583
  },
49009
48584
  on: {
49010
48585
  "getConfigData": _vm.getConfigData
49011
48586
  }
49012
48587
  }, 'BaseComp', _vm.$attrs, false), [_c('section', {
49013
- staticClass: "cmhk-home_main"
49014
- }, [_c('div', {
49015
- staticClass: "wrap",
49016
- style: _vm.wrapStyle
49017
- }, _vm._l(_vm.showVideoList, function (item) {
49018
- return _c('cms-image', {
49019
- key: item.componentId,
49020
- staticStyle: {
49021
- "overflow": "hidden"
49022
- },
49023
- attrs: {
49024
- "data": item,
49025
- "nowCompId": _vm.nowCompId,
49026
- "isOpcacity": _vm.isOpcacity,
49027
- "isMask": false,
49028
- "lang": _vm.lang
49029
- }
49030
- });
49031
- }), 1), _vm.isShowPannel ? [_c('div', {
49032
- staticClass: "view-more-container"
48588
+ staticClass: "cms-video-container",
48589
+ class: [_vm.configData.customClass || ''],
48590
+ style: _vm.containerStyle
49033
48591
  }, [_c('div', {
49034
- staticClass: "view-more-btn",
48592
+ staticClass: "video-wrapper",
48593
+ style: _vm.wrapperStyle
48594
+ }, [_vm.videoType === 'direct' && _vm.configData.videoUrl ? _c('video', {
48595
+ staticClass: "cms-video direct-video",
48596
+ style: _vm.videoStyle,
48597
+ attrs: {
48598
+ "src": _vm.configData.videoUrl,
48599
+ "controls": _vm.configData.showControls,
48600
+ "autoplay": _vm.configData.autoplay,
48601
+ "loop": _vm.configData.loop,
48602
+ "poster": _vm.configData.posterUrl
48603
+ },
48604
+ domProps: {
48605
+ "muted": _vm.configData.muted
48606
+ },
49035
48607
  on: {
49036
- "click": _vm.foldMessText
48608
+ "loadstart": _vm.onVideoLoadStart,
48609
+ "loadeddata": _vm.onVideoLoaded,
48610
+ "error": _vm.onVideoError
49037
48611
  }
49038
- }, [_c('span', {
49039
- staticClass: "view-more-text"
49040
- }, [_vm._v(" " + _vm._s(_vm.messFold ? _vm.$t("roamIndex.Collpase") : _vm.$t("roamIndex.More")) + " ")]), _c('i', {
49041
- class: ['view-more-icon', _vm.messFold ? 'el-icon-arrow-up' : 'el-icon-arrow-down']
49042
- })])])] : _vm._e()], 2)]);
48612
+ }) : _vm.configData.embedCode ? _c('div', {
48613
+ staticClass: "cms-video embed-video cms-ht",
48614
+ style: _vm.videoStyle,
48615
+ domProps: {
48616
+ "innerHTML": _vm._s(_vm.configData.embedCode)
48617
+ }
48618
+ }) : _c('div', {
48619
+ staticClass: "video-placeholder",
48620
+ style: _vm.placeholderStyle
48621
+ }, [_c('img', {
48622
+ staticStyle: {
48623
+ "width": "97.82px",
48624
+ "height": "97.82px"
48625
+ },
48626
+ attrs: {
48627
+ "src": __webpack_require__(6148),
48628
+ "alt": "Video Camera"
48629
+ }
48630
+ })])]), _vm.configData.title ? _c('div', {
48631
+ staticClass: "f-c-c"
48632
+ }, [_vm._v(_vm._s(_vm.configData.title))]) : _vm._e()])]);
49043
48633
  };
49044
48634
  var staticRenderFns = [];
49045
48635
 
48636
+ ;// ./package/cms-video/View.vue?vue&type=template&id=11fc0d9a&scoped=true
48637
+
48638
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
48639
+ var es_iterator_constructor = __webpack_require__(8111);
48640
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
48641
+ var es_iterator_for_each = __webpack_require__(7588);
49046
48642
  // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
49047
48643
  var baseComp = __webpack_require__(677);
49048
- ;// ./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-group/View.vue?vue&type=script&lang=js
48644
+ ;// ./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-video/View.vue?vue&type=script&lang=js
48645
+
48646
+
48647
+
48648
+
49049
48649
 
49050
48650
  /* harmony default export */ var Viewvue_type_script_lang_js = ({
49051
- name: "cms-image-group",
48651
+ name: "cms-video",
49052
48652
  components: {
49053
48653
  BaseComp: baseComp["default"]
49054
48654
  },
@@ -49075,23 +48675,39 @@ var baseComp = __webpack_require__(677);
49075
48675
  data() {
49076
48676
  return {
49077
48677
  configData: {},
49078
- messFold: false,
48678
+ videoLoaded: false,
48679
+ videoError: false,
49079
48680
  // 默认配置数据
49080
48681
  defaultConfig: {
49081
- colNums: 1,
49082
- defaultCol: 12,
49083
- gap: 10,
48682
+ // 视频源设置
48683
+ videoType: "direct",
48684
+ videoUrl: "",
48685
+ embedCode: "",
48686
+ posterUrl: "",
48687
+ // 播放控制
48688
+ showControls: true,
48689
+ autoplay: false,
48690
+ loop: false,
48691
+ muted: false,
48692
+ // 尺寸控制
48693
+ aspectRatio: "16:9",
48694
+ // 样式设置
48695
+ borderRadius: 0,
49084
48696
  cornerRadius: {
49085
- topLeft: "0",
49086
- topRight: "0",
49087
- bottomLeft: "0",
49088
- bottomRight: "0"
49089
- }
49090
- },
49091
- isShowPannel: false
48697
+ topLeft: "8",
48698
+ topRight: "8",
48699
+ bottomLeft: "8",
48700
+ bottomRight: "8"
48701
+ },
48702
+ // 高级配置
48703
+ customClass: "",
48704
+ customStyle: ""
48705
+ }
49092
48706
  };
49093
48707
  },
49094
- mounted() {},
48708
+ mounted() {
48709
+ this.initConfigData();
48710
+ },
49095
48711
  watch: {
49096
48712
  configData: {
49097
48713
  handler() {
@@ -49101,36 +48717,53 @@ var baseComp = __webpack_require__(677);
49101
48717
  }
49102
48718
  },
49103
48719
  computed: {
49104
- showVideoList() {
49105
- if (this.isShowPannel && !this.messFold) return this.data.childList.slice(0, this.configData.colNums * this.configData.defaultCol);
49106
- return this.data.childList;
48720
+ showEmbedCode() {
48721
+ return this.configData.embedCode.replace(/<iframe(.*?)width="(\d+)"(.*?)height="(\d+)"(.*?)>/gi, '<iframe$1width="100%"$3height="auto"$5 aspect-ratio="$2/$4">');
49107
48722
  },
49108
- isConfigPage() {
49109
- return this.$EventBus && this.isOpcacity;
48723
+ // 视频类型
48724
+ videoType() {
48725
+ return this.configData.videoType || this.defaultConfig.videoType;
48726
+ },
48727
+ // 实际使用的宽高比
48728
+ actualAspectRatio() {
48729
+ const config = {
48730
+ ...this.defaultConfig,
48731
+ ...this.configData
48732
+ };
48733
+ return config.aspectRatio || "16:9";
48734
+ },
48735
+ aspectRatioValue() {
48736
+ const ratio = this.actualAspectRatio;
48737
+ if (!ratio || ratio === "auto") {
48738
+ return null;
48739
+ }
48740
+ return ratio.replace(":", "/");
48741
+ },
48742
+ // 容器样式
48743
+ containerStyle() {
48744
+ const config = {
48745
+ ...this.defaultConfig,
48746
+ ...this.configData
48747
+ };
48748
+ return {
48749
+ ...this.parseCustomStyle(config.customStyle)
48750
+ };
49110
48751
  },
49111
48752
  borderRadiusStyle() {
49112
48753
  const config = {
49113
48754
  ...this.defaultConfig,
49114
48755
  ...this.configData
49115
48756
  };
48757
+ const fallback = config.borderRadius !== undefined && config.borderRadius !== null ? `${config.borderRadius}px` : "0px";
49116
48758
  const radiusConfig = config.cornerRadius || {};
49117
- const legacyMap = {
49118
- topLeft: config.borderRadiusTopLeft,
49119
- topRight: config.borderRadiusTopRight,
49120
- bottomLeft: config.borderRadiusBottomLeft,
49121
- bottomRight: config.borderRadiusBottomRight
49122
- };
49123
- const formatRadius = value => {
48759
+ const resolveValue = corner => {
48760
+ const value = radiusConfig[corner] !== undefined && radiusConfig[corner] !== null ? radiusConfig[corner] : config.borderRadius;
49124
48761
  if (value === "full") return "9999px";
49125
48762
  if (value === undefined || value === null || value === "") {
49126
- return "0px";
48763
+ return fallback;
49127
48764
  }
49128
48765
  const num = Number(value);
49129
- return Number.isNaN(num) ? "0px" : `${num}px`;
49130
- };
49131
- const resolveValue = corner => {
49132
- const value = radiusConfig[corner] !== undefined && radiusConfig[corner] !== null ? radiusConfig[corner] : legacyMap[corner];
49133
- return formatRadius(value);
48766
+ return Number.isNaN(num) ? fallback : `${num}px`;
49134
48767
  };
49135
48768
  return {
49136
48769
  topLeft: resolveValue("topLeft"),
@@ -49139,39 +48772,106 @@ var baseComp = __webpack_require__(677);
49139
48772
  bottomRight: resolveValue("bottomRight")
49140
48773
  };
49141
48774
  },
49142
- wrapStyle() {
48775
+ // 包装器样式
48776
+ wrapperStyle() {
49143
48777
  const config = {
49144
48778
  ...this.defaultConfig,
49145
48779
  ...this.configData
49146
48780
  };
49147
- return {
49148
- gridTemplateColumns: `repeat(${config.colNums}, 1fr)`,
49149
- gridGap: `${config.gap}px`,
48781
+ const style = {
48782
+ width: "100%",
49150
48783
  borderTopLeftRadius: this.borderRadiusStyle.topLeft,
49151
48784
  borderTopRightRadius: this.borderRadiusStyle.topRight,
49152
48785
  borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
49153
48786
  borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
49154
- overflow: "hidden"
48787
+ overflow: "hidden",
48788
+ display: "block",
48789
+ position: "relative"
48790
+ };
48791
+ if (this.aspectRatioValue) {
48792
+ style.aspectRatio = this.aspectRatioValue;
48793
+ }
48794
+ return style;
48795
+ },
48796
+ // 视频样式
48797
+ videoStyle() {
48798
+ const config = {
48799
+ ...this.defaultConfig,
48800
+ ...this.configData
49155
48801
  };
48802
+ const style = {
48803
+ width: "100%",
48804
+ display: "block",
48805
+ border: "none",
48806
+ outline: "none"
48807
+ };
48808
+ if (this.aspectRatioValue) {
48809
+ style.height = "100%";
48810
+ style.aspectRatio = this.aspectRatioValue;
48811
+ } else {
48812
+ style.height = "auto";
48813
+ }
48814
+ return style;
48815
+ },
48816
+ // 占位符样式
48817
+ placeholderStyle() {
48818
+ const config = {
48819
+ ...this.defaultConfig,
48820
+ ...this.configData
48821
+ };
48822
+ const style = {
48823
+ width: "100%",
48824
+ backgroundColor: "#f5f7fa",
48825
+ border: "1px dashed #dcdfe6",
48826
+ borderTopLeftRadius: this.borderRadiusStyle.topLeft,
48827
+ borderTopRightRadius: this.borderRadiusStyle.topRight,
48828
+ borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
48829
+ borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
48830
+ display: "flex",
48831
+ flexDirection: "column",
48832
+ alignItems: "center",
48833
+ justifyContent: "center",
48834
+ color: "#909399",
48835
+ fontSize: "14px"
48836
+ };
48837
+ if (this.aspectRatioValue) {
48838
+ style.aspectRatio = this.aspectRatioValue;
48839
+ } else {
48840
+ style.minHeight = "160px";
48841
+ }
48842
+ return style;
49156
48843
  }
49157
48844
  },
49158
48845
  methods: {
48846
+ // 初始化配置数据
48847
+ initConfigData() {
48848
+ this.configData = this.getMergedConfig(this.configData);
48849
+ },
49159
48850
  // 获取配置数据
49160
48851
  getConfigData(configData) {
49161
48852
  this.configData = this.getMergedConfig(configData);
49162
48853
  this.updateStyles();
49163
- this.isShowPannel = this.configData.colNums * this.configData.defaultCol < this.data.childList.length;
49164
48854
  },
49165
48855
  // 更新样式
49166
48856
  updateStyles() {
49167
48857
  this.$nextTick(() => {
49168
- // 触发样式更新
49169
48858
  this.$forceUpdate();
49170
48859
  });
49171
48860
  },
49172
- // 折叠/展开文本
49173
- foldMessText() {
49174
- this.messFold = !this.messFold;
48861
+ // 视频开始加载
48862
+ onVideoLoadStart() {
48863
+ this.videoLoaded = false;
48864
+ this.videoError = false;
48865
+ },
48866
+ // 视频加载完成
48867
+ onVideoLoaded() {
48868
+ this.videoLoaded = true;
48869
+ this.videoError = false;
48870
+ },
48871
+ // 视频加载失败
48872
+ onVideoError() {
48873
+ this.videoLoaded = false;
48874
+ this.videoError = true;
49175
48875
  },
49176
48876
  getMergedConfig(configData = {}) {
49177
48877
  const mergedCorner = {
@@ -49179,30 +48879,44 @@ var baseComp = __webpack_require__(677);
49179
48879
  };
49180
48880
  if (configData.cornerRadius) {
49181
48881
  Object.assign(mergedCorner, configData.cornerRadius);
49182
- } else {
49183
- mergedCorner.topLeft = configData.borderRadiusTopLeft ?? mergedCorner.topLeft;
49184
- mergedCorner.topRight = configData.borderRadiusTopRight ?? mergedCorner.topRight;
49185
- mergedCorner.bottomLeft = configData.borderRadiusBottomLeft ?? mergedCorner.bottomLeft;
49186
- mergedCorner.bottomRight = configData.borderRadiusBottomRight ?? mergedCorner.bottomRight;
49187
48882
  }
49188
48883
  return {
49189
48884
  ...this.defaultConfig,
49190
48885
  ...configData,
49191
48886
  cornerRadius: mergedCorner
49192
48887
  };
48888
+ },
48889
+ // 解析自定义样式
48890
+ parseCustomStyle(customStyle) {
48891
+ if (!customStyle) return {};
48892
+ try {
48893
+ const styles = {};
48894
+ const declarations = customStyle.split(";");
48895
+ declarations.forEach(declaration => {
48896
+ const [property, value] = declaration.split(":");
48897
+ if (property && value) {
48898
+ const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
48899
+ styles[camelCaseProperty] = value.trim();
48900
+ }
48901
+ });
48902
+ return styles;
48903
+ } catch (error) {
48904
+ console.warn("解析自定义样式失败:", error);
48905
+ return {};
48906
+ }
49193
48907
  }
49194
48908
  }
49195
48909
  });
49196
- ;// ./package/cms-image-group/View.vue?vue&type=script&lang=js
49197
- /* harmony default export */ var cms_image_group_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
49198
- ;// ./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-image-group/View.vue?vue&type=style&index=0&id=e0f7e068&prod&lang=scss&scoped=true
48910
+ ;// ./package/cms-video/View.vue?vue&type=script&lang=js
48911
+ /* harmony default export */ var cms_video_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
48912
+ ;// ./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-video/View.vue?vue&type=style&index=0&id=11fc0d9a&prod&lang=scss&scoped=true
49199
48913
  // extracted by mini-css-extract-plugin
49200
48914
 
49201
- ;// ./package/cms-image-group/View.vue?vue&type=style&index=0&id=e0f7e068&prod&lang=scss&scoped=true
48915
+ ;// ./package/cms-video/View.vue?vue&type=style&index=0&id=11fc0d9a&prod&lang=scss&scoped=true
49202
48916
 
49203
48917
  // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
49204
48918
  var componentNormalizer = __webpack_require__(1656);
49205
- ;// ./package/cms-image-group/View.vue
48919
+ ;// ./package/cms-video/View.vue
49206
48920
 
49207
48921
 
49208
48922
 
@@ -49212,18 +48926,117 @@ var componentNormalizer = __webpack_require__(1656);
49212
48926
  /* normalize component */
49213
48927
 
49214
48928
  var component = (0,componentNormalizer/* default */.A)(
49215
- cms_image_group_Viewvue_type_script_lang_js,
48929
+ cms_video_Viewvue_type_script_lang_js,
49216
48930
  render,
49217
48931
  staticRenderFns,
49218
48932
  false,
49219
48933
  null,
49220
- "e0f7e068",
48934
+ "11fc0d9a",
49221
48935
  null
49222
48936
 
49223
48937
  )
49224
48938
 
49225
48939
  /* harmony default export */ var View = (component.exports);
49226
48940
 
48941
+ /***/ }),
48942
+
48943
+ /***/ 6801:
48944
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
48945
+
48946
+ "use strict";
48947
+
48948
+ var DESCRIPTORS = __webpack_require__(3724);
48949
+ var V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(8686);
48950
+ var definePropertyModule = __webpack_require__(4913);
48951
+ var anObject = __webpack_require__(8551);
48952
+ var toIndexedObject = __webpack_require__(5397);
48953
+ var objectKeys = __webpack_require__(1072);
48954
+
48955
+ // `Object.defineProperties` method
48956
+ // https://tc39.es/ecma262/#sec-object.defineproperties
48957
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
48958
+ exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
48959
+ anObject(O);
48960
+ var props = toIndexedObject(Properties);
48961
+ var keys = objectKeys(Properties);
48962
+ var length = keys.length;
48963
+ var index = 0;
48964
+ var key;
48965
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
48966
+ return O;
48967
+ };
48968
+
48969
+
48970
+ /***/ }),
48971
+
48972
+ /***/ 6823:
48973
+ /***/ (function(module) {
48974
+
48975
+ "use strict";
48976
+
48977
+ var $String = String;
48978
+
48979
+ module.exports = function (argument) {
48980
+ try {
48981
+ return $String(argument);
48982
+ } catch (error) {
48983
+ return 'Object';
48984
+ }
48985
+ };
48986
+
48987
+
48988
+ /***/ }),
48989
+
48990
+ /***/ 6837:
48991
+ /***/ (function(module) {
48992
+
48993
+ "use strict";
48994
+
48995
+ var $TypeError = TypeError;
48996
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
48997
+
48998
+ module.exports = function (it) {
48999
+ if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
49000
+ return it;
49001
+ };
49002
+
49003
+
49004
+ /***/ }),
49005
+
49006
+ /***/ 6840:
49007
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
49008
+
49009
+ "use strict";
49010
+
49011
+ var isCallable = __webpack_require__(4901);
49012
+ var definePropertyModule = __webpack_require__(4913);
49013
+ var makeBuiltIn = __webpack_require__(283);
49014
+ var defineGlobalProperty = __webpack_require__(9433);
49015
+
49016
+ module.exports = function (O, key, value, options) {
49017
+ if (!options) options = {};
49018
+ var simple = options.enumerable;
49019
+ var name = options.name !== undefined ? options.name : key;
49020
+ if (isCallable(value)) makeBuiltIn(value, name, options);
49021
+ if (options.global) {
49022
+ if (simple) O[key] = value;
49023
+ else defineGlobalProperty(key, value);
49024
+ } else {
49025
+ try {
49026
+ if (!options.unsafe) delete O[key];
49027
+ else if (O[key]) simple = true;
49028
+ } catch (error) { /* empty */ }
49029
+ if (simple) O[key] = value;
49030
+ else definePropertyModule.f(O, key, {
49031
+ value: value,
49032
+ enumerable: false,
49033
+ configurable: !options.nonConfigurable,
49034
+ writable: !options.nonWritable
49035
+ });
49036
+ } return O;
49037
+ };
49038
+
49039
+
49227
49040
  /***/ }),
49228
49041
 
49229
49042
  /***/ 6946:
@@ -58711,6 +58524,361 @@ __webpack_require__.r(__webpack_exports__);
58711
58524
 
58712
58525
  /***/ }),
58713
58526
 
58527
+ /***/ 9383:
58528
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
58529
+
58530
+ "use strict";
58531
+ // ESM COMPAT FLAG
58532
+ __webpack_require__.r(__webpack_exports__);
58533
+
58534
+ // EXPORTS
58535
+ __webpack_require__.d(__webpack_exports__, {
58536
+ "default": function() { return /* binding */ View; }
58537
+ });
58538
+
58539
+ ;// ./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=0c128a30&scoped=true
58540
+ var render = function render() {
58541
+ var _vm = this,
58542
+ _c = _vm._self._c;
58543
+ return _c('BaseComp', _vm._b({
58544
+ attrs: {
58545
+ "data": _vm.data,
58546
+ "nowCompId": _vm.nowCompId,
58547
+ "isOpcacity": _vm.isOpcacity,
58548
+ "lang": _vm.lang
58549
+ },
58550
+ on: {
58551
+ "getConfigData": _vm.getConfigData
58552
+ }
58553
+ }, 'BaseComp', _vm.$attrs, false), [_c('section', {
58554
+ staticClass: "cms-image-container",
58555
+ class: [_vm.configData.customClass || '', {
58556
+ 'has-link': _vm.configData.zoomDynamic
58557
+ }],
58558
+ style: _vm.containerStyle
58559
+ }, [_c('div', {
58560
+ staticClass: "image-wrapper",
58561
+ style: _vm.wrapperStyle,
58562
+ on: {
58563
+ "click": _vm.handleClick
58564
+ }
58565
+ }, [_vm.configData.imageUrl ? _c('img', {
58566
+ staticClass: "cms-image",
58567
+ style: _vm.imageStyle,
58568
+ attrs: {
58569
+ "src": _vm.configData.imageUrl,
58570
+ "alt": _vm.configData.altText || '图片',
58571
+ "title": _vm.configData.title
58572
+ },
58573
+ on: {
58574
+ "load": _vm.onImageLoad,
58575
+ "error": _vm.onImageError
58576
+ }
58577
+ }) : _c('div', {
58578
+ staticClass: "image-placeholder",
58579
+ style: _vm.placeholderStyle
58580
+ }, [_c('img', {
58581
+ staticStyle: {
58582
+ "width": "200px",
58583
+ "height": "200px"
58584
+ },
58585
+ attrs: {
58586
+ "src": __webpack_require__(4806),
58587
+ "alt": "Picture"
58588
+ }
58589
+ })])])]), _vm.configData.remark ? _c('div', {
58590
+ staticClass: "f-c-c"
58591
+ }, [_vm._v(_vm._s(_vm.configData.remark))]) : _vm._e()]);
58592
+ };
58593
+ var staticRenderFns = [];
58594
+
58595
+ ;// ./package/cms-image/View.vue?vue&type=template&id=0c128a30&scoped=true
58596
+
58597
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
58598
+ var es_iterator_constructor = __webpack_require__(8111);
58599
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
58600
+ var es_iterator_for_each = __webpack_require__(7588);
58601
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
58602
+ var baseComp = __webpack_require__(677);
58603
+ ;// ./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
58604
+
58605
+
58606
+
58607
+
58608
+
58609
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
58610
+ name: "cms-image",
58611
+ components: {
58612
+ BaseComp: baseComp["default"]
58613
+ },
58614
+ props: {
58615
+ data: {
58616
+ type: Object,
58617
+ default: () => {
58618
+ return {};
58619
+ }
58620
+ },
58621
+ nowCompId: {
58622
+ type: [String, Number],
58623
+ default: ""
58624
+ },
58625
+ isOpcacity: {
58626
+ type: Boolean,
58627
+ default: true
58628
+ },
58629
+ lang: {
58630
+ type: String,
58631
+ default: "zh-HK"
58632
+ }
58633
+ },
58634
+ data() {
58635
+ return {
58636
+ configData: {},
58637
+ imageLoaded: false,
58638
+ imageError: false,
58639
+ // 默认配置数据
58640
+ defaultConfig: {
58641
+ // 图片设置
58642
+ imageUrl: "",
58643
+ altText: "图片",
58644
+ title: "",
58645
+ // 样式设置
58646
+ borderRadius: 0,
58647
+ cornerRadius: {
58648
+ topLeft: "8",
58649
+ topRight: "8",
58650
+ bottomLeft: "8",
58651
+ bottomRight: "8"
58652
+ },
58653
+ objectFit: "cover",
58654
+ // 交互功能
58655
+ linkUrl: "",
58656
+ linkTarget: "_self",
58657
+ // 高级配置
58658
+ customClass: "",
58659
+ customStyle: "",
58660
+ lazyLoad: false,
58661
+ zoomDynamic: false
58662
+ }
58663
+ };
58664
+ },
58665
+ mounted() {
58666
+ this.initConfigData();
58667
+ },
58668
+ watch: {
58669
+ configData: {
58670
+ handler() {
58671
+ this.updateStyles();
58672
+ },
58673
+ deep: true
58674
+ }
58675
+ },
58676
+ computed: {
58677
+ // 容器样式
58678
+ containerStyle() {
58679
+ const config = {
58680
+ ...this.defaultConfig,
58681
+ ...this.configData
58682
+ };
58683
+ return {
58684
+ ...this.parseCustomStyle(config.customStyle)
58685
+ };
58686
+ },
58687
+ borderRadiusStyle() {
58688
+ const config = {
58689
+ ...this.defaultConfig,
58690
+ ...this.configData
58691
+ };
58692
+ const fallback = config.borderRadius !== undefined && config.borderRadius !== null ? `${config.borderRadius}px` : "0px";
58693
+ const radiusConfig = config.cornerRadius || {};
58694
+ const legacyMap = {
58695
+ topLeft: config.borderRadiusTopLeft,
58696
+ topRight: config.borderRadiusTopRight,
58697
+ bottomLeft: config.borderRadiusBottomLeft,
58698
+ bottomRight: config.borderRadiusBottomRight
58699
+ };
58700
+ const resolveValue = corner => {
58701
+ const value = radiusConfig[corner] !== undefined && radiusConfig[corner] !== null ? radiusConfig[corner] : legacyMap[corner];
58702
+ if (value === "full") return "9999px";
58703
+ if (value === undefined || value === null || value === "") {
58704
+ return fallback;
58705
+ }
58706
+ const num = Number(value);
58707
+ return Number.isNaN(num) ? fallback : `${num}px`;
58708
+ };
58709
+ return {
58710
+ topLeft: resolveValue("topLeft"),
58711
+ topRight: resolveValue("topRight"),
58712
+ bottomLeft: resolveValue("bottomLeft"),
58713
+ bottomRight: resolveValue("bottomRight")
58714
+ };
58715
+ },
58716
+ // 包装器样式
58717
+ wrapperStyle() {
58718
+ const config = {
58719
+ ...this.defaultConfig,
58720
+ ...this.configData
58721
+ };
58722
+ return {
58723
+ width: "100%",
58724
+ height: "auto",
58725
+ maxWidth: "100%",
58726
+ borderTopLeftRadius: this.borderRadiusStyle.topLeft,
58727
+ borderTopRightRadius: this.borderRadiusStyle.topRight,
58728
+ borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
58729
+ borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
58730
+ overflow: "hidden",
58731
+ cursor: config.linkUrl ? "pointer" : "default",
58732
+ display: "block"
58733
+ };
58734
+ },
58735
+ // 图片样式
58736
+ imageStyle() {
58737
+ const config = {
58738
+ ...this.defaultConfig,
58739
+ ...this.configData
58740
+ };
58741
+ return {
58742
+ width: "100%",
58743
+ height: "auto",
58744
+ objectFit: config.objectFit,
58745
+ display: "block"
58746
+ };
58747
+ },
58748
+ // 占位符样式
58749
+ placeholderStyle() {
58750
+ const config = {
58751
+ ...this.defaultConfig,
58752
+ ...this.configData
58753
+ };
58754
+ return {
58755
+ width: "100%",
58756
+ minHeight: "150px",
58757
+ backgroundColor: "#F2F9FF",
58758
+ border: "1px dashed #dcdfe6",
58759
+ borderTopLeftRadius: this.borderRadiusStyle.topLeft,
58760
+ borderTopRightRadius: this.borderRadiusStyle.topRight,
58761
+ borderBottomLeftRadius: this.borderRadiusStyle.bottomLeft,
58762
+ borderBottomRightRadius: this.borderRadiusStyle.bottomRight,
58763
+ display: "flex",
58764
+ flexDirection: "column",
58765
+ alignItems: "center",
58766
+ justifyContent: "center",
58767
+ color: "#909399",
58768
+ fontSize: "14px"
58769
+ };
58770
+ }
58771
+ },
58772
+ methods: {
58773
+ // 初始化配置数据
58774
+ initConfigData() {
58775
+ this.configData = this.getMergedConfig(this.configData);
58776
+ },
58777
+ // 获取配置数据
58778
+ getConfigData(configData) {
58779
+ this.configData = this.getMergedConfig(configData);
58780
+ this.updateStyles();
58781
+ },
58782
+ // 更新样式
58783
+ updateStyles() {
58784
+ this.$nextTick(() => {
58785
+ this.$forceUpdate();
58786
+ });
58787
+ },
58788
+ getMergedConfig(configData = {}) {
58789
+ const mergedCorner = {
58790
+ ...(this.defaultConfig.cornerRadius || {})
58791
+ };
58792
+ if (configData.cornerRadius) {
58793
+ Object.assign(mergedCorner, configData.cornerRadius);
58794
+ } else {
58795
+ var _configData$borderRad, _configData$borderRad2, _configData$borderRad3, _configData$borderRad4;
58796
+ mergedCorner.topLeft = (_configData$borderRad = configData.borderRadiusTopLeft) === null || _configData$borderRad === void 0 ? void 0 : _configData$borderRad.mergedCorner.topLeft;
58797
+ mergedCorner.topRight = (_configData$borderRad2 = configData.borderRadiusTopRight) === null || _configData$borderRad2 === void 0 ? void 0 : _configData$borderRad2.mergedCorner.topRight;
58798
+ mergedCorner.bottomLeft = (_configData$borderRad3 = configData.borderRadiusBottomLeft) === null || _configData$borderRad3 === void 0 ? void 0 : _configData$borderRad3.mergedCorner.bottomLeft;
58799
+ mergedCorner.bottomRight = (_configData$borderRad4 = configData.borderRadiusBottomRight) === null || _configData$borderRad4 === void 0 ? void 0 : _configData$borderRad4.mergedCorner.bottomRight;
58800
+ }
58801
+ return {
58802
+ ...this.defaultConfig,
58803
+ ...configData,
58804
+ cornerRadius: mergedCorner
58805
+ };
58806
+ },
58807
+ // 处理点击事件
58808
+ handleClick() {
58809
+ if (this.configData.linkUrl) {
58810
+ const target = this.configData.linkTarget || "_self";
58811
+ if (target === "_blank") {
58812
+ window.open(this.configData.linkUrl, "_blank");
58813
+ } else {
58814
+ window.location.href = this.configData.linkUrl;
58815
+ }
58816
+ }
58817
+ },
58818
+ // 图片加载成功
58819
+ onImageLoad() {
58820
+ this.imageLoaded = true;
58821
+ this.imageError = false;
58822
+ },
58823
+ // 图片加载失败
58824
+ onImageError() {
58825
+ this.imageLoaded = false;
58826
+ this.imageError = true;
58827
+ },
58828
+ // 解析自定义样式
58829
+ parseCustomStyle(customStyle) {
58830
+ if (!customStyle) return {};
58831
+ try {
58832
+ const styles = {};
58833
+ const declarations = customStyle.split(";");
58834
+ declarations.forEach(declaration => {
58835
+ const [property, value] = declaration.split(":");
58836
+ if (property && value) {
58837
+ const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
58838
+ styles[camelCaseProperty] = value.trim();
58839
+ }
58840
+ });
58841
+ return styles;
58842
+ } catch (error) {
58843
+ console.warn("解析自定义样式失败:", error);
58844
+ return {};
58845
+ }
58846
+ }
58847
+ }
58848
+ });
58849
+ ;// ./package/cms-image/View.vue?vue&type=script&lang=js
58850
+ /* harmony default export */ var cms_image_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
58851
+ ;// ./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-image/View.vue?vue&type=style&index=0&id=0c128a30&prod&lang=scss&scoped=true
58852
+ // extracted by mini-css-extract-plugin
58853
+
58854
+ ;// ./package/cms-image/View.vue?vue&type=style&index=0&id=0c128a30&prod&lang=scss&scoped=true
58855
+
58856
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
58857
+ var componentNormalizer = __webpack_require__(1656);
58858
+ ;// ./package/cms-image/View.vue
58859
+
58860
+
58861
+
58862
+ ;
58863
+
58864
+
58865
+ /* normalize component */
58866
+
58867
+ var component = (0,componentNormalizer/* default */.A)(
58868
+ cms_image_Viewvue_type_script_lang_js,
58869
+ render,
58870
+ staticRenderFns,
58871
+ false,
58872
+ null,
58873
+ "0c128a30",
58874
+ null
58875
+
58876
+ )
58877
+
58878
+ /* harmony default export */ var View = (component.exports);
58879
+
58880
+ /***/ }),
58881
+
58714
58882
  /***/ 9429:
58715
58883
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
58716
58884