cms-chenhj-ui 2.0.35 → 2.0.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -598,7 +598,7 @@ var component = (0,componentNormalizer/* default */.A)(
598
598
  __webpack_require__.r(__webpack_exports__);
599
599
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
600
600
 
601
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 6757));
601
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 7524));
602
602
  const langData = {
603
603
  // 内容编辑
604
604
  textContent: "请输入文本内容",
@@ -1183,6 +1183,140 @@ var component = (0,componentNormalizer/* default */.A)(
1183
1183
 
1184
1184
  /***/ }),
1185
1185
 
1186
+ /***/ 450:
1187
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1188
+
1189
+ "use strict";
1190
+ // ESM COMPAT FLAG
1191
+ __webpack_require__.r(__webpack_exports__);
1192
+
1193
+ // EXPORTS
1194
+ __webpack_require__.d(__webpack_exports__, {
1195
+ "default": function() { return /* binding */ View; }
1196
+ });
1197
+
1198
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=template&id=982cf5e8&scoped=true
1199
+ var render = function render() {
1200
+ var _vm = this,
1201
+ _c = _vm._self._c;
1202
+ return _c('BaseComp', _vm._b({
1203
+ attrs: {
1204
+ "data": _vm.data,
1205
+ "nowCompId": _vm.nowCompId,
1206
+ "isOpcacity": _vm.isOpcacity,
1207
+ "lang": _vm.lang
1208
+ },
1209
+ on: {
1210
+ "getConfigData": _vm.getConfigData
1211
+ }
1212
+ }, 'BaseComp', _vm.$attrs, false), [_c('section', {
1213
+ class: {
1214
+ 'cmhk-home_main': _vm.showCmhkMain
1215
+ }
1216
+ }, [_c('div', [_c('div', {
1217
+ staticClass: "inner"
1218
+ }, [_c('p', {
1219
+ staticClass: "cms-ht",
1220
+ domProps: {
1221
+ "innerHTML": _vm._s(_vm.configData.input1)
1222
+ }
1223
+ })])])])]);
1224
+ };
1225
+ var staticRenderFns = [];
1226
+
1227
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
1228
+ var baseComp = __webpack_require__(4272);
1229
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=script&lang=js
1230
+
1231
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
1232
+ name: "cms-richText",
1233
+ components: {
1234
+ BaseComp: baseComp["default"]
1235
+ },
1236
+ props: {
1237
+ data: {
1238
+ type: Object,
1239
+ default: () => {
1240
+ return {};
1241
+ }
1242
+ },
1243
+ nowCompId: {
1244
+ type: [String, Number],
1245
+ default: ""
1246
+ },
1247
+ isOpcacity: {
1248
+ type: Boolean,
1249
+ default: true
1250
+ },
1251
+ lang: {
1252
+ type: String,
1253
+ default: "zh-HK"
1254
+ },
1255
+ showCmhkMain: {
1256
+ type: Boolean,
1257
+ default: true
1258
+ }
1259
+ },
1260
+ data() {
1261
+ return {
1262
+ configData: {},
1263
+ messFold: false
1264
+ };
1265
+ },
1266
+ mounted() {},
1267
+ watch: {},
1268
+ methods: {
1269
+ getConfigData(configData) {
1270
+ this.configData = configData;
1271
+ },
1272
+ foldMessText() {
1273
+ this.messFold = !this.messFold;
1274
+ },
1275
+ decodeJumpUrl(url) {
1276
+ if (!url) return;
1277
+ top.location.href = url;
1278
+ }
1279
+ }
1280
+ });
1281
+ ;// ./package/cms-richText/View.vue?vue&type=script&lang=js
1282
+ /* harmony default export */ var cms_richText_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
1283
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=style&index=0&id=982cf5e8&prod&lang=scss&scoped=true
1284
+ // extracted by mini-css-extract-plugin
1285
+
1286
+ ;// ./package/cms-richText/View.vue?vue&type=style&index=0&id=982cf5e8&prod&lang=scss&scoped=true
1287
+
1288
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=style&index=1&id=982cf5e8&prod&lang=scss
1289
+ // extracted by mini-css-extract-plugin
1290
+
1291
+ ;// ./package/cms-richText/View.vue?vue&type=style&index=1&id=982cf5e8&prod&lang=scss
1292
+
1293
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
1294
+ var componentNormalizer = __webpack_require__(1656);
1295
+ ;// ./package/cms-richText/View.vue
1296
+
1297
+
1298
+
1299
+ ;
1300
+
1301
+
1302
+
1303
+ /* normalize component */
1304
+
1305
+ var component = (0,componentNormalizer/* default */.A)(
1306
+ cms_richText_Viewvue_type_script_lang_js,
1307
+ render,
1308
+ staticRenderFns,
1309
+ false,
1310
+ null,
1311
+ "982cf5e8",
1312
+ null
1313
+
1314
+ )
1315
+
1316
+ /* harmony default export */ var View = (component.exports);
1317
+
1318
+ /***/ }),
1319
+
1186
1320
  /***/ 492:
1187
1321
  /***/ (function(module) {
1188
1322
 
@@ -10512,8 +10646,8 @@ var map = {
10512
10646
  "./cms-banner/index.js": 1739,
10513
10647
  "./cms-button": 2209,
10514
10648
  "./cms-button/": 2209,
10515
- "./cms-button/View": 8169,
10516
- "./cms-button/View.vue": 8169,
10649
+ "./cms-button/View": 4018,
10650
+ "./cms-button/View.vue": 4018,
10517
10651
  "./cms-button/index": 2209,
10518
10652
  "./cms-button/index.js": 2209,
10519
10653
  "./cms-cells": 1630,
@@ -10525,8 +10659,8 @@ var map = {
10525
10659
  "./cms-column": 3923,
10526
10660
  "./cms-column-card": 5340,
10527
10661
  "./cms-column-card/": 5340,
10528
- "./cms-column-card/View": 1861,
10529
- "./cms-column-card/View.vue": 1861,
10662
+ "./cms-column-card/View": 2159,
10663
+ "./cms-column-card/View.vue": 2159,
10530
10664
  "./cms-column-card/index": 5340,
10531
10665
  "./cms-column-card/index.js": 5340,
10532
10666
  "./cms-column/": 3923,
@@ -10620,8 +10754,8 @@ var map = {
10620
10754
  "./cms-question/index.js": 2269,
10621
10755
  "./cms-richText": 7616,
10622
10756
  "./cms-richText/": 7616,
10623
- "./cms-richText/View": 3011,
10624
- "./cms-richText/View.vue": 3011,
10757
+ "./cms-richText/View": 450,
10758
+ "./cms-richText/View.vue": 450,
10625
10759
  "./cms-richText/index": 7616,
10626
10760
  "./cms-richText/index.js": 7616,
10627
10761
  "./cms-servePlan-tab": 1373,
@@ -10655,8 +10789,8 @@ var map = {
10655
10789
  "./cms-termsAndConditions/index.js": 9387,
10656
10790
  "./cms-text": 394,
10657
10791
  "./cms-text/": 394,
10658
- "./cms-text/View": 6757,
10659
- "./cms-text/View.vue": 6757,
10792
+ "./cms-text/View": 7524,
10793
+ "./cms-text/View.vue": 7524,
10660
10794
  "./cms-text/index": 394,
10661
10795
  "./cms-text/index.js": 394,
10662
10796
  "./cms-threeScroll": 4670,
@@ -11138,597 +11272,142 @@ module.exports = function (object, names) {
11138
11272
  /***/ }),
11139
11273
 
11140
11274
  /***/ 1861:
11141
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
11275
+ /***/ (function(module) {
11142
11276
 
11143
11277
  "use strict";
11144
- // ESM COMPAT FLAG
11145
- __webpack_require__.r(__webpack_exports__);
11278
+ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAwUlEQVRYR+2VQQ6EMAhF6ZxEN049hif3GFY305OowdTEGGqBLpwFXTbwefkF6uDl416uDwZgDpgD5sB/OtB9+x9uyI/bhhBCrNmW3vtm3dyIGss8tXct0oEE0ABArIG4FD+02AD3RA0EVyPbA1wB6nkkuY9NKBE6QaQ5xSmQCEpiT+AiAAZyhDkx1HOxAEoQ2uKoywbIQeB9mnPV2IoAKIhkq6q42IFMp+O1emGJHSAgqla2GqDmf7jmGoA5YA6YAzukPq8hQaCizgAAAABJRU5ErkJggg==";
11146
11279
 
11147
- // EXPORTS
11148
- __webpack_require__.d(__webpack_exports__, {
11149
- "default": function() { return /* binding */ View; }
11150
- });
11280
+ /***/ }),
11151
11281
 
11152
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
11153
- var es_iterator_constructor = __webpack_require__(8111);
11154
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.drop.js
11155
- var es_iterator_drop = __webpack_require__(9314);
11156
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column-card/View.vue?vue&type=template&id=2380364b&scoped=true
11282
+ /***/ 1866:
11283
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11157
11284
 
11285
+ "use strict";
11158
11286
 
11159
11287
 
11288
+ var call = Function.prototype.call;
11289
+ var $hasOwn = Object.prototype.hasOwnProperty;
11290
+ var bind = __webpack_require__(3682);
11160
11291
 
11161
- var render = function render() {
11162
- var _vm = this,
11163
- _c = _vm._self._c;
11164
- return _c('BaseComp', _vm._b({
11165
- attrs: {
11166
- "data": _vm.data,
11167
- "nowCompId": _vm.nowCompId,
11168
- "isOpcacity": _vm.isOpcacity,
11169
- "isMask": false,
11170
- "lang": _vm.lang,
11171
- "showDel": false
11172
- },
11173
- on: {
11174
- "getConfigData": _vm.getConfigData
11175
- }
11176
- }, 'BaseComp', _vm.$attrs, false), [_vm.isConfigPage ? _c('div', {
11177
- staticClass: "main_drag hoverBorderClass",
11178
- style: _vm.cardContainerStyle,
11179
- attrs: {
11180
- "id": `cardTarget${_vm.data.componentId}`
11181
- },
11182
- on: {
11183
- "dragover": _vm.dragover,
11184
- "dragend": function ($event) {
11185
- _vm.showAddCom = false;
11186
- },
11187
- "drop": _vm.drop
11188
- }
11189
- }, [_c('Draggable', {
11190
- staticStyle: {
11191
- "position": "relative"
11192
- },
11193
- attrs: {
11194
- "group": _vm.groupConfigForMain,
11195
- "chosen-class": "chosen",
11196
- "force-fallback": "true",
11197
- "animation": "1000",
11198
- "move": _vm.onMove
11199
- },
11200
- on: {
11201
- "start": _vm.onStart,
11202
- "end": function ($event) {
11203
- _vm.showAddCom = false;
11204
- }
11205
- },
11206
- model: {
11207
- value: _vm.data.childList,
11208
- callback: function ($$v) {
11209
- _vm.$set(_vm.data, "childList", $$v);
11210
- },
11211
- expression: "data.childList"
11212
- }
11213
- }, [_vm._l(_vm.data.childList, function (item, index) {
11214
- return _c('div', {
11215
- key: item.componentId,
11216
- staticStyle: {
11217
- "position": "relative"
11218
- }
11219
- }, [_vm.showAddCom ? _c('div', {
11220
- staticClass: "up_insert",
11221
- attrs: {
11222
- "id": `${item.componentId}-cardTargetup`
11223
- }
11224
- }, [_c('i', {
11225
- staticClass: "icon-up",
11226
- attrs: {
11227
- "id": `${item.componentId}-upi`
11228
- }
11229
- }), _c('span', {
11230
- attrs: {
11231
- "id": `${item.componentId}-upspan`
11232
- }
11233
- }, [_vm._v("插入组件")])]) : _vm._e(), _c(item.cmsCompName, {
11234
- tag: "component",
11235
- style: {
11236
- marginTop: _vm.showAddCom && index == 0 ? '20px' : '0px'
11237
- },
11238
- attrs: {
11239
- "data": item,
11240
- "lang": _vm.lang,
11241
- "isOpcacity": _vm.isOpcacity,
11242
- "nowCompId": _vm.nowCompId
11243
- }
11244
- })], 1);
11245
- }), _vm.showAddCom ? _c('div', {
11246
- staticClass: "up_insert insert_bottom",
11247
- style: {
11248
- bottom: _vm.data.childList.length ? '0px' : '-24px'
11249
- },
11250
- attrs: {
11251
- "id": `-cardTargetdown`
11252
- }
11253
- }, [_c('i', {
11254
- staticClass: "icon-up"
11255
- }), _c('span', [_vm._v("插入组件")])]) : _vm._e()], 2)], 1) : _c('cms-view', _vm._b({
11256
- style: _vm.cardContainerStyle,
11257
- attrs: {
11258
- "data": _vm.data.childList,
11259
- "lang": _vm.lang,
11260
- "isOpcacity": false,
11261
- "showCmhkMain": false
11262
- }
11263
- }, 'cms-view', _vm.$attrs, false))], 1);
11264
- };
11265
- var staticRenderFns = [];
11292
+ /** @type {import('.')} */
11293
+ module.exports = bind.call(call, $hasOwn);
11266
11294
 
11267
- ;// ./package/cms-column-card/View.vue?vue&type=template&id=2380364b&scoped=true
11295
+ /***/ }),
11268
11296
 
11269
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
11270
- var es_array_push = __webpack_require__(4114);
11271
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
11272
- var baseComp = __webpack_require__(4272);
11273
- // EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
11274
- var vuedraggable_umd = __webpack_require__(1527);
11275
- var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
11276
- // EXTERNAL MODULE: ./package/baseConfig.js
11277
- var baseConfig = __webpack_require__(649);
11278
- // EXTERNAL MODULE: ./src/views/standard_page.js
11279
- var standard_page = __webpack_require__(8134);
11280
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column-card/View.vue?vue&type=script&lang=js
11297
+ /***/ 1868:
11298
+ /***/ (function(module) {
11281
11299
 
11300
+ "use strict";
11282
11301
 
11283
11302
 
11303
+ /** @type {import('./uri')} */
11304
+ module.exports = URIError;
11284
11305
 
11306
+ /***/ }),
11285
11307
 
11308
+ /***/ 1904:
11309
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11286
11310
 
11287
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
11288
- name: "cms-column-card",
11289
- components: {
11290
- BaseComp: baseComp["default"],
11291
- Draggable: (vuedraggable_umd_default())
11292
- },
11293
- props: {
11294
- data: {
11295
- type: Object,
11296
- default: () => {
11297
- return {};
11298
- }
11299
- },
11300
- nowCompId: {
11301
- type: [String, Number],
11302
- default: ""
11303
- },
11304
- isOpcacity: {
11305
- type: Boolean,
11306
- default: true
11307
- },
11308
- lang: {
11309
- type: String,
11310
- default: "zh-HK"
11311
- },
11312
- isMobile: {
11313
- type: Boolean,
11314
- default: false
11315
- },
11316
- mobileLayout: {
11317
- type: String,
11318
- default: ""
11311
+ "use strict";
11312
+
11313
+
11314
+ __webpack_require__(8111);
11315
+ __webpack_require__(7588);
11316
+ var utils = __webpack_require__(8809);
11317
+
11318
+ /**
11319
+ * Config-specific merge-function which creates a new config-object
11320
+ * by merging two configuration objects together.
11321
+ *
11322
+ * @param {Object} config1
11323
+ * @param {Object} config2
11324
+ * @returns {Object} New object resulting from merging config2 to config1
11325
+ */
11326
+ module.exports = function mergeConfig(config1, config2) {
11327
+ // eslint-disable-next-line no-param-reassign
11328
+ config2 = config2 || {};
11329
+ var config = {};
11330
+ function getMergedValue(target, source) {
11331
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
11332
+ return utils.merge(target, source);
11333
+ } else if (utils.isPlainObject(source)) {
11334
+ return utils.merge({}, source);
11335
+ } else if (utils.isArray(source)) {
11336
+ return source.slice();
11319
11337
  }
11320
- },
11321
- data() {
11322
- return {
11323
- configData: {},
11324
- messFold: true,
11325
- showAddCom: false,
11326
- temporaryList: []
11327
- };
11328
- },
11329
- computed: {
11330
- isConfigPage() {
11331
- return this.$EventBus && this.isOpcacity;
11332
- },
11333
- groupConfigForMain() {
11334
- return {
11335
- name: "task",
11336
- pull: true,
11337
- // A列表的元素可以被拖出
11338
- put: (to, from, dragEl) => {
11339
- console.log(from.el.classList);
11340
- if (from.el.classList.contains("main_drag")) {
11341
- const dataId = this.findFirstComponentKey(dragEl);
11342
- const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column"];
11343
- console.log("allowedComponents", dataId);
11344
- if (dataId === "cms-column") {
11345
- if (!this.checkColumnNestingLevel()) {
11346
- console.log("cms-column 嵌套层级超出限制");
11347
- return false;
11348
- }
11349
- }
11350
- return allowedComponents.includes(dataId);
11351
- }
11352
- return true;
11353
- }
11354
- };
11355
- },
11356
- // 卡片容器样式
11357
- cardContainerStyle() {
11358
- return {
11359
- backgroundImage: this.configData.backgroundImage ? `url('${this.configData.backgroundImage}')` : "none",
11360
- backgroundSize: "cover",
11361
- backgroundRepeat: "no-repeat",
11362
- backgroundPosition: "center center",
11363
- height: this.getContainerHeight(),
11364
- border: this.getContainerBorder(),
11365
- borderRadius: this.getContainerBorderRadius(),
11366
- backgroundColor: this.configData.backgroundColor || "transparent",
11367
- boxShadow: this.configData.boxShadow || "none"
11368
- };
11338
+ return source;
11339
+ }
11340
+
11341
+ // eslint-disable-next-line consistent-return
11342
+ function mergeDeepProperties(prop) {
11343
+ if (!utils.isUndefined(config2[prop])) {
11344
+ return getMergedValue(config1[prop], config2[prop]);
11345
+ } else if (!utils.isUndefined(config1[prop])) {
11346
+ return getMergedValue(undefined, config1[prop]);
11369
11347
  }
11370
- },
11371
- mounted() {
11372
- if (this.$EventBus) {
11373
- this.$EventBus.$on("handleDragEnd", () => {
11374
- this.showAddCom = false;
11375
- });
11348
+ }
11349
+
11350
+ // eslint-disable-next-line consistent-return
11351
+ function valueFromConfig2(prop) {
11352
+ if (!utils.isUndefined(config2[prop])) {
11353
+ return getMergedValue(undefined, config2[prop]);
11376
11354
  }
11377
- },
11378
- watch: {},
11379
- methods: {
11380
- findFirstComponentKey(root) {
11381
- var _root$querySelector;
11382
- if (!root) return null;
11355
+ }
11383
11356
 
11384
- // 若起点自身就有
11385
- if (root.nodeType === 1 && root.hasAttribute("component-key")) {
11386
- return root.getAttribute("component-key");
11387
- }
11357
+ // eslint-disable-next-line consistent-return
11358
+ function defaultToConfig2(prop) {
11359
+ if (!utils.isUndefined(config2[prop])) {
11360
+ return getMergedValue(undefined, config2[prop]);
11361
+ } else if (!utils.isUndefined(config1[prop])) {
11362
+ return getMergedValue(undefined, config1[prop]);
11363
+ }
11364
+ }
11388
11365
 
11389
- // 向下查找第一个匹配的后代
11390
- const el = (_root$querySelector = root.querySelector) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.call(root, "[component-key]");
11391
- return el ? el.getAttribute("component-key") : null;
11392
- },
11393
- // 获取容器高度
11394
- getContainerHeight() {
11395
- if (this.configData.heightType === "fixed") {
11396
- return `${this.configData.fixedHeight}px`;
11397
- }
11398
- return this.isMobile && this.mobileLayout == "vertical" ? "auto" : "100%";
11399
- },
11400
- // 获取容器边框
11401
- getContainerBorder() {
11402
- if (this.configData.borderWidth) {
11403
- return `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}`;
11404
- }
11405
- return "none";
11406
- },
11407
- // 获取容器圆角
11408
- getContainerBorderRadius() {
11409
- if (this.configData.borderRadius) {
11410
- return `${this.configData.borderRadius}px`;
11411
- }
11412
- return "0";
11413
- },
11414
- getConfigData(configData) {
11415
- this.configData = configData;
11416
- },
11417
- foldMessText() {
11418
- this.messFold = !this.messFold;
11419
- },
11420
- decodeJumpUrl(url) {
11421
- if (!url) return;
11422
- top.location.href = url;
11423
- },
11424
- onStart(evt) {
11425
- console.log("drag start in column-card", evt);
11426
- this.showAddCom = true;
11427
- },
11428
- // 限制拖拽的组件类型
11429
- onMove(evt) {
11430
- const {
11431
- draggedContext
11432
- } = evt;
11366
+ // eslint-disable-next-line consistent-return
11367
+ function mergeDirectKeys(prop) {
11368
+ if (prop in config2) {
11369
+ return getMergedValue(config1[prop], config2[prop]);
11370
+ } else if (prop in config1) {
11371
+ return getMergedValue(undefined, config1[prop]);
11372
+ }
11373
+ }
11374
+ var mergeMap = {
11375
+ 'url': valueFromConfig2,
11376
+ 'method': valueFromConfig2,
11377
+ 'data': valueFromConfig2,
11378
+ 'baseURL': defaultToConfig2,
11379
+ 'transformRequest': defaultToConfig2,
11380
+ 'transformResponse': defaultToConfig2,
11381
+ 'paramsSerializer': defaultToConfig2,
11382
+ 'timeout': defaultToConfig2,
11383
+ 'timeoutMessage': defaultToConfig2,
11384
+ 'withCredentials': defaultToConfig2,
11385
+ 'adapter': defaultToConfig2,
11386
+ 'responseType': defaultToConfig2,
11387
+ 'xsrfCookieName': defaultToConfig2,
11388
+ 'xsrfHeaderName': defaultToConfig2,
11389
+ 'onUploadProgress': defaultToConfig2,
11390
+ 'onDownloadProgress': defaultToConfig2,
11391
+ 'decompress': defaultToConfig2,
11392
+ 'maxContentLength': defaultToConfig2,
11393
+ 'maxBodyLength': defaultToConfig2,
11394
+ 'transport': defaultToConfig2,
11395
+ 'httpAgent': defaultToConfig2,
11396
+ 'httpsAgent': defaultToConfig2,
11397
+ 'cancelToken': defaultToConfig2,
11398
+ 'socketPath': defaultToConfig2,
11399
+ 'responseEncoding': defaultToConfig2,
11400
+ 'validateStatus': mergeDirectKeys
11401
+ };
11402
+ utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
11403
+ var merge = mergeMap[prop] || mergeDeepProperties;
11404
+ var configValue = merge(prop);
11405
+ utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
11406
+ });
11407
+ return config;
11408
+ };
11433
11409
 
11434
- // 允许的组件类型
11435
- const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
11436
- ];
11437
-
11438
- // 如果是从外部拖入的组件
11439
- if (draggedContext && draggedContext.element) {
11440
- const componentType = draggedContext.element.cmsCompName;
11441
- if (componentType && !allowedComponents.includes(componentType)) {
11442
- console.log("draggedContext.element", draggedContext.element);
11443
- console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
11444
- return false;
11445
- }
11446
-
11447
- // 特殊处理 cms-column:检查嵌套层级
11448
- if (componentType === "cms-column") {
11449
- if (!this.checkColumnNestingLevel()) {
11450
- console.log("cms-column 嵌套层级超出限制");
11451
- return false;
11452
- }
11453
- }
11454
- }
11455
- return true;
11456
- },
11457
- // 检查 cms-column 嵌套层级
11458
- checkColumnNestingLevel() {
11459
- // 检查当前 column-card 是否已经在 cms-column 内部
11460
- let parent = this.$parent;
11461
- let columnDepth = 0;
11462
- while (parent) {
11463
- // 检查父组件是否是 cms-column 或包含 cms-column
11464
- if (parent.$options.name === "cms-column" || parent.$data && parent.$data.data && parent.$data.data.cmsCompName === "cms-column") {
11465
- columnDepth++;
11466
- }
11467
-
11468
- // 如果已经有一层 cms-column,则不允许再嵌套
11469
- if (columnDepth >= 2) {
11470
- console.log(`检测到 cms-column 嵌套层级: ${columnDepth}, 超出限制`);
11471
- return false;
11472
- }
11473
- parent = parent.$parent;
11474
- }
11475
- console.log(`cms-column 嵌套层级检查通过: ${columnDepth}`);
11476
- return true;
11477
- },
11478
- // 处理拖拽悬停
11479
- dragover(e) {
11480
- e.preventDefault();
11481
- this.showAddCom = true;
11482
- },
11483
- // 处理拖拽放置
11484
- drop(e) {
11485
- e.preventDefault();
11486
- const componentKey = e.dataTransfer.getData("componentKey");
11487
- let temporaryId = "";
11488
- this.temporaryList = e.dataTransfer.getData("temporaryList") ? JSON.parse(e.dataTransfer.getData("temporaryList")) : [];
11489
- console.log("cms-colum-card-drop", componentKey, this.temporaryList);
11490
- if (!componentKey) return;
11491
- const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
11492
- const isTemporary = isTemporaryItem === "true";
11493
- if (isTemporary) {
11494
- temporaryId = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey).cmsCompName;
11495
- }
11496
- const componentType = isTemporary ? temporaryId : componentKey;
11497
- // 允许的组件类型
11498
- const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
11499
- ];
11500
-
11501
- // 检查组件类型是否允许
11502
- if (!allowedComponents.includes(componentType)) {
11503
- console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
11504
- this.$message && this.$message.warning(`该组件类型不支持拖入卡片容器`);
11505
- this.showAddCom = false;
11506
- return;
11507
- }
11508
-
11509
- // 特殊处理 cms-column:检查嵌套层级
11510
- if (componentType === "cms-column") {
11511
- if (!this.checkColumnNestingLevel()) {
11512
- console.log("cms-column 嵌套层级超出限制");
11513
- this.$message && this.$message.warning(`cms-column 只能嵌套一层`);
11514
- this.showAddCom = false;
11515
- return;
11516
- }
11517
- }
11518
- this.addOneComp(e, componentKey);
11519
- },
11520
- // 添加组件到卡片容器
11521
- addOneComp(e, componentKey) {
11522
- this.showAddCom = false;
11523
- console.log("drop to column-card", componentKey);
11524
-
11525
- // 动态导入组件配置
11526
- let initCompData;
11527
- try {
11528
- const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
11529
- const isTemporary = isTemporaryItem === "true";
11530
- if (isTemporary) {
11531
- initCompData = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey);
11532
- } else {
11533
- initCompData = __webpack_require__(1640)(`./${componentKey}`).default.settings(componentKey);
11534
- }
11535
- if (!isTemporary) {
11536
- initCompData = {
11537
- ...initCompData,
11538
- styleConfig: {
11539
- pc: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(16, 16, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")],
11540
- mb: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(12, 12, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")]
11541
- }
11542
- };
11543
- }
11544
- } catch (error) {
11545
- console.error(`无法加载组件 ${componentKey}:`, error);
11546
- this.$message && this.$message.error(`组件加载失败`);
11547
- return;
11548
- }
11549
- const toElementId = e.toElement.id;
11550
- if (toElementId === `cardTarget${this.data.componentId}` || toElementId.includes("cardTargetdown")) {
11551
- // 添加到卡片容器末尾
11552
- this.data.childList.push(initCompData);
11553
- } else if (toElementId.includes("cardTargetup")) {
11554
- // 插入到指定位置
11555
- const underComponentId = toElementId.split("-cardTargetup")[0];
11556
- const index = this.data.childList.findIndex(item => item.componentId === underComponentId);
11557
- if (index !== -1) {
11558
- this.data.childList.splice(index, 0, initCompData);
11559
- }
11560
- }
11561
-
11562
- // 触发数据更新
11563
- this.$emit("update:data", this.data);
11564
- if (componentKey === "cms-column") {
11565
- this.$EventBus.$emit("handleNowComp", initCompData);
11566
- }
11567
- }
11568
- }
11569
- });
11570
- ;// ./package/cms-column-card/View.vue?vue&type=script&lang=js
11571
- /* harmony default export */ var cms_column_card_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
11572
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column-card/View.vue?vue&type=style&index=0&id=2380364b&prod&lang=scss&scoped=true
11573
- // extracted by mini-css-extract-plugin
11574
-
11575
- ;// ./package/cms-column-card/View.vue?vue&type=style&index=0&id=2380364b&prod&lang=scss&scoped=true
11576
-
11577
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
11578
- var componentNormalizer = __webpack_require__(1656);
11579
- ;// ./package/cms-column-card/View.vue
11580
-
11581
-
11582
-
11583
- ;
11584
-
11585
-
11586
- /* normalize component */
11587
-
11588
- var component = (0,componentNormalizer/* default */.A)(
11589
- cms_column_card_Viewvue_type_script_lang_js,
11590
- render,
11591
- staticRenderFns,
11592
- false,
11593
- null,
11594
- "2380364b",
11595
- null
11596
-
11597
- )
11598
-
11599
- /* harmony default export */ var View = (component.exports);
11600
-
11601
- /***/ }),
11602
-
11603
- /***/ 1866:
11604
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11605
-
11606
- "use strict";
11607
-
11608
-
11609
- var call = Function.prototype.call;
11610
- var $hasOwn = Object.prototype.hasOwnProperty;
11611
- var bind = __webpack_require__(3682);
11612
-
11613
- /** @type {import('.')} */
11614
- module.exports = bind.call(call, $hasOwn);
11615
-
11616
- /***/ }),
11617
-
11618
- /***/ 1868:
11619
- /***/ (function(module) {
11620
-
11621
- "use strict";
11622
-
11623
-
11624
- /** @type {import('./uri')} */
11625
- module.exports = URIError;
11626
-
11627
- /***/ }),
11628
-
11629
- /***/ 1904:
11630
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
11631
-
11632
- "use strict";
11633
-
11634
-
11635
- __webpack_require__(8111);
11636
- __webpack_require__(7588);
11637
- var utils = __webpack_require__(8809);
11638
-
11639
- /**
11640
- * Config-specific merge-function which creates a new config-object
11641
- * by merging two configuration objects together.
11642
- *
11643
- * @param {Object} config1
11644
- * @param {Object} config2
11645
- * @returns {Object} New object resulting from merging config2 to config1
11646
- */
11647
- module.exports = function mergeConfig(config1, config2) {
11648
- // eslint-disable-next-line no-param-reassign
11649
- config2 = config2 || {};
11650
- var config = {};
11651
- function getMergedValue(target, source) {
11652
- if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
11653
- return utils.merge(target, source);
11654
- } else if (utils.isPlainObject(source)) {
11655
- return utils.merge({}, source);
11656
- } else if (utils.isArray(source)) {
11657
- return source.slice();
11658
- }
11659
- return source;
11660
- }
11661
-
11662
- // eslint-disable-next-line consistent-return
11663
- function mergeDeepProperties(prop) {
11664
- if (!utils.isUndefined(config2[prop])) {
11665
- return getMergedValue(config1[prop], config2[prop]);
11666
- } else if (!utils.isUndefined(config1[prop])) {
11667
- return getMergedValue(undefined, config1[prop]);
11668
- }
11669
- }
11670
-
11671
- // eslint-disable-next-line consistent-return
11672
- function valueFromConfig2(prop) {
11673
- if (!utils.isUndefined(config2[prop])) {
11674
- return getMergedValue(undefined, config2[prop]);
11675
- }
11676
- }
11677
-
11678
- // eslint-disable-next-line consistent-return
11679
- function defaultToConfig2(prop) {
11680
- if (!utils.isUndefined(config2[prop])) {
11681
- return getMergedValue(undefined, config2[prop]);
11682
- } else if (!utils.isUndefined(config1[prop])) {
11683
- return getMergedValue(undefined, config1[prop]);
11684
- }
11685
- }
11686
-
11687
- // eslint-disable-next-line consistent-return
11688
- function mergeDirectKeys(prop) {
11689
- if (prop in config2) {
11690
- return getMergedValue(config1[prop], config2[prop]);
11691
- } else if (prop in config1) {
11692
- return getMergedValue(undefined, config1[prop]);
11693
- }
11694
- }
11695
- var mergeMap = {
11696
- 'url': valueFromConfig2,
11697
- 'method': valueFromConfig2,
11698
- 'data': valueFromConfig2,
11699
- 'baseURL': defaultToConfig2,
11700
- 'transformRequest': defaultToConfig2,
11701
- 'transformResponse': defaultToConfig2,
11702
- 'paramsSerializer': defaultToConfig2,
11703
- 'timeout': defaultToConfig2,
11704
- 'timeoutMessage': defaultToConfig2,
11705
- 'withCredentials': defaultToConfig2,
11706
- 'adapter': defaultToConfig2,
11707
- 'responseType': defaultToConfig2,
11708
- 'xsrfCookieName': defaultToConfig2,
11709
- 'xsrfHeaderName': defaultToConfig2,
11710
- 'onUploadProgress': defaultToConfig2,
11711
- 'onDownloadProgress': defaultToConfig2,
11712
- 'decompress': defaultToConfig2,
11713
- 'maxContentLength': defaultToConfig2,
11714
- 'maxBodyLength': defaultToConfig2,
11715
- 'transport': defaultToConfig2,
11716
- 'httpAgent': defaultToConfig2,
11717
- 'httpsAgent': defaultToConfig2,
11718
- 'cancelToken': defaultToConfig2,
11719
- 'socketPath': defaultToConfig2,
11720
- 'responseEncoding': defaultToConfig2,
11721
- 'validateStatus': mergeDirectKeys
11722
- };
11723
- utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
11724
- var merge = mergeMap[prop] || mergeDeepProperties;
11725
- var configValue = merge(prop);
11726
- utils.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
11727
- });
11728
- return config;
11729
- };
11730
-
11731
- /***/ }),
11410
+ /***/ }),
11732
11411
 
11733
11412
  /***/ 1912:
11734
11413
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
@@ -12347,270 +12026,734 @@ module.exports = function (target, name, descriptor) {
12347
12026
 
12348
12027
  /***/ }),
12349
12028
 
12350
- /***/ 2125:
12351
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
12029
+ /***/ 2125:
12030
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
12031
+
12032
+ "use strict";
12033
+
12034
+
12035
+ exports.__esModule = true;
12036
+ exports.isMac = exports.isEmpty = exports.isEqual = exports.arrayEquals = exports.looseEqual = exports.capitalize = exports.kebabCase = exports.autoprefixer = exports.isFirefox = exports.isEdge = exports.isIE = exports.coerceTruthyValueToArray = exports.arrayFind = exports.arrayFindIndex = exports.escapeRegexpString = exports.valueEquals = exports.generateId = exports.getValueByPath = undefined;
12037
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
12038
+ return typeof obj;
12039
+ } : function (obj) {
12040
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
12041
+ };
12042
+ exports.noop = noop;
12043
+ exports.hasOwn = hasOwn;
12044
+ exports.toObject = toObject;
12045
+ exports.getPropByPath = getPropByPath;
12046
+ exports.rafThrottle = rafThrottle;
12047
+ exports.objToArray = objToArray;
12048
+ var _vue = __webpack_require__(6848);
12049
+ var _vue2 = _interopRequireDefault(_vue);
12050
+ var _types = __webpack_require__(7012);
12051
+ function _interopRequireDefault(obj) {
12052
+ return obj && obj.__esModule ? obj : {
12053
+ default: obj
12054
+ };
12055
+ }
12056
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
12057
+ function noop() {}
12058
+ ;
12059
+ function hasOwn(obj, key) {
12060
+ return hasOwnProperty.call(obj, key);
12061
+ }
12062
+ ;
12063
+ function extend(to, _from) {
12064
+ for (var key in _from) {
12065
+ to[key] = _from[key];
12066
+ }
12067
+ return to;
12068
+ }
12069
+ ;
12070
+ function toObject(arr) {
12071
+ var res = {};
12072
+ for (var i = 0; i < arr.length; i++) {
12073
+ if (arr[i]) {
12074
+ extend(res, arr[i]);
12075
+ }
12076
+ }
12077
+ return res;
12078
+ }
12079
+ ;
12080
+ var getValueByPath = exports.getValueByPath = function getValueByPath(object, prop) {
12081
+ prop = prop || '';
12082
+ var paths = prop.split('.');
12083
+ var current = object;
12084
+ var result = null;
12085
+ for (var i = 0, j = paths.length; i < j; i++) {
12086
+ var path = paths[i];
12087
+ if (!current) break;
12088
+ if (i === j - 1) {
12089
+ result = current[path];
12090
+ break;
12091
+ }
12092
+ current = current[path];
12093
+ }
12094
+ return result;
12095
+ };
12096
+ function getPropByPath(obj, path, strict) {
12097
+ var tempObj = obj;
12098
+ path = path.replace(/\[(\w+)\]/g, '.$1');
12099
+ path = path.replace(/^\./, '');
12100
+ var keyArr = path.split('.');
12101
+ var i = 0;
12102
+ for (var len = keyArr.length; i < len - 1; ++i) {
12103
+ if (!tempObj && !strict) break;
12104
+ var key = keyArr[i];
12105
+ if (key in tempObj) {
12106
+ tempObj = tempObj[key];
12107
+ } else {
12108
+ if (strict) {
12109
+ throw new Error('please transfer a valid prop path to form item!');
12110
+ }
12111
+ break;
12112
+ }
12113
+ }
12114
+ return {
12115
+ o: tempObj,
12116
+ k: keyArr[i],
12117
+ v: tempObj ? tempObj[keyArr[i]] : null
12118
+ };
12119
+ }
12120
+ ;
12121
+ var generateId = exports.generateId = function generateId() {
12122
+ return Math.floor(Math.random() * 10000);
12123
+ };
12124
+ var valueEquals = exports.valueEquals = function valueEquals(a, b) {
12125
+ // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
12126
+ if (a === b) return true;
12127
+ if (!(a instanceof Array)) return false;
12128
+ if (!(b instanceof Array)) return false;
12129
+ if (a.length !== b.length) return false;
12130
+ for (var i = 0; i !== a.length; ++i) {
12131
+ if (a[i] !== b[i]) return false;
12132
+ }
12133
+ return true;
12134
+ };
12135
+ var escapeRegexpString = exports.escapeRegexpString = function escapeRegexpString() {
12136
+ var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12137
+ return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
12138
+ };
12139
+
12140
+ // TODO: use native Array.find, Array.findIndex when IE support is dropped
12141
+ var arrayFindIndex = exports.arrayFindIndex = function arrayFindIndex(arr, pred) {
12142
+ for (var i = 0; i !== arr.length; ++i) {
12143
+ if (pred(arr[i])) {
12144
+ return i;
12145
+ }
12146
+ }
12147
+ return -1;
12148
+ };
12149
+ var arrayFind = exports.arrayFind = function arrayFind(arr, pred) {
12150
+ var idx = arrayFindIndex(arr, pred);
12151
+ return idx !== -1 ? arr[idx] : undefined;
12152
+ };
12153
+
12154
+ // coerce truthy value to array
12155
+ var coerceTruthyValueToArray = exports.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
12156
+ if (Array.isArray(val)) {
12157
+ return val;
12158
+ } else if (val) {
12159
+ return [val];
12160
+ } else {
12161
+ return [];
12162
+ }
12163
+ };
12164
+ var isIE = exports.isIE = function isIE() {
12165
+ return !_vue2.default.prototype.$isServer && !isNaN(Number(document.documentMode));
12166
+ };
12167
+ var isEdge = exports.isEdge = function isEdge() {
12168
+ return !_vue2.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
12169
+ };
12170
+ var isFirefox = exports.isFirefox = function isFirefox() {
12171
+ return !_vue2.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
12172
+ };
12173
+ var autoprefixer = exports.autoprefixer = function autoprefixer(style) {
12174
+ if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
12175
+ var rules = ['transform', 'transition', 'animation'];
12176
+ var prefixes = ['ms-', 'webkit-'];
12177
+ rules.forEach(function (rule) {
12178
+ var value = style[rule];
12179
+ if (rule && value) {
12180
+ prefixes.forEach(function (prefix) {
12181
+ style[prefix + rule] = value;
12182
+ });
12183
+ }
12184
+ });
12185
+ return style;
12186
+ };
12187
+ var kebabCase = exports.kebabCase = function kebabCase(str) {
12188
+ var hyphenateRE = /([^-])([A-Z])/g;
12189
+ return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
12190
+ };
12191
+ var capitalize = exports.capitalize = function capitalize(str) {
12192
+ if (!(0, _types.isString)(str)) return str;
12193
+ return str.charAt(0).toUpperCase() + str.slice(1);
12194
+ };
12195
+ var looseEqual = exports.looseEqual = function looseEqual(a, b) {
12196
+ var isObjectA = (0, _types.isObject)(a);
12197
+ var isObjectB = (0, _types.isObject)(b);
12198
+ if (isObjectA && isObjectB) {
12199
+ return JSON.stringify(a) === JSON.stringify(b);
12200
+ } else if (!isObjectA && !isObjectB) {
12201
+ return String(a) === String(b);
12202
+ } else {
12203
+ return false;
12204
+ }
12205
+ };
12206
+ var arrayEquals = exports.arrayEquals = function arrayEquals(arrayA, arrayB) {
12207
+ arrayA = arrayA || [];
12208
+ arrayB = arrayB || [];
12209
+ if (arrayA.length !== arrayB.length) {
12210
+ return false;
12211
+ }
12212
+ for (var i = 0; i < arrayA.length; i++) {
12213
+ if (!looseEqual(arrayA[i], arrayB[i])) {
12214
+ return false;
12215
+ }
12216
+ }
12217
+ return true;
12218
+ };
12219
+ var isEqual = exports.isEqual = function isEqual(value1, value2) {
12220
+ if (Array.isArray(value1) && Array.isArray(value2)) {
12221
+ return arrayEquals(value1, value2);
12222
+ }
12223
+ return looseEqual(value1, value2);
12224
+ };
12225
+ var isEmpty = exports.isEmpty = function isEmpty(val) {
12226
+ // null or undefined
12227
+ if (val == null) return true;
12228
+ if (typeof val === 'boolean') return false;
12229
+ if (typeof val === 'number') return !val;
12230
+ if (val instanceof Error) return val.message === '';
12231
+ switch (Object.prototype.toString.call(val)) {
12232
+ // String or Array
12233
+ case '[object String]':
12234
+ case '[object Array]':
12235
+ return !val.length;
12236
+
12237
+ // Map or Set or File
12238
+ case '[object File]':
12239
+ case '[object Map]':
12240
+ case '[object Set]':
12241
+ {
12242
+ return !val.size;
12243
+ }
12244
+ // Plain Object
12245
+ case '[object Object]':
12246
+ {
12247
+ return !Object.keys(val).length;
12248
+ }
12249
+ }
12250
+ return false;
12251
+ };
12252
+ function rafThrottle(fn) {
12253
+ var locked = false;
12254
+ return function () {
12255
+ var _this = this;
12256
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
12257
+ args[_key] = arguments[_key];
12258
+ }
12259
+ if (locked) return;
12260
+ locked = true;
12261
+ window.requestAnimationFrame(function (_) {
12262
+ fn.apply(_this, args);
12263
+ locked = false;
12264
+ });
12265
+ };
12266
+ }
12267
+ function objToArray(obj) {
12268
+ if (Array.isArray(obj)) {
12269
+ return obj;
12270
+ }
12271
+ return isEmpty(obj) ? [] : [obj];
12272
+ }
12273
+ var isMac = exports.isMac = function isMac() {
12274
+ return !_vue2.default.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
12275
+ };
12276
+
12277
+ /***/ }),
12278
+
12279
+ /***/ 2140:
12280
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12281
+
12282
+ "use strict";
12283
+
12284
+ var wellKnownSymbol = __webpack_require__(8227);
12285
+
12286
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
12287
+ var test = {};
12288
+
12289
+ test[TO_STRING_TAG] = 'z';
12290
+
12291
+ module.exports = String(test) === '[object z]';
12292
+
12293
+
12294
+ /***/ }),
12295
+
12296
+ /***/ 2159:
12297
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
12298
+
12299
+ "use strict";
12300
+ // ESM COMPAT FLAG
12301
+ __webpack_require__.r(__webpack_exports__);
12302
+
12303
+ // EXPORTS
12304
+ __webpack_require__.d(__webpack_exports__, {
12305
+ "default": function() { return /* binding */ View; }
12306
+ });
12307
+
12308
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
12309
+ var es_iterator_constructor = __webpack_require__(8111);
12310
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.drop.js
12311
+ var es_iterator_drop = __webpack_require__(9314);
12312
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column-card/View.vue?vue&type=template&id=155a8242&scoped=true
12313
+
12314
+
12315
+
12316
+
12317
+ var render = function render() {
12318
+ var _vm = this,
12319
+ _c = _vm._self._c;
12320
+ return _c('BaseComp', _vm._b({
12321
+ attrs: {
12322
+ "data": _vm.data,
12323
+ "nowCompId": _vm.nowCompId,
12324
+ "isOpcacity": _vm.isOpcacity,
12325
+ "isMask": false,
12326
+ "lang": _vm.lang,
12327
+ "showDel": false
12328
+ },
12329
+ on: {
12330
+ "getConfigData": _vm.getConfigData
12331
+ }
12332
+ }, 'BaseComp', _vm.$attrs, false), [_vm.isConfigPage ? _c('div', {
12333
+ staticClass: "main_drag hoverBorderClass",
12334
+ style: _vm.cardContainerStyle,
12335
+ attrs: {
12336
+ "id": `cardTarget${_vm.data.componentId}`
12337
+ },
12338
+ on: {
12339
+ "dragover": _vm.dragover,
12340
+ "dragend": function ($event) {
12341
+ _vm.showAddCom = false;
12342
+ },
12343
+ "drop": _vm.drop
12344
+ }
12345
+ }, [_c('Draggable', {
12346
+ staticStyle: {
12347
+ "position": "relative"
12348
+ },
12349
+ attrs: {
12350
+ "group": _vm.groupConfigForMain,
12351
+ "chosen-class": "chosen",
12352
+ "force-fallback": "true",
12353
+ "animation": "1000",
12354
+ "move": _vm.onMove
12355
+ },
12356
+ on: {
12357
+ "start": _vm.onStart,
12358
+ "end": function ($event) {
12359
+ _vm.showAddCom = false;
12360
+ }
12361
+ },
12362
+ model: {
12363
+ value: _vm.data.childList,
12364
+ callback: function ($$v) {
12365
+ _vm.$set(_vm.data, "childList", $$v);
12366
+ },
12367
+ expression: "data.childList"
12368
+ }
12369
+ }, [_vm._l(_vm.data.childList, function (item, index) {
12370
+ return _c('div', {
12371
+ key: item.componentId,
12372
+ staticStyle: {
12373
+ "position": "relative"
12374
+ }
12375
+ }, [_vm.showAddCom ? _c('div', {
12376
+ staticClass: "up_insert",
12377
+ attrs: {
12378
+ "id": `${item.componentId}-cardTargetup`
12379
+ }
12380
+ }, [_c('i', {
12381
+ staticClass: "icon-up",
12382
+ attrs: {
12383
+ "id": `${item.componentId}-upi`
12384
+ }
12385
+ }), _c('span', {
12386
+ attrs: {
12387
+ "id": `${item.componentId}-upspan`
12388
+ }
12389
+ }, [_vm._v("插入组件")])]) : _vm._e(), _c(item.cmsCompName, {
12390
+ tag: "component",
12391
+ style: {
12392
+ marginTop: _vm.showAddCom && index == 0 ? '20px' : '0px'
12393
+ },
12394
+ attrs: {
12395
+ "data": item,
12396
+ "lang": _vm.lang,
12397
+ "isOpcacity": _vm.isOpcacity,
12398
+ "nowCompId": _vm.nowCompId,
12399
+ "showCmhkMain": false
12400
+ }
12401
+ })], 1);
12402
+ }), _vm.showAddCom ? _c('div', {
12403
+ staticClass: "up_insert insert_bottom",
12404
+ style: {
12405
+ bottom: _vm.data.childList.length ? '0px' : '-24px'
12406
+ },
12407
+ attrs: {
12408
+ "id": `-cardTargetdown`
12409
+ }
12410
+ }, [_c('i', {
12411
+ staticClass: "icon-up"
12412
+ }), _c('span', [_vm._v("插入组件")])]) : _vm._e()], 2)], 1) : _c('cms-view', _vm._b({
12413
+ style: _vm.cardContainerStyle,
12414
+ attrs: {
12415
+ "data": _vm.data.childList,
12416
+ "lang": _vm.lang,
12417
+ "isOpcacity": false,
12418
+ "showCmhkMain": false
12419
+ }
12420
+ }, 'cms-view', _vm.$attrs, false))], 1);
12421
+ };
12422
+ var staticRenderFns = [];
12423
+
12424
+ ;// ./package/cms-column-card/View.vue?vue&type=template&id=155a8242&scoped=true
12425
+
12426
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.push.js
12427
+ var es_array_push = __webpack_require__(4114);
12428
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
12429
+ var baseComp = __webpack_require__(4272);
12430
+ // EXTERNAL MODULE: ./node_modules/vuedraggable/dist/vuedraggable.umd.js
12431
+ var vuedraggable_umd = __webpack_require__(1527);
12432
+ var vuedraggable_umd_default = /*#__PURE__*/__webpack_require__.n(vuedraggable_umd);
12433
+ // EXTERNAL MODULE: ./package/baseConfig.js
12434
+ var baseConfig = __webpack_require__(649);
12435
+ // EXTERNAL MODULE: ./src/views/standard_page.js
12436
+ var standard_page = __webpack_require__(8134);
12437
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column-card/View.vue?vue&type=script&lang=js
12438
+
12439
+
12440
+
12441
+
12442
+
12443
+
12444
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
12445
+ name: "cms-column-card",
12446
+ components: {
12447
+ BaseComp: baseComp["default"],
12448
+ Draggable: (vuedraggable_umd_default())
12449
+ },
12450
+ props: {
12451
+ data: {
12452
+ type: Object,
12453
+ default: () => {
12454
+ return {};
12455
+ }
12456
+ },
12457
+ nowCompId: {
12458
+ type: [String, Number],
12459
+ default: ""
12460
+ },
12461
+ isOpcacity: {
12462
+ type: Boolean,
12463
+ default: true
12464
+ },
12465
+ lang: {
12466
+ type: String,
12467
+ default: "zh-HK"
12468
+ },
12469
+ isMobile: {
12470
+ type: Boolean,
12471
+ default: false
12472
+ },
12473
+ mobileLayout: {
12474
+ type: String,
12475
+ default: ""
12476
+ }
12477
+ },
12478
+ data() {
12479
+ return {
12480
+ configData: {},
12481
+ messFold: true,
12482
+ showAddCom: false,
12483
+ temporaryList: []
12484
+ };
12485
+ },
12486
+ computed: {
12487
+ isConfigPage() {
12488
+ return this.$EventBus && this.isOpcacity;
12489
+ },
12490
+ groupConfigForMain() {
12491
+ return {
12492
+ name: "task",
12493
+ pull: true,
12494
+ // A列表的元素可以被拖出
12495
+ put: (to, from, dragEl) => {
12496
+ console.log(from.el.classList);
12497
+ if (from.el.classList.contains("main_drag")) {
12498
+ const dataId = this.findFirstComponentKey(dragEl);
12499
+ const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column"];
12500
+ console.log("allowedComponents", dataId);
12501
+ if (dataId === "cms-column") {
12502
+ if (!this.checkColumnNestingLevel()) {
12503
+ console.log("cms-column 嵌套层级超出限制");
12504
+ return false;
12505
+ }
12506
+ }
12507
+ return allowedComponents.includes(dataId);
12508
+ }
12509
+ return true;
12510
+ }
12511
+ };
12512
+ },
12513
+ // 卡片容器样式
12514
+ cardContainerStyle() {
12515
+ return {
12516
+ backgroundImage: this.configData.backgroundImage ? `url('${this.configData.backgroundImage}')` : "none",
12517
+ backgroundSize: "cover",
12518
+ backgroundRepeat: "no-repeat",
12519
+ backgroundPosition: "center center",
12520
+ height: this.getContainerHeight(),
12521
+ border: this.getContainerBorder(),
12522
+ borderRadius: this.getContainerBorderRadius(),
12523
+ backgroundColor: this.configData.backgroundColor || "transparent",
12524
+ boxShadow: this.configData.boxShadow || "none"
12525
+ };
12526
+ }
12527
+ },
12528
+ mounted() {
12529
+ if (this.$EventBus) {
12530
+ this.$EventBus.$on("handleDragEnd", () => {
12531
+ this.showAddCom = false;
12532
+ });
12533
+ }
12534
+ },
12535
+ watch: {},
12536
+ methods: {
12537
+ findFirstComponentKey(root) {
12538
+ var _root$querySelector;
12539
+ if (!root) return null;
12540
+
12541
+ // 若起点自身就有
12542
+ if (root.nodeType === 1 && root.hasAttribute("component-key")) {
12543
+ return root.getAttribute("component-key");
12544
+ }
12545
+
12546
+ // 向下查找第一个匹配的后代
12547
+ const el = (_root$querySelector = root.querySelector) === null || _root$querySelector === void 0 ? void 0 : _root$querySelector.call(root, "[component-key]");
12548
+ return el ? el.getAttribute("component-key") : null;
12549
+ },
12550
+ // 获取容器高度
12551
+ getContainerHeight() {
12552
+ if (this.configData.heightType === "fixed") {
12553
+ return `${this.configData.fixedHeight}px`;
12554
+ }
12555
+ return this.isMobile && this.mobileLayout == "vertical" ? "auto" : "100%";
12556
+ },
12557
+ // 获取容器边框
12558
+ getContainerBorder() {
12559
+ if (this.configData.borderWidth) {
12560
+ return `${this.configData.borderWidth}px ${this.configData.borderStyle} ${this.configData.borderColor}`;
12561
+ }
12562
+ return "none";
12563
+ },
12564
+ // 获取容器圆角
12565
+ getContainerBorderRadius() {
12566
+ if (this.configData.borderRadius) {
12567
+ return `${this.configData.borderRadius}px`;
12568
+ }
12569
+ return "0";
12570
+ },
12571
+ getConfigData(configData) {
12572
+ this.configData = configData;
12573
+ },
12574
+ foldMessText() {
12575
+ this.messFold = !this.messFold;
12576
+ },
12577
+ decodeJumpUrl(url) {
12578
+ if (!url) return;
12579
+ top.location.href = url;
12580
+ },
12581
+ onStart(evt) {
12582
+ console.log("drag start in column-card", evt);
12583
+ this.showAddCom = true;
12584
+ },
12585
+ // 限制拖拽的组件类型
12586
+ onMove(evt) {
12587
+ const {
12588
+ draggedContext
12589
+ } = evt;
12590
+
12591
+ // 允许的组件类型
12592
+ const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
12593
+ ];
12352
12594
 
12353
- "use strict";
12595
+ // 如果是从外部拖入的组件
12596
+ if (draggedContext && draggedContext.element) {
12597
+ const componentType = draggedContext.element.cmsCompName;
12598
+ if (componentType && !allowedComponents.includes(componentType)) {
12599
+ console.log("draggedContext.element", draggedContext.element);
12600
+ console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
12601
+ return false;
12602
+ }
12354
12603
 
12604
+ // 特殊处理 cms-column:检查嵌套层级
12605
+ if (componentType === "cms-column") {
12606
+ if (!this.checkColumnNestingLevel()) {
12607
+ console.log("cms-column 嵌套层级超出限制");
12608
+ return false;
12609
+ }
12610
+ }
12611
+ }
12612
+ return true;
12613
+ },
12614
+ // 检查 cms-column 嵌套层级
12615
+ checkColumnNestingLevel() {
12616
+ // 检查当前 column-card 是否已经在 cms-column 内部
12617
+ let parent = this.$parent;
12618
+ let columnDepth = 0;
12619
+ while (parent) {
12620
+ // 检查父组件是否是 cms-column 或包含 cms-column
12621
+ if (parent.$options.name === "cms-column" || parent.$data && parent.$data.data && parent.$data.data.cmsCompName === "cms-column") {
12622
+ columnDepth++;
12623
+ }
12355
12624
 
12356
- exports.__esModule = true;
12357
- exports.isMac = exports.isEmpty = exports.isEqual = exports.arrayEquals = exports.looseEqual = exports.capitalize = exports.kebabCase = exports.autoprefixer = exports.isFirefox = exports.isEdge = exports.isIE = exports.coerceTruthyValueToArray = exports.arrayFind = exports.arrayFindIndex = exports.escapeRegexpString = exports.valueEquals = exports.generateId = exports.getValueByPath = undefined;
12358
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
12359
- return typeof obj;
12360
- } : function (obj) {
12361
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
12362
- };
12363
- exports.noop = noop;
12364
- exports.hasOwn = hasOwn;
12365
- exports.toObject = toObject;
12366
- exports.getPropByPath = getPropByPath;
12367
- exports.rafThrottle = rafThrottle;
12368
- exports.objToArray = objToArray;
12369
- var _vue = __webpack_require__(6848);
12370
- var _vue2 = _interopRequireDefault(_vue);
12371
- var _types = __webpack_require__(7012);
12372
- function _interopRequireDefault(obj) {
12373
- return obj && obj.__esModule ? obj : {
12374
- default: obj
12375
- };
12376
- }
12377
- var hasOwnProperty = Object.prototype.hasOwnProperty;
12378
- function noop() {}
12379
- ;
12380
- function hasOwn(obj, key) {
12381
- return hasOwnProperty.call(obj, key);
12382
- }
12383
- ;
12384
- function extend(to, _from) {
12385
- for (var key in _from) {
12386
- to[key] = _from[key];
12387
- }
12388
- return to;
12389
- }
12390
- ;
12391
- function toObject(arr) {
12392
- var res = {};
12393
- for (var i = 0; i < arr.length; i++) {
12394
- if (arr[i]) {
12395
- extend(res, arr[i]);
12396
- }
12397
- }
12398
- return res;
12399
- }
12400
- ;
12401
- var getValueByPath = exports.getValueByPath = function getValueByPath(object, prop) {
12402
- prop = prop || '';
12403
- var paths = prop.split('.');
12404
- var current = object;
12405
- var result = null;
12406
- for (var i = 0, j = paths.length; i < j; i++) {
12407
- var path = paths[i];
12408
- if (!current) break;
12409
- if (i === j - 1) {
12410
- result = current[path];
12411
- break;
12412
- }
12413
- current = current[path];
12414
- }
12415
- return result;
12416
- };
12417
- function getPropByPath(obj, path, strict) {
12418
- var tempObj = obj;
12419
- path = path.replace(/\[(\w+)\]/g, '.$1');
12420
- path = path.replace(/^\./, '');
12421
- var keyArr = path.split('.');
12422
- var i = 0;
12423
- for (var len = keyArr.length; i < len - 1; ++i) {
12424
- if (!tempObj && !strict) break;
12425
- var key = keyArr[i];
12426
- if (key in tempObj) {
12427
- tempObj = tempObj[key];
12428
- } else {
12429
- if (strict) {
12430
- throw new Error('please transfer a valid prop path to form item!');
12625
+ // 如果已经有一层 cms-column,则不允许再嵌套
12626
+ if (columnDepth >= 2) {
12627
+ console.log(`检测到 cms-column 嵌套层级: ${columnDepth}, 超出限制`);
12628
+ return false;
12629
+ }
12630
+ parent = parent.$parent;
12431
12631
  }
12432
- break;
12433
- }
12434
- }
12435
- return {
12436
- o: tempObj,
12437
- k: keyArr[i],
12438
- v: tempObj ? tempObj[keyArr[i]] : null
12439
- };
12440
- }
12441
- ;
12442
- var generateId = exports.generateId = function generateId() {
12443
- return Math.floor(Math.random() * 10000);
12444
- };
12445
- var valueEquals = exports.valueEquals = function valueEquals(a, b) {
12446
- // see: https://stackoverflow.com/questions/3115982/how-to-check-if-two-arrays-are-equal-with-javascript
12447
- if (a === b) return true;
12448
- if (!(a instanceof Array)) return false;
12449
- if (!(b instanceof Array)) return false;
12450
- if (a.length !== b.length) return false;
12451
- for (var i = 0; i !== a.length; ++i) {
12452
- if (a[i] !== b[i]) return false;
12453
- }
12454
- return true;
12455
- };
12456
- var escapeRegexpString = exports.escapeRegexpString = function escapeRegexpString() {
12457
- var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
12458
- return String(value).replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
12459
- };
12632
+ console.log(`cms-column 嵌套层级检查通过: ${columnDepth}`);
12633
+ return true;
12634
+ },
12635
+ // 处理拖拽悬停
12636
+ dragover(e) {
12637
+ e.preventDefault();
12638
+ this.showAddCom = true;
12639
+ },
12640
+ // 处理拖拽放置
12641
+ drop(e) {
12642
+ e.preventDefault();
12643
+ const componentKey = e.dataTransfer.getData("componentKey");
12644
+ let temporaryId = "";
12645
+ this.temporaryList = e.dataTransfer.getData("temporaryList") ? JSON.parse(e.dataTransfer.getData("temporaryList")) : [];
12646
+ console.log("cms-colum-card-drop", componentKey, this.temporaryList);
12647
+ if (!componentKey) return;
12648
+ const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
12649
+ const isTemporary = isTemporaryItem === "true";
12650
+ if (isTemporary) {
12651
+ temporaryId = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey).cmsCompName;
12652
+ }
12653
+ const componentType = isTemporary ? temporaryId : componentKey;
12654
+ // 允许的组件类型
12655
+ const allowedComponents = ["cms-text", "cms-image", "cms-video", "cms-button", "cms-richText", "cms-column" // 允许拖入 cms-column
12656
+ ];
12460
12657
 
12461
- // TODO: use native Array.find, Array.findIndex when IE support is dropped
12462
- var arrayFindIndex = exports.arrayFindIndex = function arrayFindIndex(arr, pred) {
12463
- for (var i = 0; i !== arr.length; ++i) {
12464
- if (pred(arr[i])) {
12465
- return i;
12466
- }
12467
- }
12468
- return -1;
12469
- };
12470
- var arrayFind = exports.arrayFind = function arrayFind(arr, pred) {
12471
- var idx = arrayFindIndex(arr, pred);
12472
- return idx !== -1 ? arr[idx] : undefined;
12473
- };
12658
+ // 检查组件类型是否允许
12659
+ if (!allowedComponents.includes(componentType)) {
12660
+ console.log(`组件类型 ${componentType} 不允许拖入 column-card`);
12661
+ this.$message && this.$message.warning(`该组件类型不支持拖入卡片容器`);
12662
+ this.showAddCom = false;
12663
+ return;
12664
+ }
12474
12665
 
12475
- // coerce truthy value to array
12476
- var coerceTruthyValueToArray = exports.coerceTruthyValueToArray = function coerceTruthyValueToArray(val) {
12477
- if (Array.isArray(val)) {
12478
- return val;
12479
- } else if (val) {
12480
- return [val];
12481
- } else {
12482
- return [];
12483
- }
12484
- };
12485
- var isIE = exports.isIE = function isIE() {
12486
- return !_vue2.default.prototype.$isServer && !isNaN(Number(document.documentMode));
12487
- };
12488
- var isEdge = exports.isEdge = function isEdge() {
12489
- return !_vue2.default.prototype.$isServer && navigator.userAgent.indexOf('Edge') > -1;
12490
- };
12491
- var isFirefox = exports.isFirefox = function isFirefox() {
12492
- return !_vue2.default.prototype.$isServer && !!window.navigator.userAgent.match(/firefox/i);
12493
- };
12494
- var autoprefixer = exports.autoprefixer = function autoprefixer(style) {
12495
- if ((typeof style === 'undefined' ? 'undefined' : _typeof(style)) !== 'object') return style;
12496
- var rules = ['transform', 'transition', 'animation'];
12497
- var prefixes = ['ms-', 'webkit-'];
12498
- rules.forEach(function (rule) {
12499
- var value = style[rule];
12500
- if (rule && value) {
12501
- prefixes.forEach(function (prefix) {
12502
- style[prefix + rule] = value;
12503
- });
12504
- }
12505
- });
12506
- return style;
12507
- };
12508
- var kebabCase = exports.kebabCase = function kebabCase(str) {
12509
- var hyphenateRE = /([^-])([A-Z])/g;
12510
- return str.replace(hyphenateRE, '$1-$2').replace(hyphenateRE, '$1-$2').toLowerCase();
12511
- };
12512
- var capitalize = exports.capitalize = function capitalize(str) {
12513
- if (!(0, _types.isString)(str)) return str;
12514
- return str.charAt(0).toUpperCase() + str.slice(1);
12515
- };
12516
- var looseEqual = exports.looseEqual = function looseEqual(a, b) {
12517
- var isObjectA = (0, _types.isObject)(a);
12518
- var isObjectB = (0, _types.isObject)(b);
12519
- if (isObjectA && isObjectB) {
12520
- return JSON.stringify(a) === JSON.stringify(b);
12521
- } else if (!isObjectA && !isObjectB) {
12522
- return String(a) === String(b);
12523
- } else {
12524
- return false;
12525
- }
12526
- };
12527
- var arrayEquals = exports.arrayEquals = function arrayEquals(arrayA, arrayB) {
12528
- arrayA = arrayA || [];
12529
- arrayB = arrayB || [];
12530
- if (arrayA.length !== arrayB.length) {
12531
- return false;
12532
- }
12533
- for (var i = 0; i < arrayA.length; i++) {
12534
- if (!looseEqual(arrayA[i], arrayB[i])) {
12535
- return false;
12536
- }
12537
- }
12538
- return true;
12539
- };
12540
- var isEqual = exports.isEqual = function isEqual(value1, value2) {
12541
- if (Array.isArray(value1) && Array.isArray(value2)) {
12542
- return arrayEquals(value1, value2);
12543
- }
12544
- return looseEqual(value1, value2);
12545
- };
12546
- var isEmpty = exports.isEmpty = function isEmpty(val) {
12547
- // null or undefined
12548
- if (val == null) return true;
12549
- if (typeof val === 'boolean') return false;
12550
- if (typeof val === 'number') return !val;
12551
- if (val instanceof Error) return val.message === '';
12552
- switch (Object.prototype.toString.call(val)) {
12553
- // String or Array
12554
- case '[object String]':
12555
- case '[object Array]':
12556
- return !val.length;
12666
+ // 特殊处理 cms-column:检查嵌套层级
12667
+ if (componentType === "cms-column") {
12668
+ if (!this.checkColumnNestingLevel()) {
12669
+ console.log("cms-column 嵌套层级超出限制");
12670
+ this.$message && this.$message.warning(`cms-column 只能嵌套一层`);
12671
+ this.showAddCom = false;
12672
+ return;
12673
+ }
12674
+ }
12675
+ this.addOneComp(e, componentKey);
12676
+ },
12677
+ // 添加组件到卡片容器
12678
+ addOneComp(e, componentKey) {
12679
+ this.showAddCom = false;
12680
+ console.log("drop to column-card", componentKey);
12557
12681
 
12558
- // Map or Set or File
12559
- case '[object File]':
12560
- case '[object Map]':
12561
- case '[object Set]':
12562
- {
12563
- return !val.size;
12682
+ // 动态导入组件配置
12683
+ let initCompData;
12684
+ try {
12685
+ const isTemporaryItem = e.dataTransfer.getData("isTemporaryItem");
12686
+ const isTemporary = isTemporaryItem === "true";
12687
+ if (isTemporary) {
12688
+ initCompData = (0,standard_page/* getCopyTemplateCompConfig */.L7)(this.temporaryList, componentKey);
12689
+ } else {
12690
+ initCompData = __webpack_require__(1640)(`./${componentKey}`).default.settings(componentKey);
12691
+ }
12692
+ if (!isTemporary) {
12693
+ initCompData = {
12694
+ ...initCompData,
12695
+ styleConfig: {
12696
+ pc: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(16, 16, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")],
12697
+ mb: componentKey == "cms-text" ? [...(0,baseConfig.styleBaseConfig)(12, 12, 0, 0, "px")] : [...(0,baseConfig.styleBaseConfig)(0, 0, 0, 0, "px")]
12698
+ }
12699
+ };
12700
+ }
12701
+ } catch (error) {
12702
+ console.error(`无法加载组件 ${componentKey}:`, error);
12703
+ this.$message && this.$message.error(`组件加载失败`);
12704
+ return;
12564
12705
  }
12565
- // Plain Object
12566
- case '[object Object]':
12567
- {
12568
- return !Object.keys(val).length;
12706
+ const toElementId = e.toElement.id;
12707
+ if (toElementId === `cardTarget${this.data.componentId}` || toElementId.includes("cardTargetdown")) {
12708
+ // 添加到卡片容器末尾
12709
+ this.data.childList.push(initCompData);
12710
+ } else if (toElementId.includes("cardTargetup")) {
12711
+ // 插入到指定位置
12712
+ const underComponentId = toElementId.split("-cardTargetup")[0];
12713
+ const index = this.data.childList.findIndex(item => item.componentId === underComponentId);
12714
+ if (index !== -1) {
12715
+ this.data.childList.splice(index, 0, initCompData);
12716
+ }
12717
+ }
12718
+
12719
+ // 触发数据更新
12720
+ this.$emit("update:data", this.data);
12721
+ if (componentKey === "cms-column") {
12722
+ this.$EventBus.$emit("handleNowComp", initCompData);
12569
12723
  }
12570
- }
12571
- return false;
12572
- };
12573
- function rafThrottle(fn) {
12574
- var locked = false;
12575
- return function () {
12576
- var _this = this;
12577
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
12578
- args[_key] = arguments[_key];
12579
12724
  }
12580
- if (locked) return;
12581
- locked = true;
12582
- window.requestAnimationFrame(function (_) {
12583
- fn.apply(_this, args);
12584
- locked = false;
12585
- });
12586
- };
12587
- }
12588
- function objToArray(obj) {
12589
- if (Array.isArray(obj)) {
12590
- return obj;
12591
12725
  }
12592
- return isEmpty(obj) ? [] : [obj];
12593
- }
12594
- var isMac = exports.isMac = function isMac() {
12595
- return !_vue2.default.prototype.$isServer && /macintosh|mac os x/i.test(navigator.userAgent);
12596
- };
12726
+ });
12727
+ ;// ./package/cms-column-card/View.vue?vue&type=script&lang=js
12728
+ /* harmony default export */ var cms_column_card_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
12729
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-column-card/View.vue?vue&type=style&index=0&id=155a8242&prod&lang=scss&scoped=true
12730
+ // extracted by mini-css-extract-plugin
12597
12731
 
12598
- /***/ }),
12732
+ ;// ./package/cms-column-card/View.vue?vue&type=style&index=0&id=155a8242&prod&lang=scss&scoped=true
12599
12733
 
12600
- /***/ 2140:
12601
- /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
12734
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
12735
+ var componentNormalizer = __webpack_require__(1656);
12736
+ ;// ./package/cms-column-card/View.vue
12602
12737
 
12603
- "use strict";
12604
12738
 
12605
- var wellKnownSymbol = __webpack_require__(8227);
12606
12739
 
12607
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
12608
- var test = {};
12740
+ ;
12609
12741
 
12610
- test[TO_STRING_TAG] = 'z';
12611
12742
 
12612
- module.exports = String(test) === '[object z]';
12743
+ /* normalize component */
12744
+
12745
+ var component = (0,componentNormalizer/* default */.A)(
12746
+ cms_column_card_Viewvue_type_script_lang_js,
12747
+ render,
12748
+ staticRenderFns,
12749
+ false,
12750
+ null,
12751
+ "155a8242",
12752
+ null
12753
+
12754
+ )
12613
12755
 
12756
+ /* harmony default export */ var View = (component.exports);
12614
12757
 
12615
12758
  /***/ }),
12616
12759
 
@@ -12638,7 +12781,7 @@ module.exports = function (it) {
12638
12781
  __webpack_require__.r(__webpack_exports__);
12639
12782
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
12640
12783
 
12641
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 8169));
12784
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 4018));
12642
12785
  const langData = {
12643
12786
  // 文字设置
12644
12787
  buttonText: "按钮文字",
@@ -12649,7 +12792,7 @@ const langData = {
12649
12792
  fontColor: "#ffffff",
12650
12793
  fontWeight: "normal",
12651
12794
  // 样式控制
12652
- backgroundColor: "#409eff",
12795
+ backgroundColor: "#2f85ff",
12653
12796
  borderRadius: 30,
12654
12797
  borderWidth: 1,
12655
12798
  borderStyle: "solid",
@@ -26064,134 +26207,6 @@ module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
26064
26207
  }() : undefined);
26065
26208
 
26066
26209
 
26067
- /***/ }),
26068
-
26069
- /***/ 3011:
26070
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
26071
-
26072
- "use strict";
26073
- // ESM COMPAT FLAG
26074
- __webpack_require__.r(__webpack_exports__);
26075
-
26076
- // EXPORTS
26077
- __webpack_require__.d(__webpack_exports__, {
26078
- "default": function() { return /* binding */ View; }
26079
- });
26080
-
26081
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=template&id=36ccf66e&scoped=true
26082
- var render = function render() {
26083
- var _vm = this,
26084
- _c = _vm._self._c;
26085
- return _c('BaseComp', _vm._b({
26086
- attrs: {
26087
- "data": _vm.data,
26088
- "nowCompId": _vm.nowCompId,
26089
- "isOpcacity": _vm.isOpcacity,
26090
- "lang": _vm.lang
26091
- },
26092
- on: {
26093
- "getConfigData": _vm.getConfigData
26094
- }
26095
- }, 'BaseComp', _vm.$attrs, false), [_c('section', {
26096
- staticClass: "cmhk-home_main"
26097
- }, [_c('div', [_c('div', {
26098
- staticClass: "inner"
26099
- }, [_c('p', {
26100
- staticClass: "cms-ht",
26101
- domProps: {
26102
- "innerHTML": _vm._s(_vm.configData.input1)
26103
- }
26104
- })])])])]);
26105
- };
26106
- var staticRenderFns = [];
26107
-
26108
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
26109
- var baseComp = __webpack_require__(4272);
26110
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=script&lang=js
26111
-
26112
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
26113
- name: "cms-richText",
26114
- components: {
26115
- BaseComp: baseComp["default"]
26116
- },
26117
- props: {
26118
- data: {
26119
- type: Object,
26120
- default: () => {
26121
- return {};
26122
- }
26123
- },
26124
- nowCompId: {
26125
- type: [String, Number],
26126
- default: ""
26127
- },
26128
- isOpcacity: {
26129
- type: Boolean,
26130
- default: true
26131
- },
26132
- lang: {
26133
- type: String,
26134
- default: "zh-HK"
26135
- }
26136
- },
26137
- data() {
26138
- return {
26139
- configData: {},
26140
- messFold: false
26141
- };
26142
- },
26143
- mounted() {},
26144
- watch: {},
26145
- methods: {
26146
- getConfigData(configData) {
26147
- this.configData = configData;
26148
- },
26149
- foldMessText() {
26150
- this.messFold = !this.messFold;
26151
- },
26152
- decodeJumpUrl(url) {
26153
- if (!url) return;
26154
- top.location.href = url;
26155
- }
26156
- }
26157
- });
26158
- ;// ./package/cms-richText/View.vue?vue&type=script&lang=js
26159
- /* harmony default export */ var cms_richText_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
26160
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=style&index=0&id=36ccf66e&prod&lang=scss&scoped=true
26161
- // extracted by mini-css-extract-plugin
26162
-
26163
- ;// ./package/cms-richText/View.vue?vue&type=style&index=0&id=36ccf66e&prod&lang=scss&scoped=true
26164
-
26165
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-richText/View.vue?vue&type=style&index=1&id=36ccf66e&prod&lang=scss
26166
- // extracted by mini-css-extract-plugin
26167
-
26168
- ;// ./package/cms-richText/View.vue?vue&type=style&index=1&id=36ccf66e&prod&lang=scss
26169
-
26170
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
26171
- var componentNormalizer = __webpack_require__(1656);
26172
- ;// ./package/cms-richText/View.vue
26173
-
26174
-
26175
-
26176
- ;
26177
-
26178
-
26179
-
26180
- /* normalize component */
26181
-
26182
- var component = (0,componentNormalizer/* default */.A)(
26183
- cms_richText_Viewvue_type_script_lang_js,
26184
- render,
26185
- staticRenderFns,
26186
- false,
26187
- null,
26188
- "36ccf66e",
26189
- null
26190
-
26191
- )
26192
-
26193
- /* harmony default export */ var View = (component.exports);
26194
-
26195
26210
  /***/ }),
26196
26211
 
26197
26212
  /***/ 3014:
@@ -28162,6 +28177,286 @@ module.exports = function isAbsoluteURL(url) {
28162
28177
 
28163
28178
  /***/ }),
28164
28179
 
28180
+ /***/ 4018:
28181
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
28182
+
28183
+ "use strict";
28184
+ // ESM COMPAT FLAG
28185
+ __webpack_require__.r(__webpack_exports__);
28186
+
28187
+ // EXPORTS
28188
+ __webpack_require__.d(__webpack_exports__, {
28189
+ "default": function() { return /* binding */ View; }
28190
+ });
28191
+
28192
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-button/View.vue?vue&type=template&id=12ff304e&scoped=true
28193
+ var render = function render() {
28194
+ var _vm = this,
28195
+ _c = _vm._self._c;
28196
+ return _c('BaseComp', _vm._b({
28197
+ attrs: {
28198
+ "data": _vm.data,
28199
+ "nowCompId": _vm.nowCompId,
28200
+ "isOpcacity": _vm.isOpcacity,
28201
+ "lang": _vm.lang
28202
+ },
28203
+ on: {
28204
+ "getConfigData": _vm.getConfigData
28205
+ }
28206
+ }, 'BaseComp', _vm.$attrs, false), [_c('section', {
28207
+ staticClass: "cms-button-container",
28208
+ class: [`align-${_vm.configData.textAlign || 'center'}`, _vm.configData.customClass || ''],
28209
+ style: _vm.containerStyle
28210
+ }, [_c('button', {
28211
+ staticClass: "cms-button",
28212
+ class: ['cms-button-element', {
28213
+ 'has-link': _vm.configData.linkUrl,
28214
+ 'hover-effect': _vm.configData.hoverEffect
28215
+ }],
28216
+ style: _vm.buttonStyle,
28217
+ attrs: {
28218
+ "disabled": _vm.configData.disabled
28219
+ },
28220
+ on: {
28221
+ "click": _vm.handleClick
28222
+ }
28223
+ }, [_vm._v(" " + _vm._s(_vm.configData.buttonText) + " "), _c('i', {
28224
+ staticClass: "el-icon-arrow-right el-icon--right"
28225
+ })])])]);
28226
+ };
28227
+ var staticRenderFns = [];
28228
+
28229
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
28230
+ var es_iterator_constructor = __webpack_require__(8111);
28231
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
28232
+ var es_iterator_for_each = __webpack_require__(7588);
28233
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
28234
+ var baseComp = __webpack_require__(4272);
28235
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-button/View.vue?vue&type=script&lang=js
28236
+
28237
+
28238
+
28239
+
28240
+
28241
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
28242
+ name: "cms-button",
28243
+ components: {
28244
+ BaseComp: baseComp["default"]
28245
+ },
28246
+ props: {
28247
+ data: {
28248
+ type: Object,
28249
+ default: () => {
28250
+ return {};
28251
+ }
28252
+ },
28253
+ nowCompId: {
28254
+ type: [String, Number],
28255
+ default: ""
28256
+ },
28257
+ isOpcacity: {
28258
+ type: Boolean,
28259
+ default: true
28260
+ },
28261
+ lang: {
28262
+ type: String,
28263
+ default: "zh-HK"
28264
+ }
28265
+ },
28266
+ data() {
28267
+ return {
28268
+ configData: {},
28269
+ // 默认配置数据
28270
+ defaultConfig: {
28271
+ // 文字设置
28272
+ buttonText: "按钮文字",
28273
+ textAlign: "center",
28274
+ fontSize: 16,
28275
+ fontColor: "#ffffff",
28276
+ fontWeight: "normal",
28277
+ // 样式控制
28278
+ backgroundColor: "#2f85ff",
28279
+ borderRadius: 30,
28280
+ borderWidth: 1,
28281
+ borderStyle: "solid",
28282
+ borderColor: "#409eff",
28283
+ // 空间布局
28284
+ paddingTop: 12,
28285
+ paddingBottom: 12,
28286
+ paddingLeft: 20,
28287
+ paddingRight: 20,
28288
+ marginTop: 0,
28289
+ marginBottom: 0,
28290
+ marginLeft: 0,
28291
+ marginRight: 0,
28292
+ // 交互功能
28293
+ linkUrl: "",
28294
+ linkTarget: "_self",
28295
+ disabled: false,
28296
+ // 高级配置
28297
+ customClass: "",
28298
+ customStyle: "",
28299
+ hoverEffect: false,
28300
+ // 尺寸设置
28301
+ buttonWidth: "300",
28302
+ buttonHeight: "48",
28303
+ minWidth: 80,
28304
+ minHeight: 36
28305
+ }
28306
+ };
28307
+ },
28308
+ mounted() {
28309
+ this.initConfigData();
28310
+ },
28311
+ watch: {
28312
+ configData: {
28313
+ handler() {
28314
+ this.updateStyles();
28315
+ },
28316
+ deep: true
28317
+ }
28318
+ },
28319
+ computed: {
28320
+ // 容器样式
28321
+ containerStyle() {
28322
+ const config = {
28323
+ ...this.defaultConfig,
28324
+ ...this.configData
28325
+ };
28326
+ return {
28327
+ backgroundColor: config.wrapperBackgroundColor,
28328
+ textAlign: config.textAlign,
28329
+ margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
28330
+ ...this.parseCustomStyle(config.customStyle)
28331
+ };
28332
+ },
28333
+ // 按钮样式
28334
+ buttonStyle() {
28335
+ const config = {
28336
+ ...this.defaultConfig,
28337
+ ...this.configData
28338
+ };
28339
+ return {
28340
+ // 文字样式
28341
+ fontSize: `${config.fontSize}px`,
28342
+ color: config.fontColor,
28343
+ fontWeight: config.fontWeight,
28344
+ // 背景和边框
28345
+ backgroundColor: config.backgroundColor ? config.backgroundColor : "transparent",
28346
+ borderRadius: `${config.borderRadius}px`,
28347
+ border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
28348
+ // 内边距
28349
+ padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
28350
+ // 尺寸
28351
+ width: config.buttonWidth === "auto" ? "auto" : `${config.buttonWidth}px`,
28352
+ height: config.buttonHeight === "auto" ? "auto" : `${config.buttonHeight}px`,
28353
+ minWidth: `${config.minWidth}px`,
28354
+ minHeight: `${config.minHeight}px`,
28355
+ // 交互效果
28356
+ cursor: config.linkUrl ? "pointer" : "default",
28357
+ opacity: config.disabled ? 0.6 : 1,
28358
+ transition: config.hoverEffect ? "all 0.3s ease" : "none",
28359
+ // 基础样式
28360
+ outline: "none",
28361
+ textDecoration: "none",
28362
+ display: "inline-block",
28363
+ textAlign: "center",
28364
+ verticalAlign: "middle",
28365
+ userSelect: "none",
28366
+ whiteSpace: "nowrap"
28367
+ };
28368
+ }
28369
+ },
28370
+ methods: {
28371
+ // 初始化配置数据
28372
+ initConfigData() {
28373
+ this.configData = {
28374
+ ...this.defaultConfig,
28375
+ ...this.configData
28376
+ };
28377
+ },
28378
+ // 获取配置数据
28379
+ getConfigData(configData) {
28380
+ this.configData = {
28381
+ ...this.defaultConfig,
28382
+ ...configData
28383
+ };
28384
+ this.updateStyles();
28385
+ },
28386
+ // 更新样式
28387
+ updateStyles() {
28388
+ this.$nextTick(() => {
28389
+ this.$forceUpdate();
28390
+ });
28391
+ },
28392
+ // 处理点击事件
28393
+ handleClick() {
28394
+ if (this.configData.disabled) {
28395
+ return;
28396
+ }
28397
+ if (this.configData.linkUrl) {
28398
+ const target = this.configData.linkTarget || "_self";
28399
+ if (target === "_blank") {
28400
+ window.open(this.configData.linkUrl, "_blank");
28401
+ } else {
28402
+ window.location.href = this.configData.linkUrl;
28403
+ }
28404
+ }
28405
+ },
28406
+ // 解析自定义样式
28407
+ parseCustomStyle(customStyle) {
28408
+ if (!customStyle) return {};
28409
+ try {
28410
+ const styles = {};
28411
+ const declarations = customStyle.split(";");
28412
+ declarations.forEach(declaration => {
28413
+ const [property, value] = declaration.split(":");
28414
+ if (property && value) {
28415
+ const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
28416
+ styles[camelCaseProperty] = value.trim();
28417
+ }
28418
+ });
28419
+ return styles;
28420
+ } catch (error) {
28421
+ console.warn("解析自定义样式失败:", error);
28422
+ return {};
28423
+ }
28424
+ }
28425
+ }
28426
+ });
28427
+ ;// ./package/cms-button/View.vue?vue&type=script&lang=js
28428
+ /* harmony default export */ var cms_button_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
28429
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-button/View.vue?vue&type=style&index=0&id=12ff304e&prod&lang=scss&scoped=true
28430
+ // extracted by mini-css-extract-plugin
28431
+
28432
+ ;// ./package/cms-button/View.vue?vue&type=style&index=0&id=12ff304e&prod&lang=scss&scoped=true
28433
+
28434
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
28435
+ var componentNormalizer = __webpack_require__(1656);
28436
+ ;// ./package/cms-button/View.vue
28437
+
28438
+
28439
+
28440
+ ;
28441
+
28442
+
28443
+ /* normalize component */
28444
+
28445
+ var component = (0,componentNormalizer/* default */.A)(
28446
+ cms_button_Viewvue_type_script_lang_js,
28447
+ render,
28448
+ staticRenderFns,
28449
+ false,
28450
+ null,
28451
+ "12ff304e",
28452
+ null
28453
+
28454
+ )
28455
+
28456
+ /* harmony default export */ var View = (component.exports);
28457
+
28458
+ /***/ }),
28459
+
28165
28460
  /***/ 4024:
28166
28461
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
28167
28462
 
@@ -29054,14 +29349,6 @@ module.exports = (function () {
29054
29349
  })();
29055
29350
 
29056
29351
 
29057
- /***/ }),
29058
-
29059
- /***/ 4242:
29060
- /***/ (function(module) {
29061
-
29062
- "use strict";
29063
- module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAwUlEQVRYR+2VQQ6EMAhF6ZxEN049hif3GFY305OowdTEGGqBLpwFXTbwefkF6uDl416uDwZgDpgD5sB/OtB9+x9uyI/bhhBCrNmW3vtm3dyIGss8tXct0oEE0ABArIG4FD+02AD3RA0EVyPbA1wB6nkkuY9NKBE6QaQ5xSmQCEpiT+AiAAZyhDkx1HOxAEoQ2uKoywbIQeB9mnPV2IoAKIhkq6q42IFMp+O1emGJHSAgqla2GqDmf7jmGoA5YA6YAzukPq8hQaCizgAAAABJRU5ErkJggg==";
29064
-
29065
29352
  /***/ }),
29066
29353
 
29067
29354
  /***/ 4261:
@@ -41479,9 +41766,9 @@ var map = {
41479
41766
  "./cms-activityCountdown/View.vue": 4084,
41480
41767
  "./cms-activityTime/View.vue": 8322,
41481
41768
  "./cms-banner/View.vue": 6815,
41482
- "./cms-button/View.vue": 8169,
41769
+ "./cms-button/View.vue": 4018,
41483
41770
  "./cms-cells/View.vue": 5700,
41484
- "./cms-column-card/View.vue": 1861,
41771
+ "./cms-column-card/View.vue": 2159,
41485
41772
  "./cms-column/View.vue": 7855,
41486
41773
  "./cms-description/View.vue": 3203,
41487
41774
  "./cms-dynamic-comp/View.vue": 2809,
@@ -41497,12 +41784,12 @@ var map = {
41497
41784
  "./cms-prodCustomization/View.vue": 1470,
41498
41785
  "./cms-productDetails/View.vue": 4110,
41499
41786
  "./cms-question/View.vue": 4024,
41500
- "./cms-richText/View.vue": 3011,
41787
+ "./cms-richText/View.vue": 450,
41501
41788
  "./cms-servePlan-tab/View.vue": 8502,
41502
41789
  "./cms-servePlan-text/View.vue": 448,
41503
41790
  "./cms-tab/View.vue": 4685,
41504
41791
  "./cms-termsAndConditions/View.vue": 5060,
41505
- "./cms-text/View.vue": 6757,
41792
+ "./cms-text/View.vue": 7524,
41506
41793
  "./cms-threeScroll/View.vue": 517,
41507
41794
  "./cms-titleCenter/View.vue": 1429,
41508
41795
  "./cms-titleLeft/View.vue": 7874,
@@ -41940,7 +42227,7 @@ module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVAAAAEQCAYAAADm
41940
42227
  __webpack_require__.r(__webpack_exports__);
41941
42228
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
41942
42229
 
41943
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 1861));
42230
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 2159));
41944
42231
 
41945
42232
  // 默认配置数据
41946
42233
  const langData = {
@@ -43578,427 +43865,6 @@ module.exports = function (object, key, method) {
43578
43865
  };
43579
43866
 
43580
43867
 
43581
- /***/ }),
43582
-
43583
- /***/ 6757:
43584
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
43585
-
43586
- "use strict";
43587
- // ESM COMPAT FLAG
43588
- __webpack_require__.r(__webpack_exports__);
43589
-
43590
- // EXPORTS
43591
- __webpack_require__.d(__webpack_exports__, {
43592
- "default": function() { return /* binding */ View; }
43593
- });
43594
-
43595
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=template&id=877468fe&scoped=true
43596
- var render = function render() {
43597
- var _vm = this,
43598
- _c = _vm._self._c;
43599
- return _c('BaseComp', _vm._b({
43600
- attrs: {
43601
- "data": _vm.data,
43602
- "nowCompId": _vm.nowCompId,
43603
- "isOpcacity": _vm.isOpcacity,
43604
- "lang": _vm.lang
43605
- },
43606
- on: {
43607
- "getConfigData": _vm.getConfigData
43608
- }
43609
- }, 'BaseComp', _vm.$attrs, false), [_c('section', {
43610
- staticClass: "cms-text-container",
43611
- class: [`align-${_vm.configData.textAlign || 'left'}`, _vm.configData.customClass || '', {
43612
- 'has-link': _vm.configData.linkUrl,
43613
- 'cmhk-home_main': _vm.showCmhkMain,
43614
- 'hover-effect': _vm.configData.hoverEffect && _vm.configData.linkUrl
43615
- }],
43616
- style: _vm.containerStyle,
43617
- attrs: {
43618
- "aria-label": _vm.configData.ariaLabel,
43619
- "tabindex": _vm.configData.tabIndex,
43620
- "role": _vm.configData.role,
43621
- "title": _vm.configData.seoTitle || _vm.configData.seoDescription
43622
- },
43623
- on: {
43624
- "click": _vm.handleClick
43625
- }
43626
- }, [_c('div', {
43627
- staticClass: "text-content",
43628
- class: _vm.configData.textType,
43629
- style: _vm.textStyle
43630
- }, _vm._l(_vm.textLines, function (line, index) {
43631
- return _c('p', {
43632
- key: index,
43633
- staticClass: "text-line",
43634
- style: _vm.lineStyle
43635
- }, [_vm._v(" " + _vm._s(line) + " ")]);
43636
- }), 0), _vm.configData.linkUrl && _vm.configData.showLinkIcon ? _c('div', {
43637
- staticClass: "link-indicator"
43638
- }, [_c('i', {
43639
- staticClass: "el-icon-link"
43640
- })]) : _vm._e()])]);
43641
- };
43642
- var staticRenderFns = [];
43643
-
43644
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
43645
- var es_iterator_constructor = __webpack_require__(8111);
43646
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
43647
- var es_iterator_filter = __webpack_require__(2489);
43648
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
43649
- var es_iterator_for_each = __webpack_require__(7588);
43650
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
43651
- var baseComp = __webpack_require__(4272);
43652
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=script&lang=js
43653
-
43654
-
43655
-
43656
-
43657
-
43658
-
43659
-
43660
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
43661
- name: "cms-text",
43662
- components: {
43663
- BaseComp: baseComp["default"]
43664
- },
43665
- props: {
43666
- data: {
43667
- type: Object,
43668
- default: () => {
43669
- return {};
43670
- }
43671
- },
43672
- nowCompId: {
43673
- type: [String, Number],
43674
- default: ""
43675
- },
43676
- isOpcacity: {
43677
- type: Boolean,
43678
- default: true
43679
- },
43680
- lang: {
43681
- type: String,
43682
- default: "zh-HK"
43683
- },
43684
- showCmhkMain: {
43685
- type: Boolean,
43686
- default: true
43687
- }
43688
- },
43689
- data() {
43690
- return {
43691
- configData: {},
43692
- // 默认配置数据
43693
- defaultConfig: {
43694
- // 内容编辑
43695
- textContent: "请输入文本内容",
43696
- enableLineBreak: true,
43697
- // 排版控制
43698
- textAlign: "left",
43699
- // fontSize: 16,
43700
- // lineHeight: 1.5,
43701
- letterSpacing: 0,
43702
- // 样式美化
43703
- fontColor: "#333333",
43704
- // fontWeight: "normal",
43705
- fontStyle: "normal",
43706
- textDecoration: "none",
43707
- // fontFamily: "inherit",
43708
-
43709
- // 布局设置
43710
- paddingTop: 0,
43711
- paddingBottom: 0,
43712
- paddingLeft: 0,
43713
- paddingRight: 0,
43714
- marginTop: 0,
43715
- marginBottom: 0,
43716
- marginLeft: 0,
43717
- marginRight: 0,
43718
- backgroundColor: "",
43719
- // 视觉效果
43720
- borderWidth: 0,
43721
- borderStyle: "solid",
43722
- borderColor: "#dcdfe6",
43723
- borderRadius: 0,
43724
- boxShadow: "",
43725
- // 交互功能
43726
- linkUrl: "",
43727
- linkTarget: "_self",
43728
- showLinkIcon: false,
43729
- hoverEffect: false,
43730
- // 高级配置
43731
- customClass: "",
43732
- customStyle: "",
43733
- enableAnimation: false,
43734
- animationType: "fadeIn",
43735
- animationDuration: 300,
43736
- // 可访问性配置
43737
- ariaLabel: "",
43738
- tabIndex: 0,
43739
- role: "",
43740
- // SEO配置
43741
- seoTitle: "",
43742
- seoDescription: "",
43743
- // 响应式配置
43744
- mobileTextAlign: "",
43745
- mobileFontSize: 0,
43746
- tabletFontSize: 0
43747
- }
43748
- };
43749
- },
43750
- mounted() {
43751
- this.initConfigData();
43752
- this.setCSSVariables();
43753
- },
43754
- watch: {
43755
- configData: {
43756
- handler() {
43757
- this.updateStyles();
43758
- },
43759
- deep: true
43760
- }
43761
- },
43762
- computed: {
43763
- // 文本行数组(支持换行)
43764
- textLines() {
43765
- if (!this.configData.textContent) return [];
43766
- if (!this.configData.enableLineBreak) {
43767
- return [this.configData.textContent];
43768
- }
43769
- return this.configData.textContent.split("\n").filter(line => line.trim() !== "");
43770
- },
43771
- // 容器样式
43772
- containerStyle() {
43773
- const config = {
43774
- ...this.defaultConfig,
43775
- ...this.configData
43776
- };
43777
- return {
43778
- padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
43779
- margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
43780
- backgroundColor: config.backgroundColor || "transparent",
43781
- border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
43782
- borderRadius: `${config.borderRadius}px`,
43783
- boxShadow: config.boxShadow || "none",
43784
- cursor: config.linkUrl ? "pointer" : "default",
43785
- transition: config.hoverEffect ? "all 0.3s ease" : "none",
43786
- animation: config.enableAnimation ? this.getAnimationStyle() : "none",
43787
- ...this.parseCustomStyle(config.customStyle)
43788
- };
43789
- },
43790
- // 文本样式
43791
- textStyle() {
43792
- const config = {
43793
- ...this.defaultConfig,
43794
- ...this.configData
43795
- };
43796
- return {
43797
- color: config.fontColor,
43798
- // fontSize: `${config.fontSize}px`,
43799
- // fontWeight: config.fontWeight,
43800
- fontStyle: config.fontStyle,
43801
- textDecoration: config.textDecoration,
43802
- // fontFamily: config.fontFamily,
43803
- // lineHeight: config.lineHeight,
43804
- letterSpacing: `${config.letterSpacing}px`,
43805
- textAlign: config.textAlign,
43806
- wordBreak: "break-word",
43807
- wordWrap: "break-word",
43808
- cursor: config.linkUrl ? "pointer" : "default"
43809
- };
43810
- },
43811
- // 行样式
43812
- lineStyle() {
43813
- return {
43814
- margin: "0",
43815
- padding: "0"
43816
- };
43817
- }
43818
- },
43819
- methods: {
43820
- // 初始化配置数据
43821
- initConfigData() {
43822
- this.configData = {
43823
- ...this.defaultConfig,
43824
- ...this.configData
43825
- };
43826
- },
43827
- // 获取配置数据
43828
- getConfigData(configData) {
43829
- this.configData = {
43830
- ...this.defaultConfig,
43831
- ...configData
43832
- };
43833
- this.updateStyles();
43834
- },
43835
- // 更新样式
43836
- updateStyles() {
43837
- this.$nextTick(() => {
43838
- this.setCSSVariables();
43839
- this.$forceUpdate();
43840
- });
43841
- },
43842
- // 设置CSS变量
43843
- setCSSVariables() {
43844
- if (!this.$el) return;
43845
- const config = {
43846
- ...this.defaultConfig,
43847
- ...this.configData
43848
- };
43849
-
43850
- // 设置响应式字体大小
43851
- if (config.mobileFontSize > 0) {
43852
- this.$el.style.setProperty("--mobile-font-size", `${config.mobileFontSize}px`);
43853
- }
43854
- if (config.tabletFontSize > 0) {
43855
- this.$el.style.setProperty("--tablet-font-size", `${config.tabletFontSize}px`);
43856
- }
43857
-
43858
- // 设置移动端文本对齐
43859
- if (config.mobileTextAlign) {
43860
- this.$el.style.setProperty("--mobile-text-align", config.mobileTextAlign);
43861
- }
43862
- },
43863
- // 处理点击事件
43864
- handleClick() {
43865
- if (this.configData.linkUrl) {
43866
- const target = this.configData.linkTarget || "_self";
43867
- if (target === "_blank") {
43868
- window.open(this.configData.linkUrl, "_blank");
43869
- } else {
43870
- window.location.href = this.configData.linkUrl;
43871
- }
43872
- }
43873
- },
43874
- // 获取动画样式
43875
- getAnimationStyle() {
43876
- const animationType = this.configData.animationType || this.defaultConfig.animationType;
43877
- const duration = this.configData.animationDuration || this.defaultConfig.animationDuration;
43878
- if (!this.configData.enableAnimation || animationType === "none") return "";
43879
- return `${animationType} ${duration}ms ease-in-out`;
43880
- },
43881
- // 解析自定义样式
43882
- parseCustomStyle(customStyle) {
43883
- if (!customStyle) return {};
43884
- try {
43885
- // 简单的CSS样式解析
43886
- const styles = {};
43887
- const declarations = customStyle.split(";");
43888
- declarations.forEach(declaration => {
43889
- const [property, value] = declaration.split(":");
43890
- if (property && value) {
43891
- const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
43892
- styles[camelCaseProperty] = value.trim();
43893
- }
43894
- });
43895
- return styles;
43896
- } catch (error) {
43897
- console.warn("解析自定义样式失败:", error);
43898
- return {};
43899
- }
43900
- },
43901
- // 文本内容验证
43902
- validateTextContent() {
43903
- const content = this.configData.textContent;
43904
- if (!content || content.trim() === "") {
43905
- console.warn("文本内容为空");
43906
- return false;
43907
- }
43908
- return true;
43909
- },
43910
- // 获取纯文本内容
43911
- getPlainTextContent() {
43912
- return this.configData.textContent || "";
43913
- },
43914
- // 获取文本长度
43915
- getTextLength() {
43916
- return this.getPlainTextContent().length;
43917
- },
43918
- // 复制文本内容到剪贴板
43919
- copyTextToClipboard() {
43920
- const text = this.getPlainTextContent();
43921
- if (navigator.clipboard && window.isSecureContext) {
43922
- navigator.clipboard.writeText(text).then(() => {
43923
- var _this$$message;
43924
- (_this$$message = this.$message) === null || _this$$message === void 0 ? void 0 : _this$$message.success("文本已复制到剪贴板");
43925
- }).catch(err => {
43926
- console.error("复制失败:", err);
43927
- });
43928
- } else {
43929
- // 降级方案
43930
- const textArea = document.createElement("textarea");
43931
- textArea.value = text;
43932
- document.body.appendChild(textArea);
43933
- textArea.select();
43934
- try {
43935
- var _this$$message2;
43936
- document.execCommand("copy");
43937
- (_this$$message2 = this.$message) === null || _this$$message2 === void 0 ? void 0 : _this$$message2.success("文本已复制到剪贴板");
43938
- } catch (err) {
43939
- console.error("复制失败:", err);
43940
- }
43941
- document.body.removeChild(textArea);
43942
- }
43943
- },
43944
- // 文本搜索高亮
43945
- highlightText(searchTerm) {
43946
- if (!searchTerm) return;
43947
- const content = this.getPlainTextContent();
43948
- const regex = new RegExp(`(${searchTerm})`, "gi");
43949
- const highlightedContent = content.replace(regex, "<mark>$1</mark>");
43950
-
43951
- // 这里可以根据需要实现高亮显示逻辑
43952
- console.log("高亮内容:", highlightedContent);
43953
- },
43954
- // 文本统计信息
43955
- getTextStats() {
43956
- const text = this.getPlainTextContent();
43957
- const words = text.split(/\s+/).filter(word => word.length > 0);
43958
- const lines = text.split("\n").length;
43959
- const characters = text.length;
43960
- const charactersNoSpaces = text.replace(/\s/g, "").length;
43961
- return {
43962
- characters,
43963
- charactersNoSpaces,
43964
- words: words.length,
43965
- lines,
43966
- paragraphs: text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length
43967
- };
43968
- }
43969
- }
43970
- });
43971
- ;// ./package/cms-text/View.vue?vue&type=script&lang=js
43972
- /* harmony default export */ var cms_text_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
43973
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=style&index=0&id=877468fe&prod&lang=scss&scoped=true
43974
- // extracted by mini-css-extract-plugin
43975
-
43976
- ;// ./package/cms-text/View.vue?vue&type=style&index=0&id=877468fe&prod&lang=scss&scoped=true
43977
-
43978
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
43979
- var componentNormalizer = __webpack_require__(1656);
43980
- ;// ./package/cms-text/View.vue
43981
-
43982
-
43983
-
43984
- ;
43985
-
43986
-
43987
- /* normalize component */
43988
-
43989
- var component = (0,componentNormalizer/* default */.A)(
43990
- cms_text_Viewvue_type_script_lang_js,
43991
- render,
43992
- staticRenderFns,
43993
- false,
43994
- null,
43995
- "877468fe",
43996
- null
43997
-
43998
- )
43999
-
44000
- /* harmony default export */ var View = (component.exports);
44001
-
44002
43868
  /***/ }),
44003
43869
 
44004
43870
  /***/ 6763:
@@ -53758,6 +53624,431 @@ module.exports = function (fn) {
53758
53624
  };
53759
53625
 
53760
53626
 
53627
+ /***/ }),
53628
+
53629
+ /***/ 7524:
53630
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
53631
+
53632
+ "use strict";
53633
+ // ESM COMPAT FLAG
53634
+ __webpack_require__.r(__webpack_exports__);
53635
+
53636
+ // EXPORTS
53637
+ __webpack_require__.d(__webpack_exports__, {
53638
+ "default": function() { return /* binding */ View; }
53639
+ });
53640
+
53641
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=template&id=0914066e&scoped=true
53642
+ var render = function render() {
53643
+ var _vm = this,
53644
+ _c = _vm._self._c;
53645
+ return _c('BaseComp', _vm._b({
53646
+ attrs: {
53647
+ "data": _vm.data,
53648
+ "nowCompId": _vm.nowCompId,
53649
+ "isOpcacity": _vm.isOpcacity,
53650
+ "lang": _vm.lang
53651
+ },
53652
+ on: {
53653
+ "getConfigData": _vm.getConfigData
53654
+ }
53655
+ }, 'BaseComp', _vm.$attrs, false), [_c('section', {
53656
+ staticClass: "cms-text-container",
53657
+ class: [`align-${_vm.configData.textAlign || 'left'}`, _vm.configData.customClass || '', {
53658
+ 'has-link': _vm.configData.linkUrl,
53659
+ 'cmhk-home_main': _vm.showCmhkMain,
53660
+ 'hover-effect': _vm.configData.hoverEffect && _vm.configData.linkUrl
53661
+ }],
53662
+ style: _vm.containerStyle,
53663
+ attrs: {
53664
+ "aria-label": _vm.configData.ariaLabel,
53665
+ "tabindex": _vm.configData.tabIndex,
53666
+ "role": _vm.configData.role,
53667
+ "title": _vm.configData.seoTitle || _vm.configData.seoDescription
53668
+ },
53669
+ on: {
53670
+ "click": _vm.handleClick
53671
+ }
53672
+ }, [_c('div', {
53673
+ staticClass: "text-content",
53674
+ class: _vm.configData.textType,
53675
+ style: _vm.textStyle
53676
+ }, _vm._l(_vm.textLines, function (line, index) {
53677
+ return _c('p', {
53678
+ key: index,
53679
+ staticClass: "text-line",
53680
+ style: _vm.lineStyle
53681
+ }, [_vm._v(" " + _vm._s(line) + " ")]);
53682
+ }), 0), _vm.configData.linkUrl && _vm.configData.showLinkIcon ? _c('div', {
53683
+ staticClass: "link-indicator"
53684
+ }, [_c('i', {
53685
+ staticClass: "el-icon-link"
53686
+ })]) : _vm._e()])]);
53687
+ };
53688
+ var staticRenderFns = [];
53689
+
53690
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
53691
+ var es_iterator_constructor = __webpack_require__(8111);
53692
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.filter.js
53693
+ var es_iterator_filter = __webpack_require__(2489);
53694
+ // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
53695
+ var es_iterator_for_each = __webpack_require__(7588);
53696
+ // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
53697
+ var baseComp = __webpack_require__(4272);
53698
+ ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=script&lang=js
53699
+
53700
+
53701
+
53702
+
53703
+
53704
+
53705
+
53706
+ /* harmony default export */ var Viewvue_type_script_lang_js = ({
53707
+ name: "cms-text",
53708
+ components: {
53709
+ BaseComp: baseComp["default"]
53710
+ },
53711
+ props: {
53712
+ data: {
53713
+ type: Object,
53714
+ default: () => {
53715
+ return {};
53716
+ }
53717
+ },
53718
+ nowCompId: {
53719
+ type: [String, Number],
53720
+ default: ""
53721
+ },
53722
+ isOpcacity: {
53723
+ type: Boolean,
53724
+ default: true
53725
+ },
53726
+ lang: {
53727
+ type: String,
53728
+ default: "zh-HK"
53729
+ },
53730
+ showCmhkMain: {
53731
+ type: Boolean,
53732
+ default: true
53733
+ }
53734
+ },
53735
+ data() {
53736
+ return {
53737
+ configData: {},
53738
+ // 默认配置数据
53739
+ defaultConfig: {
53740
+ // 内容编辑
53741
+ textContent: "请输入文本内容",
53742
+ enableLineBreak: true,
53743
+ // 排版控制
53744
+ textAlign: "left",
53745
+ // fontSize: 16,
53746
+ // lineHeight: 1.5,
53747
+ letterSpacing: 0,
53748
+ // 样式美化
53749
+ fontColor: "#333333",
53750
+ // fontWeight: "normal",
53751
+ fontStyle: "normal",
53752
+ textDecoration: "none",
53753
+ // fontFamily: "inherit",
53754
+
53755
+ // 布局设置
53756
+ paddingTop: 0,
53757
+ paddingBottom: 0,
53758
+ paddingLeft: 0,
53759
+ paddingRight: 0,
53760
+ marginTop: 0,
53761
+ marginBottom: 0,
53762
+ marginLeft: 0,
53763
+ marginRight: 0,
53764
+ backgroundColor: "",
53765
+ // 视觉效果
53766
+ borderWidth: 0,
53767
+ borderStyle: "solid",
53768
+ borderColor: "#dcdfe6",
53769
+ borderRadius: 0,
53770
+ boxShadow: "",
53771
+ // 交互功能
53772
+ linkUrl: "",
53773
+ linkTarget: "_self",
53774
+ showLinkIcon: false,
53775
+ hoverEffect: false,
53776
+ // 高级配置
53777
+ customClass: "",
53778
+ customStyle: "",
53779
+ enableAnimation: false,
53780
+ animationType: "fadeIn",
53781
+ animationDuration: 300,
53782
+ // 可访问性配置
53783
+ ariaLabel: "",
53784
+ tabIndex: 0,
53785
+ role: "",
53786
+ // SEO配置
53787
+ seoTitle: "",
53788
+ seoDescription: "",
53789
+ // 响应式配置
53790
+ mobileTextAlign: "",
53791
+ mobileFontSize: 0,
53792
+ tabletFontSize: 0
53793
+ }
53794
+ };
53795
+ },
53796
+ mounted() {
53797
+ this.initConfigData();
53798
+ this.setCSSVariables();
53799
+ },
53800
+ watch: {
53801
+ configData: {
53802
+ handler() {
53803
+ this.updateStyles();
53804
+ },
53805
+ deep: true
53806
+ }
53807
+ },
53808
+ computed: {
53809
+ // 文本行数组(支持换行)
53810
+ textLines() {
53811
+ if (!this.configData.textContent) return [];
53812
+ if (!this.configData.enableLineBreak) {
53813
+ return [this.configData.textContent];
53814
+ }
53815
+ return this.configData.textContent.split("\n").filter(line => line.trim() !== "");
53816
+ },
53817
+ // 容器样式
53818
+ containerStyle() {
53819
+ const config = {
53820
+ ...this.defaultConfig,
53821
+ ...this.configData
53822
+ };
53823
+ let marginSettting = `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`;
53824
+ if (this.showCmhkMain && !(parseInt(config.marginTop) || parseInt(config.marginRight) || parseInt(config.marginBottom) || parseInt(config.marginLeft))) {
53825
+ marginSettting = "0 auto";
53826
+ }
53827
+ return {
53828
+ padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
53829
+ margin: marginSettting,
53830
+ backgroundColor: config.backgroundColor || "transparent",
53831
+ border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
53832
+ borderRadius: `${config.borderRadius}px`,
53833
+ boxShadow: config.boxShadow || "none",
53834
+ cursor: config.linkUrl ? "pointer" : "default",
53835
+ transition: config.hoverEffect ? "all 0.3s ease" : "none",
53836
+ animation: config.enableAnimation ? this.getAnimationStyle() : "none",
53837
+ ...this.parseCustomStyle(config.customStyle)
53838
+ };
53839
+ },
53840
+ // 文本样式
53841
+ textStyle() {
53842
+ const config = {
53843
+ ...this.defaultConfig,
53844
+ ...this.configData
53845
+ };
53846
+ return {
53847
+ color: config.fontColor,
53848
+ // fontSize: `${config.fontSize}px`,
53849
+ // fontWeight: config.fontWeight,
53850
+ fontStyle: config.fontStyle,
53851
+ textDecoration: config.textDecoration,
53852
+ // fontFamily: config.fontFamily,
53853
+ // lineHeight: config.lineHeight,
53854
+ letterSpacing: `${config.letterSpacing}px`,
53855
+ textAlign: config.textAlign,
53856
+ wordBreak: "break-word",
53857
+ wordWrap: "break-word",
53858
+ cursor: config.linkUrl ? "pointer" : "default"
53859
+ };
53860
+ },
53861
+ // 行样式
53862
+ lineStyle() {
53863
+ return {
53864
+ margin: "0",
53865
+ padding: "0"
53866
+ };
53867
+ }
53868
+ },
53869
+ methods: {
53870
+ // 初始化配置数据
53871
+ initConfigData() {
53872
+ this.configData = {
53873
+ ...this.defaultConfig,
53874
+ ...this.configData
53875
+ };
53876
+ },
53877
+ // 获取配置数据
53878
+ getConfigData(configData) {
53879
+ this.configData = {
53880
+ ...this.defaultConfig,
53881
+ ...configData
53882
+ };
53883
+ this.updateStyles();
53884
+ },
53885
+ // 更新样式
53886
+ updateStyles() {
53887
+ this.$nextTick(() => {
53888
+ this.setCSSVariables();
53889
+ this.$forceUpdate();
53890
+ });
53891
+ },
53892
+ // 设置CSS变量
53893
+ setCSSVariables() {
53894
+ if (!this.$el) return;
53895
+ const config = {
53896
+ ...this.defaultConfig,
53897
+ ...this.configData
53898
+ };
53899
+
53900
+ // 设置响应式字体大小
53901
+ if (config.mobileFontSize > 0) {
53902
+ this.$el.style.setProperty("--mobile-font-size", `${config.mobileFontSize}px`);
53903
+ }
53904
+ if (config.tabletFontSize > 0) {
53905
+ this.$el.style.setProperty("--tablet-font-size", `${config.tabletFontSize}px`);
53906
+ }
53907
+
53908
+ // 设置移动端文本对齐
53909
+ if (config.mobileTextAlign) {
53910
+ this.$el.style.setProperty("--mobile-text-align", config.mobileTextAlign);
53911
+ }
53912
+ },
53913
+ // 处理点击事件
53914
+ handleClick() {
53915
+ if (this.configData.linkUrl) {
53916
+ const target = this.configData.linkTarget || "_self";
53917
+ if (target === "_blank") {
53918
+ window.open(this.configData.linkUrl, "_blank");
53919
+ } else {
53920
+ window.location.href = this.configData.linkUrl;
53921
+ }
53922
+ }
53923
+ },
53924
+ // 获取动画样式
53925
+ getAnimationStyle() {
53926
+ const animationType = this.configData.animationType || this.defaultConfig.animationType;
53927
+ const duration = this.configData.animationDuration || this.defaultConfig.animationDuration;
53928
+ if (!this.configData.enableAnimation || animationType === "none") return "";
53929
+ return `${animationType} ${duration}ms ease-in-out`;
53930
+ },
53931
+ // 解析自定义样式
53932
+ parseCustomStyle(customStyle) {
53933
+ if (!customStyle) return {};
53934
+ try {
53935
+ // 简单的CSS样式解析
53936
+ const styles = {};
53937
+ const declarations = customStyle.split(";");
53938
+ declarations.forEach(declaration => {
53939
+ const [property, value] = declaration.split(":");
53940
+ if (property && value) {
53941
+ const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
53942
+ styles[camelCaseProperty] = value.trim();
53943
+ }
53944
+ });
53945
+ return styles;
53946
+ } catch (error) {
53947
+ console.warn("解析自定义样式失败:", error);
53948
+ return {};
53949
+ }
53950
+ },
53951
+ // 文本内容验证
53952
+ validateTextContent() {
53953
+ const content = this.configData.textContent;
53954
+ if (!content || content.trim() === "") {
53955
+ console.warn("文本内容为空");
53956
+ return false;
53957
+ }
53958
+ return true;
53959
+ },
53960
+ // 获取纯文本内容
53961
+ getPlainTextContent() {
53962
+ return this.configData.textContent || "";
53963
+ },
53964
+ // 获取文本长度
53965
+ getTextLength() {
53966
+ return this.getPlainTextContent().length;
53967
+ },
53968
+ // 复制文本内容到剪贴板
53969
+ copyTextToClipboard() {
53970
+ const text = this.getPlainTextContent();
53971
+ if (navigator.clipboard && window.isSecureContext) {
53972
+ navigator.clipboard.writeText(text).then(() => {
53973
+ var _this$$message;
53974
+ (_this$$message = this.$message) === null || _this$$message === void 0 ? void 0 : _this$$message.success("文本已复制到剪贴板");
53975
+ }).catch(err => {
53976
+ console.error("复制失败:", err);
53977
+ });
53978
+ } else {
53979
+ // 降级方案
53980
+ const textArea = document.createElement("textarea");
53981
+ textArea.value = text;
53982
+ document.body.appendChild(textArea);
53983
+ textArea.select();
53984
+ try {
53985
+ var _this$$message2;
53986
+ document.execCommand("copy");
53987
+ (_this$$message2 = this.$message) === null || _this$$message2 === void 0 ? void 0 : _this$$message2.success("文本已复制到剪贴板");
53988
+ } catch (err) {
53989
+ console.error("复制失败:", err);
53990
+ }
53991
+ document.body.removeChild(textArea);
53992
+ }
53993
+ },
53994
+ // 文本搜索高亮
53995
+ highlightText(searchTerm) {
53996
+ if (!searchTerm) return;
53997
+ const content = this.getPlainTextContent();
53998
+ const regex = new RegExp(`(${searchTerm})`, "gi");
53999
+ const highlightedContent = content.replace(regex, "<mark>$1</mark>");
54000
+
54001
+ // 这里可以根据需要实现高亮显示逻辑
54002
+ console.log("高亮内容:", highlightedContent);
54003
+ },
54004
+ // 文本统计信息
54005
+ getTextStats() {
54006
+ const text = this.getPlainTextContent();
54007
+ const words = text.split(/\s+/).filter(word => word.length > 0);
54008
+ const lines = text.split("\n").length;
54009
+ const characters = text.length;
54010
+ const charactersNoSpaces = text.replace(/\s/g, "").length;
54011
+ return {
54012
+ characters,
54013
+ charactersNoSpaces,
54014
+ words: words.length,
54015
+ lines,
54016
+ paragraphs: text.split(/\n\s*\n/).filter(p => p.trim().length > 0).length
54017
+ };
54018
+ }
54019
+ }
54020
+ });
54021
+ ;// ./package/cms-text/View.vue?vue&type=script&lang=js
54022
+ /* harmony default export */ var cms_text_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
54023
+ ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-text/View.vue?vue&type=style&index=0&id=0914066e&prod&lang=scss&scoped=true
54024
+ // extracted by mini-css-extract-plugin
54025
+
54026
+ ;// ./package/cms-text/View.vue?vue&type=style&index=0&id=0914066e&prod&lang=scss&scoped=true
54027
+
54028
+ // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
54029
+ var componentNormalizer = __webpack_require__(1656);
54030
+ ;// ./package/cms-text/View.vue
54031
+
54032
+
54033
+
54034
+ ;
54035
+
54036
+
54037
+ /* normalize component */
54038
+
54039
+ var component = (0,componentNormalizer/* default */.A)(
54040
+ cms_text_Viewvue_type_script_lang_js,
54041
+ render,
54042
+ staticRenderFns,
54043
+ false,
54044
+ null,
54045
+ "0914066e",
54046
+ null
54047
+
54048
+ )
54049
+
54050
+ /* harmony default export */ var View = (component.exports);
54051
+
53761
54052
  /***/ }),
53762
54053
 
53763
54054
  /***/ 7551:
@@ -53842,7 +54133,7 @@ $({ target: 'Iterator', proto: true, real: true }, {
53842
54133
  __webpack_require__.r(__webpack_exports__);
53843
54134
  /* harmony import */ var _baseConfig__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(649);
53844
54135
 
53845
- const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 3011));
54136
+ const View = () => Promise.resolve(/* import() */).then(__webpack_require__.bind(__webpack_require__, 450));
53846
54137
  const langData = {
53847
54138
  input1: "请输入富文本内容"
53848
54139
  };
@@ -56926,286 +57217,6 @@ const standard_page_list = [{
56926
57217
 
56927
57218
  /***/ }),
56928
57219
 
56929
- /***/ 8169:
56930
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
56931
-
56932
- "use strict";
56933
- // ESM COMPAT FLAG
56934
- __webpack_require__.r(__webpack_exports__);
56935
-
56936
- // EXPORTS
56937
- __webpack_require__.d(__webpack_exports__, {
56938
- "default": function() { return /* binding */ View; }
56939
- });
56940
-
56941
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-button/View.vue?vue&type=template&id=d7712dd2&scoped=true
56942
- var render = function render() {
56943
- var _vm = this,
56944
- _c = _vm._self._c;
56945
- return _c('BaseComp', _vm._b({
56946
- attrs: {
56947
- "data": _vm.data,
56948
- "nowCompId": _vm.nowCompId,
56949
- "isOpcacity": _vm.isOpcacity,
56950
- "lang": _vm.lang
56951
- },
56952
- on: {
56953
- "getConfigData": _vm.getConfigData
56954
- }
56955
- }, 'BaseComp', _vm.$attrs, false), [_c('section', {
56956
- staticClass: "cms-button-container",
56957
- class: [`align-${_vm.configData.textAlign || 'center'}`, _vm.configData.customClass || ''],
56958
- style: _vm.containerStyle
56959
- }, [_c('button', {
56960
- staticClass: "cms-button",
56961
- class: ['cms-button-element', {
56962
- 'has-link': _vm.configData.linkUrl,
56963
- 'hover-effect': _vm.configData.hoverEffect
56964
- }],
56965
- style: _vm.buttonStyle,
56966
- attrs: {
56967
- "disabled": _vm.configData.disabled
56968
- },
56969
- on: {
56970
- "click": _vm.handleClick
56971
- }
56972
- }, [_vm._v(" " + _vm._s(_vm.configData.buttonText) + " "), _c('i', {
56973
- staticClass: "el-icon-arrow-right el-icon--right"
56974
- })])])]);
56975
- };
56976
- var staticRenderFns = [];
56977
-
56978
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.constructor.js
56979
- var es_iterator_constructor = __webpack_require__(8111);
56980
- // EXTERNAL MODULE: ./node_modules/core-js/modules/es.iterator.for-each.js
56981
- var es_iterator_for_each = __webpack_require__(7588);
56982
- // EXTERNAL MODULE: ./package/baseComp.vue + 5 modules
56983
- var baseComp = __webpack_require__(4272);
56984
- ;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/babel-loader/lib/index.js??clonedRuleSet-41.use!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-button/View.vue?vue&type=script&lang=js
56985
-
56986
-
56987
-
56988
-
56989
-
56990
- /* harmony default export */ var Viewvue_type_script_lang_js = ({
56991
- name: "cms-button",
56992
- components: {
56993
- BaseComp: baseComp["default"]
56994
- },
56995
- props: {
56996
- data: {
56997
- type: Object,
56998
- default: () => {
56999
- return {};
57000
- }
57001
- },
57002
- nowCompId: {
57003
- type: [String, Number],
57004
- default: ""
57005
- },
57006
- isOpcacity: {
57007
- type: Boolean,
57008
- default: true
57009
- },
57010
- lang: {
57011
- type: String,
57012
- default: "zh-HK"
57013
- }
57014
- },
57015
- data() {
57016
- return {
57017
- configData: {},
57018
- // 默认配置数据
57019
- defaultConfig: {
57020
- // 文字设置
57021
- buttonText: "按钮文字",
57022
- textAlign: "center",
57023
- fontSize: 16,
57024
- fontColor: "#ffffff",
57025
- fontWeight: "normal",
57026
- // 样式控制
57027
- backgroundColor: "#409eff",
57028
- borderRadius: 30,
57029
- borderWidth: 1,
57030
- borderStyle: "solid",
57031
- borderColor: "#409eff",
57032
- // 空间布局
57033
- paddingTop: 12,
57034
- paddingBottom: 12,
57035
- paddingLeft: 20,
57036
- paddingRight: 20,
57037
- marginTop: 0,
57038
- marginBottom: 0,
57039
- marginLeft: 0,
57040
- marginRight: 0,
57041
- // 交互功能
57042
- linkUrl: "",
57043
- linkTarget: "_self",
57044
- disabled: false,
57045
- // 高级配置
57046
- customClass: "",
57047
- customStyle: "",
57048
- hoverEffect: false,
57049
- // 尺寸设置
57050
- buttonWidth: "300",
57051
- buttonHeight: "48",
57052
- minWidth: 80,
57053
- minHeight: 36
57054
- }
57055
- };
57056
- },
57057
- mounted() {
57058
- this.initConfigData();
57059
- },
57060
- watch: {
57061
- configData: {
57062
- handler() {
57063
- this.updateStyles();
57064
- },
57065
- deep: true
57066
- }
57067
- },
57068
- computed: {
57069
- // 容器样式
57070
- containerStyle() {
57071
- const config = {
57072
- ...this.defaultConfig,
57073
- ...this.configData
57074
- };
57075
- return {
57076
- backgroundColor: config.wrapperBackgroundColor,
57077
- textAlign: config.textAlign,
57078
- margin: `${config.marginTop}px ${config.marginRight}px ${config.marginBottom}px ${config.marginLeft}px`,
57079
- ...this.parseCustomStyle(config.customStyle)
57080
- };
57081
- },
57082
- // 按钮样式
57083
- buttonStyle() {
57084
- const config = {
57085
- ...this.defaultConfig,
57086
- ...this.configData
57087
- };
57088
- return {
57089
- // 文字样式
57090
- fontSize: `${config.fontSize}px`,
57091
- color: config.fontColor,
57092
- fontWeight: config.fontWeight,
57093
- // 背景和边框
57094
- backgroundColor: config.backgroundColor ? config.backgroundColor : "transparent",
57095
- borderRadius: `${config.borderRadius}px`,
57096
- border: config.borderWidth ? `${config.borderWidth}px ${config.borderStyle} ${config.borderColor}` : "none",
57097
- // 内边距
57098
- padding: `${config.paddingTop}px ${config.paddingRight}px ${config.paddingBottom}px ${config.paddingLeft}px`,
57099
- // 尺寸
57100
- width: config.buttonWidth === "auto" ? "auto" : `${config.buttonWidth}px`,
57101
- height: config.buttonHeight === "auto" ? "auto" : `${config.buttonHeight}px`,
57102
- minWidth: `${config.minWidth}px`,
57103
- minHeight: `${config.minHeight}px`,
57104
- // 交互效果
57105
- cursor: config.linkUrl ? "pointer" : "default",
57106
- opacity: config.disabled ? 0.6 : 1,
57107
- transition: config.hoverEffect ? "all 0.3s ease" : "none",
57108
- // 基础样式
57109
- outline: "none",
57110
- textDecoration: "none",
57111
- display: "inline-block",
57112
- textAlign: "center",
57113
- verticalAlign: "middle",
57114
- userSelect: "none",
57115
- whiteSpace: "nowrap"
57116
- };
57117
- }
57118
- },
57119
- methods: {
57120
- // 初始化配置数据
57121
- initConfigData() {
57122
- this.configData = {
57123
- ...this.defaultConfig,
57124
- ...this.configData
57125
- };
57126
- },
57127
- // 获取配置数据
57128
- getConfigData(configData) {
57129
- this.configData = {
57130
- ...this.defaultConfig,
57131
- ...configData
57132
- };
57133
- this.updateStyles();
57134
- },
57135
- // 更新样式
57136
- updateStyles() {
57137
- this.$nextTick(() => {
57138
- this.$forceUpdate();
57139
- });
57140
- },
57141
- // 处理点击事件
57142
- handleClick() {
57143
- if (this.configData.disabled) {
57144
- return;
57145
- }
57146
- if (this.configData.linkUrl) {
57147
- const target = this.configData.linkTarget || "_self";
57148
- if (target === "_blank") {
57149
- window.open(this.configData.linkUrl, "_blank");
57150
- } else {
57151
- window.location.href = this.configData.linkUrl;
57152
- }
57153
- }
57154
- },
57155
- // 解析自定义样式
57156
- parseCustomStyle(customStyle) {
57157
- if (!customStyle) return {};
57158
- try {
57159
- const styles = {};
57160
- const declarations = customStyle.split(";");
57161
- declarations.forEach(declaration => {
57162
- const [property, value] = declaration.split(":");
57163
- if (property && value) {
57164
- const camelCaseProperty = property.trim().replace(/-([a-z])/g, g => g[1].toUpperCase());
57165
- styles[camelCaseProperty] = value.trim();
57166
- }
57167
- });
57168
- return styles;
57169
- } catch (error) {
57170
- console.warn("解析自定义样式失败:", error);
57171
- return {};
57172
- }
57173
- }
57174
- }
57175
- });
57176
- ;// ./package/cms-button/View.vue?vue&type=script&lang=js
57177
- /* harmony default export */ var cms_button_Viewvue_type_script_lang_js = (Viewvue_type_script_lang_js);
57178
- ;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-42.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./package/cms-button/View.vue?vue&type=style&index=0&id=d7712dd2&prod&lang=scss&scoped=true
57179
- // extracted by mini-css-extract-plugin
57180
-
57181
- ;// ./package/cms-button/View.vue?vue&type=style&index=0&id=d7712dd2&prod&lang=scss&scoped=true
57182
-
57183
- // EXTERNAL MODULE: ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
57184
- var componentNormalizer = __webpack_require__(1656);
57185
- ;// ./package/cms-button/View.vue
57186
-
57187
-
57188
-
57189
- ;
57190
-
57191
-
57192
- /* normalize component */
57193
-
57194
- var component = (0,componentNormalizer/* default */.A)(
57195
- cms_button_Viewvue_type_script_lang_js,
57196
- render,
57197
- staticRenderFns,
57198
- false,
57199
- null,
57200
- "d7712dd2",
57201
- null
57202
-
57203
- )
57204
-
57205
- /* harmony default export */ var View = (component.exports);
57206
-
57207
- /***/ }),
57208
-
57209
57220
  /***/ 8227:
57210
57221
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
57211
57222
 
@@ -58026,7 +58037,7 @@ var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
58026
58037
  // images
58027
58038
  placeholderImg: __webpack_require__(5335),
58028
58039
  arrowRightImg: __webpack_require__(4860),
58029
- arrowDownImg: __webpack_require__(4242),
58040
+ arrowDownImg: __webpack_require__(1861),
58030
58041
  arrowHoverImg: __webpack_require__(4116),
58031
58042
  arrowActiveImg: __webpack_require__(9670),
58032
58043
  shopList: [],