@idooel/components 0.0.1-beta.71 → 0.0.1-beta.73

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.
@@ -20,7 +20,7 @@ import FileUpload from 'vue-upload-component';
20
20
  //
21
21
  //
22
22
 
23
- var script$E = {
23
+ var script$F = {
24
24
  name: 'ele-button',
25
25
  props: {
26
26
  record: {
@@ -141,10 +141,10 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
141
141
  }
142
142
 
143
143
  /* script */
144
- const __vue_script__$E = script$E;
144
+ const __vue_script__$F = script$F;
145
145
 
146
146
  /* template */
147
- var __vue_render__$E = function () {
147
+ var __vue_render__$F = function () {
148
148
  var _vm = this;
149
149
  var _h = _vm.$createElement;
150
150
  var _c = _vm._self._c || _h;
@@ -190,17 +190,17 @@ var __vue_render__$E = function () {
190
190
  2
191
191
  )
192
192
  };
193
- var __vue_staticRenderFns__$E = [];
194
- __vue_render__$E._withStripped = true;
193
+ var __vue_staticRenderFns__$F = [];
194
+ __vue_render__$F._withStripped = true;
195
195
 
196
196
  /* style */
197
- const __vue_inject_styles__$E = undefined;
197
+ const __vue_inject_styles__$F = undefined;
198
198
  /* scoped */
199
- const __vue_scope_id__$E = undefined;
199
+ const __vue_scope_id__$F = undefined;
200
200
  /* module identifier */
201
- const __vue_module_identifier__$E = undefined;
201
+ const __vue_module_identifier__$F = undefined;
202
202
  /* functional template */
203
- const __vue_is_functional_template__$E = false;
203
+ const __vue_is_functional_template__$F = false;
204
204
  /* style inject */
205
205
 
206
206
  /* style inject SSR */
@@ -209,23 +209,23 @@ __vue_render__$E._withStripped = true;
209
209
 
210
210
 
211
211
 
212
- const __vue_component__$E = /*#__PURE__*/normalizeComponent(
213
- { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
214
- __vue_inject_styles__$E,
215
- __vue_script__$E,
216
- __vue_scope_id__$E,
217
- __vue_is_functional_template__$E,
218
- __vue_module_identifier__$E,
212
+ const __vue_component__$F = /*#__PURE__*/normalizeComponent(
213
+ { render: __vue_render__$F, staticRenderFns: __vue_staticRenderFns__$F },
214
+ __vue_inject_styles__$F,
215
+ __vue_script__$F,
216
+ __vue_scope_id__$F,
217
+ __vue_is_functional_template__$F,
218
+ __vue_module_identifier__$F,
219
219
  false,
220
220
  undefined,
221
221
  undefined,
222
222
  undefined
223
223
  );
224
224
 
225
- __vue_component__$E.install = Vue => Vue.component(__vue_component__$E.name, __vue_component__$E);
225
+ __vue_component__$F.install = Vue => Vue.component(__vue_component__$F.name, __vue_component__$F);
226
226
 
227
227
  //
228
- var script$D = {
228
+ var script$E = {
229
229
  name: 'ele-date',
230
230
  model: {
231
231
  prop: 'value',
@@ -345,10 +345,10 @@ function addStyle(id, css) {
345
345
  }
346
346
 
347
347
  /* script */
348
- const __vue_script__$D = script$D;
348
+ const __vue_script__$E = script$E;
349
349
 
350
350
  /* template */
351
- var __vue_render__$D = function () {
351
+ var __vue_render__$E = function () {
352
352
  var _vm = this;
353
353
  var _h = _vm.$createElement;
354
354
  var _c = _vm._self._c || _h;
@@ -396,48 +396,48 @@ var __vue_render__$D = function () {
396
396
  1
397
397
  )
398
398
  };
399
- var __vue_staticRenderFns__$D = [];
400
- __vue_render__$D._withStripped = true;
399
+ var __vue_staticRenderFns__$E = [];
400
+ __vue_render__$E._withStripped = true;
401
401
 
402
402
  /* style */
403
- const __vue_inject_styles__$D = function (inject) {
403
+ const __vue_inject_styles__$E = function (inject) {
404
404
  if (!inject) return
405
405
  inject("data-v-e10e4c8e_0", { source: ".ele-date__wrapper[data-v-e10e4c8e] {\n width: 100%;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\date\\src\\index.vue","index.vue"],"names":[],"mappings":"AAuGA;EACA,WAAA;ACtGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-date__wrapper\">\r\n <a-date-picker \r\n style=\"width: 100%;\" \r\n :mode=\"modeValue\"\r\n v-if=\"modeValue == 'year'\"\r\n :open=\"open\"\r\n :disabled=\"disabled\"\r\n :value=\"value\"\r\n :show-time=\"showTime\"\r\n :show-today=\"showToday\"\r\n :valueFormat=\"innerValueFormat\"\r\n @panelChange=\"onPanelChange\"\r\n @openChange=\"openChange\"\r\n @change=\"onChange\"\r\n :format=\"format\">\r\n </a-date-picker>\r\n <a-date-picker \r\n v-else\r\n style=\"width: 100%;\" \r\n :open=\"open\"\r\n :disabled=\"disabled\"\r\n :value=\"value\"\r\n :show-time=\"showTime\"\r\n :show-today=\"showToday\"\r\n :valueFormat=\"innerValueFormat\"\r\n @panelChange=\"onPanelChange\"\r\n @openChange=\"openChange\"\r\n @change=\"onChange\"\r\n :format=\"format\">\r\n </a-date-picker>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport moment from 'moment'\r\nexport default {\r\n name: 'ele-date',\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n value: {\r\n type: [String, Object]\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n format: {\r\n type: String,\r\n default: 'YYYY/MM/DD'\r\n },\r\n mode: {\r\n type: String\r\n },\r\n valueFormat: {\r\n type: String\r\n },\r\n showTime: {\r\n type: [Boolean, Object],\r\n default: true\r\n },\r\n showToday: {\r\n type: Boolean,\r\n default: true\r\n },\r\n },\r\n data () {\r\n return {\r\n open: false\r\n }\r\n },\r\n computed: {\r\n innerValueFormat () {\r\n if (this.valueFormat) return this.valueFormat\r\n return this.format\r\n },\r\n modeValue () {\r\n if (this.mode) return this.mode\r\n if (this.format === 'YYYY') return 'year'\r\n return 'date'\r\n }\r\n },\r\n methods: {\r\n onChange (_, dataString) {\r\n this.$emit('input', dataString)\r\n this.$emit('change', dataString)\r\n },\r\n onPanelChange (value, mode) {\r\n if (this.modeValue !== 'year') return\r\n this.$emit('input', moment(value).format(this.format))\r\n this.$emit('change', moment(value).format(this.format))\r\n this.open = false\r\n },\r\n openChange (open) {\r\n this.open = open\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ele-date__wrapper {\r\n width: 100%;\r\n}\r\n</style>",".ele-date__wrapper {\n width: 100%;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
406
406
 
407
407
  };
408
408
  /* scoped */
409
- const __vue_scope_id__$D = "data-v-e10e4c8e";
409
+ const __vue_scope_id__$E = "data-v-e10e4c8e";
410
410
  /* module identifier */
411
- const __vue_module_identifier__$D = undefined;
411
+ const __vue_module_identifier__$E = undefined;
412
412
  /* functional template */
413
- const __vue_is_functional_template__$D = false;
413
+ const __vue_is_functional_template__$E = false;
414
414
  /* style inject SSR */
415
415
 
416
416
  /* style inject shadow dom */
417
417
 
418
418
 
419
419
 
420
- const __vue_component__$D = /*#__PURE__*/normalizeComponent(
421
- { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
422
- __vue_inject_styles__$D,
423
- __vue_script__$D,
424
- __vue_scope_id__$D,
425
- __vue_is_functional_template__$D,
426
- __vue_module_identifier__$D,
420
+ const __vue_component__$E = /*#__PURE__*/normalizeComponent(
421
+ { render: __vue_render__$E, staticRenderFns: __vue_staticRenderFns__$E },
422
+ __vue_inject_styles__$E,
423
+ __vue_script__$E,
424
+ __vue_scope_id__$E,
425
+ __vue_is_functional_template__$E,
426
+ __vue_module_identifier__$E,
427
427
  false,
428
428
  createInjector,
429
429
  undefined,
430
430
  undefined
431
431
  );
432
432
 
433
- __vue_component__$D.install = Vue => Vue.component(__vue_component__$D.name, __vue_component__$D);
433
+ __vue_component__$E.install = Vue => Vue.component(__vue_component__$E.name, __vue_component__$E);
434
434
 
435
435
  //
436
436
  //
437
437
  //
438
438
  //
439
439
 
440
- var script$C = {
440
+ var script$D = {
441
441
  name: 'ele-input',
442
442
  model: {
443
443
  prop: 'value',
@@ -465,10 +465,10 @@ var script$C = {
465
465
  };
466
466
 
467
467
  /* script */
468
- const __vue_script__$C = script$C;
468
+ const __vue_script__$D = script$D;
469
469
 
470
470
  /* template */
471
- var __vue_render__$C = function () {
471
+ var __vue_render__$D = function () {
472
472
  var _vm = this;
473
473
  var _h = _vm.$createElement;
474
474
  var _c = _vm._self._c || _h;
@@ -481,44 +481,44 @@ var __vue_render__$C = function () {
481
481
  on: { change: _vm.onChange },
482
482
  })
483
483
  };
484
- var __vue_staticRenderFns__$C = [];
485
- __vue_render__$C._withStripped = true;
484
+ var __vue_staticRenderFns__$D = [];
485
+ __vue_render__$D._withStripped = true;
486
486
 
487
487
  /* style */
488
- const __vue_inject_styles__$C = function (inject) {
488
+ const __vue_inject_styles__$D = function (inject) {
489
489
  if (!inject) return
490
490
  inject("data-v-b8defd54_0", { source: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", map: {"version":3,"sources":[],"names":[],"mappings":"","file":"index.vue"}, media: undefined });
491
491
 
492
492
  };
493
493
  /* scoped */
494
- const __vue_scope_id__$C = "data-v-b8defd54";
494
+ const __vue_scope_id__$D = "data-v-b8defd54";
495
495
  /* module identifier */
496
- const __vue_module_identifier__$C = undefined;
496
+ const __vue_module_identifier__$D = undefined;
497
497
  /* functional template */
498
- const __vue_is_functional_template__$C = false;
498
+ const __vue_is_functional_template__$D = false;
499
499
  /* style inject SSR */
500
500
 
501
501
  /* style inject shadow dom */
502
502
 
503
503
 
504
504
 
505
- const __vue_component__$C = /*#__PURE__*/normalizeComponent(
506
- { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
507
- __vue_inject_styles__$C,
508
- __vue_script__$C,
509
- __vue_scope_id__$C,
510
- __vue_is_functional_template__$C,
511
- __vue_module_identifier__$C,
505
+ const __vue_component__$D = /*#__PURE__*/normalizeComponent(
506
+ { render: __vue_render__$D, staticRenderFns: __vue_staticRenderFns__$D },
507
+ __vue_inject_styles__$D,
508
+ __vue_script__$D,
509
+ __vue_scope_id__$D,
510
+ __vue_is_functional_template__$D,
511
+ __vue_module_identifier__$D,
512
512
  false,
513
513
  createInjector,
514
514
  undefined,
515
515
  undefined
516
516
  );
517
517
 
518
- __vue_component__$C.install = Vue => Vue.component(__vue_component__$C.name, __vue_component__$C);
518
+ __vue_component__$D.install = Vue => Vue.component(__vue_component__$D.name, __vue_component__$D);
519
519
 
520
520
  //
521
- var script$B = {
521
+ var script$C = {
522
522
  name: 'ele-select',
523
523
  props: {
524
524
  disabled: {
@@ -603,10 +603,10 @@ var script$B = {
603
603
  };
604
604
 
605
605
  /* script */
606
- const __vue_script__$B = script$B;
606
+ const __vue_script__$C = script$C;
607
607
 
608
608
  /* template */
609
- var __vue_render__$B = function () {
609
+ var __vue_render__$C = function () {
610
610
  var _vm = this;
611
611
  var _h = _vm.$createElement;
612
612
  var _c = _vm._self._c || _h;
@@ -627,41 +627,41 @@ var __vue_render__$B = function () {
627
627
  1
628
628
  )
629
629
  };
630
- var __vue_staticRenderFns__$B = [];
631
- __vue_render__$B._withStripped = true;
630
+ var __vue_staticRenderFns__$C = [];
631
+ __vue_render__$C._withStripped = true;
632
632
 
633
633
  /* style */
634
- const __vue_inject_styles__$B = function (inject) {
634
+ const __vue_inject_styles__$C = function (inject) {
635
635
  if (!inject) return
636
636
  inject("data-v-3e39f9c5_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
637
637
 
638
638
  };
639
639
  /* scoped */
640
- const __vue_scope_id__$B = "data-v-3e39f9c5";
640
+ const __vue_scope_id__$C = "data-v-3e39f9c5";
641
641
  /* module identifier */
642
- const __vue_module_identifier__$B = undefined;
642
+ const __vue_module_identifier__$C = undefined;
643
643
  /* functional template */
644
- const __vue_is_functional_template__$B = false;
644
+ const __vue_is_functional_template__$C = false;
645
645
  /* style inject SSR */
646
646
 
647
647
  /* style inject shadow dom */
648
648
 
649
649
 
650
650
 
651
- const __vue_component__$B = /*#__PURE__*/normalizeComponent(
652
- { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
653
- __vue_inject_styles__$B,
654
- __vue_script__$B,
655
- __vue_scope_id__$B,
656
- __vue_is_functional_template__$B,
657
- __vue_module_identifier__$B,
651
+ const __vue_component__$C = /*#__PURE__*/normalizeComponent(
652
+ { render: __vue_render__$C, staticRenderFns: __vue_staticRenderFns__$C },
653
+ __vue_inject_styles__$C,
654
+ __vue_script__$C,
655
+ __vue_scope_id__$C,
656
+ __vue_is_functional_template__$C,
657
+ __vue_module_identifier__$C,
658
658
  false,
659
659
  createInjector,
660
660
  undefined,
661
661
  undefined
662
662
  );
663
663
 
664
- __vue_component__$B.install = Vue => Vue.component(__vue_component__$B.name, __vue_component__$B);
664
+ __vue_component__$C.install = Vue => Vue.component(__vue_component__$C.name, __vue_component__$C);
665
665
 
666
666
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
667
667
  // require the crypto API and do not support built-in fallback to lower quality random number
@@ -1383,7 +1383,7 @@ const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
1383
1383
 
1384
1384
  //
1385
1385
  const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
1386
- var script$A = {
1386
+ var script$B = {
1387
1387
  props: {
1388
1388
  record: {
1389
1389
  type: Object
@@ -1510,10 +1510,10 @@ var script$A = {
1510
1510
  };
1511
1511
 
1512
1512
  /* script */
1513
- const __vue_script__$A = script$A;
1513
+ const __vue_script__$B = script$B;
1514
1514
 
1515
1515
  /* template */
1516
- var __vue_render__$A = function () {
1516
+ var __vue_render__$B = function () {
1517
1517
  var _vm = this;
1518
1518
  var _h = _vm.$createElement;
1519
1519
  var _c = _vm._self._c || _h;
@@ -1678,34 +1678,34 @@ var __vue_render__$A = function () {
1678
1678
  0
1679
1679
  )
1680
1680
  };
1681
- var __vue_staticRenderFns__$A = [];
1682
- __vue_render__$A._withStripped = true;
1681
+ var __vue_staticRenderFns__$B = [];
1682
+ __vue_render__$B._withStripped = true;
1683
1683
 
1684
1684
  /* style */
1685
- const __vue_inject_styles__$A = function (inject) {
1685
+ const __vue_inject_styles__$B = function (inject) {
1686
1686
  if (!inject) return
1687
1687
  inject("data-v-816a4e70_0", { source: ".g-table__action[data-v-816a4e70] {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item[data-v-816a4e70] {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item[data-v-816a4e70]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\table\\src\\action.vue","action.vue"],"names":[],"mappings":"AA8JA;EACA,aAAA;EACA,mBAAA;AC7JA;AD8JA;EACA,eAAA;EACA,cAAA;EACA,iBAAA;EACA,eAAA;AC5JA;AD6JA;EACA,cAAA;AC3JA;;AAEA,qCAAqC","file":"action.vue","sourcesContent":["<template>\r\n <div class=\"g-table__action\">\r\n <div class=\"table-action__item\" v-for=\"(item, idx) in execOperationExpression(dataSource)\" :key=\"idx\">\r\n <template v-if=\"item.type == 'text'\">\r\n <span @click=\"handleClickText(item)\">{{ item.label }}</span>\r\n </template>\r\n <template v-else-if=\"item.type == 'confirm'\">\r\n <div>\r\n <a-popconfirm :title=\"item.message\" @confirm=\"handleClickConfirm(item)\">\r\n {{ item.label }}\r\n </a-popconfirm>\r\n </div>\r\n </template>\r\n <template v-else-if=\"item.type == 'dropdown'\">\r\n <a-dropdown>\r\n <a-menu slot=\"overlay\" @click=\"handleDropdownClick\">\r\n <a-menu-item :key=\"`${item.key || ''}${menuKeyDelimiter}${opt.value || ''}`\" v-for=\"opt in execOperationExpression(item.optionList)\">\r\n <template v-if=\"opt.type == 'confirm'\">\r\n <a-popconfirm :title=\"opt.message\" @confirm=\"handleClickConfirm(opt)\">\r\n {{ opt.label }}\r\n </a-popconfirm>\r\n </template>\r\n <template v-if=\"opt.type == 'modal-confirm'\">\r\n <div style=\"width: 100%\" @click=\"handleClickModalConfirm(opt)\">{{ opt.label }}</div>\r\n <ele-modal-confirm v-bind=\"opt.modalConfirm\" v-on=\"$listeners\" v-model=\"showModalConfirm\"></ele-modal-confirm>\r\n </template>\r\n <template v-else>\r\n {{ opt.label }}\r\n </template>\r\n </a-menu-item>\r\n </a-menu>\r\n <span>{{ item.label }}</span>\r\n </a-dropdown>\r\n </template>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v5 as uuidv5 } from 'uuid'\r\nimport { type, route } from '@idooel/shared'\r\nimport { parse } from '@idooel/expression'\r\nimport { CONTEXT } from '../../utils'\r\nconst MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002'\r\nexport default {\r\n props: {\r\n record: {\r\n type: Object\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n inject: {\r\n requestTreeData: {\r\n default: void 0\r\n },\r\n requestTableData: {\r\n default: void 0\r\n }\r\n },\r\n data() {\r\n return {\r\n showModalConfirm: false\r\n }\r\n },\r\n provide () {\r\n return {\r\n [CONTEXT]: () => {\r\n return {\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta,\r\n exposed: this.builtInMethods,\r\n ...this.record\r\n }\r\n }\r\n }\r\n },\r\n computed: {\r\n menuKeyDelimiter () {\r\n return uuidv5('_', MENU_KEY_NAMESPACE)\r\n },\r\n builtInMethods () {\r\n return { \r\n requestTreeData: this.requestTreeData, \r\n requestTableData: this.requestTableData,\r\n closeModalConfirm: this.closeModalConfirm,\r\n showModalConfirm: this.handleClickModalConfirm\r\n }\r\n }\r\n },\r\n methods: {\r\n closeModalConfirm () {\r\n this.showModalConfirm = false\r\n },\r\n handleClickModalConfirm () {\r\n this.showModalConfirm = true\r\n },\r\n execOperationExpression (dataSource = []) {\r\n const ret = dataSource.map(item => {\r\n const { show } = item\r\n if (type.isUndefined(show)) {\r\n return item\r\n } else if (type.isBool(show)) {\r\n if (show) return item\r\n } else if (type.isStr(show)) {\r\n const parseRet = parse(show, { \r\n ...this.record, \r\n _route: route.searchToQueryParams(window.location.search) \r\n })\r\n if (parseRet) return item\r\n }\r\n }).filter(item => item)\r\n return ret\r\n },\r\n handleClickConfirm (props) {\r\n //TODO generate event by special rule\r\n const { eventName, value, key } = props\r\n this.$emit(eventName, { \r\n key: value || key, \r\n record: this.record,\r\n builtInMethods: this.builtInMethods,\r\n exposed: this.builtInMethods\r\n })\r\n },\r\n handleDropdownClick (props) {\r\n const { key } = props\r\n const [parent, child] = key.split(this.menuKeyDelimiter)\r\n if (!parent || !child) {\r\n throw new Error('key is required')\r\n }\r\n const currentDropdown = this.dataSource.find(item => item.key === parent)\r\n const currentClickTarget = currentDropdown.optionList.find(item => item.value === child)\r\n const { eventName, type } = currentClickTarget\r\n //TODO generate event by special rule\r\n if (type === 'confirm' || type === 'modal-confirm') return\r\n this.$emit(eventName, { \r\n key: child, \r\n record: this.record, \r\n builtInMethods: this.builtInMethods,\r\n exposed: this.builtInMethods\r\n })\r\n },\r\n handleClickText (props) {\r\n const { eventName, key } = props\r\n this.$emit(eventName, { \r\n key, \r\n record: this.record, \r\n builtInMethods: this.builtInMethods,\r\n exposed: this.builtInMethods\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-table__action {\r\n display: flex;\r\n flex-direction: row;\r\n .table-action__item {\r\n font-size: 14px;\r\n color: #409EFF;\r\n margin-left: 16px;\r\n cursor: pointer;\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n }\r\n}\r\n</style>",".g-table__action {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */"]}, media: undefined });
1688
1688
 
1689
1689
  };
1690
1690
  /* scoped */
1691
- const __vue_scope_id__$A = "data-v-816a4e70";
1691
+ const __vue_scope_id__$B = "data-v-816a4e70";
1692
1692
  /* module identifier */
1693
- const __vue_module_identifier__$A = undefined;
1693
+ const __vue_module_identifier__$B = undefined;
1694
1694
  /* functional template */
1695
- const __vue_is_functional_template__$A = false;
1695
+ const __vue_is_functional_template__$B = false;
1696
1696
  /* style inject SSR */
1697
1697
 
1698
1698
  /* style inject shadow dom */
1699
1699
 
1700
1700
 
1701
1701
 
1702
- const __vue_component__$A = /*#__PURE__*/normalizeComponent(
1703
- { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
1704
- __vue_inject_styles__$A,
1705
- __vue_script__$A,
1706
- __vue_scope_id__$A,
1707
- __vue_is_functional_template__$A,
1708
- __vue_module_identifier__$A,
1702
+ const __vue_component__$B = /*#__PURE__*/normalizeComponent(
1703
+ { render: __vue_render__$B, staticRenderFns: __vue_staticRenderFns__$B },
1704
+ __vue_inject_styles__$B,
1705
+ __vue_script__$B,
1706
+ __vue_scope_id__$B,
1707
+ __vue_is_functional_template__$B,
1708
+ __vue_module_identifier__$B,
1709
1709
  false,
1710
1710
  createInjector,
1711
1711
  undefined,
@@ -1713,10 +1713,10 @@ __vue_render__$A._withStripped = true;
1713
1713
  );
1714
1714
 
1715
1715
  //
1716
- var script$z = {
1716
+ var script$A = {
1717
1717
  name: 'ele-table',
1718
1718
  components: {
1719
- Actions: __vue_component__$A
1719
+ Actions: __vue_component__$B
1720
1720
  },
1721
1721
  props: {
1722
1722
  // ant table wrapper
@@ -1907,10 +1907,10 @@ var script$z = {
1907
1907
  };
1908
1908
 
1909
1909
  /* script */
1910
- const __vue_script__$z = script$z;
1910
+ const __vue_script__$A = script$A;
1911
1911
 
1912
1912
  /* template */
1913
- var __vue_render__$z = function () {
1913
+ var __vue_render__$A = function () {
1914
1914
  var _vm = this;
1915
1915
  var _h = _vm.$createElement;
1916
1916
  var _c = _vm._self._c || _h;
@@ -1976,41 +1976,41 @@ var __vue_render__$z = function () {
1976
1976
  1
1977
1977
  )
1978
1978
  };
1979
- var __vue_staticRenderFns__$z = [];
1980
- __vue_render__$z._withStripped = true;
1979
+ var __vue_staticRenderFns__$A = [];
1980
+ __vue_render__$A._withStripped = true;
1981
1981
 
1982
1982
  /* style */
1983
- const __vue_inject_styles__$z = function (inject) {
1983
+ const __vue_inject_styles__$A = function (inject) {
1984
1984
  if (!inject) return
1985
1985
  inject("data-v-aea3b71c_0", { source: ".g-table__wrapper[data-v-aea3b71c] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-header tr th {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-tbody tr td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);\n border-style: solid;\n border-top: unset;\n border-left: unset;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-fixed-left .ant-table-header {\n /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */\n /* border-bottom-style: solid; */\n /* border-bottom-color: var(--idooel-border-color); */\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-fixed-left .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-fixed-left .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-fixed-right .ant-table-header {\n /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */\n /* border-bottom-color: var(--idooel-border-color); */\n /* border-bottom-style: solid; */\n}\n.g-table__wrapper[data-v-aea3b71c] .ant-table-wrapper .ant-table-fixed-right .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-aea3b71c] .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd[data-v-aea3b71c] {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination[data-v-aea3b71c] {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 999;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\table\\src\\index.vue","index.vue"],"names":[],"mappings":"AAyNA;EA8FA,aAAA;EACA,kBAAA;ACrTA;ADuNA;EACA,eAAA;ACrNA;ADuNA;EACA,gBAAA;ACrNA;ADwNA;EACA,eAAA;ACtNA;ADuNA;EACA,eAAA;ACrNA;ADmOA;EACA,oDAAA;EACA,mBAAA;EACA,wCAAA;ACjOA;ADoOA;EACA,iDAAA;AClOA;ADqOA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACnOA;ADyOA;EACA,+CAAA;EACA,2DAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;ACvOA;ADgPA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;AC9OA;AD+OA;EACA,iEAAA;EACA,gCAAA;EACA,qDAAA;AC7OA;AD+OA;EACA,0DAAA;EACA,yBAAA;EACA,8CAAA;AC7OA;AD+OA;EACA,0DAAA;EACA,8CAAA;EACA,yBAAA;AC7OA;ADiPA;EACA,iEAAA;EACA,qDAAA;EACA,gCAAA;AC/OA;ADoPA;EACA,yDAAA;EACA,wBAAA;EACA,6CAAA;AClPA;ADwPA;EACA,wCAAA;ACtPA;ADwPA;EACA,uCAAA;ACtPA;ADwPA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;EACA,oDAAA;EACA,wCAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;EACA,kBAAA;EACA,YAAA;ACtPA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"g-table__wrapper\" :style=\"{ height: `${height}px` }\">\r\n <a-table\r\n :class=\"[isNoData && 'g-table__no-data']\"\r\n :style=\"{ height: noDataAntTableHeight }\"\r\n :pagination=\"false\"\r\n :loading=\"loading\"\r\n :columns=\"innerColumns\"\r\n :row-selection=\"rowSelection\"\r\n :row-class-name=\"setRowClassName\"\r\n :data-source=\"dataSource\"\r\n :scroll=\"getScroll\">\r\n <template slot=\"action\" slot-scope=\"record\">\r\n <Actions v-on=\"$listeners\" :data-source=\"actions\" :record=\"record\"></Actions>\r\n </template>\r\n </a-table>\r\n <div class=\"g-table__pagination\">\r\n <a-pagination\r\n :show-total=\"all => `共 ${all} 条数据`\"\r\n show-size-changer \r\n show-quick-jumper\r\n :pageSize=\"innerPageSize\"\r\n :current=\"innerCurrentPage\"\r\n :pageSizeOptions=\"pageSizeOptions\"\r\n @change=\"onChangePagination\"\r\n @showSizeChange=\"onShowSizeChange\"\r\n :total=\"total\">\r\n </a-pagination>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Actions from './action.vue'\r\nexport default {\r\n name: 'ele-table',\r\n components: {\r\n Actions\r\n },\r\n props: {\r\n // ant table wrapper\r\n height: {\r\n type: Number\r\n },\r\n width: {\r\n type: Number\r\n },\r\n x: {\r\n type: Number,\r\n default: 1200\r\n },\r\n y: {\r\n type: Number,\r\n default: 200\r\n },\r\n scroll: {\r\n type: Object\r\n },\r\n rowSelection: {\r\n type: Object\r\n },\r\n actions: {\r\n type: Array,\r\n default: () => []\r\n },\r\n total: {\r\n type: Number,\r\n default: 0\r\n },\r\n loading: {\r\n type: Boolean,\r\n default: false\r\n },\r\n columns: {\r\n type: Array,\r\n default: () => []\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n },\r\n pageSize: {\r\n type: Number,\r\n default: 10\r\n },\r\n pageSizeOptions: {\r\n type: Array,\r\n default: () => ['10', '20', '30', '40']\r\n }\r\n },\r\n data() {\r\n return {\r\n tableHeaderHeight: 0,\r\n paginationHeight: 0,\r\n innerPageSize: 10,\r\n innerCurrentPage: 1,\r\n tableContentHeight: 0,\r\n obs: [],\r\n tableTbodyHeight: 0\r\n }\r\n },\r\n computed: {\r\n innerColumns () {\r\n return this.columns.filter(col => !Object.keys(col).includes('multiple'))\r\n },\r\n isNoData () {\r\n return !this.dataSource.length\r\n },\r\n noDataAntTableHeight () {\r\n //TODO\r\n if (this.dataSource.length) {\r\n // return 'auto'\r\n return `${this.height - this.paginationHeight - 16}px` \r\n }\r\n return `${this.height - this.paginationHeight - 16}px` \r\n },\r\n getScrollHeightByHeight () {\r\n const height = this.height - this.tableHeaderHeight - this.paginationHeight\r\n console.log('this.height', this.height)\r\n console.log('height', height)\r\n console.log('this.tableTbodyHeight', this.tableTbodyHeight)\r\n if (this.tableTbodyHeight == 0) {\r\n //暂无数据\r\n document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'auto')\r\n } else if (this.tableTbodyHeight !== 0 && height > this.tableTbodyHeight) {\r\n document.querySelector('.ant-table-content') && (document.querySelector('.ant-table-content').style.height = 'inherit')\r\n document.querySelector('.ant-table-scroll') && (document.querySelector('.ant-table-scroll').style.height = 'inherit')\r\n document.querySelector('.ant-table-body') && (document.querySelector('.ant-table-body').style.height = 'inherit')\r\n if (this.tableTbodyHeight > height) {\r\n document.querySelector('.ant-table-content').style.height = 'auto'\r\n document.querySelector('.ant-table-scroll').style.height = 'auto'\r\n document.querySelector('.ant-table-body').style.height = 'auto'\r\n }\r\n return 0\r\n // 0的时候没有y滚动条\r\n }\r\n return this.height - this.tableHeaderHeight - this.paginationHeight\r\n },\r\n isFlexColumn () {\r\n return this.columns.every(col => !col.width)\r\n },\r\n getScroll () {\r\n if (this.scroll) {\r\n return this.scroll\r\n } else {\r\n if (this.height) {\r\n return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.getScrollHeightByHeight }\r\n }\r\n return { x: this.isFlexColumn ? 0 : this.width > this.x ? 0 : this.x, y: this.y }\r\n }\r\n }\r\n },\r\n watch: {\r\n pageSize: {\r\n handler (pageSize) {\r\n this.innerPageSize = pageSize\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n onShowSizeChange (current, pageSize) {\r\n this.innerCurrentPage = current\r\n this.innerPageSize = pageSize\r\n this.$emit('change-page', current, pageSize)\r\n },\r\n setPaginationHeight () {\r\n this.$nextTick(() => {\r\n const { height } = document.querySelector('.g-table__pagination').getBoundingClientRect()\r\n this.paginationHeight = height\r\n })\r\n },\r\n setTableHeaderHeight () {\r\n this.$nextTick(() => {\r\n const el = document.querySelector('.ant-table-header')\r\n if (!el) return\r\n const { height } = el.getBoundingClientRect()\r\n this.tableHeaderHeight = height\r\n })\r\n },\r\n setTableTbodyHeight () {\r\n const el = document.querySelector('table .ant-table-tbody')\r\n const ob = new ResizeObserver((entries => {\r\n if (this.tableHeaderHeight) return\r\n for (const _ of entries) {\r\n requestAnimationFrame(() => {\r\n const { height } = el.getBoundingClientRect()\r\n this.tableTbodyHeight = height\r\n this.setTableHeaderHeight()\r\n })\r\n }\r\n }))\r\n ob.observe(el)\r\n this.obs.push(ob)\r\n },\r\n setRowClassName (record, idx) {\r\n return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'\r\n },\r\n onChangePagination (page, pageSize) {\r\n this.innerCurrentPage = page\r\n this.innerPageSize = pageSize\r\n this.$emit('change-page', page, pageSize)\r\n }\r\n },\r\n mounted() {\r\n this.setPaginationHeight()\r\n setTimeout(() => {\r\n this.setTableTbodyHeight()\r\n }, 100)\r\n },\r\n destroyed () {\r\n this.obs.forEach(ob => ob.disconnect())\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-table__wrapper {\r\n ::v-deep .ant-spin-nested-loading {\r\n height: inherit;\r\n .ant-table-fixed-header {\r\n .ant-table-body-inner {\r\n overflow: hidden;\r\n }\r\n }\r\n .ant-spin-container {\r\n height: inherit;\r\n .ant-table {\r\n height: inherit;\r\n .ant-table-content {\r\n // height: inherit;\r\n // .ant-table-scroll {\r\n // height: inherit;\r\n // .ant-table-body {\r\n // height: inherit;\r\n // }\r\n // }\r\n }\r\n }\r\n }\r\n }\r\n ::v-deep .ant-table-wrapper {\r\n .ant-table {\r\n border-width: calc(var(--idooel-border-width) * 1px);\r\n border-style: solid;\r\n border-color: var(--idooel-border-color);\r\n }\r\n .ant-table-header {\r\n .ant-table-fixed {\r\n /* border-bottom: 2px solid #53a8ff !important; */\r\n }\r\n tr {\r\n th {\r\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\r\n border-bottom-style: solid;\r\n border-bottom-color: var(--idooel-border-color);\r\n }\r\n }\r\n }\r\n .ant-table-tbody {\r\n tr {\r\n td {\r\n border-color: var(--idooel-column-border-color);\r\n border-width: calc(var(--idooel-column-border-width) * 1px);;\r\n border-style: solid;\r\n border-top: unset;\r\n border-left: unset;\r\n }\r\n }\r\n }\r\n .ant-table-body {\r\n // border-top-width: calc(var(--idooel-border-width) * 1px);\r\n // border-top-style: solid;\r\n // border-top-color: var(--idooel-border-color);\r\n }\r\n .ant-table-fixed-left {\r\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\r\n border-bottom-style: solid;\r\n border-bottom-color: var(--idooel-border-color);\r\n .ant-table-header {\r\n /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */\r\n /* border-bottom-style: solid; */\r\n /* border-bottom-color: var(--idooel-border-color); */\r\n }\r\n .ant-table-body-inner {\r\n border-right-width: calc(var(--idooel-border-width) * 1px);\r\n border-right-style: solid;\r\n border-right-color: var(--idooel-border-color);\r\n }\r\n .ant-table-fixed {\r\n border-right-width: calc(var(--idooel-border-width) * 1px);\r\n border-right-color: var(--idooel-border-color);\r\n border-right-style: solid;\r\n }\r\n }\r\n .ant-table-fixed-right {\r\n .ant-table-header {\r\n /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */\r\n /* border-bottom-color: var(--idooel-border-color); */\r\n /* border-bottom-style: solid; */\r\n }\r\n // border-bottom-width: calc(var(--idooel-border-width) * 1px);\r\n // border-bottom-style: solid;\r\n // border-bottom-color: var(--idooel-border-color);\r\n .ant-table-fixed {\r\n border-left-width: calc(var(--idooel-border-width) * 1px);\r\n border-left-style: solid;\r\n border-left-color: var(--idooel-border-color);\r\n }\r\n }\r\n }\r\n padding: 16px;\r\n padding-top: unset;\r\n ::v-deep .g-table__row--even {\r\n background: var(--idooel-row-even-color);\r\n }\r\n .g-table__row--odd {\r\n background: var(--idooel-row-odd-color);\r\n }\r\n .g-table__pagination {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: end;\r\n border-width: calc(var(--idooel-border-width) * 1px);\r\n border-color: var(--idooel-border-color);\r\n border-style: solid;\r\n border-top: unset;\r\n padding-top: 8px;\r\n padding-bottom: 8px;\r\n position: relative;\r\n z-index: 999;\r\n }\r\n}\r\n</style>",".g-table__wrapper {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-table-fixed-header .ant-table-body-inner {\n overflow: hidden;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-spin-container {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-spin-nested-loading .ant-spin-container .ant-table {\n height: inherit;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-header tr th {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-tbody tr td {\n border-color: var(--idooel-column-border-color);\n border-width: calc(var(--idooel-column-border-width) * 1px);\n border-style: solid;\n border-top: unset;\n border-left: unset;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left {\n border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-header {\n /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */\n /* border-bottom-style: solid; */\n /* border-bottom-color: var(--idooel-border-color); */\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-body-inner {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-style: solid;\n border-right-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-left .ant-table-fixed {\n border-right-width: calc(var(--idooel-border-width) * 1px);\n border-right-color: var(--idooel-border-color);\n border-right-style: solid;\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-right .ant-table-header {\n /* border-bottom-width: calc(var(--idooel-border-width) * 1px); */\n /* border-bottom-color: var(--idooel-border-color); */\n /* border-bottom-style: solid; */\n}\n.g-table__wrapper ::v-deep .ant-table-wrapper .ant-table-fixed-right .ant-table-fixed {\n border-left-width: calc(var(--idooel-border-width) * 1px);\n border-left-style: solid;\n border-left-color: var(--idooel-border-color);\n}\n.g-table__wrapper ::v-deep .g-table__row--even {\n background: var(--idooel-row-even-color);\n}\n.g-table__wrapper .g-table__row--odd {\n background: var(--idooel-row-odd-color);\n}\n.g-table__wrapper .g-table__pagination {\n display: flex;\n flex-direction: row;\n justify-content: end;\n border-width: calc(var(--idooel-border-width) * 1px);\n border-color: var(--idooel-border-color);\n border-style: solid;\n border-top: unset;\n padding-top: 8px;\n padding-bottom: 8px;\n position: relative;\n z-index: 999;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
1986
1986
 
1987
1987
  };
1988
1988
  /* scoped */
1989
- const __vue_scope_id__$z = "data-v-aea3b71c";
1989
+ const __vue_scope_id__$A = "data-v-aea3b71c";
1990
1990
  /* module identifier */
1991
- const __vue_module_identifier__$z = undefined;
1991
+ const __vue_module_identifier__$A = undefined;
1992
1992
  /* functional template */
1993
- const __vue_is_functional_template__$z = false;
1993
+ const __vue_is_functional_template__$A = false;
1994
1994
  /* style inject SSR */
1995
1995
 
1996
1996
  /* style inject shadow dom */
1997
1997
 
1998
1998
 
1999
1999
 
2000
- const __vue_component__$z = /*#__PURE__*/normalizeComponent(
2001
- { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
2002
- __vue_inject_styles__$z,
2003
- __vue_script__$z,
2004
- __vue_scope_id__$z,
2005
- __vue_is_functional_template__$z,
2006
- __vue_module_identifier__$z,
2000
+ const __vue_component__$A = /*#__PURE__*/normalizeComponent(
2001
+ { render: __vue_render__$A, staticRenderFns: __vue_staticRenderFns__$A },
2002
+ __vue_inject_styles__$A,
2003
+ __vue_script__$A,
2004
+ __vue_scope_id__$A,
2005
+ __vue_is_functional_template__$A,
2006
+ __vue_module_identifier__$A,
2007
2007
  false,
2008
2008
  createInjector,
2009
2009
  undefined,
2010
2010
  undefined
2011
2011
  );
2012
2012
 
2013
- __vue_component__$z.install = Vue => Vue.component(__vue_component__$z.name, __vue_component__$z);
2013
+ __vue_component__$A.install = Vue => Vue.component(__vue_component__$A.name, __vue_component__$A);
2014
2014
 
2015
2015
  //
2016
2016
  //
@@ -2040,7 +2040,7 @@ __vue_component__$z.install = Vue => Vue.component(__vue_component__$z.name, __v
2040
2040
  //
2041
2041
  //
2042
2042
 
2043
- var script$y = {
2043
+ var script$z = {
2044
2044
  name: 'ele-tree',
2045
2045
  props: {
2046
2046
  treeData: {
@@ -2101,10 +2101,10 @@ var script$y = {
2101
2101
  };
2102
2102
 
2103
2103
  /* script */
2104
- const __vue_script__$y = script$y;
2104
+ const __vue_script__$z = script$z;
2105
2105
 
2106
2106
  /* template */
2107
- var __vue_render__$y = function () {
2107
+ var __vue_render__$z = function () {
2108
2108
  var _vm = this;
2109
2109
  var _h = _vm.$createElement;
2110
2110
  var _c = _vm._self._c || _h;
@@ -2175,44 +2175,44 @@ var __vue_render__$y = function () {
2175
2175
  1
2176
2176
  )
2177
2177
  };
2178
- var __vue_staticRenderFns__$y = [];
2179
- __vue_render__$y._withStripped = true;
2178
+ var __vue_staticRenderFns__$z = [];
2179
+ __vue_render__$z._withStripped = true;
2180
2180
 
2181
2181
  /* style */
2182
- const __vue_inject_styles__$y = function (inject) {
2182
+ const __vue_inject_styles__$z = function (inject) {
2183
2183
  if (!inject) return
2184
2184
  inject("data-v-02dd33e4_0", { source: ".g-tree__wrapper[data-v-02dd33e4] {\n overflow: hidden;\n}\n.g-tree__wrapper[data-v-02dd33e4] .ant-tree .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.g-tree__wrapper[data-v-02dd33e4] .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\tree\\src\\index.vue","index.vue"],"names":[],"mappings":"AAwFA;EACA,gBAAA;ACvFA;ADyFA;EACA,uBAAA;EACA,gBAAA;EACA,mBAAA;ACvFA;ADyFA;EACA,WAAA;ACvFA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"g-tree__wrapper\">\r\n <a-tree\r\n v-if=\"innerTreeData.length\"\r\n :tree-data=\"innerTreeData\"\r\n :checkable=\"checkable\"\r\n @select=\"selectTreeNode\"\r\n @check=\"checkTreeNode\"\r\n :replaceFields=\"replaceFields\"\r\n :default-expanded-keys=\"defaultExpandedKeys\"\r\n :default-selected-keys=\"defaultSelectedKeys\"\r\n :show-line=\"showLine\"\r\n blockNode \r\n :show-icon=\"showIcon\">\r\n <a-icon v-if=\"switcherIcon\" slot=\"switcherIcon\" :type=\"switcherIcon\" />\r\n <template #title=\"{ title }\">\r\n <span :title=\"title\" class=\"tree-node__title\">\r\n {{ title }}\r\n </span>\r\n </template>\r\n <template slot=\"custom\" slot-scope=\"{ scopedSlots }\">\r\n <a-icon :type=\"scopedSlots.iconName\"></a-icon>\r\n </template>\r\n </a-tree>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-tree',\r\n props: {\r\n treeData: {\r\n type: Array,\r\n default: () => []\r\n },\r\n showLine: {\r\n type: Boolean,\r\n default: false\r\n },\r\n switcherIcon: {\r\n type: String\r\n },\r\n checkable: {\r\n type: Boolean,\r\n default: false\r\n },\r\n replaceFields: {\r\n type: Object,\r\n default: () => ({\r\n title: 'title',\r\n key: 'id',\r\n children: 'children'\r\n })\r\n },\r\n defaultExpandedKeys: {\r\n type: Array\r\n },\r\n defaultSelectedKeys: {\r\n type: Array\r\n },\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n innerTreeData () {\r\n return this.treeData\r\n }\r\n },\r\n methods: {\r\n checkTreeNode (checkedKeys, e) {\r\n const { checkedNodes } = e\r\n const nodeDatas = checkedNodes.map(item => item.data.props.dataRef)\r\n this.$emit('check', checkedKeys, nodeDatas)\r\n },\r\n refreshTreeStatus (props = {}) {},\r\n selectTreeNode (selectedKeys, e) {\r\n this.$emit('select', selectedKeys, e)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-tree__wrapper {\r\n overflow: hidden;\r\n ::v-deep .ant-tree {\r\n .ant-tree-node-content-wrapper {\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n }\r\n .ant-tree-node-selected {\r\n color: #fff;\r\n }\r\n }\r\n}\r\n</style>",".g-tree__wrapper {\n overflow: hidden;\n}\n.g-tree__wrapper ::v-deep .ant-tree .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.g-tree__wrapper ::v-deep .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
2185
2185
 
2186
2186
  };
2187
2187
  /* scoped */
2188
- const __vue_scope_id__$y = "data-v-02dd33e4";
2188
+ const __vue_scope_id__$z = "data-v-02dd33e4";
2189
2189
  /* module identifier */
2190
- const __vue_module_identifier__$y = undefined;
2190
+ const __vue_module_identifier__$z = undefined;
2191
2191
  /* functional template */
2192
- const __vue_is_functional_template__$y = false;
2192
+ const __vue_is_functional_template__$z = false;
2193
2193
  /* style inject SSR */
2194
2194
 
2195
2195
  /* style inject shadow dom */
2196
2196
 
2197
2197
 
2198
2198
 
2199
- const __vue_component__$y = /*#__PURE__*/normalizeComponent(
2200
- { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
2201
- __vue_inject_styles__$y,
2202
- __vue_script__$y,
2203
- __vue_scope_id__$y,
2204
- __vue_is_functional_template__$y,
2205
- __vue_module_identifier__$y,
2199
+ const __vue_component__$z = /*#__PURE__*/normalizeComponent(
2200
+ { render: __vue_render__$z, staticRenderFns: __vue_staticRenderFns__$z },
2201
+ __vue_inject_styles__$z,
2202
+ __vue_script__$z,
2203
+ __vue_scope_id__$z,
2204
+ __vue_is_functional_template__$z,
2205
+ __vue_module_identifier__$z,
2206
2206
  false,
2207
2207
  createInjector,
2208
2208
  undefined,
2209
2209
  undefined
2210
2210
  );
2211
2211
 
2212
- __vue_component__$y.install = Vue => Vue.component(__vue_component__$y.name, __vue_component__$y);
2212
+ __vue_component__$z.install = Vue => Vue.component(__vue_component__$z.name, __vue_component__$z);
2213
2213
 
2214
2214
  //
2215
- var script$x = {
2215
+ var script$y = {
2216
2216
  name: 'ele-tree-table-model',
2217
2217
  props: {
2218
2218
  title: {
@@ -2745,10 +2745,10 @@ var script$x = {
2745
2745
  };
2746
2746
 
2747
2747
  /* script */
2748
- const __vue_script__$x = script$x;
2748
+ const __vue_script__$y = script$y;
2749
2749
 
2750
2750
  /* template */
2751
- var __vue_render__$x = function () {
2751
+ var __vue_render__$y = function () {
2752
2752
  var _vm = this;
2753
2753
  var _h = _vm.$createElement;
2754
2754
  var _c = _vm._self._c || _h;
@@ -2911,34 +2911,34 @@ var __vue_render__$x = function () {
2911
2911
  1
2912
2912
  )
2913
2913
  };
2914
- var __vue_staticRenderFns__$x = [];
2915
- __vue_render__$x._withStripped = true;
2914
+ var __vue_staticRenderFns__$y = [];
2915
+ __vue_render__$y._withStripped = true;
2916
2916
 
2917
2917
  /* style */
2918
- const __vue_inject_styles__$x = function (inject) {
2918
+ const __vue_inject_styles__$y = function (inject) {
2919
2919
  if (!inject) return
2920
2920
  inject("data-v-6465022b_0", { source: ".ele.model__tree-table[data-v-6465022b] {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.ele.model__tree-table .model__tree-table--container .model__tree--wrapper[data-v-6465022b] {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n}\n.ele.model__tree-table .model__table--container[data-v-6465022b] {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--bar[data-v-6465022b] {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--text[data-v-6465022b] {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper[data-v-6465022b] {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area[data-v-6465022b] {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .g-table__wrapper .fsm[data-v-6465022b] {\n cursor: pointer;\n color: var(--idooel-primary-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\models\\tree-table-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AAweA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;ACveA;ADyeA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;ACveA;AD0eA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;ACxeA;AD0eA;EACA,WAAA;EACA,WAAA;EACA,uCAAA;EACA,2BAAA;EACA,4BAAA;ACxeA;AD0eA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,iBAAA;EACA,gBAAA;EACA,wBAAA;EACA,qCAAA;ACxeA;AD2eA;EACA,gBAAA;ACzeA;AD0eA;EACA,WAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;EACA,iBAAA;EACA,mBAAA;EACA,mBAAA;ACxeA;AD2eA;EACA,eAAA;EACA,kCAAA;ACzeA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <section class=\"ele model__tree-table\">\r\n <section class=\"model__tree-table--container\" v-if=\"showTree\">\r\n <div class=\"model__tree--title\"></div>\r\n <section :ref=\"modelTreeWrapper\" class=\"model__tree--wrapper\" :style=\"{height: `${treeWrapperHeight}px`}\">\r\n <ele-tree\r\n :tree-data=\"treeData\"\r\n :defaultExpandedKeys=\"defaultExpandedKeys\"\r\n :defaultSelectedKeys=\"defaultSelectedKeys\"\r\n @select=\"selectTreeNode\"\r\n :replace-fields=\"treeMeta.replaceFields || replaceFields\">\r\n </ele-tree>\r\n </section>\r\n </section>\r\n <section class=\"model__table--container\" :ref=\"modelTableContainerRef\">\r\n <div class=\"model__table--title\" v-if=\"title\">\r\n <template v-if=\"titleMode\">\r\n <div :class=\"[`model__table-title--${titleMode}`]\"></div>\r\n </template>\r\n <template v-else>\r\n <div class=\"model__table-title--text\">{{ title }}</div>\r\n </template>\r\n </div>\r\n <section :ref=\"modelTableWrapper\" class=\"model__table--wrapper\">\r\n <ele-search-area :ref=\"searchArea\" @search=\"onSearch\" :data-source=\"searchMeta.elements\"></ele-search-area>\r\n <div class=\"button-row__area\">\r\n <ele-button-group class=\"model-table__button-group\" v-on=\"overrideButtonGroupEvent\" :ref=\"buttonGroup\" @click=\"handleClickButtonGroup\" :data-source=\"getButtonGroupElements\"></ele-button-group>\r\n <slot name=\"tags\"></slot>\r\n <slot name=\"sub-center\"></slot>\r\n </div>\r\n <ele-table\r\n v-on=\"overrideTableEvent\"\r\n :ref=\"tableRef\"\r\n :row-selection=\"rowSelection\"\r\n :loading=\"loading\" \r\n :columns=\"columns\"\r\n :total=\"total\"\r\n :x=\"x\"\r\n :y=\"y\"\r\n :height=\"tableHeight\"\r\n :width=\"tableWidth\"\r\n :actions=\"actions\"\r\n :pageSize=\"pageSize\"\r\n :pageSizeOptions=\"pageSizeOptions\"\r\n :data-source=\"tableData\"\r\n @change-page=\"onChangePage\"\r\n ></ele-table>\r\n </section>\r\n </section>\r\n <ele-modal-form v-model=\"modalFormValue\" v-on=\"overrideModalFormEvent\" :meta=\"modalFormMeta\"></ele-modal-form>\r\n <ele-modal-fsm v-model=\"showFsmModal\" :contextProp=\"fsmContextProp\" :meta=\"fsmMeta\" @cancel=\"handleCloseFsmModal\"></ele-modal-fsm>\r\n </section>\r\n</template>\r\n\r\n<script>\r\nimport { type, net } from '@idooel/shared'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap, BUILT_IN_TRIGGER, CONTEXT } from '../../../utils'\r\nexport default {\r\n name: 'ele-tree-table-model',\r\n props: {\r\n title: {\r\n type: [Object, String]\r\n },\r\n overHeight: {\r\n type: Number,\r\n default: 0\r\n },\r\n treeMeta: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n searchMeta: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n buttonGroupMeta: {\r\n typeof: Object,\r\n default: () => ({})\r\n },\r\n tableMeta: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n createMeta: {\r\n type: Object\r\n },\r\n editMeta: {\r\n type: Object\r\n }\r\n },\r\n provide () {\r\n return {\r\n requestTreeData: this.requestTreeData,\r\n requestTableData: this.requestTableData,\r\n [CONTEXT]: () => {\r\n return {\r\n exposed: { ...this.exposed }\r\n }\r\n }\r\n }\r\n },\r\n data () {\r\n return {\r\n tableHeight: 0,\r\n tableWidth: 0,\r\n modalFormMeta: {},\r\n modalFormValue: false,\r\n treeData: [],\r\n tableData: [],\r\n defaultExpandedKeys: [],\r\n defaultSelectedKeys: [],\r\n replaceFields: {\r\n title: 'title',\r\n children: 'children',\r\n key: 'id'\r\n },\r\n loading: false,\r\n total: 0,\r\n tableQuerys: {},\r\n resizeObserverModelTableWrapper: null,\r\n modelTableWrapperHeight: 0,\r\n currentTreeNodeData: {},\r\n treeWrapperHeight: 0,\r\n currentTableSelection: {},\r\n showFsmModal: false,\r\n fsmMeta: {},\r\n fsmContextProp: {}\r\n }\r\n },\r\n computed: {\r\n rowSelection () {\r\n if (!this.currentTableMode) return void 0\r\n return {\r\n columnTitle: this.currentSelectionColumn.columnTitle,\r\n fixed: true,\r\n type: this.currentTableMode,\r\n onChange: this.onChangeTableSelection\r\n }\r\n },\r\n currentSelectionColumn () {\r\n const { multiple } = this.tableMeta\r\n const target = this.columns.find(item => Object.keys(item).includes('multiple'))\r\n const isGlobalExistMultiple = Object.keys(this.tableMeta).includes('multiple')\r\n if (target) {\r\n return target\r\n } else if (isGlobalExistMultiple) {\r\n return { multiple }\r\n }\r\n return void 0\r\n },\r\n x () {\r\n const { x } = this.tableMeta\r\n return x\r\n },\r\n y () {\r\n const { y } = this.tableMeta\r\n return y\r\n },\r\n currentTableMode () {\r\n if (!this.currentSelectionColumn) return void 0\r\n const { multiple } = this.currentSelectionColumn\r\n if (type.isBool(multiple)) {\r\n if (multiple) {\r\n return 'checkbox'\r\n } else {\r\n return 'radio'\r\n }\r\n } else {\r\n return void 0\r\n }\r\n },\r\n modelTableContainerRef () {\r\n return uuidv4()\r\n },\r\n titleMode () {\r\n if (type.isObject(this.title)) {\r\n const { mode = '' } = this.title\r\n return mode\r\n }\r\n return void 0\r\n },\r\n tableRef () {\r\n return uuidv4()\r\n },\r\n exposed () {\r\n return {\r\n currentTableSelection: this.currentTableSelection,\r\n currentTreeNode: this.currentTreeNodeData,\r\n requestTableData: this.requestTableData,\r\n querys: this.tableQuerys\r\n }\r\n },\r\n overrideTableEvent () {\r\n const events = this.actions.reduce((ret, action) => {\r\n ret[action.eventName] = (e) => {\r\n this.$emit(action.eventName || 'click', { ...e, currentTreeNode: this.currentTreeNodeData, exposed: this.exposed })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.EDIT]: this[BUILT_IN_EVENT_NAMES.EDIT]\r\n }\r\n },\r\n overrideModalFormEvent () {\r\n return {\r\n ...this.$listeners\r\n }\r\n },\r\n overrideButtonGroupEvent () {\r\n const events = this.getButtonGroupElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e, currentTreeNode: this.currentTreeNodeData, exposed: this.exposed })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.CREATE]: this[BUILT_IN_EVENT_NAMES.CREATE]\r\n }\r\n },\r\n showTree () {\r\n return !!Object.keys(this.treeMeta).length\r\n },\r\n buttonGroup () {\r\n return uuidv4()\r\n },\r\n searchArea () {\r\n return uuidv4()\r\n },\r\n modelTreeWrapper () {\r\n return uuidv4()\r\n },\r\n modelTableWrapper () {\r\n return uuidv4()\r\n },\r\n actions () {\r\n const { operations } = this.tableMeta\r\n if (operations) {\r\n return operations.elements\r\n } else {\r\n return []\r\n }\r\n },\r\n pageSize () {\r\n const { page = {} } = this.tableMeta\r\n return page.pageSize || 10\r\n },\r\n pageSizeOptions () {\r\n const { page = {} } = this.tableMeta\r\n return page.pageSizeOptions || ['10', '20', '30', '40']\r\n },\r\n columns () {\r\n const { columns, operations } = this.tableMeta\r\n if (type.get(columns) === 'array') {\r\n const columnsOptions = columns.map(item => {\r\n const { mode = 'text' } = item\r\n if (item.render) {\r\n return {\r\n ...item,\r\n customRender: (text, record, index) => {\r\n const { $createElement } = this\r\n return item.render.call(this, \r\n { h: $createElement, ctx: this },\r\n text ? typeof text == 'object' ? text[item.dataIndex] : text : '', \r\n record, index)\r\n }\r\n }\r\n } else if (mode !== BUILT_IN_TRIGGER.TEXT) {\r\n const { [`${mode}Meta`]: modeMeta } = item\r\n return {\r\n ...item,\r\n customRender: (text, record, index) => {\r\n return <span onClick={() => this.dispatchTrigger({ mode, record, modeMeta, index })} class={ mode }>{ text }</span>\r\n }\r\n }\r\n }\r\n return {\r\n ...item\r\n }\r\n })\r\n if (operations) {\r\n return [\r\n ...columnsOptions,\r\n {\r\n title: '操作',\r\n width: operations.width,\r\n key: 'action',\r\n fixed: 'right',\r\n scopedSlots: { customRender: 'action' }\r\n }\r\n ]\r\n }\r\n return columnsOptions\r\n } else {\r\n console.error('Error: columns is invalid, please check it')\r\n return []\r\n }\r\n },\r\n getButtonGroupElements () {\r\n const { elements } = this.buttonGroupMeta\r\n if (type.get(elements) === 'function') {\r\n return elements.call(this)\r\n } else if (type.get(elements) === 'array') {\r\n return elements\r\n } else {\r\n return []\r\n }\r\n }\r\n },\r\n async created () {\r\n if (this.showTree) {\r\n this.treeData = await this.requestTreeData()\r\n const [defaultTreeNode = {}] = this.treeData\r\n this.defaultExpandedKeys = [defaultTreeNode[this.replaceFields.key]]\r\n this.defaultSelectedKeys = [defaultTreeNode[this.replaceFields.key]]\r\n this.currentTreeNodeData = defaultTreeNode\r\n }\r\n const { params = {}, fieldMap = {}, overrideInit = false } = this.tableMeta\r\n const ctx = { ...this.currentTreeNodeData, _route: this.$route.query }\r\n const initQuerys = Object.assign({}, params, parseFieldMap(fieldMap, ctx))\r\n if (overrideInit) {\r\n this.$emit(RESERVE_EVENT_NAMES.INIT, { ...this.exposed })\r\n } else {\r\n this.tableData = await this.requestTableData(initQuerys)\r\n }\r\n },\r\n methods: {\r\n dispatchTrigger ({ mode, record = {}, modeMeta = { } }) {\r\n switch (mode) {\r\n case BUILT_IN_TRIGGER.FSM:\r\n this[`${BUILT_IN_TRIGGER.FSM}Trigger`](record, modeMeta = { \r\n url: 'api-fsm/workbench/fsm/auditFlow',\r\n requestType: 'GET',\r\n fieldMap: {\r\n modelCode: 'modelCode',\r\n businessId: 'businessId'\r\n }\r\n })\r\n break\r\n default:\r\n break\r\n }\r\n },\r\n handleCloseFsmModal () {\r\n this.showFsmModal = false\r\n },\r\n [`${BUILT_IN_TRIGGER.FSM}Trigger`] (record, meta) {\r\n this.fsmMeta = meta\r\n this.fsmContextProp = record\r\n this.showFsmModal = true\r\n },\r\n onChangeTableSelection (_, selectedRows) {\r\n if (this.currentTableMode === 'radio') {\r\n this.currentTableSelection = selectedRows[0]\r\n this.$emit('on-change-table-selection', this.currentTableSelection)\r\n } else {\r\n this.currentTableSelection = selectedRows\r\n this.$emit('on-change-table-selection', this.currentTableSelection)\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.EDIT] () {\r\n this.modalFormMeta = this.editMeta\r\n this.modalFormValue = true\r\n },\r\n [BUILT_IN_EVENT_NAMES.CREATE] () {\r\n this.modalFormMeta = this.createMeta\r\n this.modalFormValue = true\r\n },\r\n handleClickButtonGroup (props) {\r\n const { eventName } = props\r\n this.$emit(eventName, { currentTreeNode: this.currentTreeNodeData })\r\n },\r\n watchViewPort () {\r\n const modelTableWrapper = this.$refs[this.modelTableWrapper]\r\n console.log(modelTableWrapper.getBoundingClientRect())\r\n const { top } = modelTableWrapper.getBoundingClientRect()\r\n this.$refs[this.modelTreeWrapper].style.height = `calc(100vh - ${top}px)`\r\n },\r\n async onSearch (props) {\r\n const { overrideInit = false } = this.tableMeta\r\n this.tableQuerys = Object.assign(this.tableQuerys, props)\r\n if (overrideInit) {\r\n this.$emit(RESERVE_EVENT_NAMES.TREE_CHANGE, { ...this.exposed })\r\n } else {\r\n this.tableData = await this.requestTableData()\r\n }\r\n },\r\n execTableFieldMap (fieldMap = {}, props) {\r\n let ret = {}\r\n const keys = Object.keys(fieldMap)\r\n keys.forEach(key => {\r\n const field = fieldMap[key]\r\n ret[field] = props[key]\r\n })\r\n return ret\r\n },\r\n async selectTreeNode (selectedKeys, e) {\r\n const { fieldMap } = this.tableMeta\r\n this.currentTreeNodeData = e.node.$vnode.data.props.dataRef\r\n const execFieldMapRet = this.execTableFieldMap(fieldMap, e.node.$vnode.data.props.dataRef)\r\n const { overrideInit = false } = this.tableMeta\r\n if (overrideInit) {\r\n this.$emit(RESERVE_EVENT_NAMES.TREE_CHANGE, { ...this.exposed })\r\n } else {\r\n this.tableData = await this.requestTableData(execFieldMapRet)\r\n }\r\n },\r\n async requestTreeData () {\r\n const { url, requestType = 'GET', params = {}, fieldMap = {} } = this.treeMeta\r\n const fieldMapRet = parseFieldMap(fieldMap, { ...this.currentTreeNodeData, _route: this.$route.query })\r\n const ret = await net[requestType.toLowerCase()](\r\n url,\r\n { ...params, ...fieldMapRet }\r\n ).then(resp => {\r\n const { data } = resp || {}\r\n return data\r\n })\r\n return ret\r\n },\r\n async onChangePage (page, pageSize) {\r\n this.tableData = await this.requestTableData({ currentPage: page, pageSize })\r\n },\r\n async requestTableData (props = {}) {\r\n const { url, requestType = 'GET', page = {} } = this.tableMeta\r\n const { pageSize = 10 } = page\r\n this.tableQuerys = Object.assign(this.tableQuerys, { currentPage: 1, pageSize }, props)\r\n this.$emit(RESERVE_EVENT_NAMES.WATCH, { ...this.exposed })\r\n this.loading = true\r\n const ret = await net[requestType.toLowerCase()](\r\n url,\r\n this.tableQuerys\r\n ).then(resp => {\r\n const { data = [], count } = resp || {}\r\n this.total = count\r\n this.loading = false\r\n return (data || []).map(item => {\r\n delete item.children\r\n return {\r\n key: uuidv4(),\r\n ...item\r\n }\r\n })\r\n })\r\n this.tableData = ret\r\n return ret\r\n },\r\n refreshTreeStatus (props = {}) {},\r\n refreshTableStatus (props = {}) {},\r\n calculateTableHeight () {\r\n const currentViewportHeight = window.innerHeight\r\n const tableRef = this.$refs[this.tableRef]\r\n const { top: tableToTop, width } = tableRef.$el.getBoundingClientRect()\r\n this.tableWidth = width\r\n this.tableHeight = currentViewportHeight - tableToTop - this.overHeight\r\n },\r\n calculateTreeHeight () {\r\n if (!this.showTree) return\r\n const modelTableContainerRef = this.$refs[this.modelTableContainerRef]\r\n const { height } = modelTableContainerRef.getBoundingClientRect()\r\n this.treeWrapperHeight = height\r\n }\r\n },\r\n mounted () {\r\n this.calculateTableHeight()\r\n this.$nextTick(() => {\r\n this.calculateTreeHeight()\r\n })\r\n this.resizeObserverModelTableWrapper = new ResizeObserver(entries => {\r\n for (const _ of entries) {\r\n requestAnimationFrame(() => {\r\n this.calculateTableHeight()\r\n })\r\n }\r\n })\r\n this.resizeObserverModelTableWrapper.observe(this.$refs[this.modelTableWrapper])\r\n },\r\n destroyed () {\r\n this.resizeObserverModelTableWrapper.disconnect()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele {\r\n &.model__tree-table {\r\n background: transparent; \r\n display: flex;\r\n flex-direction: row;\r\n width: 100%;\r\n .model__tree-table--container {\r\n .model__tree--wrapper {\r\n width: 240px;\r\n background: #fff;\r\n flex-shrink: 0;\r\n padding: 16px;\r\n box-sizing: border-box;\r\n margin-right: 16px;\r\n overflow-y: auto;\r\n }\r\n }\r\n .model__table--container {\r\n width: 100%;\r\n min-width: 0;\r\n background: #fff;\r\n .model__table--title {\r\n .model__table-title--bar {\r\n width: 100%;\r\n height: 8px;\r\n background: var(--idooel-primary-color);\r\n border-top-left-radius: 4px;\r\n border-top-right-radius: 4px;\r\n }\r\n .model__table-title--text {\r\n text-align: left;\r\n padding: 16px;\r\n font-size: 16px;\r\n font-weight: bold;\r\n background: #fff;\r\n border-bottom: 1px solid;\r\n border-color: var(--idoole-black-016);\r\n }\r\n }\r\n .model__table--wrapper {\r\n background: #fff;\r\n .button-row__area {\r\n width: 100%;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n padding-top: 16px;\r\n padding-bottom: 8px;\r\n padding-right: 16px;\r\n }\r\n .g-table__wrapper {\r\n .fsm {\r\n cursor: pointer;\r\n color: var(--idooel-primary-color);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</style>\r\n",".ele.model__tree-table {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.ele.model__tree-table .model__tree-table--container .model__tree--wrapper {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n}\n.ele.model__tree-table .model__table--container {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--bar {\n width: 100%;\n height: 8px;\n background: var(--idooel-primary-color);\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.ele.model__tree-table .model__table--container .model__table--title .model__table-title--text {\n text-align: left;\n padding: 16px;\n font-size: 16px;\n font-weight: bold;\n background: #fff;\n border-bottom: 1px solid;\n border-color: var(--idoole-black-016);\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper {\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .button-row__area {\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding-top: 16px;\n padding-bottom: 8px;\n padding-right: 16px;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper .g-table__wrapper .fsm {\n cursor: pointer;\n color: var(--idooel-primary-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
2921
2921
 
2922
2922
  };
2923
2923
  /* scoped */
2924
- const __vue_scope_id__$x = "data-v-6465022b";
2924
+ const __vue_scope_id__$y = "data-v-6465022b";
2925
2925
  /* module identifier */
2926
- const __vue_module_identifier__$x = undefined;
2926
+ const __vue_module_identifier__$y = undefined;
2927
2927
  /* functional template */
2928
- const __vue_is_functional_template__$x = false;
2928
+ const __vue_is_functional_template__$y = false;
2929
2929
  /* style inject SSR */
2930
2930
 
2931
2931
  /* style inject shadow dom */
2932
2932
 
2933
2933
 
2934
2934
 
2935
- const __vue_component__$x = /*#__PURE__*/normalizeComponent(
2936
- { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
2937
- __vue_inject_styles__$x,
2938
- __vue_script__$x,
2939
- __vue_scope_id__$x,
2940
- __vue_is_functional_template__$x,
2941
- __vue_module_identifier__$x,
2935
+ const __vue_component__$y = /*#__PURE__*/normalizeComponent(
2936
+ { render: __vue_render__$y, staticRenderFns: __vue_staticRenderFns__$y },
2937
+ __vue_inject_styles__$y,
2938
+ __vue_script__$y,
2939
+ __vue_scope_id__$y,
2940
+ __vue_is_functional_template__$y,
2941
+ __vue_module_identifier__$y,
2942
2942
  false,
2943
2943
  createInjector,
2944
2944
  undefined,
@@ -2946,7 +2946,7 @@ __vue_render__$x._withStripped = true;
2946
2946
  );
2947
2947
 
2948
2948
  //
2949
- var script$w = {
2949
+ var script$x = {
2950
2950
  name: 'ele-form-group-model',
2951
2951
  props: {
2952
2952
  mode: {
@@ -3226,10 +3226,10 @@ var script$w = {
3226
3226
  };
3227
3227
 
3228
3228
  /* script */
3229
- const __vue_script__$w = script$w;
3229
+ const __vue_script__$x = script$x;
3230
3230
 
3231
3231
  /* template */
3232
- var __vue_render__$w = function () {
3232
+ var __vue_render__$x = function () {
3233
3233
  var _vm = this;
3234
3234
  var _h = _vm.$createElement;
3235
3235
  var _c = _vm._self._c || _h;
@@ -3331,42 +3331,42 @@ var __vue_render__$w = function () {
3331
3331
  2
3332
3332
  )
3333
3333
  };
3334
- var __vue_staticRenderFns__$w = [];
3335
- __vue_render__$w._withStripped = true;
3334
+ var __vue_staticRenderFns__$x = [];
3335
+ __vue_render__$x._withStripped = true;
3336
3336
 
3337
3337
  /* style */
3338
- const __vue_inject_styles__$w = function (inject) {
3338
+ const __vue_inject_styles__$x = function (inject) {
3339
3339
  if (!inject) return
3340
3340
  inject("data-v-b64cef74_0", { source: ".ele.form-group-model__wrapper[data-v-b64cef74] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-b64cef74] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-b64cef74]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-b64cef74] {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--content[data-v-b64cef74] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-b64cef74] {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\models\\form-group-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AA4OA;EACA,iBAAA;EACA,oBAAA;AC3OA;AD4OA;EACA,gBAAA;EACA,gBAAA;AC1OA;AD2OA;EACA,iBAAA;ACzOA;AD2OA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,wBAAA;EACA,mDAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACzOA;AD2OA;EACA,aAAA;ACzOA;AD4OA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC1OA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele form-group-model__wrapper\">\r\n <template v-for=\"(group, idx) in innerGroupMeta\">\r\n <div \r\n class=\"form-group-model__from\"\r\n v-if=\"!group.isGenTpl\"\r\n :key=\"group.key || idx\">\r\n <div class=\"form-group-model__form--title\">\r\n <div>{{ group.title }}</div>\r\n <div class=\"form-group-model__form--buttons\">\r\n <ele-button-group v-if=\"group.buttonGroupMeta\" v-on=\"assignAttrForEvents\" @delete=\"handleClickDelete($event, group, idx)\" :data-source=\"group.buttonGroupMeta.elements.call(this)\"></ele-button-group>\r\n </div>\r\n </div>\r\n <div class=\"form-group-model__form--content\">\r\n <ele-form @change=\"onChangeFormStatus($event, group.key || idx)\" :form-name=\"group.key || idx\" :ref=\"group.key || `${formRefBase}__${idx}`\" :elements=\"group.elements\"></ele-form>\r\n </div>\r\n </div>\r\n </template>\r\n <div v-if=\"showFooterMeta\" class=\"form-group-model__form--footer\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap, PAGE_STATUS } from '../../../utils'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { type, net } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-form-group-model',\r\n props: {\r\n mode: {\r\n type: String\r\n },\r\n fieldName: {\r\n type: String,\r\n default: 'formGroup'\r\n },\r\n groupMeta: {\r\n type: Function,\r\n default: () => []\r\n },\r\n footerMeta: {\r\n type: Object,\r\n default: () => {}\r\n },\r\n preRequest: {\r\n type: Object,\r\n default: () => {}\r\n },\r\n infoRequest: {\r\n type: Object,\r\n default: () => {}\r\n },\r\n submitRequest: {\r\n type: Object,\r\n default: () => {}\r\n }\r\n },\r\n data () {\r\n return {\r\n increaseCount: 1,\r\n innerGroupMeta: []\r\n }\r\n },\r\n watch: {\r\n readOnlyGroupMeta: {\r\n handler (meta) {\r\n this.innerGroupMeta = meta\r\n },\r\n immediate: true\r\n }\r\n },\r\n computed: {\r\n routeMetaMode () {\r\n return this.$route.meta.mode\r\n },\r\n readOnlyGroupMeta () {\r\n return this.groupMeta.call(this)\r\n },\r\n showFooterMeta () {\r\n return !type.isEmpty(this.footerMeta)\r\n },\r\n formRefBase () {\r\n return uuidv4()\r\n },\r\n footerElements () {\r\n const { elements } = this.footerMeta\r\n return elements.call(this)\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\r\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL],\r\n [BUILT_IN_EVENT_NAMES.INCREASE]: this[BUILT_IN_EVENT_NAMES.INCREASE]\r\n }\r\n },\r\n getFormRefs () {\r\n return this.innerGroupMeta.map((group, idx) => {\r\n if (!group.isGenTpl) {\r\n return this.$refs[group.key || `${this.formRefBase}__${idx}`]\r\n }\r\n return void 0\r\n }).filter(item => !!item).flat()\r\n },\r\n formModels () {\r\n if (this.mode === 'increase') {\r\n //TODO increase mode to return formModels\r\n return this.getFormRefs.map(form => {\r\n return form.getFieldsValue()\r\n })\r\n } else {\r\n return this.getFormRefs.map(form => {\r\n const { $vnode: { data: { ref } } } = form\r\n return {\r\n key: ref,\r\n value: form.getFieldsValue()\r\n }\r\n }).reduce((ret, props) => {\r\n ret[props.key] = props.value\r\n return ret\r\n }, {})\r\n }\r\n }\r\n },\r\n methods: {\r\n execFieldMap (fieldMap = {}, dataSource = {}) {\r\n const ret = parseFieldMap(fieldMap, { _route: this.$route.query, ...dataSource})\r\n return ret\r\n },\r\n onChangeFormStatus (props, key) {\r\n this.$emit(RESERVE_EVENT_NAMES.WATCH_FORM_STATUS, { key, ...props })\r\n },\r\n async infoRequestTrigger () {\r\n if (!this.infoRequest || this.routeMetaMode == PAGE_STATUS.CREATE) return\r\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\r\n if (!url) return\r\n net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\r\n const { data = {} } = resp\r\n if (this.mode === 'increase') {\r\n this.renderIncreaseForm(data)\r\n }\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n })\r\n },\r\n async preRequestTrigger () {\r\n if (!this.preRequest) return\r\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\r\n if (!url) return\r\n net[requestType.toLowerCase()](url, { ...params, ...fieldMap }, { ...headers }).then(resp => {\r\n const { data = {} } = resp\r\n if (this.mode === 'increase') {\r\n this.renderIncreaseForm(data)\r\n }\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n })\r\n },\r\n renderIncreaseForm (data = {}) {\r\n const formGroupValuesLength = data[this.fieldName].length\r\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\r\n const notGenTplPoolLength = this.readOnlyGroupMeta.filter(item => !item.isGenTpl).length\r\n const genNum = formGroupValuesLength - notGenTplPoolLength\r\n new Array(genNum).fill().forEach(() => {\r\n const form = this.genForm(genTplTarget)\r\n this.innerGroupMeta.push(form)\r\n })\r\n const formGroupValues = data[this.fieldName]\r\n this.$nextTick(() => {\r\n this.setFieldsValue(formGroupValues)\r\n })\r\n },\r\n async submitRequestTrigger (props = {}) {\r\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\r\n if (!url) return\r\n const ret = await net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels }), [this.fieldName]: this.formModels }, { headers }).then(resp => {\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\r\n return resp.data\r\n })\r\n return ret\r\n },\r\n setFieldsValue (data = []) {\r\n this.getFormRefs.forEach((form, idx) => {\r\n form.setFieldsValue(data[idx])\r\n form.evalDisabledExpression(data[idx])\r\n })\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\r\n const status = this.getFormRefs.map(form => {\r\n const status = form.validateFields()\r\n return status\r\n }).every(item => item)\r\n if (status) {\r\n return this.submitRequestTrigger(props)\r\n } else {\r\n return false\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\r\n },\r\n genForm (base) {\r\n const { elements, title, buttonGroupMeta } = base\r\n return {\r\n elements: JSON.parse(JSON.stringify(elements)),\r\n buttonGroupMeta,\r\n title: `${title}${this.increaseCount++}`,\r\n _gen: true\r\n }\r\n },\r\n handleClickDelete (props = {}, attr = {}, idx) {\r\n this.innerGroupMeta.splice(idx, 1)\r\n this.$emit(BUILT_IN_EVENT_NAMES.DELETE, { ...props })\r\n },\r\n [BUILT_IN_EVENT_NAMES.INCREASE] (props) {\r\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\r\n const form = this.genForm(genTplTarget)\r\n this.innerGroupMeta.push(form)\r\n }\r\n },\r\n async mounted() {\r\n await this.preRequestTrigger()\r\n await this.infoRequestTrigger()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele {\r\n &.form-group-model__wrapper {\r\n background: unset;\r\n padding-bottom: 80px;\r\n .form-group-model__from {\r\n background: #fff;\r\n margin-top: 16px;\r\n &:first-child {\r\n margin-top: unset;\r\n }\r\n .form-group-model__form--title {\r\n width: 100%;\r\n height: 56px;\r\n padding: 0 16px;\r\n border-bottom: 1px solid;\r\n border-color: var(--idooel-form-title-border-color);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n }\r\n .form-group-model__form--content {\r\n padding: 16px;\r\n }\r\n }\r\n .form-group-model__form--footer {\r\n width: 100%;\r\n height: 64px;\r\n background: #fff;\r\n position: fixed;\r\n bottom: 0;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n }\r\n}\r\n</style>",".ele.form-group-model__wrapper {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--content {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
3341
3341
 
3342
3342
  };
3343
3343
  /* scoped */
3344
- const __vue_scope_id__$w = "data-v-b64cef74";
3344
+ const __vue_scope_id__$x = "data-v-b64cef74";
3345
3345
  /* module identifier */
3346
- const __vue_module_identifier__$w = undefined;
3346
+ const __vue_module_identifier__$x = undefined;
3347
3347
  /* functional template */
3348
- const __vue_is_functional_template__$w = false;
3348
+ const __vue_is_functional_template__$x = false;
3349
3349
  /* style inject SSR */
3350
3350
 
3351
3351
  /* style inject shadow dom */
3352
3352
 
3353
3353
 
3354
3354
 
3355
- const __vue_component__$w = /*#__PURE__*/normalizeComponent(
3356
- { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
3357
- __vue_inject_styles__$w,
3358
- __vue_script__$w,
3359
- __vue_scope_id__$w,
3360
- __vue_is_functional_template__$w,
3361
- __vue_module_identifier__$w,
3362
- false,
3355
+ const __vue_component__$x = /*#__PURE__*/normalizeComponent(
3356
+ { render: __vue_render__$x, staticRenderFns: __vue_staticRenderFns__$x },
3357
+ __vue_inject_styles__$x,
3358
+ __vue_script__$x,
3359
+ __vue_scope_id__$x,
3360
+ __vue_is_functional_template__$x,
3361
+ __vue_module_identifier__$x,
3362
+ false,
3363
3363
  createInjector,
3364
3364
  undefined,
3365
3365
  undefined
3366
3366
  );
3367
3367
 
3368
3368
  //
3369
- var script$v = {
3369
+ var script$w = {
3370
3370
  name: 'ele-form-model',
3371
3371
  props: {
3372
3372
  disabled: {
@@ -3603,10 +3603,10 @@ var script$v = {
3603
3603
  };
3604
3604
 
3605
3605
  /* script */
3606
- const __vue_script__$v = script$v;
3606
+ const __vue_script__$w = script$w;
3607
3607
 
3608
3608
  /* template */
3609
- var __vue_render__$v = function () {
3609
+ var __vue_render__$w = function () {
3610
3610
  var _vm = this;
3611
3611
  var _h = _vm.$createElement;
3612
3612
  var _c = _vm._self._c || _h;
@@ -3659,34 +3659,34 @@ var __vue_render__$v = function () {
3659
3659
  : _vm._e(),
3660
3660
  ])
3661
3661
  };
3662
- var __vue_staticRenderFns__$v = [];
3663
- __vue_render__$v._withStripped = true;
3662
+ var __vue_staticRenderFns__$w = [];
3663
+ __vue_render__$w._withStripped = true;
3664
3664
 
3665
3665
  /* style */
3666
- const __vue_inject_styles__$v = function (inject) {
3666
+ const __vue_inject_styles__$w = function (inject) {
3667
3667
  if (!inject) return
3668
3668
  inject("data-v-6c9bca95_0", { source: ".form__model--wrapper[data-v-6c9bca95] {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title[data-v-6c9bca95] {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n}\n.form__model--wrapper .form-model__content[data-v-6c9bca95] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-6c9bca95] {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\models\\form-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AAuLA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,gBAAA;ACtLA;ADuLA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8DAAA;ACrLA;ADuLA;EACA,aAAA;ACrLA;ADuLA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACrLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"form__model--wrapper\">\r\n <div class=\"form-model__title\" v-if=\"title\">\r\n {{ title }}\r\n </div>\r\n <div class=\"form-model__content\">\r\n <ele-alert style=\"margin-bottom: 16px;\" v-if=\"alertMeta\" v-bind=\"alertMeta\"></ele-alert>\r\n <ele-form :ref=\"formRef\" :elements=\"elements\" :disabled=\"globalDisabled\"></ele-form>\r\n </div>\r\n <div class=\"form-model__footer\" v-if=\"footerMeta\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { BUILT_IN_EVENT_NAMES, parseFieldMap, RESERVE_EVENT_NAMES, PAGE_STATUS, CONTEXT } from '../../../utils'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { net, type } from '@idooel/shared'\r\nimport { parse } from '@idooel/expression'\r\nexport default {\r\n name: 'ele-form-model',\r\n props: {\r\n disabled: {\r\n type: [Boolean, String],\r\n default: '_routeMeta.disabled'\r\n },\r\n title: {\r\n type: String\r\n },\r\n formMeta: {\r\n type: Object\r\n },\r\n footerMeta: {\r\n type: Object\r\n }\r\n },\r\n data() {\r\n return {}\r\n },\r\n provide () {\r\n return {\r\n [CONTEXT]: () => {\r\n return {\r\n exposed: this.exposed\r\n }\r\n }\r\n }\r\n },\r\n computed: {\r\n globalDisabled () {\r\n return this.executeExpression(this.disabled)\r\n },\r\n formRef () {\r\n return uuidv4()\r\n },\r\n exposed () {\r\n return {\r\n setFieldsValue: this.setFieldsValue,\r\n validateFields: this.validateFields\r\n }\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e, formModel: this.formModels(), exposed: this.exposed })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\r\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL]\r\n }\r\n },\r\n elements () {\r\n const { elements } = this.formMeta\r\n return elements\r\n },\r\n preRequest () {\r\n const { preRequest = {} } = this.formMeta\r\n return preRequest\r\n },\r\n infoRequest () {\r\n const { infoRequest = {} } = this.formMeta\r\n return infoRequest\r\n },\r\n alertMeta () {\r\n const { alert = {} } = this.formMeta\r\n return type.isEmpty(alert) ? null : alert\r\n },\r\n submitRequest () {\r\n const { submitRequest = {} } = this.formMeta\r\n return submitRequest\r\n },\r\n footerElements () {\r\n const { elements } = this.footerMeta\r\n return elements.call(this)\r\n },\r\n expressionData () {\r\n return {\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta\r\n }\r\n },\r\n routeMetaMode () {\r\n return this.$route.meta.mode\r\n }\r\n },\r\n methods: {\r\n formModels () {\r\n return this.$refs[this.formRef] ? this.$refs[this.formRef].getFieldsValue() : {}\r\n },\r\n executeExpression (expression, dataSource = {}) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.expressionData, ...this.formModels(), ...dataSource })\r\n },\r\n execFieldMap (fieldMap = {}, dataSource = {}) {\r\n const ret = parseFieldMap(fieldMap, { ...this.expressionData, ...dataSource})\r\n return ret\r\n },\r\n async submitRequestTrigger (props = {}) {\r\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\r\n const currentUrl = this.executeExpressionForUrl(url)\r\n if (!currentUrl) return\r\n const ret = await net[requestType.toLowerCase()](currentUrl, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels() }), ...this.formModels() }, { headers }).then(resp => {\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels(), ...resp.data || {} } })\r\n return resp.data\r\n })\r\n return ret\r\n },\r\n async infoRequestTrigger () {\r\n if (PAGE_STATUS.CREATE == this.routeMetaMode) return\r\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\r\n const currentUrl = this.executeExpressionForUrl(url)\r\n if (!currentUrl) return\r\n net[requestType.toLowerCase()](currentUrl, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\r\n const { data = {} } = resp\r\n this.setFieldsValue(data)\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n })\r\n },\r\n async preRequestTrigger () {\r\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\r\n const currentUrl = this.executeExpressionForUrl(url)\r\n if (!currentUrl) return\r\n const { data } = await net[requestType.toLowerCase()](currentUrl, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers })\r\n this.setFieldsValue(data)\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n },\r\n executeExpressionForUrl (url) {\r\n return type.isApi(url) ? url : this.executeExpression(url)\r\n },\r\n setFieldsValue (props) {\r\n this.$refs[this.formRef].setFieldsValue(props)\r\n },\r\n validateFields () {\r\n return this.$refs[this.formRef].validateFields()\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\r\n if (this.globalDisabled) return\r\n const status = this.$refs[this.formRef].validateFields()\r\n if (status) {\r\n //TODO fieldMap\r\n return this.submitRequestTrigger(props)\r\n } else {\r\n return false\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\r\n }\r\n },\r\n async mounted() {\r\n await this.preRequestTrigger()\r\n await this.infoRequestTrigger()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.form__model--wrapper {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n background: #fff;\r\n .form-model__title {\r\n height: 56px;\r\n padding: 0 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n border-bottom: 1px solid var(--idooel-form-title-border-color);\r\n }\r\n .form-model__content {\r\n padding: 16px;\r\n }\r\n .form-model__footer {\r\n /* width: 100%; */\r\n height: 64px;\r\n position: fixed;\r\n bottom: 0;\r\n display: flex;\r\n float: right;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n}\r\n</style>",".form__model--wrapper {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n}\n.form__model--wrapper .form-model__content {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
3669
3669
 
3670
3670
  };
3671
3671
  /* scoped */
3672
- const __vue_scope_id__$v = "data-v-6c9bca95";
3672
+ const __vue_scope_id__$w = "data-v-6c9bca95";
3673
3673
  /* module identifier */
3674
- const __vue_module_identifier__$v = undefined;
3674
+ const __vue_module_identifier__$w = undefined;
3675
3675
  /* functional template */
3676
- const __vue_is_functional_template__$v = false;
3676
+ const __vue_is_functional_template__$w = false;
3677
3677
  /* style inject SSR */
3678
3678
 
3679
3679
  /* style inject shadow dom */
3680
3680
 
3681
3681
 
3682
3682
 
3683
- const __vue_component__$v = /*#__PURE__*/normalizeComponent(
3684
- { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
3685
- __vue_inject_styles__$v,
3686
- __vue_script__$v,
3687
- __vue_scope_id__$v,
3688
- __vue_is_functional_template__$v,
3689
- __vue_module_identifier__$v,
3683
+ const __vue_component__$w = /*#__PURE__*/normalizeComponent(
3684
+ { render: __vue_render__$w, staticRenderFns: __vue_staticRenderFns__$w },
3685
+ __vue_inject_styles__$w,
3686
+ __vue_script__$w,
3687
+ __vue_scope_id__$w,
3688
+ __vue_is_functional_template__$w,
3689
+ __vue_module_identifier__$w,
3690
3690
  false,
3691
3691
  createInjector,
3692
3692
  undefined,
@@ -3694,7 +3694,7 @@ __vue_render__$v._withStripped = true;
3694
3694
  );
3695
3695
 
3696
3696
  //
3697
- var script$u = {
3697
+ var script$v = {
3698
3698
  name: 'ele-step-model',
3699
3699
  props: {
3700
3700
  stepMeta: {
@@ -3885,10 +3885,10 @@ var script$u = {
3885
3885
  };
3886
3886
 
3887
3887
  /* script */
3888
- const __vue_script__$u = script$u;
3888
+ const __vue_script__$v = script$v;
3889
3889
 
3890
3890
  /* template */
3891
- var __vue_render__$u = function () {
3891
+ var __vue_render__$v = function () {
3892
3892
  var _vm = this;
3893
3893
  var _h = _vm.$createElement;
3894
3894
  var _c = _vm._self._c || _h;
@@ -3954,34 +3954,34 @@ var __vue_render__$u = function () {
3954
3954
  ),
3955
3955
  ])
3956
3956
  };
3957
- var __vue_staticRenderFns__$u = [];
3958
- __vue_render__$u._withStripped = true;
3957
+ var __vue_staticRenderFns__$v = [];
3958
+ __vue_render__$v._withStripped = true;
3959
3959
 
3960
3960
  /* style */
3961
- const __vue_inject_styles__$u = function (inject) {
3961
+ const __vue_inject_styles__$v = function (inject) {
3962
3962
  if (!inject) return
3963
3963
  inject("data-v-6312b5ba_0", { source: ".ele-step-model__wrapper[data-v-6312b5ba] {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper[data-v-6312b5ba] {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper .ele-steps .ant-steps-item[data-v-6312b5ba] {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper[data-v-6312b5ba] {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n}\n.ele-step-model__wrapper .ele-step-model__footer--wrapper[data-v-6312b5ba] {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\models\\step-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AAwLA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;ACvLA;ADwLA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,gBAAA;ACtLA;ADwLA;EACA,gBAAA;ACtLA;AD0LA;EACA,WAAA;EACA,WAAA;EACA,gBAAA;EACA,mBAAA;EACA,+CAAA;EACA,cAAA;ACxLA;AD0LA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACxLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-step-model__wrapper\">\r\n <div class=\"ele-step-model__step--wrapper\">\r\n <a-steps class=\"ele-steps\" :current=\"current\" size=\"small\">\r\n <a-step v-for=\"step in elements\" :title=\"step.title\" :key=\"step.key\" />\r\n </a-steps>\r\n </div>\r\n <div class=\"ele-step-model__content--wrapper\">\r\n <template v-for=\"name in scopedSlotsNames\">\r\n <div :key=\"name\" v-if=\"currentSlotName == name\" :class=\"['ele-step-model__slot', `ele-step-model__slot--${name}`]\">\r\n <slot :name=\"name\"></slot>\r\n </div>\r\n </template>\r\n </div>\r\n <div class=\"ele-step-model__footer--wrapper\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { BUILT_IN_EVENT_NAMES, CONTEXT } from '../../../utils'\r\nimport { parse } from '@idooel/expression'\r\nimport { type } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-step-model',\r\n props: {\r\n stepMeta: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n footerMeta: {\r\n type: Object,\r\n default: () => ({})\r\n }\r\n },\r\n data() {\r\n return {\r\n current: 0,\r\n currentSlotComponentRef: null,\r\n innerFooterElements: []\r\n }\r\n },\r\n provide() {\r\n return {\r\n [CONTEXT]: () => {\r\n return {\r\n ...this.expressionData\r\n }\r\n }\r\n }\r\n },\r\n computed: {\r\n routeMetaDisabled () {\r\n return this.executeExpression(this.$route.meta.disabled)\r\n },\r\n expressionData () {\r\n return {\r\n current: this.current,\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta\r\n }\r\n },\r\n currentSlotName () {\r\n return this.scopedSlotsNames[this.current]\r\n },\r\n footerElements () {\r\n return this.innerFooterElements\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.evalShowExpressionForFooterElements()\r\n this.$emit(ele.eventName || 'click', { ...e, exposed: this.exposedMethods })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.NEXT]: this[BUILT_IN_EVENT_NAMES.NEXT],\r\n [BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS],\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT]\r\n }\r\n },\r\n activeIndex () {\r\n const { activeIndex } = this.stepMeta\r\n return activeIndex\r\n },\r\n elements () {\r\n const { elements } = this.stepMeta\r\n return elements\r\n },\r\n scopedSlotsNames () {\r\n const slotNames = this.elements.map(item => item.key)\r\n return slotNames\r\n },\r\n exposedMethods () {\r\n return {\r\n slotRef: this.currentSlotComponentRef,\r\n setCurrentStep: this.setCurrentStep,\r\n next: this.nextStep,\r\n prev: this.prevStep,\r\n current: this.current\r\n }\r\n }\r\n },\r\n watch: {\r\n activeIndex: {\r\n handler (idx) {\r\n this.current = idx\r\n },\r\n immediate: true\r\n },\r\n current: {\r\n handler () {\r\n this.$nextTick(() => {\r\n this.currentSlotComponentRef = this.getCurrentSlotComponentRef()\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n created () {\r\n const { elements } = this.footerMeta\r\n this.innerFooterElements = elements.call(this)\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n methods: {\r\n executeExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.expressionData })\r\n },\r\n evalShowExpressionForFooterElements () {\r\n this.innerFooterElements = this.innerFooterElements.map(element => {\r\n const { show = true, key, eventName } = element\r\n if(key == BUILT_IN_EVENT_NAMES.SUBMIT || eventName == BUILT_IN_EVENT_NAMES.SUBMIT) {\r\n // built in submit button should according to the route meta disabled\r\n this.$set(element, '_show', this.executeExpression(show, this.expressionData) && !this.routeMetaDisabled)\r\n return element\r\n }\r\n show && this.$set(element, '_show', this.executeExpression(show, this.expressionData))\r\n return element\r\n })\r\n },\r\n getCurrentSlotComponentRef () {\r\n const includeMetaCmp = this.$children.find(child => child.meta)\r\n if (!includeMetaCmp) return null\r\n const { $children: components } = includeMetaCmp\r\n const target = components.find(cmp => cmp.$options._componentTag === 'ele-tpl')\r\n return target.getModel ? target.getModel() : null\r\n },\r\n setCurrentStep (index) {\r\n this.current = index\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n nextStep () {\r\n if (this.current >= this.elements.length - 1) return\r\n this.current ++\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n prevStep () {\r\n if (this.current <= 0) return\r\n this.current --\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n [BUILT_IN_EVENT_NAMES.NEXT] (props) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.NEXT, { ...props, exposed: { ...this.exposedMethods } })\r\n },\r\n [BUILT_IN_EVENT_NAMES.PREVIOUS] (props) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.PREVIOUS, { ...props, exposed: { ...this.exposedMethods } })\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props) {\r\n const currentComponent = this.getCurrentSlotComponentRef() || {}\r\n const hasSubmitMethod = currentComponent.hasOwnProperty(BUILT_IN_EVENT_NAMES.SUBMIT)\r\n hasSubmitMethod && currentComponent[BUILT_IN_EVENT_NAMES.SUBMIT]()\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, exposed: { ...this.exposedMethods } })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-step-model__wrapper {\r\n width: 100%;\r\n height: 100vh;\r\n position: relative;\r\n .ele-step-model__step--wrapper {\r\n width: 100%;\r\n height: 64px;\r\n padding: 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n background: #fff;\r\n .ele-steps {\r\n .ant-steps-item {\r\n text-align: left;\r\n }\r\n }\r\n }\r\n .ele-step-model__content--wrapper {\r\n width: 100%;\r\n width: 100%;\r\n margin-top: 16px;\r\n margin-bottom: 16px;\r\n height: calc(100vh - 64px - 64px - 16px - 16px);\r\n overflow: auto;\r\n }\r\n .ele-step-model__footer--wrapper {\r\n width: 100%;\r\n height: 64px;\r\n background: #fff;\r\n position: absolute;\r\n bottom: 0;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n}\r\n</style>import meta from '@/views/tree-table-page/meta'import meta from '@/views/tree-table-page/meta'\r\n\r\n",".ele-step-model__wrapper {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper .ele-steps .ant-steps-item {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n}\n.ele-step-model__wrapper .ele-step-model__footer--wrapper {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
3964
3964
 
3965
3965
  };
3966
3966
  /* scoped */
3967
- const __vue_scope_id__$u = "data-v-6312b5ba";
3967
+ const __vue_scope_id__$v = "data-v-6312b5ba";
3968
3968
  /* module identifier */
3969
- const __vue_module_identifier__$u = undefined;
3969
+ const __vue_module_identifier__$v = undefined;
3970
3970
  /* functional template */
3971
- const __vue_is_functional_template__$u = false;
3971
+ const __vue_is_functional_template__$v = false;
3972
3972
  /* style inject SSR */
3973
3973
 
3974
3974
  /* style inject shadow dom */
3975
3975
 
3976
3976
 
3977
3977
 
3978
- const __vue_component__$u = /*#__PURE__*/normalizeComponent(
3979
- { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
3980
- __vue_inject_styles__$u,
3981
- __vue_script__$u,
3982
- __vue_scope_id__$u,
3983
- __vue_is_functional_template__$u,
3984
- __vue_module_identifier__$u,
3978
+ const __vue_component__$v = /*#__PURE__*/normalizeComponent(
3979
+ { render: __vue_render__$v, staticRenderFns: __vue_staticRenderFns__$v },
3980
+ __vue_inject_styles__$v,
3981
+ __vue_script__$v,
3982
+ __vue_scope_id__$v,
3983
+ __vue_is_functional_template__$v,
3984
+ __vue_module_identifier__$v,
3985
3985
  false,
3986
3986
  createInjector,
3987
3987
  undefined,
@@ -3989,7 +3989,7 @@ __vue_render__$u._withStripped = true;
3989
3989
  );
3990
3990
 
3991
3991
  //
3992
- var script$t = {
3992
+ var script$u = {
3993
3993
  name: 'ele-tpl',
3994
3994
  props: {
3995
3995
  modelName: {
@@ -3997,10 +3997,10 @@ var script$t = {
3997
3997
  }
3998
3998
  },
3999
3999
  components: {
4000
+ [__vue_component__$y.name]: __vue_component__$y,
4000
4001
  [__vue_component__$x.name]: __vue_component__$x,
4001
- [__vue_component__$w.name]: __vue_component__$w,
4002
- [__vue_component__$u.name]: __vue_component__$u,
4003
- [__vue_component__$v.name]: __vue_component__$v
4002
+ [__vue_component__$v.name]: __vue_component__$v,
4003
+ [__vue_component__$w.name]: __vue_component__$w
4004
4004
  },
4005
4005
  computed: {
4006
4006
  modelNameValidator() {
@@ -4022,10 +4022,10 @@ var script$t = {
4022
4022
  };
4023
4023
 
4024
4024
  /* script */
4025
- const __vue_script__$t = script$t;
4025
+ const __vue_script__$u = script$u;
4026
4026
 
4027
4027
  /* template */
4028
- var __vue_render__$t = function () {
4028
+ var __vue_render__$u = function () {
4029
4029
  var _vm = this;
4030
4030
  var _h = _vm.$createElement;
4031
4031
  var _c = _vm._self._c || _h;
@@ -4063,44 +4063,44 @@ var __vue_render__$t = function () {
4063
4063
  domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
4064
4064
  })
4065
4065
  };
4066
- var __vue_staticRenderFns__$t = [];
4067
- __vue_render__$t._withStripped = true;
4066
+ var __vue_staticRenderFns__$u = [];
4067
+ __vue_render__$u._withStripped = true;
4068
4068
 
4069
4069
  /* style */
4070
- const __vue_inject_styles__$t = function (inject) {
4070
+ const __vue_inject_styles__$u = function (inject) {
4071
4071
  if (!inject) return
4072
4072
  inject("data-v-7b0fd229_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
4073
4073
 
4074
4074
  };
4075
4075
  /* scoped */
4076
- const __vue_scope_id__$t = undefined;
4076
+ const __vue_scope_id__$u = undefined;
4077
4077
  /* module identifier */
4078
- const __vue_module_identifier__$t = undefined;
4078
+ const __vue_module_identifier__$u = undefined;
4079
4079
  /* functional template */
4080
- const __vue_is_functional_template__$t = false;
4080
+ const __vue_is_functional_template__$u = false;
4081
4081
  /* style inject SSR */
4082
4082
 
4083
4083
  /* style inject shadow dom */
4084
4084
 
4085
4085
 
4086
4086
 
4087
- const __vue_component__$t = /*#__PURE__*/normalizeComponent(
4088
- { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
4089
- __vue_inject_styles__$t,
4090
- __vue_script__$t,
4091
- __vue_scope_id__$t,
4092
- __vue_is_functional_template__$t,
4093
- __vue_module_identifier__$t,
4087
+ const __vue_component__$u = /*#__PURE__*/normalizeComponent(
4088
+ { render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
4089
+ __vue_inject_styles__$u,
4090
+ __vue_script__$u,
4091
+ __vue_scope_id__$u,
4092
+ __vue_is_functional_template__$u,
4093
+ __vue_module_identifier__$u,
4094
4094
  false,
4095
4095
  createInjector,
4096
4096
  undefined,
4097
4097
  undefined
4098
4098
  );
4099
4099
 
4100
- __vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
4100
+ __vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
4101
4101
 
4102
4102
  //
4103
- var script$s = {
4103
+ var script$t = {
4104
4104
  name: 'ele-form',
4105
4105
  props: {
4106
4106
  disabled: {
@@ -4237,10 +4237,10 @@ var script$s = {
4237
4237
  };
4238
4238
 
4239
4239
  /* script */
4240
- const __vue_script__$s = script$s;
4240
+ const __vue_script__$t = script$t;
4241
4241
 
4242
4242
  /* template */
4243
- var __vue_render__$s = function () {
4243
+ var __vue_render__$t = function () {
4244
4244
  var _vm = this;
4245
4245
  var _h = _vm.$createElement;
4246
4246
  var _c = _vm._self._c || _h;
@@ -4658,6 +4658,49 @@ var __vue_render__$s = function () {
4658
4658
  1
4659
4659
  ),
4660
4660
  ]
4661
+ : ele.type == "ele-form-img-crop"
4662
+ ? [
4663
+ _c(
4664
+ "a-form-item",
4665
+ { attrs: { label: ele.label + ":" } },
4666
+ [
4667
+ _c("ele-form-img-crop", {
4668
+ directives: [
4669
+ {
4670
+ name: "decorator",
4671
+ rawName: "v-decorator",
4672
+ value: [
4673
+ ele.name,
4674
+ {
4675
+ rules: _vm.rebuildRules(
4676
+ ele.rules
4677
+ ),
4678
+ },
4679
+ ],
4680
+ expression:
4681
+ "[ele.name, { rules: rebuildRules(ele.rules) }]",
4682
+ },
4683
+ ],
4684
+ staticStyle: { width: "100%" },
4685
+ attrs: {
4686
+ width: ele.width,
4687
+ height: ele.height,
4688
+ "modal-title": ele.modalTitle,
4689
+ "oper-text": ele.operText,
4690
+ disabled: _vm.executeExpression(
4691
+ ele._disabled
4692
+ ),
4693
+ },
4694
+ on: {
4695
+ change: function ($event) {
4696
+ return _vm.onChange($event, ele)
4697
+ },
4698
+ },
4699
+ }),
4700
+ ],
4701
+ 1
4702
+ ),
4703
+ ]
4661
4704
  : _vm._e(),
4662
4705
  ],
4663
4706
  2
@@ -4675,41 +4718,41 @@ var __vue_render__$s = function () {
4675
4718
  1
4676
4719
  )
4677
4720
  };
4678
- var __vue_staticRenderFns__$s = [];
4679
- __vue_render__$s._withStripped = true;
4721
+ var __vue_staticRenderFns__$t = [];
4722
+ __vue_render__$t._withStripped = true;
4680
4723
 
4681
4724
  /* style */
4682
- const __vue_inject_styles__$s = function (inject) {
4725
+ const __vue_inject_styles__$t = function (inject) {
4683
4726
  if (!inject) return
4684
- inject("data-v-28ac236a_0", { source: ".ele__form--wrapper[data-v-28ac236a] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\form\\src\\index.vue","index.vue"],"names":[],"mappings":"AAyPA;EACA,gBAAA;ACxPA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele__form--wrapper\">\r\n <a-form :form=\"form\" layout=\"vertical\" class=\"ant-advanced-search-form\">\r\n <a-row :gutter=\"24\">\r\n <template v-for=\"ele in elements\">\r\n <a-col v-if=\"executeExpression(ele._show)\" :span=\"ele.span\" :key=\"ele.name\">\r\n <template v-if=\"ele.type == 'Input'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-input \r\n @change=\"onChange($event, ele)\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n :max-length=\"ele.maxLength\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-input>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Textarea'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-textarea \r\n @change=\"onChange($event, ele)\"\r\n :max-length=\"ele.maxLength\"\r\n :autosize=\"ele.autosize\"\r\n :disabled=\"executeExpression(ele._disabled)\"\r\n :allow-clear=\"ele.allowClear\"\r\n :placeholder=\"ele.placeholder\"\r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\"\r\n style=\"width:100%;\">\r\n </ele-textarea>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Select'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-select \r\n :data-source=\"ele.optionList\" \r\n :disabled=\"executeExpression(ele._disabled)\"\r\n :multiple=\"ele.multiple\"\r\n :mode=\"ele.mode\"\r\n :code=\"ele.code\"\r\n :url=\"ele.url\"\r\n :params=\"ele.params\" \r\n @change=\"onChange($event, ele)\"\r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-select>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-upload'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-upload v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n :ext=\"ele.ext\"\r\n :multiple=\"ele.multiple\"\r\n :accept=\"ele.accept\"\r\n :extensions=\"ele.extensions\"\r\n :size=\"ele.size\"\r\n :icon=\"ele.icon\"\r\n :url=\"ele.url\"\r\n :message=\"ele.message\" \r\n style=\"width:100%;\">\r\n </ele-upload>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-date-range'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-date-range \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-date-range>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-date'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-date\r\n :format=\"ele.format\"\r\n :mode=\"ele.mode\"\r\n :show-time=\"ele.showTime\"\r\n :show-today=\"ele.showToday\"\r\n :value-format=\"ele.valueFormat\"\r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-date>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'SelectEntity'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-select-entity \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-select-entity>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'InputNumber'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-input-number \r\n @change=\"onChange($event, ele)\" \r\n :precision=\"ele.precision\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n v-bind=\"ele.props\" \r\n style=\"width:100%;\">\r\n </ele-input-number>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Checkbox'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-checkbox \r\n :data-source=\"ele.optionList\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-checkbox>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Radio'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-radio \r\n @change=\"onChange($event, ele)\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n :data-source=\"ele.optionList\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-radio>\r\n </a-form-item>\r\n </template>\r\n </a-col>\r\n </template>\r\n </a-row>\r\n </a-form>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { parse } from '@idooel/expression'\r\nimport { type } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-form',\r\n props: {\r\n disabled: {\r\n type: [Boolean, String],\r\n default: '_routeMeta.disabled'\r\n },\r\n formName: {\r\n type: [Number, String],\r\n default: 'coordinated'\r\n },\r\n elements: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n globalDisabled () {\r\n return this.executeExpression(this.disabled)\r\n },\r\n form () {\r\n return this.$form.createForm(this, { name: this.formName })\r\n },\r\n exposedMethods () {\r\n return {\r\n setFieldsValue: this.setFieldsValue,\r\n getFieldsValue: this.getFieldsValue\r\n }\r\n }\r\n },\r\n methods: {\r\n rebuildRules (rules = []) {\r\n //TODO\r\n rules.map(rule => {\r\n const { validator } = rule\r\n if (validator) {\r\n validator.formModel = this.getFieldsValue()\r\n validator.exposed = this.exposedMethods\r\n }\r\n })\r\n return rules\r\n },\r\n dispatchExpression () {\r\n this.evalDisabledExpression()\r\n this.evalShowExpression()\r\n },\r\n evalDisabledExpression () {\r\n this.elements.forEach(ele => {\r\n if (this.globalDisabled) return this.$set(ele, '_disabled', true)\r\n const { disabled } = ele\r\n const ret = this.executeExpression(disabled)\r\n this.$set(ele, '_disabled', ret)\r\n })\r\n },\r\n evalShowExpression () {\r\n this.elements.forEach(ele => {\r\n const { show = true } = ele\r\n const ret = this.executeExpression(show)\r\n this.$set(ele, '_show', ret)\r\n })\r\n },\r\n executeExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.getFieldsValue(), _route: this.$route.query, _routeMeta: this.$route.meta })\r\n },\r\n onChange (value, props) {\r\n const { name } = props\r\n this.setFieldsValue({ [name]: value })\r\n this.dispatchExpression()\r\n this.$emit('change', { value, props, exposed: { ...this.exposedMethods } })\r\n },\r\n collectDefaultValues () {\r\n const ret = this.elements.reduce((ret, props) => {\r\n const { name, defaultValue } = props\r\n if (defaultValue) {\r\n ret[name] = defaultValue\r\n }\r\n return ret\r\n }, {})\r\n return ret\r\n },\r\n setDefaultValues () {\r\n const defaultValues = this.collectDefaultValues()\r\n this.setFieldsValue(defaultValues)\r\n },\r\n validateFields () {\r\n let ret = false\r\n this.form.validateFields((error, values) => {\r\n ret = !error\r\n })\r\n return ret\r\n },\r\n setFieldsValue (props = {}) {\r\n this.form.setFieldsValue(props)\r\n },\r\n getFieldsValue () {\r\n return this.form.getFieldsValue()\r\n }\r\n },\r\n mounted() {\r\n this.dispatchExpression()\r\n this.$nextTick(() => {\r\n this.setDefaultValues()\r\n })\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele__form--wrapper {\r\n background: #fff;\r\n .ant-form-item {\r\n }\r\n}\r\n</style>",".ele__form--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
4727
+ inject("data-v-05a7db76_0", { source: ".ele__form--wrapper[data-v-05a7db76] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\form\\src\\index.vue","index.vue"],"names":[],"mappings":"AAuQA;EACA,gBAAA;ACtQA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele__form--wrapper\">\r\n <a-form :form=\"form\" layout=\"vertical\" class=\"ant-advanced-search-form\">\r\n <a-row :gutter=\"24\">\r\n <template v-for=\"ele in elements\">\r\n <a-col v-if=\"executeExpression(ele._show)\" :span=\"ele.span\" :key=\"ele.name\">\r\n <template v-if=\"ele.type == 'Input'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-input \r\n @change=\"onChange($event, ele)\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n :max-length=\"ele.maxLength\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-input>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Textarea'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-textarea \r\n @change=\"onChange($event, ele)\"\r\n :max-length=\"ele.maxLength\"\r\n :autosize=\"ele.autosize\"\r\n :disabled=\"executeExpression(ele._disabled)\"\r\n :allow-clear=\"ele.allowClear\"\r\n :placeholder=\"ele.placeholder\"\r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\"\r\n style=\"width:100%;\">\r\n </ele-textarea>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Select'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-select \r\n :data-source=\"ele.optionList\" \r\n :disabled=\"executeExpression(ele._disabled)\"\r\n :multiple=\"ele.multiple\"\r\n :mode=\"ele.mode\"\r\n :code=\"ele.code\"\r\n :url=\"ele.url\"\r\n :params=\"ele.params\" \r\n @change=\"onChange($event, ele)\"\r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-select>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-upload'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-upload v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n :ext=\"ele.ext\"\r\n :multiple=\"ele.multiple\"\r\n :accept=\"ele.accept\"\r\n :extensions=\"ele.extensions\"\r\n :size=\"ele.size\"\r\n :icon=\"ele.icon\"\r\n :url=\"ele.url\"\r\n :message=\"ele.message\" \r\n style=\"width:100%;\">\r\n </ele-upload>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-date-range'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-date-range \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-date-range>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-date'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-date\r\n :format=\"ele.format\"\r\n :mode=\"ele.mode\"\r\n :show-time=\"ele.showTime\"\r\n :show-today=\"ele.showToday\"\r\n :value-format=\"ele.valueFormat\"\r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-date>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'SelectEntity'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-select-entity \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-select-entity>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'InputNumber'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-input-number \r\n @change=\"onChange($event, ele)\" \r\n :precision=\"ele.precision\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n v-bind=\"ele.props\" \r\n style=\"width:100%;\">\r\n </ele-input-number>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Checkbox'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-checkbox \r\n :data-source=\"ele.optionList\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-checkbox>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Radio'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-radio \r\n @change=\"onChange($event, ele)\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n :data-source=\"ele.optionList\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-radio>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-form-img-crop'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-form-img-crop\r\n @change=\"onChange($event, ele)\"\r\n :width=\"ele.width\"\r\n :height=\"ele.height\"\r\n :modal-title=\"ele.modalTitle\"\r\n :oper-text=\"ele.operText\"\r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: rebuildRules(ele.rules) }]\" \r\n style=\"width:100%;\">\r\n </ele-form-img-crop>\r\n </a-form-item>\r\n </template>\r\n </a-col>\r\n </template>\r\n </a-row>\r\n </a-form>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { parse } from '@idooel/expression'\r\nimport { type } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-form',\r\n props: {\r\n disabled: {\r\n type: [Boolean, String],\r\n default: '_routeMeta.disabled'\r\n },\r\n formName: {\r\n type: [Number, String],\r\n default: 'coordinated'\r\n },\r\n elements: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n globalDisabled () {\r\n return this.executeExpression(this.disabled)\r\n },\r\n form () {\r\n return this.$form.createForm(this, { name: this.formName })\r\n },\r\n exposedMethods () {\r\n return {\r\n setFieldsValue: this.setFieldsValue,\r\n getFieldsValue: this.getFieldsValue\r\n }\r\n }\r\n },\r\n methods: {\r\n rebuildRules (rules = []) {\r\n //TODO\r\n rules.map(rule => {\r\n const { validator } = rule\r\n if (validator) {\r\n validator.formModel = this.getFieldsValue()\r\n validator.exposed = this.exposedMethods\r\n }\r\n })\r\n return rules\r\n },\r\n dispatchExpression () {\r\n this.evalDisabledExpression()\r\n this.evalShowExpression()\r\n },\r\n evalDisabledExpression () {\r\n this.elements.forEach(ele => {\r\n if (this.globalDisabled) return this.$set(ele, '_disabled', true)\r\n const { disabled } = ele\r\n const ret = this.executeExpression(disabled)\r\n this.$set(ele, '_disabled', ret)\r\n })\r\n },\r\n evalShowExpression () {\r\n this.elements.forEach(ele => {\r\n const { show = true } = ele\r\n const ret = this.executeExpression(show)\r\n this.$set(ele, '_show', ret)\r\n })\r\n },\r\n executeExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.getFieldsValue(), _route: this.$route.query, _routeMeta: this.$route.meta })\r\n },\r\n onChange (value, props) {\r\n const { name } = props\r\n this.setFieldsValue({ [name]: value })\r\n this.dispatchExpression()\r\n this.$emit('change', { value, props, exposed: { ...this.exposedMethods } })\r\n },\r\n collectDefaultValues () {\r\n const ret = this.elements.reduce((ret, props) => {\r\n const { name, defaultValue } = props\r\n if (defaultValue) {\r\n ret[name] = defaultValue\r\n }\r\n return ret\r\n }, {})\r\n return ret\r\n },\r\n setDefaultValues () {\r\n const defaultValues = this.collectDefaultValues()\r\n this.setFieldsValue(defaultValues)\r\n },\r\n validateFields () {\r\n let ret = false\r\n this.form.validateFields((error, values) => {\r\n ret = !error\r\n })\r\n return ret\r\n },\r\n setFieldsValue (props = {}) {\r\n this.form.setFieldsValue(props)\r\n },\r\n getFieldsValue () {\r\n return this.form.getFieldsValue()\r\n }\r\n },\r\n mounted() {\r\n this.dispatchExpression()\r\n this.$nextTick(() => {\r\n this.setDefaultValues()\r\n })\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele__form--wrapper {\r\n background: #fff;\r\n .ant-form-item {\r\n }\r\n}\r\n</style>",".ele__form--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
4685
4728
 
4686
4729
  };
4687
4730
  /* scoped */
4688
- const __vue_scope_id__$s = "data-v-28ac236a";
4731
+ const __vue_scope_id__$t = "data-v-05a7db76";
4689
4732
  /* module identifier */
4690
- const __vue_module_identifier__$s = undefined;
4733
+ const __vue_module_identifier__$t = undefined;
4691
4734
  /* functional template */
4692
- const __vue_is_functional_template__$s = false;
4735
+ const __vue_is_functional_template__$t = false;
4693
4736
  /* style inject SSR */
4694
4737
 
4695
4738
  /* style inject shadow dom */
4696
4739
 
4697
4740
 
4698
4741
 
4699
- const __vue_component__$s = /*#__PURE__*/normalizeComponent(
4700
- { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
4701
- __vue_inject_styles__$s,
4702
- __vue_script__$s,
4703
- __vue_scope_id__$s,
4704
- __vue_is_functional_template__$s,
4705
- __vue_module_identifier__$s,
4742
+ const __vue_component__$t = /*#__PURE__*/normalizeComponent(
4743
+ { render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
4744
+ __vue_inject_styles__$t,
4745
+ __vue_script__$t,
4746
+ __vue_scope_id__$t,
4747
+ __vue_is_functional_template__$t,
4748
+ __vue_module_identifier__$t,
4706
4749
  false,
4707
4750
  createInjector,
4708
4751
  undefined,
4709
4752
  undefined
4710
4753
  );
4711
4754
 
4712
- __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
4755
+ __vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
4713
4756
 
4714
4757
  //
4715
4758
  //
@@ -4723,7 +4766,7 @@ __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __v
4723
4766
  //
4724
4767
  //
4725
4768
 
4726
- var script$r = {
4769
+ var script$s = {
4727
4770
  name: 'ele-alert',
4728
4771
  props: {
4729
4772
  type: {
@@ -4752,10 +4795,10 @@ var script$r = {
4752
4795
  };
4753
4796
 
4754
4797
  /* script */
4755
- const __vue_script__$r = script$r;
4798
+ const __vue_script__$s = script$s;
4756
4799
 
4757
4800
  /* template */
4758
- var __vue_render__$r = function () {
4801
+ var __vue_render__$s = function () {
4759
4802
  var _vm = this;
4760
4803
  var _h = _vm.$createElement;
4761
4804
  var _c = _vm._self._c || _h;
@@ -4771,44 +4814,44 @@ var __vue_render__$r = function () {
4771
4814
  },
4772
4815
  })
4773
4816
  };
4774
- var __vue_staticRenderFns__$r = [];
4775
- __vue_render__$r._withStripped = true;
4817
+ var __vue_staticRenderFns__$s = [];
4818
+ __vue_render__$s._withStripped = true;
4776
4819
 
4777
4820
  /* style */
4778
- const __vue_inject_styles__$r = function (inject) {
4821
+ const __vue_inject_styles__$s = function (inject) {
4779
4822
  if (!inject) return
4780
4823
  inject("data-v-00c1ba58_0", { source: ".ele-alert[data-v-00c1ba58] {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\alert\\src\\index.vue","index.vue"],"names":[],"mappings":"AA0CA;EACA,2BAAA;ACzCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <a-alert\r\n class=\"ele-alert\"\r\n :message=\"message\" \r\n :description=\"description\" \r\n :type=\"type\"\r\n :closable=\"closable\"\r\n :closeText=\"closeText\"\r\n :show-icon=\"showIcon\" />\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-alert',\r\n props: {\r\n type: {\r\n type: String,\r\n default: 'success'\r\n },\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n message: {\r\n type: String,\r\n default: 'Success Tips'\r\n },\r\n description: {\r\n type: String\r\n },\r\n closable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n closeText: {\r\n type: String\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-alert {\r\n text-align: left !important;\r\n}\r\n</style>",".ele-alert {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
4781
4824
 
4782
4825
  };
4783
4826
  /* scoped */
4784
- const __vue_scope_id__$r = "data-v-00c1ba58";
4827
+ const __vue_scope_id__$s = "data-v-00c1ba58";
4785
4828
  /* module identifier */
4786
- const __vue_module_identifier__$r = undefined;
4829
+ const __vue_module_identifier__$s = undefined;
4787
4830
  /* functional template */
4788
- const __vue_is_functional_template__$r = false;
4831
+ const __vue_is_functional_template__$s = false;
4789
4832
  /* style inject SSR */
4790
4833
 
4791
4834
  /* style inject shadow dom */
4792
4835
 
4793
4836
 
4794
4837
 
4795
- const __vue_component__$r = /*#__PURE__*/normalizeComponent(
4796
- { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
4797
- __vue_inject_styles__$r,
4798
- __vue_script__$r,
4799
- __vue_scope_id__$r,
4800
- __vue_is_functional_template__$r,
4801
- __vue_module_identifier__$r,
4838
+ const __vue_component__$s = /*#__PURE__*/normalizeComponent(
4839
+ { render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
4840
+ __vue_inject_styles__$s,
4841
+ __vue_script__$s,
4842
+ __vue_scope_id__$s,
4843
+ __vue_is_functional_template__$s,
4844
+ __vue_module_identifier__$s,
4802
4845
  false,
4803
4846
  createInjector,
4804
4847
  undefined,
4805
4848
  undefined
4806
4849
  );
4807
4850
 
4808
- __vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
4851
+ __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
4809
4852
 
4810
4853
  //
4811
- var script$q = {
4854
+ var script$r = {
4812
4855
  name: 'ele-upload',
4813
4856
  components: {
4814
4857
  FileUpload
@@ -5149,10 +5192,10 @@ var script$q = {
5149
5192
  };
5150
5193
 
5151
5194
  /* script */
5152
- const __vue_script__$q = script$q;
5195
+ const __vue_script__$r = script$r;
5153
5196
 
5154
5197
  /* template */
5155
- var __vue_render__$q = function () {
5198
+ var __vue_render__$r = function () {
5156
5199
  var _vm = this;
5157
5200
  var _h = _vm.$createElement;
5158
5201
  var _c = _vm._self._c || _h;
@@ -5314,41 +5357,41 @@ var __vue_render__$q = function () {
5314
5357
  1
5315
5358
  )
5316
5359
  };
5317
- var __vue_staticRenderFns__$q = [];
5318
- __vue_render__$q._withStripped = true;
5360
+ var __vue_staticRenderFns__$r = [];
5361
+ __vue_render__$r._withStripped = true;
5319
5362
 
5320
5363
  /* style */
5321
- const __vue_inject_styles__$q = function (inject) {
5364
+ const __vue_inject_styles__$r = function (inject) {
5322
5365
  if (!inject) return
5323
5366
  inject("data-v-abce2c3c_0", { source: "[data-v-abce2c3c] .ele-upload__inner {\n opacity: 1 !important;\n cursor: pointer;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color) !important;\n border-radius: var(--idooel-form-border-radius);\n}\n[data-v-abce2c3c] .ele-upload__inner:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n.ele-upload__wrapper[data-v-abce2c3c] {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area[data-v-abce2c3c] {\n padding: 16px;\n width: 100%;\n height: 80px;\n display: flex;\n flex-direction: row;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon[data-v-abce2c3c] {\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 16x;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload[data-v-abce2c3c] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon[data-v-abce2c3c] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text[data-v-abce2c3c] {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message[data-v-abce2c3c] {\n font-size: 16px;\n color: var(--idoole-black-088);\n text-align: left;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__ext[data-v-abce2c3c] {\n text-align: left;\n font-size: 14px;\n color: var(--idoole-black-06);\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item[data-v-abce2c3c] {\n width: 100%;\n margin-top: 8px;\n padding: 8px 12px;\n border-radius: var(--idooel-form-border-radius);\n background: var(--idooel-form-upload-bg-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name[data-v-abce2c3c] {\n flex: 1;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n font-size: 14px;\n margin-left: 8px;\n cursor: pointer;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name .ele-file__inner[data-v-abce2c3c] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete[data-v-abce2c3c] {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon[data-v-abce2c3c] {\n margin-left: 8px;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\upload\\src\\index.vue","index.vue"],"names":[],"mappings":"AA2WA;EACA,qBAAA;EACA,eAAA;EACA,wDAAA;EACA,yDAAA;EAIA,+CAAA;AC7WA;AD0WA;EACA,0DAAA;ACxWA;AD4WA;EACA,WAAA;ACzWA;AD0WA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;ACxWA;ADyWA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,cAAA;ACvWA;ADwWA;EACA,eAAA;EACA,kCAAA;ACtWA;ADwWA;EACA,eAAA;EACA,kCAAA;ACtWA;ADyWA;EACA,iBAAA;ACvWA;ADwWA;EACA,eAAA;EACA,8BAAA;EACA,gBAAA;ACtWA;ADwWA;EACA,gBAAA;EACA,eAAA;EACA,6BAAA;ACtWA;AD2WA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EACA,+CAAA;EACA,8CAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACzWA;AD2WA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;ACzWA;AD0WA;EACA,gBAAA;EACA,uBAAA;ACxWA;AD2WA;EACA,gBAAA;ACzWA;AD0WA;EACA,gBAAA;EACA,eAAA;ACxWA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-upload__wrapper\">\r\n <FileUpload\r\n class=\"ele-upload__inner\"\r\n v-show=\"isShowUploadContainer\"\r\n v-model=\"files\"\r\n :ref=\"uploadRef\"\r\n :drop=\"drop\"\r\n :chunk-enabled=\"chunkEnabled\"\r\n :chunk=\"chunkConfig\"\r\n :accept=\"accept\"\r\n :extensions=\"extensions\"\r\n :size=\"fileSizeLimit\"\r\n :post-action=\"postAction\"\r\n :multiple=\"multiple\"\r\n :headers=\"headers\"\r\n :maximum=\"getMaximum\"\r\n @input-file=\"onWatchInputFiles\"\r\n @input=\"onWatchFiles\"\r\n style=\"width: 100%;\">\r\n <section class=\"ele-upload__area\">\r\n <div class=\"ele-upload__area--icon\">\r\n <template v-if=\"iconIsZhWrod\">\r\n {{ icon }}\r\n </template>\r\n <template v-else>\r\n <ele-icon :type=\"icon\"></ele-icon>\r\n </template>\r\n </div>\r\n <div class=\"ele-upload__area--text\">\r\n <div class=\"ele-upload__message\" v-if=\"message\" v-html=\"message\"></div>\r\n <div class=\"ele-upload__message\" v-else>单击或拖动文件到该区域以上传</div>\r\n <div class=\"ele-upload__ext\" v-if=\"ext\" v-html=\"ext\"></div>\r\n <div class=\"ele-upload__ext\" v-else>文件小于{{ size }}M</div>\r\n </div>\r\n </section>\r\n </FileUpload>\r\n <section class=\"ele-files__wrapper\">\r\n <div class=\"ele-file__item\" v-for=\"(file, idx) in buildedFiles\" :key=\"idx\">\r\n <div class=\"ele-file__suffix--icon\">\r\n <ele-icon :type=\"fileSuffixIcon[file.suffix] ? fileSuffixIcon[file.suffix].name : 'icon-file'\"></ele-icon>\r\n </div>\r\n <div class=\"ele-file__name\">\r\n <div class=\"ele-file__inner\" @click=\"handleClickDownload(file)\">{{ file.name }}</div>\r\n <div v-if=\"(!file.success && file.progress)\" class=\"ele-uplpad__progress\">\r\n <a-progress :strokeWidth=\"2\" :percent=\"Number(file.progress)\" size=\"small\" />\r\n </div>\r\n </div>\r\n <div class=\"ele-file__delete\" v-if=\"file.success || file.error || !file.response\">\r\n <span class=\"ele-file__size\">{{ (file.size / byteConversion).toFixed(2) }}M</span>\r\n <span class=\"ele-file__delete--icon\" @click=\"handleClickDelete(file)\">\r\n <ele-icon type=\"delete\"></ele-icon>\r\n </span>\r\n </div>\r\n </div>\r\n </section>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport FileUpload from 'vue-upload-component'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { route, net, type } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-upload',\r\n components: {\r\n FileUpload\r\n },\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n url: {\r\n type: String,\r\n //TODO\r\n default: `zuul/api-file/workbench/file`\r\n },\r\n icon: {\r\n type: String,\r\n default: '上传'\r\n },\r\n size: {\r\n type: Number,\r\n default: 100\r\n },\r\n message: {\r\n type: String,\r\n default: '单击或拖动文件到该区域以上传'\r\n },\r\n ext: {\r\n type: String\r\n },\r\n extensions: {\r\n type: String\r\n },\r\n accept: {\r\n type: String\r\n },\r\n maximum: {\r\n type: Number,\r\n default: 10\r\n },\r\n multiple: {\r\n type: Boolean,\r\n default: false\r\n },\r\n drop: {\r\n type: Boolean,\r\n default: true\r\n },\r\n value: {\r\n type: [String, Array]\r\n },\r\n querys: {\r\n type: Object,\r\n default: () => ({\r\n _csrf: localStorage.getItem('token'),\r\n _t: new Date().valueOf()\r\n })\r\n },\r\n headers: {\r\n type: Object,\r\n default: () => ({\r\n 'X-XSRF-TOKEN': localStorage.getItem('token')\r\n })\r\n },\r\n byteConversion: {\r\n type: Number,\r\n default: 1024 * 1024\r\n },\r\n chunkEnabled: {\r\n type: Boolean,\r\n default: true\r\n }\r\n },\r\n data() {\r\n return {\r\n files: [],\r\n buildedFiles: [],\r\n saveToServerAsyncPageTimer: null\r\n }\r\n },\r\n watch: {\r\n value: {\r\n async handler (value) {\r\n if (type.isArray(value)) {\r\n // multiple\r\n } else if (type.isEmpty(value)) {\r\n this.files = []\r\n this.buildedFiles = []\r\n } else {\r\n // single\r\n this.fetchFileWithFileId()\r\n }\r\n },\r\n immediate: true\r\n }\r\n },\r\n computed: {\r\n prefixPath () {\r\n return window.prefixPath\r\n },\r\n iconIsZhWrod () {\r\n return type.isZhWord(this.icon)\r\n },\r\n getPayloads () {\r\n return {\r\n override: false\r\n }\r\n },\r\n chunkConfig () {\r\n return {\r\n action: `${this.prefixPath}zuul/api-file/workbench/file/temp/chunk/vue`,\r\n headers: {\r\n ...this.headers\r\n },\r\n minSize: 3 * this.byteConversion,\r\n maxActive: 3,\r\n maxRetries: 5,\r\n startBody: {\r\n override: true,\r\n path: '/cw'\r\n },\r\n uploadBody: {\r\n override: true,\r\n path: '/cw'\r\n },\r\n finishBody: {\r\n override: true,\r\n path: '/cw'\r\n }\r\n }\r\n },\r\n isFileUploadSuccessed () {\r\n return this.files.every(file => file.success)\r\n },\r\n isShowUploadContainer () {\r\n if (this.multiple) {\r\n if (this.isFileUploadSuccessed && this.buildedFiles.length >= this.maximum) {\r\n return false\r\n } else {\r\n return true\r\n }\r\n } else {\r\n const [file = {}] = this.buildedFiles\r\n if (this.buildedFiles.length < 1) {\r\n return true\r\n }\r\n if ((this.isFileUploadSuccessed && this.buildedFiles.length >= 1) || !file.response) {\r\n return false\r\n } else {\r\n return true\r\n }\r\n }\r\n },\r\n getMaximum () {\r\n return this.multiple ? this.maximum : 1\r\n },\r\n fileSizeLimit () {\r\n return this.size * this.byteConversion\r\n },\r\n postAction () {\r\n const ret = route.toQueryString(this.querys)\r\n return `${this.prefixPath}${this.url}?${ret}`\r\n },\r\n uploadRef () {\r\n return uuidv4()\r\n },\r\n fileSuffixIcon () {\r\n return {\r\n 'doc': { name: 'icon-doc' },\r\n 'html': { name: 'icon-html' },\r\n 'mp4': { name: 'icon-mp' },\r\n 'pdf': { name: 'icon-pdf' },\r\n 'ppt': { name: 'icon-ppt' },\r\n 'psd': { name: 'icon-psd' },\r\n 'rtf': { name: 'icon-rtf' },\r\n 'txt': { name: 'icon-txt' },\r\n 'vis': { name: 'icon-vis' },\r\n 'xls': { name: 'icon-xls' },\r\n 'xml': { name: 'icon-xml' },\r\n 'zip': { name: 'icon-zip' },\r\n 'jpg': { name: 'icon-img' },\r\n 'mp3': { name: 'icon-mp1' },\r\n }\r\n },\r\n fileIds () {\r\n const fileIds = this.buildedFiles.map(file => {\r\n return file.fileID\r\n })\r\n return this.multiple ? fileIds : fileIds[0]\r\n },\r\n fileResponseData () {\r\n return this.multiple ? this.buildedFiles : this.buildedFiles[0]\r\n }\r\n },\r\n methods: {\r\n async fetchFileWithFileId () {\r\n if (!this.value) return\r\n await net.get(\r\n `/api-file/file/${this.value}`\r\n ).then(resp => {\r\n const { data } = resp\r\n this.buildedFiles = [data]\r\n this.files = [data]\r\n })\r\n },\r\n handleClickDownload (file) {\r\n const { fileID: fileId } = file\r\n window.open(`/api-file/workbench/file/stream/${fileId}?origin=true`)\r\n },\r\n handleClickDelete (file) {\r\n this.$refs[this.uploadRef].remove(file)\r\n const { fileID } = file\r\n this.files = this.files.filter(file => file.fileID !== fileID)\r\n this.buildedFiles = this.buildedFiles.filter(file => file.fileID !== fileID)\r\n this.$emit('change', this.fileIds)\r\n },\r\n onWatchFiles (files) {\r\n this.files = files\r\n this.buildedFiles = this.files.map(file => {\r\n return {\r\n ...file.response.data,\r\n ...file\r\n }\r\n })\r\n if (this.isFileUploadSuccessed) {\r\n this.$emit('change', this.fileIds)\r\n this.$emit('on-success', this.fileResponseData)\r\n }\r\n },\r\n async saveToServerAsyncPage (payloads = {}) {\r\n net.post('zuul/api-file/workbench/file/temp/saveToServerAsyncPage', payloads, { \r\n headers: {\r\n 'Content-Type': 'multipart/form-data'\r\n }\r\n }).then(resp =>{\r\n const { data } = resp\r\n if (data !== 'saveToServerAsyncPage') {\r\n clearInterval(this.saveToServerAsyncPageTimer)\r\n }\r\n })\r\n // const ret = await net.post({\r\n // url: 'zuul/api-file/workbench/file/temp/saveToServerAsyncPage',\r\n // method: 'POST',\r\n // data: { ...payloads }\r\n // }).then(resp => {\r\n // const { data: { data, code, message } } = resp\r\n // if (code !== '2000') {\r\n // this.$Message.error(message)\r\n // return\r\n // }\r\n // if (data !== 'saveToServerAsyncPage') {\r\n // clearInterval(timer)\r\n // const { fileID, size } = data\r\n // this.$emit('on-success', { ...data, fileId: fileID })\r\n // this.$Message.success('同步成功')\r\n // return { fileId: fileID, size }\r\n // }\r\n // })\r\n // return ret\r\n },\r\n onWatchInputFiles (newFile, oldFile) {\r\n if (newFile && !oldFile) {\r\n // add file\r\n console.log('add', newFile)\r\n }\r\n if (newFile && oldFile) {\r\n // update file\r\n console.log('update', newFile)\r\n const { success, active, chunk, response } = newFile\r\n if (chunk && success && !active) {\r\n console.log('chunk end')\r\n const { data: { file, type } } = response\r\n const payloads = {\r\n filePath: file.match(/\\/cw(.*)/)[0],\r\n asyncID: uuidv4(),\r\n isDeleteOrigin: false,\r\n toImage: type === 'pdf' ? true : false,\r\n unzip: type === 'zip' ? true : false,\r\n _csrf: localStorage.getItem('token')\r\n }\r\n this.saveToServerAsyncPageTimer = setInterval(() => {\r\n this.saveToServerAsyncPage(payloads)\r\n }, 2000)\r\n }\r\n }\r\n if (!newFile && oldFile) {\r\n // delete file\r\n console.log('delete')\r\n }\r\n if (Boolean(newFile) !== Boolean(oldFile) || oldFile.error !== newFile.error) {\r\n if (!this.$refs[this.uploadRef].active) {\r\n this.$refs[this.uploadRef].active = true\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .ele-upload__inner {\r\n opacity: 1 !important;\r\n cursor: pointer;\r\n border: 1px dashed var(--idooel-form-title-border-color);\r\n background: var(--idooel-form-upload-bg-color) !important;\r\n &:hover {\r\n border-color: var(--idooel-form-upload-border-hover-color);\r\n }\r\n border-radius: var(--idooel-form-border-radius);\r\n}\r\n.ele-upload__wrapper {\r\n width: 100%;\r\n .ele-upload__area {\r\n padding: 16px;\r\n width: 100%;\r\n height: 80px;\r\n display: flex;\r\n flex-direction: row;\r\n .ele-upload__area--icon {\r\n color: var(--idooel-primary-color);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n font-size: 16x;\r\n .anticon-cloud-upload {\r\n font-size: 48px;\r\n color: var(--idooel-primary-color);\r\n }\r\n .anticon {\r\n font-size: 48px;\r\n color: var(--idooel-primary-color);\r\n }\r\n }\r\n .ele-upload__area--text {\r\n margin-left: 16px;\r\n .ele-upload__message {\r\n font-size: 16px;\r\n color: var(--idoole-black-088);\r\n text-align: left;\r\n }\r\n .ele-upload__ext {\r\n text-align: left;\r\n font-size: 14px;\r\n color: var(--idoole-black-06);\r\n }\r\n }\r\n }\r\n .ele-files__wrapper {\r\n .ele-file__item {\r\n width: 100%;\r\n margin-top: 8px;\r\n padding: 8px 12px;\r\n border-radius: var(--idooel-form-border-radius);\r\n background: var(--idooel-form-upload-bg-color);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n .ele-file__suffix--icon {}\r\n .ele-file__name {\r\n flex: 1;\r\n text-align: left;\r\n white-space: nowrap;\r\n overflow: hidden;\r\n font-size: 14px;\r\n margin-left: 8px;\r\n cursor: pointer;\r\n .ele-file__inner {\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n }\r\n }\r\n .ele-file__delete {\r\n margin-left: 8px;\r\n .ele-file__delete--icon {\r\n margin-left: 8px;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</style>","::v-deep .ele-upload__inner {\n opacity: 1 !important;\n cursor: pointer;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color) !important;\n border-radius: var(--idooel-form-border-radius);\n}\n::v-deep .ele-upload__inner:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n\n.ele-upload__wrapper {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area {\n padding: 16px;\n width: 100%;\n height: 80px;\n display: flex;\n flex-direction: row;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon {\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 16x;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--icon .anticon {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message {\n font-size: 16px;\n color: var(--idoole-black-088);\n text-align: left;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n text-align: left;\n font-size: 14px;\n color: var(--idoole-black-06);\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item {\n width: 100%;\n margin-top: 8px;\n padding: 8px 12px;\n border-radius: var(--idooel-form-border-radius);\n background: var(--idooel-form-upload-bg-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name {\n flex: 1;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n font-size: 14px;\n margin-left: 8px;\n cursor: pointer;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__name .ele-file__inner {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon {\n margin-left: 8px;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
5324
5367
 
5325
5368
  };
5326
5369
  /* scoped */
5327
- const __vue_scope_id__$q = "data-v-abce2c3c";
5370
+ const __vue_scope_id__$r = "data-v-abce2c3c";
5328
5371
  /* module identifier */
5329
- const __vue_module_identifier__$q = undefined;
5372
+ const __vue_module_identifier__$r = undefined;
5330
5373
  /* functional template */
5331
- const __vue_is_functional_template__$q = false;
5374
+ const __vue_is_functional_template__$r = false;
5332
5375
  /* style inject SSR */
5333
5376
 
5334
5377
  /* style inject shadow dom */
5335
5378
 
5336
5379
 
5337
5380
 
5338
- const __vue_component__$q = /*#__PURE__*/normalizeComponent(
5339
- { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
5340
- __vue_inject_styles__$q,
5341
- __vue_script__$q,
5342
- __vue_scope_id__$q,
5343
- __vue_is_functional_template__$q,
5344
- __vue_module_identifier__$q,
5381
+ const __vue_component__$r = /*#__PURE__*/normalizeComponent(
5382
+ { render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
5383
+ __vue_inject_styles__$r,
5384
+ __vue_script__$r,
5385
+ __vue_scope_id__$r,
5386
+ __vue_is_functional_template__$r,
5387
+ __vue_module_identifier__$r,
5345
5388
  false,
5346
5389
  createInjector,
5347
5390
  undefined,
5348
5391
  undefined
5349
5392
  );
5350
5393
 
5351
- __vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __vue_component__$q);
5394
+ __vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
5352
5395
 
5353
5396
  //
5354
5397
  //
@@ -5369,7 +5412,7 @@ __vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __v
5369
5412
  //
5370
5413
  //
5371
5414
 
5372
- var script$p = {
5415
+ var script$q = {
5373
5416
  name: 'ele-select-entity',
5374
5417
  props: {
5375
5418
  value: {
@@ -5426,10 +5469,10 @@ var script$p = {
5426
5469
  };
5427
5470
 
5428
5471
  /* script */
5429
- const __vue_script__$p = script$p;
5472
+ const __vue_script__$q = script$q;
5430
5473
 
5431
5474
  /* template */
5432
- var __vue_render__$p = function () {
5475
+ var __vue_render__$q = function () {
5433
5476
  var _vm = this;
5434
5477
  var _h = _vm.$createElement;
5435
5478
  var _c = _vm._self._c || _h;
@@ -5479,41 +5522,41 @@ var __vue_render__$p = function () {
5479
5522
  2
5480
5523
  )
5481
5524
  };
5482
- var __vue_staticRenderFns__$p = [];
5483
- __vue_render__$p._withStripped = true;
5525
+ var __vue_staticRenderFns__$q = [];
5526
+ __vue_render__$q._withStripped = true;
5484
5527
 
5485
5528
  /* style */
5486
- const __vue_inject_styles__$p = function (inject) {
5529
+ const __vue_inject_styles__$q = function (inject) {
5487
5530
  if (!inject) return
5488
5531
  inject("data-v-65b6ac0f_0", { source: ".g-select-entity__wrapper[data-v-65b6ac0f] {\n font-size: 14px;\n line-height: 30px;\n position: relative;\n width: 100%;\n display: flex;\n color: var(--idoole-black-07);\n border-radius: 4px;\n border: 1px solid var(--idooel-form-title-border-color);\n}\n.g-select-entity__wrapper[data-v-65b6ac0f]:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input[data-v-65b6ac0f] {\n padding: 0 11px;\n background-color: #fff;\n border-radius: 4px;\n flex-grow: 1;\n min-height: 30px;\n text-align: left;\n}\n.g-select-entity__wrapper .select-entity__addon[data-v-65b6ac0f] {\n padding: 0 11px;\n color: var(--idoole-black-07);\n background-color: var(--idoole-black-02);\n border-left: 1px solid var(--idooel-form-title-border-color);\n cursor: pointer;\n min-height: 30px;\n white-space: nowrap;\n}\n.has-error .g-select-entity__wrapper[data-v-65b6ac0f] {\n border-color: var(--idooel-form-border-err-color);\n}\n.g-select-entity__disabled .select-entity__input[data-v-65b6ac0f] {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\select-entity\\src\\index.vue","index.vue"],"names":[],"mappings":"AA6EA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,WAAA;EACA,aAAA;EACA,6BAAA;EACA,kBAAA;EACA,uDAAA;AC5EA;AD6EA;EACA,yCAAA;AC3EA;AD6EA;EACA,eAAA;EACA,sBAAA;EACA,kBAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;AC3EA;AD6EA;EACA,eAAA;EACA,6BAAA;EACA,wCAAA;EACA,4DAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;AC3EA;AD8EA;EACA,iDAAA;AC3EA;AD6EA;EACA,wCAAA;AC1EA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"g-select-entity__wrapper\" :class=\"disabled ? 'g-select-entity__disabled' : ''\">\r\n <span class=\"select-entity__input\">\r\n <a-tag\r\n v-for=\"(item, inx) in getValueList()\"\r\n :key=\"item.value\"\r\n :closable=\"!disabled && !getIsMaxCount()\"\r\n @close=\"onClose(...arguments, inx)\"\r\n >\r\n {{ item.label }}\r\n </a-tag>\r\n <a-tag v-if=\"getIsMaxCount()\">......</a-tag>\r\n </span>\r\n <span class=\"select-entity__addon\" @click=\"onChange\">{{ addonAfter }}</span>\r\n <slot></slot>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-select-entity',\r\n props: {\r\n value: {\r\n type: [Array, Object]\r\n },\r\n multiple: {\r\n type: Boolean,\r\n default: true\r\n },\r\n maxCount: {\r\n type: Number,\r\n default: 7\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n addonAfter: {\r\n type: String,\r\n default: '选择'\r\n }\r\n },\r\n methods: {\r\n getValueList () {\r\n if (this.value) {\r\n if (this.multiple) {\r\n return this.getIsMaxCount() ? this.value.slice(0, this.maxCount) : this.value\r\n }\r\n return [this.value]\r\n }\r\n return []\r\n },\r\n getIsMaxCount () {\r\n if (this.value && this.multiple) {\r\n return this.value.length >= this.maxCount\r\n }\r\n return false\r\n },\r\n onChange () {\r\n if (this.disabled) return\r\n this.$emit('change', this.value)\r\n },\r\n onClose (e, inx) {\r\n e = window.event || e\r\n e.preventDefault()\r\n if (!this.multiple) {\r\n this.$emit('change', null)\r\n return\r\n }\r\n this.value.splice(inx, 1)\r\n this.$emit('change', this.value)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-select-entity__wrapper {\r\n font-size: 14px;\r\n line-height: 30px;\r\n position: relative;\r\n width: 100%;\r\n display: flex;\r\n color: var(--idoole-black-07);\r\n border-radius: 4px;\r\n border: 1px solid var(--idooel-form-title-border-color);\r\n &:hover {\r\n border-color: var(--idooel-primary-color);\r\n }\r\n .select-entity__input {\r\n padding: 0 11px;\r\n background-color: #fff;\r\n border-radius: 4px;\r\n flex-grow: 1;\r\n min-height: 30px;\r\n text-align: left;\r\n }\r\n .select-entity__addon {\r\n padding: 0 11px;\r\n color: var(--idoole-black-07);\r\n background-color: var(--idoole-black-02);\r\n border-left: 1px solid var(--idooel-form-title-border-color);\r\n cursor: pointer;\r\n min-height: 30px;\r\n white-space: nowrap;\r\n }\r\n}\r\n.has-error .g-select-entity__wrapper {\r\n border-color: var(--idooel-form-border-err-color);\r\n}\r\n.g-select-entity__disabled .select-entity__input {\r\n background-color: var(--idoole-black-02);\r\n}\r\n</style>",".g-select-entity__wrapper {\n font-size: 14px;\n line-height: 30px;\n position: relative;\n width: 100%;\n display: flex;\n color: var(--idoole-black-07);\n border-radius: 4px;\n border: 1px solid var(--idooel-form-title-border-color);\n}\n.g-select-entity__wrapper:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input {\n padding: 0 11px;\n background-color: #fff;\n border-radius: 4px;\n flex-grow: 1;\n min-height: 30px;\n text-align: left;\n}\n.g-select-entity__wrapper .select-entity__addon {\n padding: 0 11px;\n color: var(--idoole-black-07);\n background-color: var(--idoole-black-02);\n border-left: 1px solid var(--idooel-form-title-border-color);\n cursor: pointer;\n min-height: 30px;\n white-space: nowrap;\n}\n\n.has-error .g-select-entity__wrapper {\n border-color: var(--idooel-form-border-err-color);\n}\n\n.g-select-entity__disabled .select-entity__input {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
5489
5532
 
5490
5533
  };
5491
5534
  /* scoped */
5492
- const __vue_scope_id__$p = "data-v-65b6ac0f";
5535
+ const __vue_scope_id__$q = "data-v-65b6ac0f";
5493
5536
  /* module identifier */
5494
- const __vue_module_identifier__$p = undefined;
5537
+ const __vue_module_identifier__$q = undefined;
5495
5538
  /* functional template */
5496
- const __vue_is_functional_template__$p = false;
5539
+ const __vue_is_functional_template__$q = false;
5497
5540
  /* style inject SSR */
5498
5541
 
5499
5542
  /* style inject shadow dom */
5500
5543
 
5501
5544
 
5502
5545
 
5503
- const __vue_component__$p = /*#__PURE__*/normalizeComponent(
5504
- { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
5505
- __vue_inject_styles__$p,
5506
- __vue_script__$p,
5507
- __vue_scope_id__$p,
5508
- __vue_is_functional_template__$p,
5509
- __vue_module_identifier__$p,
5510
- false,
5546
+ const __vue_component__$q = /*#__PURE__*/normalizeComponent(
5547
+ { render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
5548
+ __vue_inject_styles__$q,
5549
+ __vue_script__$q,
5550
+ __vue_scope_id__$q,
5551
+ __vue_is_functional_template__$q,
5552
+ __vue_module_identifier__$q,
5553
+ false,
5511
5554
  createInjector,
5512
5555
  undefined,
5513
5556
  undefined
5514
5557
  );
5515
5558
 
5516
- __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
5559
+ __vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __vue_component__$q);
5517
5560
 
5518
5561
  //
5519
5562
  //
@@ -5525,7 +5568,7 @@ __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __v
5525
5568
  //
5526
5569
  //
5527
5570
 
5528
- var script$o = {
5571
+ var script$p = {
5529
5572
  name: 'ele-icon',
5530
5573
  props: {
5531
5574
  type: {
@@ -5548,10 +5591,10 @@ var script$o = {
5548
5591
  };
5549
5592
 
5550
5593
  /* script */
5551
- const __vue_script__$o = script$o;
5594
+ const __vue_script__$p = script$p;
5552
5595
 
5553
5596
  /* template */
5554
- var __vue_render__$o = function () {
5597
+ var __vue_render__$p = function () {
5555
5598
  var _vm = this;
5556
5599
  var _h = _vm.$createElement;
5557
5600
  var _c = _vm._self._c || _h;
@@ -5559,17 +5602,17 @@ var __vue_render__$o = function () {
5559
5602
  ? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
5560
5603
  : _c("i", { class: ["iconfont", _vm.type] })
5561
5604
  };
5562
- var __vue_staticRenderFns__$o = [];
5563
- __vue_render__$o._withStripped = true;
5605
+ var __vue_staticRenderFns__$p = [];
5606
+ __vue_render__$p._withStripped = true;
5564
5607
 
5565
5608
  /* style */
5566
- const __vue_inject_styles__$o = undefined;
5609
+ const __vue_inject_styles__$p = undefined;
5567
5610
  /* scoped */
5568
- const __vue_scope_id__$o = undefined;
5611
+ const __vue_scope_id__$p = undefined;
5569
5612
  /* module identifier */
5570
- const __vue_module_identifier__$o = undefined;
5613
+ const __vue_module_identifier__$p = undefined;
5571
5614
  /* functional template */
5572
- const __vue_is_functional_template__$o = false;
5615
+ const __vue_is_functional_template__$p = false;
5573
5616
  /* style inject */
5574
5617
 
5575
5618
  /* style inject SSR */
@@ -5578,20 +5621,20 @@ __vue_render__$o._withStripped = true;
5578
5621
 
5579
5622
 
5580
5623
 
5581
- const __vue_component__$o = /*#__PURE__*/normalizeComponent(
5582
- { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
5583
- __vue_inject_styles__$o,
5584
- __vue_script__$o,
5585
- __vue_scope_id__$o,
5586
- __vue_is_functional_template__$o,
5587
- __vue_module_identifier__$o,
5624
+ const __vue_component__$p = /*#__PURE__*/normalizeComponent(
5625
+ { render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
5626
+ __vue_inject_styles__$p,
5627
+ __vue_script__$p,
5628
+ __vue_scope_id__$p,
5629
+ __vue_is_functional_template__$p,
5630
+ __vue_module_identifier__$p,
5588
5631
  false,
5589
5632
  undefined,
5590
5633
  undefined,
5591
5634
  undefined
5592
5635
  );
5593
5636
 
5594
- __vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
5637
+ __vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
5595
5638
 
5596
5639
  //
5597
5640
  //
@@ -5600,7 +5643,7 @@ __vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __v
5600
5643
  //
5601
5644
  //
5602
5645
 
5603
- var script$n = {
5646
+ var script$o = {
5604
5647
  name: 'ele-input-number',
5605
5648
  props: {
5606
5649
  precision: {
@@ -5618,10 +5661,10 @@ var script$n = {
5618
5661
  };
5619
5662
 
5620
5663
  /* script */
5621
- const __vue_script__$n = script$n;
5664
+ const __vue_script__$o = script$o;
5622
5665
 
5623
5666
  /* template */
5624
- var __vue_render__$n = function () {
5667
+ var __vue_render__$o = function () {
5625
5668
  var _vm = this;
5626
5669
  var _h = _vm.$createElement;
5627
5670
  var _c = _vm._self._c || _h;
@@ -5645,17 +5688,17 @@ var __vue_render__$n = function () {
5645
5688
  1
5646
5689
  )
5647
5690
  };
5648
- var __vue_staticRenderFns__$n = [];
5649
- __vue_render__$n._withStripped = true;
5691
+ var __vue_staticRenderFns__$o = [];
5692
+ __vue_render__$o._withStripped = true;
5650
5693
 
5651
5694
  /* style */
5652
- const __vue_inject_styles__$n = undefined;
5695
+ const __vue_inject_styles__$o = undefined;
5653
5696
  /* scoped */
5654
- const __vue_scope_id__$n = undefined;
5697
+ const __vue_scope_id__$o = undefined;
5655
5698
  /* module identifier */
5656
- const __vue_module_identifier__$n = undefined;
5699
+ const __vue_module_identifier__$o = undefined;
5657
5700
  /* functional template */
5658
- const __vue_is_functional_template__$n = false;
5701
+ const __vue_is_functional_template__$o = false;
5659
5702
  /* style inject */
5660
5703
 
5661
5704
  /* style inject SSR */
@@ -5664,23 +5707,23 @@ __vue_render__$n._withStripped = true;
5664
5707
 
5665
5708
 
5666
5709
 
5667
- const __vue_component__$n = /*#__PURE__*/normalizeComponent(
5668
- { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
5669
- __vue_inject_styles__$n,
5670
- __vue_script__$n,
5671
- __vue_scope_id__$n,
5672
- __vue_is_functional_template__$n,
5673
- __vue_module_identifier__$n,
5710
+ const __vue_component__$o = /*#__PURE__*/normalizeComponent(
5711
+ { render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
5712
+ __vue_inject_styles__$o,
5713
+ __vue_script__$o,
5714
+ __vue_scope_id__$o,
5715
+ __vue_is_functional_template__$o,
5716
+ __vue_module_identifier__$o,
5674
5717
  false,
5675
5718
  undefined,
5676
5719
  undefined,
5677
5720
  undefined
5678
5721
  );
5679
5722
 
5680
- __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
5723
+ __vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
5681
5724
 
5682
5725
  //
5683
- var script$m = {
5726
+ var script$n = {
5684
5727
  name: 'ele-modal',
5685
5728
  props: {
5686
5729
  value: {
@@ -5824,10 +5867,10 @@ var script$m = {
5824
5867
  };
5825
5868
 
5826
5869
  /* script */
5827
- const __vue_script__$m = script$m;
5870
+ const __vue_script__$n = script$n;
5828
5871
 
5829
5872
  /* template */
5830
- var __vue_render__$m = function () {
5873
+ var __vue_render__$n = function () {
5831
5874
  var _vm = this;
5832
5875
  var _h = _vm.$createElement;
5833
5876
  var _c = _vm._self._c || _h;
@@ -5900,41 +5943,41 @@ var __vue_render__$m = function () {
5900
5943
  2
5901
5944
  )
5902
5945
  };
5903
- var __vue_staticRenderFns__$m = [];
5904
- __vue_render__$m._withStripped = true;
5946
+ var __vue_staticRenderFns__$n = [];
5947
+ __vue_render__$n._withStripped = true;
5905
5948
 
5906
5949
  /* style */
5907
- const __vue_inject_styles__$m = function (inject) {
5950
+ const __vue_inject_styles__$n = function (inject) {
5908
5951
  if (!inject) return
5909
5952
  inject("data-v-a2a3937a_0", { source: ".ele-modal__footer[data-v-a2a3937a] {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.ele-modal__footer .footer-btn__wrapper[data-v-a2a3937a] {\n flex: 1;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\modal\\src\\index.vue","index.vue"],"names":[],"mappings":"AA+KA;EACA,aAAA;EACA,mBAAA;EACA,8BAAA;EACA,mBAAA;AC9KA;AD+KA;EACA,OAAA;AC7KA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <a-modal\r\n :title=\"title\"\r\n :cancelText=\"cancelText\"\r\n :okText=\"okText\"\r\n :closable=\"closable\"\r\n v-model:visible=\"showModal\"\r\n :width=\"width\"\r\n :keyboard=\"false\"\r\n :maskClosable=\"maskClosable\"\r\n :dialogStyle=\"{ top: `${upDownDistance[size]}px` }\"\r\n :bodyStyle=\"{ maxHeight: maxheight, overflowY: 'auto' }\"\r\n :footer=\"showFooter ? undefined : null\"\r\n @cancel=\"handleCancel\"\r\n @ok=\"handleOk\"\r\n >\r\n <slot v-if=\"showModal\"></slot>\r\n <template slot=\"footer\" v-if=\"!showDefaultFooter\">\r\n <div class=\"ele-modal__footer\">\r\n <slot name=\"footer-text\"></slot>\r\n <div class=\"footer-btn__wrapper\">\r\n <ele-button\r\n v-for=\"btn in buttonGroupMeta.elements\"\r\n :type=\"btn.type\"\r\n v-on=\"assignAttrEvents\"\r\n :event-name=\"btn.eventName\"\r\n :key=\"btn.key\">\r\n {{ btn.label }}\r\n </ele-button>\r\n </div>\r\n </div>\r\n </template>\r\n </a-modal>\r\n</template>\r\n<script>\r\nimport { CONTEXT } from '../../utils'\r\nexport default {\r\n name: 'ele-modal',\r\n props: {\r\n value: {\r\n type: Boolean,\r\n default: false\r\n },\r\n title: {\r\n type: String,\r\n default: '标题'\r\n },\r\n cancelText: {\r\n type: String,\r\n default: '关闭'\r\n },\r\n okText: {\r\n type: String,\r\n default: '确定'\r\n },\r\n size: {\r\n type: String,\r\n default: 'middle'\r\n },\r\n map: {\r\n type: Object,\r\n default () {\r\n return {}\r\n }\r\n },\r\n closable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n maskClosable: {\r\n type: Boolean,\r\n default: false\r\n },\r\n showFooter: {\r\n type: Boolean,\r\n default: true\r\n },\r\n footer: {\r\n type: Function,\r\n default: null\r\n },\r\n onlyClose: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonGroupMeta: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n // 是否展示组件默认底部按钮\r\n showDefaultFooter: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n watch: {\r\n value: {\r\n handler (value) {\r\n this.$nextTick(() => {\r\n this.showModal = value\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n inject: {\r\n [CONTEXT]: {\r\n default: () => (() => ({}))\r\n }\r\n },\r\n computed: {\r\n assignAttrEvents () {\r\n const events = this.buttons.reduce((ret, btn) => {\r\n ret[btn.eventName] = (e) => {\r\n this.$emit(btn.eventName || 'click', { ...e, ...this[CONTEXT]() })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events\r\n }\r\n },\r\n buttons () {\r\n const { elements = [] } = this.buttonGroupMeta\r\n return elements\r\n },\r\n width () {\r\n return this.map[this.size]\r\n },\r\n maxheight () {\r\n return `calc(100vh - ${this.upDownDistance[this.size] * 2 + (this.title ? 55 : 0) + (this.showFooter ? 53 : 0) }px`\r\n }\r\n },\r\n data () {\r\n return {\r\n showModal: false\r\n }\r\n },\r\n created () {\r\n let defaultMap = {\r\n small: 480,\r\n middle: 768,\r\n big: 1200\r\n }\r\n this.upDownDistance = {\r\n small: 80,\r\n middle: 80,\r\n big: 40\r\n }\r\n this.map = Object.assign(this.map, defaultMap)\r\n },\r\n methods: {\r\n openModal () {\r\n this.showModal = true\r\n this.removeHidden()\r\n },\r\n handleCancel () {\r\n this.showModal = false\r\n this.$emit('input', this.showModal)\r\n this.$emit('change', this.showModal)\r\n this.removeHidden()\r\n this.$emit('cancel')\r\n },\r\n handleOk () {\r\n this.$emit('ok')\r\n },\r\n removeHidden () {\r\n let ishidden = document.body.style.overflow === 'hidden'\r\n ishidden && (document.body.style.overflow = 'initial')\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ele-modal__footer {\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: space-between;\r\n align-items: center;\r\n .footer-btn__wrapper {\r\n flex: 1;\r\n }\r\n}\r\n</style>",".ele-modal__footer {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n}\n.ele-modal__footer .footer-btn__wrapper {\n flex: 1;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
5910
5953
 
5911
5954
  };
5912
5955
  /* scoped */
5913
- const __vue_scope_id__$m = "data-v-a2a3937a";
5956
+ const __vue_scope_id__$n = "data-v-a2a3937a";
5914
5957
  /* module identifier */
5915
- const __vue_module_identifier__$m = undefined;
5958
+ const __vue_module_identifier__$n = undefined;
5916
5959
  /* functional template */
5917
- const __vue_is_functional_template__$m = false;
5960
+ const __vue_is_functional_template__$n = false;
5918
5961
  /* style inject SSR */
5919
5962
 
5920
5963
  /* style inject shadow dom */
5921
5964
 
5922
5965
 
5923
5966
 
5924
- const __vue_component__$m = /*#__PURE__*/normalizeComponent(
5925
- { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
5926
- __vue_inject_styles__$m,
5927
- __vue_script__$m,
5928
- __vue_scope_id__$m,
5929
- __vue_is_functional_template__$m,
5930
- __vue_module_identifier__$m,
5967
+ const __vue_component__$n = /*#__PURE__*/normalizeComponent(
5968
+ { render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
5969
+ __vue_inject_styles__$n,
5970
+ __vue_script__$n,
5971
+ __vue_scope_id__$n,
5972
+ __vue_is_functional_template__$n,
5973
+ __vue_module_identifier__$n,
5931
5974
  false,
5932
5975
  createInjector,
5933
5976
  undefined,
5934
5977
  undefined
5935
5978
  );
5936
5979
 
5937
- __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
5980
+ __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
5938
5981
 
5939
5982
  //
5940
5983
  //
@@ -5946,7 +5989,7 @@ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __v
5946
5989
  //
5947
5990
  //
5948
5991
 
5949
- var script$l = {
5992
+ var script$m = {
5950
5993
  name: 'ele-checkbox',
5951
5994
  model: {
5952
5995
  prop: 'value',
@@ -5974,10 +6017,10 @@ var script$l = {
5974
6017
  };
5975
6018
 
5976
6019
  /* script */
5977
- const __vue_script__$l = script$l;
6020
+ const __vue_script__$m = script$m;
5978
6021
 
5979
6022
  /* template */
5980
- var __vue_render__$l = function () {
6023
+ var __vue_render__$m = function () {
5981
6024
  var _vm = this;
5982
6025
  var _h = _vm.$createElement;
5983
6026
  var _c = _vm._self._c || _h;
@@ -5990,41 +6033,41 @@ var __vue_render__$l = function () {
5990
6033
  on: { change: _vm.onChange },
5991
6034
  })
5992
6035
  };
5993
- var __vue_staticRenderFns__$l = [];
5994
- __vue_render__$l._withStripped = true;
6036
+ var __vue_staticRenderFns__$m = [];
6037
+ __vue_render__$m._withStripped = true;
5995
6038
 
5996
6039
  /* style */
5997
- const __vue_inject_styles__$l = function (inject) {
6040
+ const __vue_inject_styles__$m = function (inject) {
5998
6041
  if (!inject) return
5999
6042
  inject("data-v-fc5aacae_0", { source: ".ant-checkbox-group[data-v-fc5aacae] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-checkbox-group[data-v-fc5aacae] .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group[data-v-fc5aacae] .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\checkbox\\src\\index.vue","index.vue"],"names":[],"mappings":"AAsCA;EACA,gBAAA;EACA,iBAAA;ACrCA;ADyCA;EACA,0CAAA;ACtCA;ADwCA;EACA,iDAAA;ACtCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <a-checkbox-group\r\n :value=\"value\"\r\n :options=\"dataSource\" \r\n :disabled=\"disabled\" \r\n @change=\"onChange\">\r\n </a-checkbox-group>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-checkbox',\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n value: {\r\n type: Array\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n methods: {\r\n onChange (value) {\r\n this.$emit('change', value)\r\n this.$emit('input', value)\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ant-checkbox-group {\r\n text-align: left;\r\n line-height: 32px;\r\n}\r\n.has-error {\r\n .ant-checkbox-group {\r\n ::v-deep .ant-checkbox-wrapper {\r\n color: var(--idooel-form-border-err-color);\r\n }\r\n ::v-deep .ant-checkbox-inner {\r\n border-color: var(--idooel-form-border-err-color);\r\n }\r\n }\r\n}\r\n</style>",".ant-checkbox-group {\n text-align: left;\n line-height: 32px;\n}\n\n.has-error .ant-checkbox-group ::v-deep .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group ::v-deep .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
6000
6043
 
6001
6044
  };
6002
6045
  /* scoped */
6003
- const __vue_scope_id__$l = "data-v-fc5aacae";
6046
+ const __vue_scope_id__$m = "data-v-fc5aacae";
6004
6047
  /* module identifier */
6005
- const __vue_module_identifier__$l = undefined;
6048
+ const __vue_module_identifier__$m = undefined;
6006
6049
  /* functional template */
6007
- const __vue_is_functional_template__$l = false;
6050
+ const __vue_is_functional_template__$m = false;
6008
6051
  /* style inject SSR */
6009
6052
 
6010
6053
  /* style inject shadow dom */
6011
6054
 
6012
6055
 
6013
6056
 
6014
- const __vue_component__$l = /*#__PURE__*/normalizeComponent(
6015
- { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
6016
- __vue_inject_styles__$l,
6017
- __vue_script__$l,
6018
- __vue_scope_id__$l,
6019
- __vue_is_functional_template__$l,
6020
- __vue_module_identifier__$l,
6057
+ const __vue_component__$m = /*#__PURE__*/normalizeComponent(
6058
+ { render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
6059
+ __vue_inject_styles__$m,
6060
+ __vue_script__$m,
6061
+ __vue_scope_id__$m,
6062
+ __vue_is_functional_template__$m,
6063
+ __vue_module_identifier__$m,
6021
6064
  false,
6022
6065
  createInjector,
6023
6066
  undefined,
6024
6067
  undefined
6025
6068
  );
6026
6069
 
6027
- __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
6070
+ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
6028
6071
 
6029
6072
  //
6030
6073
  //
@@ -6035,7 +6078,7 @@ __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __v
6035
6078
  //
6036
6079
  //
6037
6080
 
6038
- var script$k = {
6081
+ var script$l = {
6039
6082
  name: 'ele-radio',
6040
6083
  model: {
6041
6084
  prop: 'value',
@@ -6068,10 +6111,10 @@ var script$k = {
6068
6111
  };
6069
6112
 
6070
6113
  /* script */
6071
- const __vue_script__$k = script$k;
6114
+ const __vue_script__$l = script$l;
6072
6115
 
6073
6116
  /* template */
6074
- var __vue_render__$k = function () {
6117
+ var __vue_render__$l = function () {
6075
6118
  var _vm = this;
6076
6119
  var _h = _vm.$createElement;
6077
6120
  var _c = _vm._self._c || _h;
@@ -6089,41 +6132,41 @@ var __vue_render__$k = function () {
6089
6132
  1
6090
6133
  )
6091
6134
  };
6092
- var __vue_staticRenderFns__$k = [];
6093
- __vue_render__$k._withStripped = true;
6135
+ var __vue_staticRenderFns__$l = [];
6136
+ __vue_render__$l._withStripped = true;
6094
6137
 
6095
6138
  /* style */
6096
- const __vue_inject_styles__$k = function (inject) {
6139
+ const __vue_inject_styles__$l = function (inject) {
6097
6140
  if (!inject) return
6098
6141
  inject("data-v-743a2c6f_0", { source: ".ant-radio-group[data-v-743a2c6f] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-radio-group[data-v-743a2c6f] .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group[data-v-743a2c6f] .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\radio\\src\\index.vue","index.vue"],"names":[],"mappings":"AA0CA;EACA,gBAAA;EACA,iBAAA;ACzCA;AD6CA;EACA,0CAAA;AC1CA;AD4CA;EACA,iDAAA;AC1CA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <a-radio-group :value=\"value\" @change=\"onChange\" :disabled=\"disabled\">\r\n <a-radio v-for=\"item in dataSource\" :key=\"item.value\" :value=\"item.value\">\r\n {{ item.label }}\r\n </a-radio>\r\n </a-radio-group>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-radio',\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n value: {\r\n type: [String, Array, Number]\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n watch: {\r\n value (val) {\r\n console.log('valvalval', val)\r\n }\r\n },\r\n methods: {\r\n onChange (e) {\r\n this.$emit('change', e.target.value)\r\n this.$emit('input', e.target.value)\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ant-radio-group {\r\n text-align: left;\r\n line-height: 32px;\r\n}\r\n.has-error {\r\n .ant-radio-group {\r\n ::v-deep .ant-radio-wrapper {\r\n color: var(--idooel-form-border-err-color);\r\n }\r\n ::v-deep .ant-radio-inner {\r\n border-color: var(--idooel-form-border-err-color);\r\n }\r\n }\r\n}\r\n</style>",".ant-radio-group {\n text-align: left;\n line-height: 32px;\n}\n\n.has-error .ant-radio-group ::v-deep .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group ::v-deep .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
6099
6142
 
6100
6143
  };
6101
6144
  /* scoped */
6102
- const __vue_scope_id__$k = "data-v-743a2c6f";
6145
+ const __vue_scope_id__$l = "data-v-743a2c6f";
6103
6146
  /* module identifier */
6104
- const __vue_module_identifier__$k = undefined;
6147
+ const __vue_module_identifier__$l = undefined;
6105
6148
  /* functional template */
6106
- const __vue_is_functional_template__$k = false;
6149
+ const __vue_is_functional_template__$l = false;
6107
6150
  /* style inject SSR */
6108
6151
 
6109
6152
  /* style inject shadow dom */
6110
6153
 
6111
6154
 
6112
6155
 
6113
- const __vue_component__$k = /*#__PURE__*/normalizeComponent(
6114
- { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
6115
- __vue_inject_styles__$k,
6116
- __vue_script__$k,
6117
- __vue_scope_id__$k,
6118
- __vue_is_functional_template__$k,
6119
- __vue_module_identifier__$k,
6156
+ const __vue_component__$l = /*#__PURE__*/normalizeComponent(
6157
+ { render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
6158
+ __vue_inject_styles__$l,
6159
+ __vue_script__$l,
6160
+ __vue_scope_id__$l,
6161
+ __vue_is_functional_template__$l,
6162
+ __vue_module_identifier__$l,
6120
6163
  false,
6121
6164
  createInjector,
6122
6165
  undefined,
6123
6166
  undefined
6124
6167
  );
6125
6168
 
6126
- __vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
6169
+ __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
6127
6170
 
6128
6171
  //
6129
6172
  //
@@ -6147,7 +6190,7 @@ __vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __v
6147
6190
  //
6148
6191
  //
6149
6192
 
6150
- var script$j = {
6193
+ var script$k = {
6151
6194
  name: 'ele-batch-export',
6152
6195
  props: {
6153
6196
  value: {
@@ -6191,10 +6234,10 @@ var script$j = {
6191
6234
  };
6192
6235
 
6193
6236
  /* script */
6194
- const __vue_script__$j = script$j;
6237
+ const __vue_script__$k = script$k;
6195
6238
 
6196
6239
  /* template */
6197
- var __vue_render__$j = function () {
6240
+ var __vue_render__$k = function () {
6198
6241
  var _vm = this;
6199
6242
  var _h = _vm.$createElement;
6200
6243
  var _c = _vm._self._c || _h;
@@ -6253,42 +6296,42 @@ var __vue_render__$j = function () {
6253
6296
  ]
6254
6297
  )
6255
6298
  };
6256
- var __vue_staticRenderFns__$j = [];
6257
- __vue_render__$j._withStripped = true;
6299
+ var __vue_staticRenderFns__$k = [];
6300
+ __vue_render__$k._withStripped = true;
6258
6301
 
6259
6302
  /* style */
6260
- const __vue_inject_styles__$j = function (inject) {
6303
+ const __vue_inject_styles__$k = function (inject) {
6261
6304
  if (!inject) return
6262
6305
  inject("data-v-2ed2589f_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
6263
6306
  ,inject("data-v-2ed2589f_1", { source: ".ele-batch-export__content[data-v-2ed2589f] {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container[data-v-2ed2589f] {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__icon[data-v-2ed2589f] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle[data-v-2ed2589f] {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn[data-v-2ed2589f] {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn--hint[data-v-2ed2589f] {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message[data-v-2ed2589f] {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\batch-export\\src\\index.vue","index.vue"],"names":[],"mappings":"AAuEA;EACA,aAAA;ACtEA;ADuEA;EACA,iBAAA;EACA,oBAAA;EACA,YAAA;EACA,mCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,eAAA;ACrEA;ADsEA;EACA,eAAA;EACA,4BAAA;ACpEA;ADsEA;EACA,iBAAA;ACpEA;ADqEA;EACA,4BAAA;EACA,eAAA;EACA,eAAA;ACnEA;ADqEA;EACA,4BAAA;EACA,eAAA;ACnEA;ADuEA;EACA,4BAAA;EACA,eAAA;ACrEA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <ele-modal \r\n v-model=\"innerValue\" \r\n v-on=\"$listeners\"\r\n :buttonGroupMeta=\"buttonGroupMeta\" \r\n title=\"批量导出\">\r\n <div class=\"ele-batch-export__content\">\r\n <div class=\"ele-batch-export__container\">\r\n <ele-icon class=\"ele-batch-export__icon\" type=\"download\"></ele-icon>\r\n <div class=\"ele-batch-export__handle\">\r\n <div class=\"ele-batch-export__btn\" @click=\"handleClick\">导出任务处理中..... 请点击此按钮跳转到“批处理管理”菜单查看任务进度</div>\r\n <div class=\"ele-batch-export__btn--hint\">批处理任务的准备工作会在后台运行</div>\r\n </div>\r\n </div>\r\n <div class=\"ele-batch-export__message\">\r\n 您可以请点击上方按钮查看任务进度或关闭弹框\r\n </div>\r\n </div>\r\n </ele-modal>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-batch-export',\r\n props: {\r\n value: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonGroupMeta: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n elements: [\r\n {\r\n label: '关闭',\r\n key: 'close',\r\n type: 'primary',\r\n eventName: 'handleClose'\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n },\r\n data() {\r\n return {\r\n innerValue: false\r\n }\r\n },\r\n watch: {\r\n value: {\r\n handler (value) {\r\n this.$nextTick(() => {\r\n this.innerValue = value\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n handleClick () {\r\n this.$emit('on-batch-export')\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\">\r\n@import '../../theme/index';\r\n</style>\r\n<style lang=\"scss\" scoped>\r\n.ele-batch-export__content {\r\n height: 106px;\r\n .ele-batch-export__container {\r\n border-width: 1px;\r\n border-style: dashed;\r\n height: 80px;\r\n border-color: var(--idooel-link-06);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: 0 16px;\r\n .ele-batch-export__icon {\r\n font-size: 48px;\r\n color: var(--idooel-link-06);\r\n }\r\n .ele-batch-export__handle {\r\n margin-left: 16px;\r\n .ele-batch-export__btn {\r\n color: var(--idooel-link-06);\r\n font-size: 16px;\r\n cursor: pointer;\r\n }\r\n .ele-batch-export__btn--hint {\r\n color: var(--idooel-link-03);\r\n font-size: 14px;\r\n }\r\n }\r\n }\r\n .ele-batch-export__message {\r\n color: var(--idooel-link-06);\r\n font-size: 14px;\r\n }\r\n}\r\n</style>",".ele-batch-export__content {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn--hint {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
6264
6307
 
6265
6308
  };
6266
6309
  /* scoped */
6267
- const __vue_scope_id__$j = "data-v-2ed2589f";
6310
+ const __vue_scope_id__$k = "data-v-2ed2589f";
6268
6311
  /* module identifier */
6269
- const __vue_module_identifier__$j = undefined;
6312
+ const __vue_module_identifier__$k = undefined;
6270
6313
  /* functional template */
6271
- const __vue_is_functional_template__$j = false;
6314
+ const __vue_is_functional_template__$k = false;
6272
6315
  /* style inject SSR */
6273
6316
 
6274
6317
  /* style inject shadow dom */
6275
6318
 
6276
6319
 
6277
6320
 
6278
- const __vue_component__$j = /*#__PURE__*/normalizeComponent(
6279
- { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
6280
- __vue_inject_styles__$j,
6281
- __vue_script__$j,
6282
- __vue_scope_id__$j,
6283
- __vue_is_functional_template__$j,
6284
- __vue_module_identifier__$j,
6321
+ const __vue_component__$k = /*#__PURE__*/normalizeComponent(
6322
+ { render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
6323
+ __vue_inject_styles__$k,
6324
+ __vue_script__$k,
6325
+ __vue_scope_id__$k,
6326
+ __vue_is_functional_template__$k,
6327
+ __vue_module_identifier__$k,
6285
6328
  false,
6286
6329
  createInjector,
6287
6330
  undefined,
6288
6331
  undefined
6289
6332
  );
6290
6333
 
6291
- __vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __vue_component__$j);
6334
+ __vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
6292
6335
 
6293
6336
  //
6294
6337
  //
@@ -6302,7 +6345,7 @@ __vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __v
6302
6345
  //
6303
6346
  //
6304
6347
 
6305
- var script$i = {
6348
+ var script$j = {
6306
6349
  name: 'ele-date-range',
6307
6350
  model: {
6308
6351
  prop: 'value',
@@ -6333,10 +6376,10 @@ var script$i = {
6333
6376
  };
6334
6377
 
6335
6378
  /* script */
6336
- const __vue_script__$i = script$i;
6379
+ const __vue_script__$j = script$j;
6337
6380
 
6338
6381
  /* template */
6339
- var __vue_render__$i = function () {
6382
+ var __vue_render__$j = function () {
6340
6383
  var _vm = this;
6341
6384
  var _h = _vm.$createElement;
6342
6385
  var _c = _vm._self._c || _h;
@@ -6351,44 +6394,44 @@ var __vue_render__$i = function () {
6351
6394
  on: { change: _vm.onChange },
6352
6395
  })
6353
6396
  };
6354
- var __vue_staticRenderFns__$i = [];
6355
- __vue_render__$i._withStripped = true;
6397
+ var __vue_staticRenderFns__$j = [];
6398
+ __vue_render__$j._withStripped = true;
6356
6399
 
6357
6400
  /* style */
6358
- const __vue_inject_styles__$i = function (inject) {
6401
+ const __vue_inject_styles__$j = function (inject) {
6359
6402
  if (!inject) return
6360
6403
  inject("data-v-586a9dc8_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
6361
6404
 
6362
6405
  };
6363
6406
  /* scoped */
6364
- const __vue_scope_id__$i = "data-v-586a9dc8";
6407
+ const __vue_scope_id__$j = "data-v-586a9dc8";
6365
6408
  /* module identifier */
6366
- const __vue_module_identifier__$i = undefined;
6409
+ const __vue_module_identifier__$j = undefined;
6367
6410
  /* functional template */
6368
- const __vue_is_functional_template__$i = false;
6411
+ const __vue_is_functional_template__$j = false;
6369
6412
  /* style inject SSR */
6370
6413
 
6371
6414
  /* style inject shadow dom */
6372
6415
 
6373
6416
 
6374
6417
 
6375
- const __vue_component__$i = /*#__PURE__*/normalizeComponent(
6376
- { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
6377
- __vue_inject_styles__$i,
6378
- __vue_script__$i,
6379
- __vue_scope_id__$i,
6380
- __vue_is_functional_template__$i,
6381
- __vue_module_identifier__$i,
6418
+ const __vue_component__$j = /*#__PURE__*/normalizeComponent(
6419
+ { render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
6420
+ __vue_inject_styles__$j,
6421
+ __vue_script__$j,
6422
+ __vue_scope_id__$j,
6423
+ __vue_is_functional_template__$j,
6424
+ __vue_module_identifier__$j,
6382
6425
  false,
6383
6426
  createInjector,
6384
6427
  undefined,
6385
6428
  undefined
6386
6429
  );
6387
6430
 
6388
- __vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
6431
+ __vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __vue_component__$j);
6389
6432
 
6390
6433
  //
6391
- var script$h = {
6434
+ var script$i = {
6392
6435
  name: 'ele-timeline',
6393
6436
  props: {
6394
6437
  url: {
@@ -6476,10 +6519,10 @@ var script$h = {
6476
6519
  };
6477
6520
 
6478
6521
  /* script */
6479
- const __vue_script__$h = script$h;
6522
+ const __vue_script__$i = script$i;
6480
6523
 
6481
6524
  /* template */
6482
- var __vue_render__$h = function () {
6525
+ var __vue_render__$i = function () {
6483
6526
  var _vm = this;
6484
6527
  var _h = _vm.$createElement;
6485
6528
  var _c = _vm._self._c || _h;
@@ -6557,7 +6600,7 @@ var __vue_render__$h = function () {
6557
6600
  0
6558
6601
  )
6559
6602
  };
6560
- var __vue_staticRenderFns__$h = [
6603
+ var __vue_staticRenderFns__$i = [
6561
6604
  function () {
6562
6605
  var _vm = this;
6563
6606
  var _h = _vm.$createElement;
@@ -6569,41 +6612,41 @@ var __vue_staticRenderFns__$h = [
6569
6612
  ])
6570
6613
  },
6571
6614
  ];
6572
- __vue_render__$h._withStripped = true;
6615
+ __vue_render__$i._withStripped = true;
6573
6616
 
6574
6617
  /* style */
6575
- const __vue_inject_styles__$h = function (inject) {
6618
+ const __vue_inject_styles__$i = function (inject) {
6576
6619
  if (!inject) return
6577
6620
  inject("data-v-4eb77e98_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
6578
6621
  ,inject("data-v-4eb77e98_1", { source: ".ele-timeline__wrapper[data-v-4eb77e98] {\n width: 100%;\n height: 100%;\n}\n.ele-timeline__wrapper .ele-timeline__item[data-v-4eb77e98] {\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item:last-child .ele-timeline__middle .ele-timeline__traline[data-v-4eb77e98] {\n display: none;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left[data-v-4eb77e98] {\n flex: 1;\n padding-right: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n text-align: right;\n display: flex;\n flex-direction: row;\n justify-content: end;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left .titleline-left__date[data-v-4eb77e98] {\n width: 100px;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle[data-v-4eb77e98] {\n width: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n transform: translate(0, 20px);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__circle[data-v-4eb77e98] {\n width: 100%;\n height: 10px;\n border-radius: 50%;\n border-width: 2px;\n border-style: solid;\n border-color: var(--idooel-primary-color);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__traline[data-v-4eb77e98] {\n width: 1px;\n height: calc(100% - 10px);\n border-width: 1px;\n border-style: solid;\n border-color: var(--idoole-black-016);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right[data-v-4eb77e98] {\n text-align: left;\n flex: 2;\n padding-left: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title[data-v-4eb77e98] {\n line-height: 22px;\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title[data-v-4eb77e98] {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info[data-v-4eb77e98] {\n font-size: 14px;\n color: var(--idoole-black-064);\n margin-left: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info[data-v-4eb77e98]::before {\n content: \"\";\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 8px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.success[data-v-4eb77e98]::before {\n background: var(--idoole-success-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.warning[data-v-4eb77e98]::before {\n background: var(--idoole-warning-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.error[data-v-4eb77e98]::before {\n background: var(--idoole-error-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper[data-v-4eb77e98] {\n line-height: 22px;\n margin-top: 8px;\n margin-left: 12px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper .oper-name[data-v-4eb77e98] {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle[data-v-4eb77e98] {\n margin-left: 12px;\n display: flex;\n flex-direction: row;\n line-height: 22px;\n margin-top: 4px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__field[data-v-4eb77e98] {\n flex-shrink: 0;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__content[data-v-4eb77e98] {\n font-size: 14px;\n color: var(--idoole-black-088);\n font-weight: bold;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\timeline\\src\\index.vue","index.vue"],"names":[],"mappings":"AA6HA;EACA,WAAA;EACA,YAAA;AC5HA;AD6HA;EACA,aAAA;EACA,mBAAA;AC3HA;AD8HA;EACA,aAAA;AC5HA;ADgIA;EACA,OAAA;EACA,mBAAA;EACA,iBAAA;EACA,oBAAA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;AC9HA;AD+HA;EACA,YAAA;EACA,eAAA;EACA,8BAAA;AC7HA;ADgIA;EACA,WAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,6BAAA;AC9HA;AD+HA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;EACA,iBAAA;EACA,mBAAA;EACA,yCAAA;AC7HA;AD+HA;EACA,UAAA;EACA,yBAAA;EACA,iBAAA;EACA,mBAAA;EACA,qCAAA;AC7HA;ADgIA;EACA,gBAAA;EACA,OAAA;EACA,kBAAA;EACA,iBAAA;EACA,oBAAA;AC9HA;AD+HA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;AC7HA;AD8HA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;AC5HA;AD8HA;EACA,eAAA;EACA,8BAAA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AC5HA;AD6HA;EACA,WAAA;EACA,qBAAA;EACA,UAAA;EACA,WAAA;EACA,kBAAA;EACA,iBAAA;AC3HA;AD8HA;EACA,oCAAA;AC5HA;ADgIA;EACA,oCAAA;AC9HA;ADkIA;EACA,kCAAA;AChIA;ADqIA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;ACnIA;ADoIA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;AClIA;ADqIA;EACA,iBAAA;EACA,aAAA;EACA,mBAAA;EACA,iBAAA;EACA,eAAA;ACnIA;ADoIA;EACA,cAAA;EACA,eAAA;EACA,8BAAA;AClIA;ADoIA;EACA,eAAA;EACA,8BAAA;EACA,iBAAA;EACA,gBAAA;AClIA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-timeline__wrapper\">\r\n <div class=\"ele-timeline__item\" v-for=\"item in innerDataSource\" :key=\"item.key\">\r\n <div class=\"ele-timeline__left\">\r\n <div class=\"titleline-left__date\">{{ item.date }}</div>\r\n </div>\r\n <div class=\"ele-timeline__middle\">\r\n <div class=\"ele-timeline__circle\"></div>\r\n <div class=\"ele-timeline__traline\"></div>\r\n </div>\r\n <div class=\"ele-timeline__right\">\r\n <slot v-if=\"$scopedSlots.right\" name=\"right\" :data=\"item\"></slot>\r\n <template v-else>\r\n <div class=\"timeline-right__title\">\r\n <span class=\"title\">{{ item.title }}</span>\r\n <span :class=\"['title-info', item.state == 1 && 'success', item.state == 2 && 'warning', item.state == 3 && 'error']\">{{ item.stateName }}</span>\r\n </div>\r\n <div class=\"timeline-right__oper\">\r\n 由\r\n <span class=\"oper-name\">{{ item.userName }}</span>\r\n 操作\r\n </div>\r\n <div class=\"timeline-right__subtitle\" v-for=\"label in item.labelList\" :key=\"label.value\">\r\n <div class=\"right-subtitle__field\">{{ label.label }}:</div>\r\n <div class=\"right-subtitle__content\">{{ label.value }}</div>\r\n </div>\r\n </template>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { net, type } from '@idooel/shared'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { CONTEXT, parseFieldMap } from '../../utils'\r\nexport default {\r\n name: 'ele-timeline',\r\n props: {\r\n url: {\r\n type: String\r\n },\r\n params: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n requestType: {\r\n type: String,\r\n default: 'GET'\r\n },\r\n fieldMap: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => ([\r\n // {\r\n // date: '2023/05/09 03:34:56',\r\n // title: 123,\r\n // state: 1,\r\n // stateName: '成功',\r\n // userName: 'Name',\r\n // labelList: [\r\n // {\r\n // label: 'label',\r\n // value: 'value'\r\n // }\r\n // ],\r\n // action: '结班',\r\n // opinion: '意见'\r\n // }\r\n ])\r\n }\r\n },\r\n data () {\r\n return {\r\n innerDataSource: []\r\n }\r\n },\r\n inject: {\r\n [CONTEXT]: {\r\n default: () => (() => ({}))\r\n }\r\n },\r\n computed: {\r\n expressionData () {\r\n return {\r\n _route: this.$route.query,\r\n ...this[CONTEXT]()\r\n }\r\n }\r\n },\r\n async created() {\r\n if (this.url) {\r\n this.innerDataSource = await this.requestData()\r\n } else if (!type.isEmpty(this.dataSource)) {\r\n this.innerDataSource = this.dataSource\r\n } else {\r\n console.warn('ele-timeline: 请传入数据源')\r\n }\r\n },\r\n methods: {\r\n async requestData () {\r\n const ret = await net[this.requestType.toLowerCase()](\r\n this.url,\r\n { ...this.params, ...parseFieldMap(this.fieldMap, this.expressionData) }\r\n ).then(resp => {\r\n const { data } = resp || {}\r\n return data.map(item => {\r\n return {\r\n key: uuidv4(),\r\n ...item\r\n }\r\n })\r\n })\r\n return ret\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\">\r\n@import '../../theme/index';\r\n</style>\r\n<style lang=\"scss\" scoped>\r\n.ele-timeline__wrapper {\r\n width: 100%;\r\n height: 100%;\r\n .ele-timeline__item {\r\n display: flex;\r\n flex-direction: row;\r\n &:last-child {\r\n .ele-timeline__middle {\r\n .ele-timeline__traline {\r\n display: none;\r\n }\r\n }\r\n }\r\n .ele-timeline__left {\r\n flex: 1;\r\n padding-right: 12px;\r\n padding-top: 16px;\r\n padding-bottom: 16px;\r\n text-align: right;\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: end;\r\n .titleline-left__date {\r\n width: 100px;\r\n font-size: 14px;\r\n color: var(--idoole-black-064);\r\n }\r\n }\r\n .ele-timeline__middle {\r\n width: 10px;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n transform: translate(0, 20px);\r\n .ele-timeline__circle {\r\n width: 100%;\r\n height: 10px;\r\n border-radius: 50%;\r\n border-width: 2px;\r\n border-style: solid;\r\n border-color: var(--idooel-primary-color);\r\n }\r\n .ele-timeline__traline {\r\n width: 1px;\r\n height: calc(100% - 10px);\r\n border-width: 1px;\r\n border-style: solid;\r\n border-color: var(--idoole-black-016);\r\n }\r\n }\r\n .ele-timeline__right {\r\n text-align: left;\r\n flex: 2;\r\n padding-left: 12px;\r\n padding-top: 16px;\r\n padding-bottom: 16px;\r\n .timeline-right__title {\r\n line-height: 22px;\r\n display: flex;\r\n flex-direction: row;\r\n .title {\r\n color: var(--idoole-black-088);\r\n font-size: 14px;\r\n font-weight: bold;\r\n }\r\n .title-info {\r\n font-size: 14px;\r\n color: var(--idoole-black-064);\r\n margin-left: 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n &::before {\r\n content: '';\r\n display: inline-block;\r\n width: 6px;\r\n height: 6px;\r\n border-radius: 50%;\r\n margin-right: 8px;\r\n }\r\n &.success {\r\n &::before {\r\n background: var(--idoole-success-06);\r\n }\r\n }\r\n &.warning {\r\n &::before {\r\n background: var(--idoole-warning-06);\r\n }\r\n }\r\n &.error {\r\n &::before {\r\n background: var(--idoole-error-06);\r\n }\r\n }\r\n }\r\n }\r\n .timeline-right__oper {\r\n line-height: 22px;\r\n margin-top: 8px;\r\n margin-left: 12px;\r\n .oper-name {\r\n color: var(--idoole-black-088);\r\n font-size: 14px;\r\n font-weight: bold;\r\n }\r\n }\r\n .timeline-right__subtitle {\r\n margin-left: 12px;\r\n display: flex;\r\n flex-direction: row;\r\n line-height: 22px;\r\n margin-top: 4px;\r\n .right-subtitle__field {\r\n flex-shrink: 0;\r\n font-size: 14px;\r\n color: var(--idoole-black-064);\r\n }\r\n .right-subtitle__content {\r\n font-size: 14px;\r\n color: var(--idoole-black-088);\r\n font-weight: bold;\r\n margin-left: 4px;\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</style>",".ele-timeline__wrapper {\n width: 100%;\n height: 100%;\n}\n.ele-timeline__wrapper .ele-timeline__item {\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item:last-child .ele-timeline__middle .ele-timeline__traline {\n display: none;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left {\n flex: 1;\n padding-right: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n text-align: right;\n display: flex;\n flex-direction: row;\n justify-content: end;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__left .titleline-left__date {\n width: 100px;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle {\n width: 10px;\n display: flex;\n flex-direction: column;\n align-items: center;\n transform: translate(0, 20px);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__circle {\n width: 100%;\n height: 10px;\n border-radius: 50%;\n border-width: 2px;\n border-style: solid;\n border-color: var(--idooel-primary-color);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__middle .ele-timeline__traline {\n width: 1px;\n height: calc(100% - 10px);\n border-width: 1px;\n border-style: solid;\n border-color: var(--idoole-black-016);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right {\n text-align: left;\n flex: 2;\n padding-left: 12px;\n padding-top: 16px;\n padding-bottom: 16px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title {\n line-height: 22px;\n display: flex;\n flex-direction: row;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info {\n font-size: 14px;\n color: var(--idoole-black-064);\n margin-left: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info::before {\n content: \"\";\n display: inline-block;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n margin-right: 8px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.success::before {\n background: var(--idoole-success-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.warning::before {\n background: var(--idoole-warning-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__title .title-info.error::before {\n background: var(--idoole-error-06);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper {\n line-height: 22px;\n margin-top: 8px;\n margin-left: 12px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__oper .oper-name {\n color: var(--idoole-black-088);\n font-size: 14px;\n font-weight: bold;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle {\n margin-left: 12px;\n display: flex;\n flex-direction: row;\n line-height: 22px;\n margin-top: 4px;\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__field {\n flex-shrink: 0;\n font-size: 14px;\n color: var(--idoole-black-064);\n}\n.ele-timeline__wrapper .ele-timeline__item .ele-timeline__right .timeline-right__subtitle .right-subtitle__content {\n font-size: 14px;\n color: var(--idoole-black-088);\n font-weight: bold;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
6579
6622
 
6580
6623
  };
6581
6624
  /* scoped */
6582
- const __vue_scope_id__$h = "data-v-4eb77e98";
6625
+ const __vue_scope_id__$i = "data-v-4eb77e98";
6583
6626
  /* module identifier */
6584
- const __vue_module_identifier__$h = undefined;
6627
+ const __vue_module_identifier__$i = undefined;
6585
6628
  /* functional template */
6586
- const __vue_is_functional_template__$h = false;
6629
+ const __vue_is_functional_template__$i = false;
6587
6630
  /* style inject SSR */
6588
6631
 
6589
6632
  /* style inject shadow dom */
6590
6633
 
6591
6634
 
6592
6635
 
6593
- const __vue_component__$h = /*#__PURE__*/normalizeComponent(
6594
- { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
6595
- __vue_inject_styles__$h,
6596
- __vue_script__$h,
6597
- __vue_scope_id__$h,
6598
- __vue_is_functional_template__$h,
6599
- __vue_module_identifier__$h,
6636
+ const __vue_component__$i = /*#__PURE__*/normalizeComponent(
6637
+ { render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
6638
+ __vue_inject_styles__$i,
6639
+ __vue_script__$i,
6640
+ __vue_scope_id__$i,
6641
+ __vue_is_functional_template__$i,
6642
+ __vue_module_identifier__$i,
6600
6643
  false,
6601
6644
  createInjector,
6602
6645
  undefined,
6603
6646
  undefined
6604
6647
  );
6605
6648
 
6606
- __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
6649
+ __vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
6607
6650
 
6608
6651
  //
6609
6652
  //
@@ -6613,7 +6656,7 @@ __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __v
6613
6656
  //
6614
6657
  //
6615
6658
 
6616
- var script$g = {
6659
+ var script$h = {
6617
6660
  name: 'ele-text',
6618
6661
  props: {
6619
6662
  type: {
@@ -6633,10 +6676,10 @@ var script$g = {
6633
6676
  };
6634
6677
 
6635
6678
  /* script */
6636
- const __vue_script__$g = script$g;
6679
+ const __vue_script__$h = script$h;
6637
6680
 
6638
6681
  /* template */
6639
- var __vue_render__$g = function () {
6682
+ var __vue_render__$h = function () {
6640
6683
  var _vm = this;
6641
6684
  var _h = _vm.$createElement;
6642
6685
  var _c = _vm._self._c || _h;
@@ -6651,41 +6694,41 @@ var __vue_render__$g = function () {
6651
6694
  1
6652
6695
  )
6653
6696
  };
6654
- var __vue_staticRenderFns__$g = [];
6655
- __vue_render__$g._withStripped = true;
6697
+ var __vue_staticRenderFns__$h = [];
6698
+ __vue_render__$h._withStripped = true;
6656
6699
 
6657
6700
  /* style */
6658
- const __vue_inject_styles__$g = function (inject) {
6701
+ const __vue_inject_styles__$h = function (inject) {
6659
6702
  if (!inject) return
6660
6703
  inject("data-v-241d84da_0", { source: ".ele-text__wrapper[data-v-241d84da] {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-text__wrapper.default .anticon[data-v-241d84da], .ele-text__wrapper.default .message[data-v-241d84da] {\n color: var(--idoole-black-064);\n}\n.ele-text__wrapper .anticon[data-v-241d84da] {\n font-size: 16px;\n}\n.ele-text__wrapper .message[data-v-241d84da] {\n font-size: 14px;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\text\\src\\index.vue","index.vue"],"names":[],"mappings":"AA8BA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AC7BA;AD+BA;EACA,8BAAA;AC7BA;ADgCA;EACA,eAAA;AC9BA;ADgCA;EACA,eAAA;EACA,gBAAA;AC9BA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div :class=\"['ele-text__wrapper', type]\">\r\n <ele-icon theme=\"filled\" :type=\"icon\"></ele-icon>\r\n <span class=\"message\">{{ message }}</span>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-text',\r\n props: {\r\n type: {\r\n String,\r\n // default success error warning info\r\n default: 'default'\r\n },\r\n message: {\r\n type: String\r\n }\r\n },\r\n computed: {\r\n icon() {\r\n return 'info-circle'\r\n }\r\n },\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n//\r\n.ele-text__wrapper {\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n &.default {\r\n .anticon, .message {\r\n color: var(--idoole-black-064);\r\n }\r\n }\r\n .anticon {\r\n font-size: 16px;\r\n }\r\n .message {\r\n font-size: 14px;\r\n margin-left: 4px;\r\n }\r\n}\r\n</style>",".ele-text__wrapper {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.ele-text__wrapper.default .anticon, .ele-text__wrapper.default .message {\n color: var(--idoole-black-064);\n}\n.ele-text__wrapper .anticon {\n font-size: 16px;\n}\n.ele-text__wrapper .message {\n font-size: 14px;\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
6661
6704
 
6662
6705
  };
6663
6706
  /* scoped */
6664
- const __vue_scope_id__$g = "data-v-241d84da";
6707
+ const __vue_scope_id__$h = "data-v-241d84da";
6665
6708
  /* module identifier */
6666
- const __vue_module_identifier__$g = undefined;
6709
+ const __vue_module_identifier__$h = undefined;
6667
6710
  /* functional template */
6668
- const __vue_is_functional_template__$g = false;
6711
+ const __vue_is_functional_template__$h = false;
6669
6712
  /* style inject SSR */
6670
6713
 
6671
6714
  /* style inject shadow dom */
6672
6715
 
6673
-
6674
-
6675
- const __vue_component__$g = /*#__PURE__*/normalizeComponent(
6676
- { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
6677
- __vue_inject_styles__$g,
6678
- __vue_script__$g,
6679
- __vue_scope_id__$g,
6680
- __vue_is_functional_template__$g,
6681
- __vue_module_identifier__$g,
6716
+
6717
+
6718
+ const __vue_component__$h = /*#__PURE__*/normalizeComponent(
6719
+ { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
6720
+ __vue_inject_styles__$h,
6721
+ __vue_script__$h,
6722
+ __vue_scope_id__$h,
6723
+ __vue_is_functional_template__$h,
6724
+ __vue_module_identifier__$h,
6682
6725
  false,
6683
6726
  createInjector,
6684
6727
  undefined,
6685
6728
  undefined
6686
6729
  );
6687
6730
 
6688
- __vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
6731
+ __vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
6689
6732
 
6690
6733
  //
6691
6734
  //
@@ -6702,7 +6745,7 @@ __vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __v
6702
6745
  //
6703
6746
  //
6704
6747
 
6705
- var script$f = {
6748
+ var script$g = {
6706
6749
  name: 'ele-tabs',
6707
6750
  components: {},
6708
6751
  model: {
@@ -6738,10 +6781,10 @@ var script$f = {
6738
6781
  };
6739
6782
 
6740
6783
  /* script */
6741
- const __vue_script__$f = script$f;
6784
+ const __vue_script__$g = script$g;
6742
6785
 
6743
6786
  /* template */
6744
- var __vue_render__$f = function () {
6787
+ var __vue_render__$g = function () {
6745
6788
  var _vm = this;
6746
6789
  var _h = _vm.$createElement;
6747
6790
  var _c = _vm._self._c || _h;
@@ -6792,41 +6835,41 @@ var __vue_render__$f = function () {
6792
6835
  1
6793
6836
  )
6794
6837
  };
6795
- var __vue_staticRenderFns__$f = [];
6796
- __vue_render__$f._withStripped = true;
6838
+ var __vue_staticRenderFns__$g = [];
6839
+ __vue_render__$g._withStripped = true;
6797
6840
 
6798
6841
  /* style */
6799
- const __vue_inject_styles__$f = function (inject) {
6842
+ const __vue_inject_styles__$g = function (inject) {
6800
6843
  if (!inject) return
6801
6844
  inject("data-v-592dffe2_0", { source: "[data-v-592dffe2] .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\tabs\\src\\index.vue","index.vue"],"names":[],"mappings":"AAoDA;EACA,sBAAA;ACnDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div>\r\n <a-tabs :default-active-key=\"activeKey\" :tabBarGutter=\"tabBarGutter\" :tabBarStyle=\"tabBarStyle\" @change=\"changeHandle\">\r\n <a-tab-pane v-for=\"(item, index) in tabsList\" :key=\"index\" :tab=\"item.tabName\" :disabled=\"item.disabled\">\r\n <template #tab>\r\n <component v-if=\"item.renderHeader\" :is=\"item.renderHeader\" ></component>\r\n <span v-else>{{ item.tabName }}</span>\r\n </template>\r\n <component :is=\"item.content\"></component>\r\n </a-tab-pane>\r\n </a-tabs>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-tabs',\r\n components: {},\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n activeKey: {\r\n type: Number,\r\n default: 0\r\n },\r\n tabsList: {\r\n type: Array,\r\n default () {\r\n return []\r\n }\r\n },\r\n tabBarStyle: {\r\n type: Object,\r\n default () {\r\n return {}\r\n }\r\n },\r\n tabBarGutter: {\r\n type: Number\r\n }\r\n },\r\n methods: {\r\n changeHandle (key) {\r\n this.$emit('changeActiveKey', key)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .ant-tabs-nav-scroll {\r\n float: left !important;\r\n}\r\n</style>","::v-deep .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
6802
6845
 
6803
6846
  };
6804
6847
  /* scoped */
6805
- const __vue_scope_id__$f = "data-v-592dffe2";
6848
+ const __vue_scope_id__$g = "data-v-592dffe2";
6806
6849
  /* module identifier */
6807
- const __vue_module_identifier__$f = undefined;
6850
+ const __vue_module_identifier__$g = undefined;
6808
6851
  /* functional template */
6809
- const __vue_is_functional_template__$f = false;
6852
+ const __vue_is_functional_template__$g = false;
6810
6853
  /* style inject SSR */
6811
6854
 
6812
6855
  /* style inject shadow dom */
6813
6856
 
6814
6857
 
6815
6858
 
6816
- const __vue_component__$f = /*#__PURE__*/normalizeComponent(
6817
- { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
6818
- __vue_inject_styles__$f,
6819
- __vue_script__$f,
6820
- __vue_scope_id__$f,
6821
- __vue_is_functional_template__$f,
6822
- __vue_module_identifier__$f,
6859
+ const __vue_component__$g = /*#__PURE__*/normalizeComponent(
6860
+ { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
6861
+ __vue_inject_styles__$g,
6862
+ __vue_script__$g,
6863
+ __vue_scope_id__$g,
6864
+ __vue_is_functional_template__$g,
6865
+ __vue_module_identifier__$g,
6823
6866
  false,
6824
6867
  createInjector,
6825
6868
  undefined,
6826
6869
  undefined
6827
6870
  );
6828
6871
 
6829
- __vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
6872
+ __vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
6830
6873
 
6831
6874
  /*!
6832
6875
  * Cropper.js v1.4.1
@@ -10538,7 +10581,7 @@ var Cropper = function () {
10538
10581
  assign(Cropper.prototype, render, preview, events, handlers, change, methods);
10539
10582
 
10540
10583
  //
10541
- var script$e = {
10584
+ var script$f = {
10542
10585
  name: 'ele-modal-img-crop',
10543
10586
  model: {
10544
10587
  event: 'input',
@@ -10606,7 +10649,7 @@ var script$e = {
10606
10649
  return v4();
10607
10650
  },
10608
10651
  imageUrl() {
10609
- return `api-file/workbench/file/stream/${this.fileId}?origin=true`;
10652
+ return `/api-file/workbench/file/stream/${this.fileId}?origin=true`;
10610
10653
  },
10611
10654
  getEleModal() {
10612
10655
  return v4();
@@ -10626,6 +10669,10 @@ var script$e = {
10626
10669
  }
10627
10670
  },
10628
10671
  methods: {
10672
+ handleCancel() {
10673
+ this.$emit('input', false);
10674
+ this.$emit('change', this.fileId);
10675
+ },
10629
10676
  handleClickDeleteFile() {
10630
10677
  this.fileId = null;
10631
10678
  this.fileName = null;
@@ -10679,10 +10726,10 @@ var script$e = {
10679
10726
  };
10680
10727
 
10681
10728
  /* script */
10682
- const __vue_script__$e = script$e;
10729
+ const __vue_script__$f = script$f;
10683
10730
 
10684
10731
  /* template */
10685
- var __vue_render__$e = function () {
10732
+ var __vue_render__$f = function () {
10686
10733
  var _vm = this;
10687
10734
  var _h = _vm.$createElement;
10688
10735
  var _c = _vm._self._c || _h;
@@ -10702,7 +10749,7 @@ var __vue_render__$e = function () {
10702
10749
  value: _vm.value,
10703
10750
  showDefaultFooter: true,
10704
10751
  },
10705
- on: { ok: _vm.handleOk },
10752
+ on: { ok: _vm.handleOk, cancel: _vm.handleCancel },
10706
10753
  },
10707
10754
  _vm.$listeners
10708
10755
  ),
@@ -10800,44 +10847,44 @@ var __vue_render__$e = function () {
10800
10847
  1
10801
10848
  )
10802
10849
  };
10803
- var __vue_staticRenderFns__$e = [];
10804
- __vue_render__$e._withStripped = true;
10850
+ var __vue_staticRenderFns__$f = [];
10851
+ __vue_render__$f._withStripped = true;
10805
10852
 
10806
10853
  /* style */
10807
- const __vue_inject_styles__$e = function (inject) {
10854
+ const __vue_inject_styles__$f = function (inject) {
10808
10855
  if (!inject) return
10809
- inject("data-v-224b9a4e_0", { source: "[data-v-224b9a4e] .ant-modal-body {\n padding: 16px;\n}\n[data-v-224b9a4e] .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper[data-v-224b9a4e] {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg[data-v-224b9a4e] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .img-crop-left__image[data-v-224b9a4e] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-224b9a4e] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-224b9a4e] .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-224b9a4e] .ele-upload__inner .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-224b9a4e] .ele-upload__inner .ele-upload__area .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1[data-v-224b9a4e] {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2[data-v-224b9a4e] {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update[data-v-224b9a4e] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right[data-v-224b9a4e] {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span[data-v-224b9a4e] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right .img-crop-right__image[data-v-224b9a4e] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item[data-v-224b9a4e] {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n.ele-imgCrop__tips[data-v-224b9a4e] {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error[data-v-224b9a4e] {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2[data-v-224b9a4e] {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon[data-v-224b9a4e] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\modal-img-crop\\src\\index.vue","index.vue"],"names":[],"mappings":"AAsLA;EACA,aAAA;ACrLA;ADuLA;EACA,aAAA;ACpLA;ADsLA;EACA,aAAA;EACA,SAAA;EACA,uBAAA;EACA,mBAAA;ACnLA;ADqLA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ACnLA;ADoLA;EACA,WAAA;EACA,YAAA;AClLA;ADoLA;EACA,WAAA;EACA,YAAA;AClLA;ADmLA;EACA,YAAA;EACA,aAAA;EACA,kCAAA;ACjLA;ADkLA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;AChLA;ADiLA;EACA,gBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;AC/KA;ADoLA;EACA,8BAAA;EACA,eAAA;EACA,4BAAA;AClLA;ADoLA;EACA,6BAAA;EACA,eAAA;EACA,iBAAA;AClLA;ADqLA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;ACnLA;ADsLA;EACA,kBAAA;ACpLA;ADqLA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;ACnLA;ADqLA;EACA,WAAA;EACA,YAAA;ACnLA;ADsLA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,wDAAA;EACA,8CAAA;ACpLA;ADuLA;EACA,WAAA;EACA,UAAA;ACpLA;ADsLA;EACA,qDAAA;ACnLA;ADqLA;EACA,kDAAA;AClLA;ADoLA;EACA,eAAA;EACA,4BAAA;ACjLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div>\r\n <ele-modal\r\n :ref=\"getEleModal\"\r\n :title=\"title\"\r\n :cancelText=\"cancelText\"\r\n :maskClosable=\"maskClosable\"\r\n v-on=\"$listeners\"\r\n :size=\"size\"\r\n :value=\"value\"\r\n @ok=\"handleOk\"\r\n :showDefaultFooter=\"true\"\r\n >\r\n <div class=\"ele-imgCrop__wrapper\">\r\n <div class=\"ele-imgCrop__left ele-imgCrop__item\">\r\n <div class=\"ele-imgCrop__noImg\">\r\n <ele-upload v-if=\"!fileId\" v-bind=\"uploadFileConfig\" class=\"ele-img-crop__upload\" @on-success=\"onUploadFileSuccess\" icon=\"inbox\" url=\"api/zuul/api-file/workbench/file\"></ele-upload>\r\n <template v-else>\r\n <img :ref=\"leftImage\" class=\"img-crop-left__image\" :src=\"imageUrl\" alt=\"\">\r\n </template>\r\n </div>\r\n <div class=\"margin-t-8\">\r\n <span v-if=\"imgtips\" class=\"ele-imgCrop__font1 ele-imgCrop__tips\" :class=\"isFail? 'ele-imgCrop__error' : ''\">{{ imgtips }}</span>\r\n <template v-else>\r\n <span class=\"ele-imgCrop__font1\">{{ fileName }}</span>\r\n <a-icon v-if=\"fileName\" @click=\"handleClickDeleteFile\" type=\"close\" style=\"cursor: pointer;float: right; line-height: 24px;\"/>\r\n </template>\r\n </div>\r\n </div>\r\n <div class=\"ele-imgCrop__right ele-imgCrop__item\">\r\n <span v-if=\"!fileId\" class=\"ele-imgCrop__font2\">左侧上传图片后可预览</span>\r\n <template v-else>\r\n <img class=\"img-crop-right__image\" :src=\"previewBase\" alt=\"\">\r\n </template>\r\n </div>\r\n </div>\r\n </ele-modal>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport Cropper from 'cropperjs'\r\nimport { util, net } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-modal-img-crop',\r\n model: {\r\n event: 'input',\r\n prop: 'value'\r\n },\r\n props: {\r\n title: {\r\n type: String,\r\n default: '图像裁剪'\r\n },\r\n uploadFileConfig: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n size: 10,\r\n accept: '*',\r\n byteConversion: 1024 * 1024\r\n }\r\n }\r\n },\r\n imageId: {\r\n type: String\r\n },\r\n maskClosable: {\r\n type: Boolean,\r\n default () {\r\n return false\r\n }\r\n },\r\n size: {\r\n type: String,\r\n default () {\r\n return 'big'\r\n }\r\n },\r\n value: {\r\n type: Boolean,\r\n default () {\r\n return false\r\n }\r\n },\r\n cropperConfig: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n aspectRatio: 16 / 9\r\n }\r\n }\r\n }\r\n },\r\n data () {\r\n return {\r\n haveImg: false,\r\n imgtips: null,\r\n isFail: false,\r\n cancelText: '取消',\r\n fileName: null,\r\n fileId: null,\r\n previewBase: null,\r\n cropper: null\r\n }\r\n },\r\n computed: {\r\n leftImage () {\r\n return uuidv4()\r\n },\r\n imageUrl () {\r\n return `api-file/workbench/file/stream/${this.fileId}?origin=true`\r\n },\r\n getEleModal () {\r\n return uuidv4()\r\n }\r\n },\r\n watch: {\r\n value: {\r\n handler (value) {\r\n this.fileId = this.imageId\r\n if (value && this.fileId) {\r\n setTimeout(() => {\r\n this.initCropper()\r\n })\r\n }\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n handleClickDeleteFile () {\r\n this.fileId = null\r\n this.fileName = null\r\n },\r\n handleOk () {\r\n this.cropper.getCroppedCanvas().toBlob(async (blob) => {\r\n await this.uploadFile(blob)\r\n this.$emit('input', false)\r\n this.$emit('change', this.fileId)\r\n })\r\n },\r\n async uploadFile (file) {\r\n const formData = new FormData()\r\n formData.append('serviceCode', 'cover-image')\r\n formData.append('_t', Math.random())\r\n formData.append('file', file)\r\n await net.post(\r\n 'zuul/api-file/workbench/file' + '?_csrf=' + localStorage.getItem('token'),\r\n formData\r\n ).then(() => {})\r\n },\r\n initCropper () {\r\n let previewReady = false\r\n console.log('this.$refs[this.leftImage', this.$refs[this.leftImage])\r\n this.cropper = new Cropper(this.$refs[this.leftImage], {\r\n aspectRatio: this.cropperConfig.aspectRatio,\r\n ready: () => {\r\n previewReady = true\r\n },\r\n crop: util.debounce(() => {\r\n if (!previewReady) {\r\n return\r\n }\r\n this.previewBase = this.cropper.getCroppedCanvas().toDataURL()\r\n }, 200)\r\n })\r\n },\r\n onUploadFileSuccess (props) {\r\n const { response: { data: { fileID } }, name } = props\r\n this.fileId = fileID\r\n this.fileName = name\r\n this.$nextTick(() => {\r\n this.initCropper()\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .ant-modal-body {\r\n padding: 16px;\r\n}\r\n::v-deep .ant-modal-header {\r\n padding: 16px;\r\n}\r\n.ele-imgCrop__wrapper {\r\n display: flex;\r\n gap: 16px;\r\n justify-content: center;\r\n margin-bottom: 30px;\r\n .ele-imgCrop__left {\r\n .ele-imgCrop__noImg {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n position: relative;\r\n .img-crop-left__image {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n .ele-img-crop__upload {\r\n width: 100%;\r\n height: 100%;\r\n ::v-deep .ele-upload__inner {\r\n height: 100%;\r\n border: unset;\r\n background: transparent !important;\r\n .ele-upload__area {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: center;\r\n .ele-upload__area--text {\r\n margin-top: 16px;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n }\r\n }\r\n }\r\n .ele-imgCrop__font1 {\r\n color: var(--idoole-black-088);\r\n font-size: 16px;\r\n line-height: 24px !important;\r\n }\r\n .ele-imgCrop__font2 {\r\n color: var(--idoole-black-06);\r\n font-size: 14px;\r\n line-height: 22px; \r\n }\r\n }\r\n .ele-imgCrop__update {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n opacity: 0;\r\n cursor: pointer;\r\n }\r\n }\r\n .ele-imgCrop__right {\r\n position: relative;\r\n span {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n }\r\n .img-crop-right__image {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n }\r\n .ele-imgCrop__item {\r\n width: 480px;\r\n height: 300px;\r\n border-radius: 2px;\r\n border: 1px dashed var(--idooel-form-title-border-color);\r\n background: var(--idooel-form-upload-bg-color);\r\n }\r\n}\r\n.ele-imgCrop__tips {\r\n float: left;\r\n width: 80%;\r\n}\r\n.ele-imgCrop__error {\r\n color: var(--idooel-form-border-err-color) !important;\r\n}\r\n.ele-imgCrop__error2 {\r\n color: var(--idooel-img-crop-err-color) !important;\r\n}\r\n.ele-imgCrop__icon {\r\n font-size: 48px;\r\n color: var(--idooel-link-06);\r\n}\r\n</style>","::v-deep .ant-modal-body {\n padding: 16px;\n}\n\n::v-deep .ant-modal-header {\n padding: 16px;\n}\n\n.ele-imgCrop__wrapper {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .img-crop-left__image {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner .ele-upload__area .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1 {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2 {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right .img-crop-right__image {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n\n.ele-imgCrop__tips {\n float: left;\n width: 80%;\n}\n\n.ele-imgCrop__error {\n color: var(--idooel-form-border-err-color) !important;\n}\n\n.ele-imgCrop__error2 {\n color: var(--idooel-img-crop-err-color) !important;\n}\n\n.ele-imgCrop__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
10856
+ inject("data-v-8d65d4ec_0", { source: "[data-v-8d65d4ec] .ant-modal-body {\n padding: 16px;\n}\n[data-v-8d65d4ec] .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper[data-v-8d65d4ec] {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg[data-v-8d65d4ec] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .img-crop-left__image[data-v-8d65d4ec] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-8d65d4ec] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-8d65d4ec] .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-8d65d4ec] .ele-upload__inner .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload[data-v-8d65d4ec] .ele-upload__inner .ele-upload__area .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1[data-v-8d65d4ec] {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2[data-v-8d65d4ec] {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update[data-v-8d65d4ec] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right[data-v-8d65d4ec] {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span[data-v-8d65d4ec] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right .img-crop-right__image[data-v-8d65d4ec] {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item[data-v-8d65d4ec] {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n.ele-imgCrop__tips[data-v-8d65d4ec] {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error[data-v-8d65d4ec] {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2[data-v-8d65d4ec] {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon[data-v-8d65d4ec] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\modal-img-crop\\src\\index.vue","index.vue"],"names":[],"mappings":"AA2LA;EACA,aAAA;AC1LA;AD4LA;EACA,aAAA;ACzLA;AD2LA;EACA,aAAA;EACA,SAAA;EACA,uBAAA;EACA,mBAAA;ACxLA;AD0LA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ACxLA;ADyLA;EACA,WAAA;EACA,YAAA;ACvLA;ADyLA;EACA,WAAA;EACA,YAAA;ACvLA;ADwLA;EACA,YAAA;EACA,aAAA;EACA,kCAAA;ACtLA;ADuLA;EACA,aAAA;EACA,sBAAA;EACA,YAAA;EACA,mBAAA;EACA,uBAAA;ACrLA;ADsLA;EACA,gBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;ACpLA;ADyLA;EACA,8BAAA;EACA,eAAA;EACA,4BAAA;ACvLA;ADyLA;EACA,6BAAA;EACA,eAAA;EACA,iBAAA;ACvLA;AD0LA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;ACxLA;AD2LA;EACA,kBAAA;ACzLA;AD0LA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;ACxLA;AD0LA;EACA,WAAA;EACA,YAAA;ACxLA;AD2LA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,wDAAA;EACA,8CAAA;ACzLA;AD4LA;EACA,WAAA;EACA,UAAA;ACzLA;AD2LA;EACA,qDAAA;ACxLA;AD0LA;EACA,kDAAA;ACvLA;ADyLA;EACA,eAAA;EACA,4BAAA;ACtLA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div>\r\n <ele-modal\r\n :ref=\"getEleModal\"\r\n :title=\"title\"\r\n :cancelText=\"cancelText\"\r\n :maskClosable=\"maskClosable\"\r\n v-on=\"$listeners\"\r\n :size=\"size\"\r\n :value=\"value\"\r\n @ok=\"handleOk\"\r\n @cancel=\"handleCancel\"\r\n :showDefaultFooter=\"true\"\r\n >\r\n <div class=\"ele-imgCrop__wrapper\">\r\n <div class=\"ele-imgCrop__left ele-imgCrop__item\">\r\n <div class=\"ele-imgCrop__noImg\">\r\n <ele-upload v-if=\"!fileId\" v-bind=\"uploadFileConfig\" class=\"ele-img-crop__upload\" @on-success=\"onUploadFileSuccess\" icon=\"inbox\" url=\"api/zuul/api-file/workbench/file\"></ele-upload>\r\n <template v-else>\r\n <img :ref=\"leftImage\" class=\"img-crop-left__image\" :src=\"imageUrl\" alt=\"\">\r\n </template>\r\n </div>\r\n <div class=\"margin-t-8\">\r\n <span v-if=\"imgtips\" class=\"ele-imgCrop__font1 ele-imgCrop__tips\" :class=\"isFail? 'ele-imgCrop__error' : ''\">{{ imgtips }}</span>\r\n <template v-else>\r\n <span class=\"ele-imgCrop__font1\">{{ fileName }}</span>\r\n <a-icon v-if=\"fileName\" @click=\"handleClickDeleteFile\" type=\"close\" style=\"cursor: pointer;float: right; line-height: 24px;\"/>\r\n </template>\r\n </div>\r\n </div>\r\n <div class=\"ele-imgCrop__right ele-imgCrop__item\">\r\n <span v-if=\"!fileId\" class=\"ele-imgCrop__font2\">左侧上传图片后可预览</span>\r\n <template v-else>\r\n <img class=\"img-crop-right__image\" :src=\"previewBase\" alt=\"\">\r\n </template>\r\n </div>\r\n </div>\r\n </ele-modal>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport Cropper from 'cropperjs'\r\nimport { util, net } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-modal-img-crop',\r\n model: {\r\n event: 'input',\r\n prop: 'value'\r\n },\r\n props: {\r\n title: {\r\n type: String,\r\n default: '图像裁剪'\r\n },\r\n uploadFileConfig: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n size: 10,\r\n accept: '*',\r\n byteConversion: 1024 * 1024\r\n }\r\n }\r\n },\r\n imageId: {\r\n type: String\r\n },\r\n maskClosable: {\r\n type: Boolean,\r\n default () {\r\n return false\r\n }\r\n },\r\n size: {\r\n type: String,\r\n default () {\r\n return 'big'\r\n }\r\n },\r\n value: {\r\n type: Boolean,\r\n default () {\r\n return false\r\n }\r\n },\r\n cropperConfig: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n aspectRatio: 16 / 9\r\n }\r\n }\r\n }\r\n },\r\n data () {\r\n return {\r\n haveImg: false,\r\n imgtips: null,\r\n isFail: false,\r\n cancelText: '取消',\r\n fileName: null,\r\n fileId: null,\r\n previewBase: null,\r\n cropper: null\r\n }\r\n },\r\n computed: {\r\n leftImage () {\r\n return uuidv4()\r\n },\r\n imageUrl () {\r\n return `/api-file/workbench/file/stream/${this.fileId}?origin=true`\r\n },\r\n getEleModal () {\r\n return uuidv4()\r\n }\r\n },\r\n watch: {\r\n value: {\r\n handler (value) {\r\n this.fileId = this.imageId\r\n if (value && this.fileId) {\r\n setTimeout(() => {\r\n this.initCropper()\r\n })\r\n }\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n handleCancel () {\r\n this.$emit('input', false)\r\n this.$emit('change', this.fileId)\r\n },\r\n handleClickDeleteFile () {\r\n this.fileId = null\r\n this.fileName = null\r\n },\r\n handleOk () {\r\n this.cropper.getCroppedCanvas().toBlob(async (blob) => {\r\n await this.uploadFile(blob)\r\n this.$emit('input', false)\r\n this.$emit('change', this.fileId)\r\n })\r\n },\r\n async uploadFile (file) {\r\n const formData = new FormData()\r\n formData.append('serviceCode', 'cover-image')\r\n formData.append('_t', Math.random())\r\n formData.append('file', file)\r\n await net.post(\r\n 'zuul/api-file/workbench/file' + '?_csrf=' + localStorage.getItem('token'),\r\n formData\r\n ).then(() => {})\r\n },\r\n initCropper () {\r\n let previewReady = false\r\n console.log('this.$refs[this.leftImage', this.$refs[this.leftImage])\r\n this.cropper = new Cropper(this.$refs[this.leftImage], {\r\n aspectRatio: this.cropperConfig.aspectRatio,\r\n ready: () => {\r\n previewReady = true\r\n },\r\n crop: util.debounce(() => {\r\n if (!previewReady) {\r\n return\r\n }\r\n this.previewBase = this.cropper.getCroppedCanvas().toDataURL()\r\n }, 200)\r\n })\r\n },\r\n onUploadFileSuccess (props) {\r\n const { response: { data: { fileID } }, name } = props\r\n this.fileId = fileID\r\n this.fileName = name\r\n this.$nextTick(() => {\r\n this.initCropper()\r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .ant-modal-body {\r\n padding: 16px;\r\n}\r\n::v-deep .ant-modal-header {\r\n padding: 16px;\r\n}\r\n.ele-imgCrop__wrapper {\r\n display: flex;\r\n gap: 16px;\r\n justify-content: center;\r\n margin-bottom: 30px;\r\n .ele-imgCrop__left {\r\n .ele-imgCrop__noImg {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n position: relative;\r\n .img-crop-left__image {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n .ele-img-crop__upload {\r\n width: 100%;\r\n height: 100%;\r\n ::v-deep .ele-upload__inner {\r\n height: 100%;\r\n border: unset;\r\n background: transparent !important;\r\n .ele-upload__area {\r\n display: flex;\r\n flex-direction: column;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: center;\r\n .ele-upload__area--text {\r\n margin-top: 16px;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n }\r\n }\r\n }\r\n .ele-imgCrop__font1 {\r\n color: var(--idoole-black-088);\r\n font-size: 16px;\r\n line-height: 24px !important;\r\n }\r\n .ele-imgCrop__font2 {\r\n color: var(--idoole-black-06);\r\n font-size: 14px;\r\n line-height: 22px; \r\n }\r\n }\r\n .ele-imgCrop__update {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n opacity: 0;\r\n cursor: pointer;\r\n }\r\n }\r\n .ele-imgCrop__right {\r\n position: relative;\r\n span {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n }\r\n .img-crop-right__image {\r\n width: 100%;\r\n height: 100%;\r\n }\r\n }\r\n .ele-imgCrop__item {\r\n width: 480px;\r\n height: 300px;\r\n border-radius: 2px;\r\n border: 1px dashed var(--idooel-form-title-border-color);\r\n background: var(--idooel-form-upload-bg-color);\r\n }\r\n}\r\n.ele-imgCrop__tips {\r\n float: left;\r\n width: 80%;\r\n}\r\n.ele-imgCrop__error {\r\n color: var(--idooel-form-border-err-color) !important;\r\n}\r\n.ele-imgCrop__error2 {\r\n color: var(--idooel-img-crop-err-color) !important;\r\n}\r\n.ele-imgCrop__icon {\r\n font-size: 48px;\r\n color: var(--idooel-link-06);\r\n}\r\n</style>","::v-deep .ant-modal-body {\n padding: 16px;\n}\n\n::v-deep .ant-modal-header {\n padding: 16px;\n}\n\n.ele-imgCrop__wrapper {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .img-crop-left__image {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner {\n height: 100%;\n border: unset;\n background: transparent !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner .ele-upload__area {\n display: flex;\n flex-direction: column;\n height: 100%;\n align-items: center;\n justify-content: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-img-crop__upload ::v-deep .ele-upload__inner .ele-upload__area .ele-upload__area--text {\n margin-top: 16px;\n display: flex;\n flex-direction: column;\n align-items: center;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1 {\n color: var(--idoole-black-088);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2 {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right .img-crop-right__image {\n width: 100%;\n height: 100%;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n\n.ele-imgCrop__tips {\n float: left;\n width: 80%;\n}\n\n.ele-imgCrop__error {\n color: var(--idooel-form-border-err-color) !important;\n}\n\n.ele-imgCrop__error2 {\n color: var(--idooel-img-crop-err-color) !important;\n}\n\n.ele-imgCrop__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
10810
10857
 
10811
10858
  };
10812
10859
  /* scoped */
10813
- const __vue_scope_id__$e = "data-v-224b9a4e";
10860
+ const __vue_scope_id__$f = "data-v-8d65d4ec";
10814
10861
  /* module identifier */
10815
- const __vue_module_identifier__$e = undefined;
10862
+ const __vue_module_identifier__$f = undefined;
10816
10863
  /* functional template */
10817
- const __vue_is_functional_template__$e = false;
10864
+ const __vue_is_functional_template__$f = false;
10818
10865
  /* style inject SSR */
10819
10866
 
10820
10867
  /* style inject shadow dom */
10821
10868
 
10822
10869
 
10823
10870
 
10824
- const __vue_component__$e = /*#__PURE__*/normalizeComponent(
10825
- { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
10826
- __vue_inject_styles__$e,
10827
- __vue_script__$e,
10828
- __vue_scope_id__$e,
10829
- __vue_is_functional_template__$e,
10830
- __vue_module_identifier__$e,
10871
+ const __vue_component__$f = /*#__PURE__*/normalizeComponent(
10872
+ { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
10873
+ __vue_inject_styles__$f,
10874
+ __vue_script__$f,
10875
+ __vue_scope_id__$f,
10876
+ __vue_is_functional_template__$f,
10877
+ __vue_module_identifier__$f,
10831
10878
  false,
10832
10879
  createInjector,
10833
10880
  undefined,
10834
10881
  undefined
10835
10882
  );
10836
10883
 
10837
- __vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
10884
+ __vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
10838
10885
 
10839
10886
  //
10840
- var script$d = {
10887
+ var script$e = {
10841
10888
  name: 'ele-text-editor',
10842
10889
  props: {
10843
10890
  editorWidth: {
@@ -10883,10 +10930,10 @@ var script$d = {
10883
10930
  };
10884
10931
 
10885
10932
  /* script */
10886
- const __vue_script__$d = script$d;
10933
+ const __vue_script__$e = script$e;
10887
10934
 
10888
10935
  /* template */
10889
- var __vue_render__$d = function () {
10936
+ var __vue_render__$e = function () {
10890
10937
  var _vm = this;
10891
10938
  var _h = _vm.$createElement;
10892
10939
  var _c = _vm._self._c || _h;
@@ -10909,41 +10956,41 @@ var __vue_render__$d = function () {
10909
10956
  1
10910
10957
  )
10911
10958
  };
10912
- var __vue_staticRenderFns__$d = [];
10913
- __vue_render__$d._withStripped = true;
10959
+ var __vue_staticRenderFns__$e = [];
10960
+ __vue_render__$e._withStripped = true;
10914
10961
 
10915
10962
  /* style */
10916
- const __vue_inject_styles__$d = function (inject) {
10963
+ const __vue_inject_styles__$e = function (inject) {
10917
10964
  if (!inject) return
10918
10965
  inject("data-v-48934605_0", { source: ".ele-editor__bottom[data-v-48934605] {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n}\n.ele-editor__bottom span[data-v-48934605] {\n color: var(--idoole-black-088);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\text-editor\\src\\index.vue","index.vue"],"names":[],"mappings":"AA0DA;EACA,YAAA;EACA,yBAAA;EACA,uDAAA;EACA,eAAA;ACzDA;AD0DA;EACA,8BAAA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;EACA,WAAA;EACA,qBAAA;ACxDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-editor__wrapper\" :style=\"{width: editorWidth, height: editorHeight}\">\r\n <Vueditor :ref=\"getVueditor\" :style=\"{width: editorWidth, height: editorHeight}\"></Vueditor>\r\n <div class=\"ele-editor__bottom\">\r\n <span>{{ innerContent.length }}字</span>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v4 as uuidv4 } from 'uuid'\r\nexport default {\r\n name: 'ele-text-editor',\r\n props: {\r\n editorWidth: {\r\n type: String\r\n },\r\n editorHeight: {\r\n type: String\r\n },\r\n maxLength: {\r\n type: Number,\r\n default () {\r\n return 10\r\n }\r\n }\r\n },\r\n data() {\r\n return {\r\n editorConfig: {},\r\n textEditorRef: null\r\n }\r\n },\r\n computed: {\r\n innerContent () {\r\n let content = this.textEditorRef ? this.textEditorRef.getContent() : ''\r\n if (this.textEditorRef && content.length > this.maxLength) {\r\n content = content.substring(0, this.maxLength)\r\n this.$nextTick(() => {\r\n this.textEditorRef.setContent(content)\r\n })\r\n }\r\n this.$emit('input', content)\r\n return content\r\n },\r\n getVueditor () {\r\n return uuidv4()\r\n }\r\n },\r\n watch: {},\r\n methods: {},\r\n mounted () {\r\n this.textEditorRef = this.$refs[this.getVueditor]\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-editor__bottom {\r\n height: 40px;\r\n padding: 8px 20px 8px 8px;\r\n border: 1px solid var(--idooel-form-title-border-color);\r\n border-top: 0px;\r\n span {\r\n color: var(--idoole-black-088);\r\n text-align: right;\r\n font-size: 12px;\r\n line-height: 20px;\r\n width: 100%;\r\n display: inline-block;\r\n }\r\n}\r\n</style>",".ele-editor__bottom {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n}\n.ele-editor__bottom span {\n color: var(--idoole-black-088);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
10919
10966
 
10920
10967
  };
10921
10968
  /* scoped */
10922
- const __vue_scope_id__$d = "data-v-48934605";
10969
+ const __vue_scope_id__$e = "data-v-48934605";
10923
10970
  /* module identifier */
10924
- const __vue_module_identifier__$d = undefined;
10971
+ const __vue_module_identifier__$e = undefined;
10925
10972
  /* functional template */
10926
- const __vue_is_functional_template__$d = false;
10973
+ const __vue_is_functional_template__$e = false;
10927
10974
  /* style inject SSR */
10928
10975
 
10929
10976
  /* style inject shadow dom */
10930
10977
 
10931
10978
 
10932
10979
 
10933
- const __vue_component__$d = /*#__PURE__*/normalizeComponent(
10934
- { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
10935
- __vue_inject_styles__$d,
10936
- __vue_script__$d,
10937
- __vue_scope_id__$d,
10938
- __vue_is_functional_template__$d,
10939
- __vue_module_identifier__$d,
10980
+ const __vue_component__$e = /*#__PURE__*/normalizeComponent(
10981
+ { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
10982
+ __vue_inject_styles__$e,
10983
+ __vue_script__$e,
10984
+ __vue_scope_id__$e,
10985
+ __vue_is_functional_template__$e,
10986
+ __vue_module_identifier__$e,
10940
10987
  false,
10941
10988
  createInjector,
10942
10989
  undefined,
10943
10990
  undefined
10944
10991
  );
10945
10992
 
10946
- __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
10993
+ __vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
10947
10994
 
10948
10995
  //
10949
10996
  //
@@ -10958,7 +11005,7 @@ __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __v
10958
11005
  //
10959
11006
  //
10960
11007
 
10961
- var script$c = {
11008
+ var script$d = {
10962
11009
  name: 'ele-textarea',
10963
11010
  model: {
10964
11011
  prop: 'value',
@@ -11000,10 +11047,10 @@ var script$c = {
11000
11047
  };
11001
11048
 
11002
11049
  /* script */
11003
- const __vue_script__$c = script$c;
11050
+ const __vue_script__$d = script$d;
11004
11051
 
11005
11052
  /* template */
11006
- var __vue_render__$c = function () {
11053
+ var __vue_render__$d = function () {
11007
11054
  var _vm = this;
11008
11055
  var _h = _vm.$createElement;
11009
11056
  var _c = _vm._self._c || _h;
@@ -11019,41 +11066,41 @@ var __vue_render__$c = function () {
11019
11066
  on: { change: _vm.onChange },
11020
11067
  })
11021
11068
  };
11022
- var __vue_staticRenderFns__$c = [];
11023
- __vue_render__$c._withStripped = true;
11069
+ var __vue_staticRenderFns__$d = [];
11070
+ __vue_render__$d._withStripped = true;
11024
11071
 
11025
11072
  /* style */
11026
- const __vue_inject_styles__$c = function (inject) {
11073
+ const __vue_inject_styles__$d = function (inject) {
11027
11074
  if (!inject) return
11028
11075
  inject("data-v-2cd6a0f7_0", { source: "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", map: {"version":3,"sources":[],"names":[],"mappings":"","file":"index.vue"}, media: undefined });
11029
11076
 
11030
11077
  };
11031
11078
  /* scoped */
11032
- const __vue_scope_id__$c = "data-v-2cd6a0f7";
11079
+ const __vue_scope_id__$d = "data-v-2cd6a0f7";
11033
11080
  /* module identifier */
11034
- const __vue_module_identifier__$c = undefined;
11081
+ const __vue_module_identifier__$d = undefined;
11035
11082
  /* functional template */
11036
- const __vue_is_functional_template__$c = false;
11083
+ const __vue_is_functional_template__$d = false;
11037
11084
  /* style inject SSR */
11038
11085
 
11039
11086
  /* style inject shadow dom */
11040
11087
 
11041
11088
 
11042
11089
 
11043
- const __vue_component__$c = /*#__PURE__*/normalizeComponent(
11044
- { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
11045
- __vue_inject_styles__$c,
11046
- __vue_script__$c,
11047
- __vue_scope_id__$c,
11048
- __vue_is_functional_template__$c,
11049
- __vue_module_identifier__$c,
11090
+ const __vue_component__$d = /*#__PURE__*/normalizeComponent(
11091
+ { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
11092
+ __vue_inject_styles__$d,
11093
+ __vue_script__$d,
11094
+ __vue_scope_id__$d,
11095
+ __vue_is_functional_template__$d,
11096
+ __vue_module_identifier__$d,
11050
11097
  false,
11051
11098
  createInjector,
11052
11099
  undefined,
11053
11100
  undefined
11054
11101
  );
11055
11102
 
11056
- __vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
11103
+ __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
11057
11104
 
11058
11105
  //
11059
11106
  //
@@ -11062,7 +11109,7 @@ __vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __v
11062
11109
  //
11063
11110
  //
11064
11111
 
11065
- var script$b = {
11112
+ var script$c = {
11066
11113
  name: 'ele-loading',
11067
11114
  props: {
11068
11115
  loading: {
@@ -11073,50 +11120,50 @@ var script$b = {
11073
11120
  };
11074
11121
 
11075
11122
  /* script */
11076
- const __vue_script__$b = script$b;
11123
+ const __vue_script__$c = script$c;
11077
11124
 
11078
11125
  /* template */
11079
- var __vue_render__$b = function () {
11126
+ var __vue_render__$c = function () {
11080
11127
  var _vm = this;
11081
11128
  var _h = _vm.$createElement;
11082
11129
  var _c = _vm._self._c || _h;
11083
11130
  return _vm.loading ? _c("div", { staticClass: "g-loading" }) : _vm._e()
11084
11131
  };
11085
- var __vue_staticRenderFns__$b = [];
11086
- __vue_render__$b._withStripped = true;
11132
+ var __vue_staticRenderFns__$c = [];
11133
+ __vue_render__$c._withStripped = true;
11087
11134
 
11088
11135
  /* style */
11089
- const __vue_inject_styles__$b = function (inject) {
11136
+ const __vue_inject_styles__$c = function (inject) {
11090
11137
  if (!inject) return
11091
11138
  inject("data-v-214908b6_0", { source: ".g-loading[data-v-214908b6] {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate-data-v-214908b6 infinite 0.75s linear;\n}\n@keyframes rotate-data-v-214908b6 {\n0% {\n transform: rotate(0);\n}\n100% {\n transform: rotate(360deg);\n}\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\loading\\src\\index.vue","index.vue"],"names":[],"mappings":"AAmBA;EACA,WAAA;EACA,YAAA;EACA,yBAAA;EACA,6BAAA;EACA,8BAAA;EACA,mBAAA;EACA,uDAAA;AClBA;ADoBA;AACA;IACA,oBAAA;ACjBE;ADmBF;IACA,yBAAA;ACjBE;AACF;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div v-if=\"loading\" class=\"g-loading\">\r\n\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-loading',\r\n props: {\r\n loading: {\r\n type: Boolean,\r\n default: true\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-loading {\r\n width: 16px;\r\n height: 16px;\r\n border: 1px solid #409EFF;\r\n border-top-color: transparent;\r\n border-left-color: transparent;\r\n border-radius: 100%;\r\n animation: rotate infinite 0.75s linear;\r\n}\r\n@keyframes rotate {\r\n 0% {\r\n transform: rotate(0);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n</style>",".g-loading {\n width: 16px;\n height: 16px;\n border: 1px solid #409EFF;\n border-top-color: transparent;\n border-left-color: transparent;\n border-radius: 100%;\n animation: rotate infinite 0.75s linear;\n}\n\n@keyframes rotate {\n 0% {\n transform: rotate(0);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
11092
11139
 
11093
11140
  };
11094
11141
  /* scoped */
11095
- const __vue_scope_id__$b = "data-v-214908b6";
11142
+ const __vue_scope_id__$c = "data-v-214908b6";
11096
11143
  /* module identifier */
11097
- const __vue_module_identifier__$b = undefined;
11144
+ const __vue_module_identifier__$c = undefined;
11098
11145
  /* functional template */
11099
- const __vue_is_functional_template__$b = false;
11146
+ const __vue_is_functional_template__$c = false;
11100
11147
  /* style inject SSR */
11101
11148
 
11102
11149
  /* style inject shadow dom */
11103
11150
 
11104
11151
 
11105
11152
 
11106
- const __vue_component__$b = /*#__PURE__*/normalizeComponent(
11107
- { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
11108
- __vue_inject_styles__$b,
11109
- __vue_script__$b,
11110
- __vue_scope_id__$b,
11111
- __vue_is_functional_template__$b,
11112
- __vue_module_identifier__$b,
11153
+ const __vue_component__$c = /*#__PURE__*/normalizeComponent(
11154
+ { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
11155
+ __vue_inject_styles__$c,
11156
+ __vue_script__$c,
11157
+ __vue_scope_id__$c,
11158
+ __vue_is_functional_template__$c,
11159
+ __vue_module_identifier__$c,
11113
11160
  false,
11114
11161
  createInjector,
11115
11162
  undefined,
11116
11163
  undefined
11117
11164
  );
11118
11165
 
11119
- __vue_component__$b.install = Vue => Vue.component(__vue_component__$b.name, __vue_component__$b);
11166
+ __vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
11120
11167
 
11121
11168
  //
11122
11169
  //
@@ -11126,7 +11173,7 @@ __vue_component__$b.install = Vue => Vue.component(__vue_component__$b.name, __v
11126
11173
  //
11127
11174
  //
11128
11175
 
11129
- var script$a = {
11176
+ var script$b = {
11130
11177
  props: {
11131
11178
  label: {
11132
11179
  type: String
@@ -11135,10 +11182,10 @@ var script$a = {
11135
11182
  };
11136
11183
 
11137
11184
  /* script */
11138
- const __vue_script__$a = script$a;
11185
+ const __vue_script__$b = script$b;
11139
11186
 
11140
11187
  /* template */
11141
- var __vue_render__$a = function () {
11188
+ var __vue_render__$b = function () {
11142
11189
  var _vm = this;
11143
11190
  var _h = _vm.$createElement;
11144
11191
  var _c = _vm._self._c || _h;
@@ -11148,34 +11195,34 @@ var __vue_render__$a = function () {
11148
11195
  _c("span", { staticClass: "label__suffix" }, [_vm._v(":")]),
11149
11196
  ])
11150
11197
  };
11151
- var __vue_staticRenderFns__$a = [];
11152
- __vue_render__$a._withStripped = true;
11198
+ var __vue_staticRenderFns__$b = [];
11199
+ __vue_render__$b._withStripped = true;
11153
11200
 
11154
11201
  /* style */
11155
- const __vue_inject_styles__$a = function (inject) {
11202
+ const __vue_inject_styles__$b = function (inject) {
11156
11203
  if (!inject) return
11157
11204
  inject("data-v-29265e42_0", { source: ".g-search__label[data-v-29265e42] {\n /* width: 69px; */\n flex-basis: 69px;\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.g-search__label .label__title[data-v-29265e42], .g-search__label .label__suffix[data-v-29265e42] {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n}\n.g-search__label .label__suffix[data-v-29265e42] {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\search-area\\src\\label.vue","label.vue"],"names":[],"mappings":"AAkBA;EACA,iBAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACjBA;ADkBA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;AChBA;ADkBA;EACA,gBAAA;AChBA;;AAEA,oCAAoC","file":"label.vue","sourcesContent":["<template>\r\n <div class=\"g-search__label\">\r\n <span class=\"label__title\">{{ label }}</span>\r\n <span class=\"label__suffix\">:</span>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n props: {\r\n label: {\r\n type: String\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-search__label {\r\n /* width: 69px; */\r\n flex-basis: 69px;\r\n height: 32px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n .label__title, .label__suffix {\r\n font-size: 14px;\r\n color: rgba(0, 0, 0, 0.88);\r\n white-space: nowrap;\r\n }\r\n .label__suffix {\r\n margin-left: 4px;\r\n }\r\n}\r\n</style>",".g-search__label {\n /* width: 69px; */\n flex-basis: 69px;\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.g-search__label .label__title, .g-search__label .label__suffix {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n}\n.g-search__label .label__suffix {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */"]}, media: undefined });
11158
11205
 
11159
11206
  };
11160
11207
  /* scoped */
11161
- const __vue_scope_id__$a = "data-v-29265e42";
11208
+ const __vue_scope_id__$b = "data-v-29265e42";
11162
11209
  /* module identifier */
11163
- const __vue_module_identifier__$a = undefined;
11210
+ const __vue_module_identifier__$b = undefined;
11164
11211
  /* functional template */
11165
- const __vue_is_functional_template__$a = false;
11212
+ const __vue_is_functional_template__$b = false;
11166
11213
  /* style inject SSR */
11167
11214
 
11168
11215
  /* style inject shadow dom */
11169
11216
 
11170
11217
 
11171
11218
 
11172
- const __vue_component__$a = /*#__PURE__*/normalizeComponent(
11173
- { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
11174
- __vue_inject_styles__$a,
11175
- __vue_script__$a,
11176
- __vue_scope_id__$a,
11177
- __vue_is_functional_template__$a,
11178
- __vue_module_identifier__$a,
11219
+ const __vue_component__$b = /*#__PURE__*/normalizeComponent(
11220
+ { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
11221
+ __vue_inject_styles__$b,
11222
+ __vue_script__$b,
11223
+ __vue_scope_id__$b,
11224
+ __vue_is_functional_template__$b,
11225
+ __vue_module_identifier__$b,
11179
11226
  false,
11180
11227
  createInjector,
11181
11228
  undefined,
@@ -11183,10 +11230,10 @@ __vue_render__$a._withStripped = true;
11183
11230
  );
11184
11231
 
11185
11232
  //
11186
- var script$9 = {
11233
+ var script$a = {
11187
11234
  name: 'ele-search-area',
11188
11235
  components: {
11189
- Label: __vue_component__$a
11236
+ Label: __vue_component__$b
11190
11237
  },
11191
11238
  props: {
11192
11239
  gutter: {
@@ -11334,10 +11381,10 @@ var script$9 = {
11334
11381
  };
11335
11382
 
11336
11383
  /* script */
11337
- const __vue_script__$9 = script$9;
11384
+ const __vue_script__$a = script$a;
11338
11385
 
11339
11386
  /* template */
11340
- var __vue_render__$9 = function () {
11387
+ var __vue_render__$a = function () {
11341
11388
  var _vm = this;
11342
11389
  var _h = _vm.$createElement;
11343
11390
  var _c = _vm._self._c || _h;
@@ -11523,44 +11570,44 @@ var __vue_render__$9 = function () {
11523
11570
  1
11524
11571
  )
11525
11572
  };
11526
- var __vue_staticRenderFns__$9 = [];
11527
- __vue_render__$9._withStripped = true;
11573
+ var __vue_staticRenderFns__$a = [];
11574
+ __vue_render__$a._withStripped = true;
11528
11575
 
11529
11576
  /* style */
11530
- const __vue_inject_styles__$9 = function (inject) {
11577
+ const __vue_inject_styles__$a = function (inject) {
11531
11578
  if (!inject) return
11532
11579
  inject("data-v-3085db1e_0", { source: ".search-area__wrapper[data-v-3085db1e] {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper[data-v-3085db1e] .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item[data-v-3085db1e] {\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.search-area__wrapper .search-area__item.search-area--action[data-v-3085db1e] {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse[data-v-3085db1e] {\n margin-left: 8px;\n height: 32px;\n padding: 4px 16px;\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__text[data-v-3085db1e] {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon[data-v-3085db1e] {\n font-size: 16px;\n margin-left: 8px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\search-area\\src\\index.vue","index.vue"],"names":[],"mappings":"AAiMA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;AChMA;ADkMA;EACA,YAAA;AChMA;ADmMA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACjMA;ADkMA;EACA,oBAAA;AChMA;ADkMA;EACA,gBAAA;EACA,YAAA;EACA,iBAAA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,uBAAA;EACA,eAAA;AChMA;ADiMA;EACA,eAAA;AC/LA;ADiMA;EACA,eAAA;EACA,gBAAA;AC/LA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"search-area__wrapper\">\r\n <a-row :gutter=\"gutter\">\r\n <template v-for=\"(item, idx) in innerDataSource\">\r\n <a-col v-if=\"item._show\" :span=\"item.span || span\" :key=\"idx\">\r\n <div v-if=\"item.type == '_action'\" class=\"search-area__item search-area--action\">\r\n <ele-button icon=\"search\" type=\"primary\" @click=\"handleClickSearch\">查询</ele-button>\r\n <ele-button style=\"margin-left:8px;\" icon=\"reload\" @click=\"handleClickReset\">重置</ele-button>\r\n <div v-if=\"innerDataSource.length > cuttingFormula + 1\" class=\"expand-collapse\" @click=\"handleClickExpandCollapse\">\r\n <span class=\"expand-collapse__text\">{{ isExpand ? '收起' : '展开' }}</span>\r\n <span class=\"expand-collapse__icon\">\r\n <a-icon v-if=\"isExpand\" type=\"up\" />\r\n <a-icon v-else type=\"down\" />\r\n </span>\r\n </div>\r\n </div>\r\n <div v-else class=\"search-area__item\">\r\n <template v-if=\"item.type == 'Input'\">\r\n <Label :label=\"item.label\"></Label>\r\n <ele-input v-model=\"item._value\"></ele-input>\r\n </template>\r\n <template v-else-if=\"item.type == 'Select'\">\r\n <Label :label=\"item.label\"></Label>\r\n <ele-select v-model=\"item._value\" :multiple=\"item.multiple\" :data-source=\"item.optionList\"></ele-select>\r\n </template>\r\n <template v-else-if=\"item.type == 'DatePicker'\">\r\n <Label :label=\"item.label\"></Label>\r\n <ele-date v-model=\"item._value\" :format=\"item.format\"></ele-date>\r\n </template>\r\n <template v-else-if=\"item.type == 'ele-date-range'\">\r\n <Label :label=\"item.label\"></Label>\r\n <ele-date-range v-model=\"item._value\" :format=\"item.format\" :show-time=\"item.showTime\"></ele-date-range>\r\n </template>\r\n </div>\r\n </a-col>\r\n </template>\r\n </a-row>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Label from './label.vue'\r\nimport moment from 'moment'\r\nimport { parse } from '@idooel/expression'\r\nexport default {\r\n name: 'ele-search-area',\r\n components: {\r\n Label\r\n },\r\n props: {\r\n gutter: {\r\n type: [Number, Array, Object],\r\n default: () => ([\r\n 16, 8\r\n ])\r\n },\r\n span: {\r\n type: Number,\r\n default: 8\r\n },\r\n dataSource: {\r\n type: Array,\r\n required: true\r\n }\r\n },\r\n data() {\r\n return {\r\n isExpand: false\r\n }\r\n },\r\n computed: {\r\n cuttingFormula () {\r\n return (24 / this.span - 1)\r\n },\r\n buildDataSource () {\r\n return this.controlDisplayByFormula(this.mapDefaultValueToValue())\r\n },\r\n innerDataSource () {\r\n return [ ...this.buildDataSource, { type: '_action', _show: true }]\r\n }\r\n },\r\n created() {\r\n const querys = this.extractValues()\r\n this.$emit('search', querys)\r\n },\r\n methods: {\r\n controlDisplayByFormula (dataSource = []) {\r\n if (this.isExpand) {\r\n dataSource.forEach(item => {\r\n this.$set(item, '_show', true)\r\n })\r\n } else {\r\n dataSource.forEach((item, idx) => {\r\n if (idx < this.cuttingFormula) {\r\n this.$set(item, '_show', true)\r\n } else {\r\n this.$set(item, '_show', false)\r\n }\r\n })\r\n }\r\n return dataSource\r\n },\r\n buildDefaultValue (arg) {\r\n if (!arg || arg.charAt(0) !== '_') return arg\r\n return parse(arg, {\r\n _route: this.$route.query\r\n })\r\n },\r\n mapDefaultValueToValue () {\r\n this.dataSource.forEach(props => {\r\n this.$set(props, '_show', this.isExpand)\r\n if (props.defaultValue) {\r\n this.$set(props, '_value', this.buildDefaultValue(props.defaultValue))\r\n }\r\n })\r\n return this.dataSource\r\n },\r\n handleClickExpandCollapse () {\r\n this.isExpand = !this.isExpand\r\n },\r\n handleClickSearch () {\r\n const querys = this.extractValues()\r\n this.$emit('search', querys)\r\n },\r\n buildMapto (mapTo = [], dataSource) {\r\n const [ startField, endField ] = mapTo\r\n const [ startValue, endValue ] = dataSource || [null, null]\r\n return {\r\n [startField]: startValue,\r\n [endField]: endValue\r\n }\r\n },\r\n extractValues () {\r\n let ret = {}\r\n this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {\r\n switch (item.type) {\r\n case 'DatePicker':\r\n ret[item.name] = typeof item._value == 'undefined' ? undefined : moment(item._value).format(item.format)\r\n break\r\n case 'ele-date-range':\r\n if (item.mapTo) {\r\n Object.assign(ret, this.buildMapto(item.mapTo, item._value))\r\n } else {\r\n ret[item.name] = (item._value || []).join(',')\r\n }\r\n break\r\n default:\r\n ret[item.name] = item._value\r\n break\r\n }\r\n })\r\n return ret\r\n },\r\n cleanValues () {\r\n this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {\r\n const { defaultValue } = item\r\n switch (item.type) {\r\n case 'Select':\r\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\r\n !defaultValue && this.$set(item, '_value', null)\r\n break\r\n case 'DatePicker':\r\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\r\n !defaultValue && this.$set(item, '_value', undefined)\r\n break\r\n case 'ele-date-range':\r\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\r\n !defaultValue && this.$set(item, '_value', [])\r\n break\r\n default:\r\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\r\n !defaultValue && this.$set(item, '_value', null)\r\n break\r\n }\r\n })\r\n },\r\n handleClickReset () {\r\n this.cleanValues()\r\n //TODO defaultValue\r\n const querys = this.extractValues()\r\n this.$emit('search', querys)\r\n },\r\n onChangeSelect (value, props) {\r\n this.$set(props, '_value', value)\r\n }\r\n },\r\n destroyed () {\r\n this.cleanValues()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.search-area__wrapper {\r\n padding-top: 16px;\r\n padding-left: 16px;\r\n padding-right: 16px;\r\n ::v-deep .ant-col {\r\n &:last-child {\r\n float: right;\r\n }\r\n }\r\n .search-area__item {\r\n height: 32px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n &.search-area--action {\r\n justify-content: end;\r\n }\r\n .expand-collapse {\r\n margin-left: 8px;\r\n height: 32px;\r\n padding: 4px 16px;\r\n color: var(--idooel-primary-color);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: pointer;\r\n .expand-collapse__text {\r\n font-size: 14px;\r\n }\r\n .expand-collapse__icon {\r\n font-size: 16px;\r\n margin-left: 8px;\r\n }\r\n }\r\n }\r\n}\r\n</style>",".search-area__wrapper {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper ::v-deep .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item {\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.search-area__wrapper .search-area__item.search-area--action {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse {\n margin-left: 8px;\n height: 32px;\n padding: 4px 16px;\n color: var(--idooel-primary-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__text {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon {\n font-size: 16px;\n margin-left: 8px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
11533
11580
 
11534
11581
  };
11535
11582
  /* scoped */
11536
- const __vue_scope_id__$9 = "data-v-3085db1e";
11583
+ const __vue_scope_id__$a = "data-v-3085db1e";
11537
11584
  /* module identifier */
11538
- const __vue_module_identifier__$9 = undefined;
11585
+ const __vue_module_identifier__$a = undefined;
11539
11586
  /* functional template */
11540
- const __vue_is_functional_template__$9 = false;
11587
+ const __vue_is_functional_template__$a = false;
11541
11588
  /* style inject SSR */
11542
11589
 
11543
11590
  /* style inject shadow dom */
11544
11591
 
11545
11592
 
11546
11593
 
11547
- const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
11548
- { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
11549
- __vue_inject_styles__$9,
11550
- __vue_script__$9,
11551
- __vue_scope_id__$9,
11552
- __vue_is_functional_template__$9,
11553
- __vue_module_identifier__$9,
11594
+ const __vue_component__$a = /*#__PURE__*/normalizeComponent(
11595
+ { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
11596
+ __vue_inject_styles__$a,
11597
+ __vue_script__$a,
11598
+ __vue_scope_id__$a,
11599
+ __vue_is_functional_template__$a,
11600
+ __vue_module_identifier__$a,
11554
11601
  false,
11555
11602
  createInjector,
11556
11603
  undefined,
11557
11604
  undefined
11558
11605
  );
11559
11606
 
11560
- __vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __vue_component__$9);
11607
+ __vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __vue_component__$a);
11561
11608
 
11562
11609
  //
11563
- var script$8 = {
11610
+ var script$9 = {
11564
11611
  name: 'ele-button-group',
11565
11612
  props: {
11566
11613
  dataSource: {
@@ -11645,10 +11692,10 @@ var script$8 = {
11645
11692
  };
11646
11693
 
11647
11694
  /* script */
11648
- const __vue_script__$8 = script$8;
11695
+ const __vue_script__$9 = script$9;
11649
11696
 
11650
11697
  /* template */
11651
- var __vue_render__$8 = function () {
11698
+ var __vue_render__$9 = function () {
11652
11699
  var _vm = this;
11653
11700
  var _h = _vm.$createElement;
11654
11701
  var _c = _vm._self._c || _h;
@@ -11706,44 +11753,44 @@ var __vue_render__$8 = function () {
11706
11753
  2
11707
11754
  )
11708
11755
  };
11709
- var __vue_staticRenderFns__$8 = [];
11710
- __vue_render__$8._withStripped = true;
11756
+ var __vue_staticRenderFns__$9 = [];
11757
+ __vue_render__$9._withStripped = true;
11711
11758
 
11712
11759
  /* style */
11713
- const __vue_inject_styles__$8 = function (inject) {
11760
+ const __vue_inject_styles__$9 = function (inject) {
11714
11761
  if (!inject) return
11715
11762
  inject("data-v-2f32b3c3_0", { source: ".button-group__wrapper[data-v-2f32b3c3] {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn[data-v-2f32b3c3] {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn[data-v-2f32b3c3]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\button-group\\src\\index.vue","index.vue"],"names":[],"mappings":"AAsGA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;ACrGA;ADsGA;EACA,gBAAA;ACpGA;ADqGA;EACA,cAAA;ACnGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"button-group__wrapper\">\r\n <template v-for=\"(item, idx) in innerDatasource\" >\r\n <ele-button\r\n v-if=\"isBool(item._show) ? item._show : true\"\r\n :type=\"item.type\"\r\n :icon=\"item.icon\"\r\n :mode=\"item.mode\"\r\n :data-source=\"item.optionList\"\r\n :event-name=\"item.eventName\"\r\n :record=\"item\"\r\n v-on=\"overrideButtonEvent\"\r\n :key=\"idx\">\r\n {{ item.label }}\r\n </ele-button>\r\n </template>\r\n <ele-modal-confirm v-model=\"modalConfirmValue\" :contextProp=\"currentContext\" v-on=\"overrideModalConfirmEvent\" v-bind=\"modalConfirmMeta\"></ele-modal-confirm>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { type } from '@idooel/shared'\r\nimport { parse } from '@idooel/expression'\r\nimport { CONTEXT } from '../../../utils'\r\nexport default {\r\n name: 'ele-button-group',\r\n props: {\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n data() {\r\n return {\r\n innerDatasource: [],\r\n modalConfirmValue: false,\r\n modalConfirmMeta: {}\r\n }\r\n },\r\n inject: {\r\n [CONTEXT]: {\r\n default: () => (() => ({}))\r\n }\r\n },\r\n computed: {\r\n overrideButtonEvent () {\r\n const events = this.dataSource.reduce((ret, item) => {\r\n ret[item.eventName || 'click'] = (e) => {\r\n const { modalConfirm } = item\r\n if (modalConfirm) {\r\n this.modalConfirmMeta = modalConfirm\r\n this.modalConfirmValue = true\r\n }\r\n this.$emit(item.eventName || 'click', { ...e, record: item, ...this.currentContext })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events\r\n }\r\n },\r\n overrideModalConfirmEvent () {\r\n return {\r\n ...this.$listeners\r\n }\r\n },\r\n currentContext () {\r\n return {\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta,\r\n ...this[CONTEXT]()\r\n }\r\n }\r\n },\r\n watch: {\r\n dataSource: {\r\n handler (dataSource) {\r\n this.innerDatasource = dataSource.map(item => {\r\n return {\r\n ...item,\r\n _show: this.executeExpression(item.show)\r\n }\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n executeExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return true\r\n return parse(expression, { ...this.currentContext })\r\n },\r\n isBool (arg) {\r\n return type.isBool(arg)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.button-group__wrapper {\r\n display: flex;\r\n padding-left: 16px;\r\n padding-right: 16px;\r\n .ant-btn {\r\n margin-left: 8px;\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n }\r\n}\r\n</style>",".button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
11716
11763
 
11717
11764
  };
11718
11765
  /* scoped */
11719
- const __vue_scope_id__$8 = "data-v-2f32b3c3";
11766
+ const __vue_scope_id__$9 = "data-v-2f32b3c3";
11720
11767
  /* module identifier */
11721
- const __vue_module_identifier__$8 = undefined;
11768
+ const __vue_module_identifier__$9 = undefined;
11722
11769
  /* functional template */
11723
- const __vue_is_functional_template__$8 = false;
11770
+ const __vue_is_functional_template__$9 = false;
11724
11771
  /* style inject SSR */
11725
11772
 
11726
11773
  /* style inject shadow dom */
11727
11774
 
11728
11775
 
11729
11776
 
11730
- const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
11731
- { render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
11732
- __vue_inject_styles__$8,
11733
- __vue_script__$8,
11734
- __vue_scope_id__$8,
11735
- __vue_is_functional_template__$8,
11736
- __vue_module_identifier__$8,
11777
+ const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
11778
+ { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
11779
+ __vue_inject_styles__$9,
11780
+ __vue_script__$9,
11781
+ __vue_scope_id__$9,
11782
+ __vue_is_functional_template__$9,
11783
+ __vue_module_identifier__$9,
11737
11784
  false,
11738
11785
  createInjector,
11739
11786
  undefined,
11740
11787
  undefined
11741
11788
  );
11742
11789
 
11743
- __vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
11790
+ __vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __vue_component__$9);
11744
11791
 
11745
11792
  //
11746
- var script$7 = {
11793
+ var script$8 = {
11747
11794
  name: 'ele-modal-form',
11748
11795
  model: {
11749
11796
  prop: 'value',
@@ -12014,10 +12061,10 @@ var script$7 = {
12014
12061
  };
12015
12062
 
12016
12063
  /* script */
12017
- const __vue_script__$7 = script$7;
12064
+ const __vue_script__$8 = script$8;
12018
12065
 
12019
12066
  /* template */
12020
- var __vue_render__$7 = function () {
12067
+ var __vue_render__$8 = function () {
12021
12068
  var _vm = this;
12022
12069
  var _h = _vm.$createElement;
12023
12070
  var _c = _vm._self._c || _h;
@@ -12038,17 +12085,17 @@ var __vue_render__$7 = function () {
12038
12085
  1
12039
12086
  )
12040
12087
  };
12041
- var __vue_staticRenderFns__$7 = [];
12042
- __vue_render__$7._withStripped = true;
12088
+ var __vue_staticRenderFns__$8 = [];
12089
+ __vue_render__$8._withStripped = true;
12043
12090
 
12044
12091
  /* style */
12045
- const __vue_inject_styles__$7 = undefined;
12092
+ const __vue_inject_styles__$8 = undefined;
12046
12093
  /* scoped */
12047
- const __vue_scope_id__$7 = undefined;
12094
+ const __vue_scope_id__$8 = undefined;
12048
12095
  /* module identifier */
12049
- const __vue_module_identifier__$7 = undefined;
12096
+ const __vue_module_identifier__$8 = undefined;
12050
12097
  /* functional template */
12051
- const __vue_is_functional_template__$7 = false;
12098
+ const __vue_is_functional_template__$8 = false;
12052
12099
  /* style inject */
12053
12100
 
12054
12101
  /* style inject SSR */
@@ -12057,20 +12104,20 @@ __vue_render__$7._withStripped = true;
12057
12104
 
12058
12105
 
12059
12106
 
12060
- const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
12061
- { render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
12062
- __vue_inject_styles__$7,
12063
- __vue_script__$7,
12064
- __vue_scope_id__$7,
12065
- __vue_is_functional_template__$7,
12066
- __vue_module_identifier__$7,
12107
+ const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
12108
+ { render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
12109
+ __vue_inject_styles__$8,
12110
+ __vue_script__$8,
12111
+ __vue_scope_id__$8,
12112
+ __vue_is_functional_template__$8,
12113
+ __vue_module_identifier__$8,
12067
12114
  false,
12068
12115
  undefined,
12069
12116
  undefined,
12070
12117
  undefined
12071
12118
  );
12072
12119
 
12073
- __vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
12120
+ __vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
12074
12121
 
12075
12122
  //
12076
12123
  //
@@ -12082,7 +12129,7 @@ __vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __v
12082
12129
  //
12083
12130
  //
12084
12131
 
12085
- var script$6 = {
12132
+ var script$7 = {
12086
12133
  name: 'ele-modal-tree',
12087
12134
  model: {
12088
12135
  event: 'input',
@@ -12140,10 +12187,10 @@ var script$6 = {
12140
12187
  };
12141
12188
 
12142
12189
  /* script */
12143
- const __vue_script__$6 = script$6;
12190
+ const __vue_script__$7 = script$7;
12144
12191
 
12145
12192
  /* template */
12146
- var __vue_render__$6 = function () {
12193
+ var __vue_render__$7 = function () {
12147
12194
  var _vm = this;
12148
12195
  var _h = _vm.$createElement;
12149
12196
  var _c = _vm._self._c || _h;
@@ -12165,44 +12212,44 @@ var __vue_render__$6 = function () {
12165
12212
  1
12166
12213
  )
12167
12214
  };
12168
- var __vue_staticRenderFns__$6 = [];
12169
- __vue_render__$6._withStripped = true;
12215
+ var __vue_staticRenderFns__$7 = [];
12216
+ __vue_render__$7._withStripped = true;
12170
12217
 
12171
12218
  /* style */
12172
- const __vue_inject_styles__$6 = function (inject) {
12219
+ const __vue_inject_styles__$7 = function (inject) {
12173
12220
  if (!inject) return
12174
12221
  inject("data-v-3ca93364_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
12175
12222
 
12176
12223
  };
12177
12224
  /* scoped */
12178
- const __vue_scope_id__$6 = "data-v-3ca93364";
12225
+ const __vue_scope_id__$7 = "data-v-3ca93364";
12179
12226
  /* module identifier */
12180
- const __vue_module_identifier__$6 = undefined;
12227
+ const __vue_module_identifier__$7 = undefined;
12181
12228
  /* functional template */
12182
- const __vue_is_functional_template__$6 = false;
12229
+ const __vue_is_functional_template__$7 = false;
12183
12230
  /* style inject SSR */
12184
12231
 
12185
12232
  /* style inject shadow dom */
12186
12233
 
12187
12234
 
12188
12235
 
12189
- const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
12190
- { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
12191
- __vue_inject_styles__$6,
12192
- __vue_script__$6,
12193
- __vue_scope_id__$6,
12194
- __vue_is_functional_template__$6,
12195
- __vue_module_identifier__$6,
12236
+ const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
12237
+ { render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
12238
+ __vue_inject_styles__$7,
12239
+ __vue_script__$7,
12240
+ __vue_scope_id__$7,
12241
+ __vue_is_functional_template__$7,
12242
+ __vue_module_identifier__$7,
12196
12243
  false,
12197
12244
  createInjector,
12198
12245
  undefined,
12199
12246
  undefined
12200
12247
  );
12201
12248
 
12202
- __vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
12249
+ __vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
12203
12250
 
12204
12251
  //
12205
- var script$5 = {
12252
+ var script$6 = {
12206
12253
  name: 'ele-modal-confirm',
12207
12254
  model: {
12208
12255
  event: 'change',
@@ -12295,10 +12342,10 @@ var script$5 = {
12295
12342
  };
12296
12343
 
12297
12344
  /* script */
12298
- const __vue_script__$5 = script$5;
12345
+ const __vue_script__$6 = script$6;
12299
12346
 
12300
12347
  /* template */
12301
- var __vue_render__$5 = function () {
12348
+ var __vue_render__$6 = function () {
12302
12349
  var _vm = this;
12303
12350
  var _h = _vm.$createElement;
12304
12351
  var _c = _vm._self._c || _h;
@@ -12330,45 +12377,45 @@ var __vue_render__$5 = function () {
12330
12377
  1
12331
12378
  )
12332
12379
  };
12333
- var __vue_staticRenderFns__$5 = [];
12334
- __vue_render__$5._withStripped = true;
12380
+ var __vue_staticRenderFns__$6 = [];
12381
+ __vue_render__$6._withStripped = true;
12335
12382
 
12336
12383
  /* style */
12337
- const __vue_inject_styles__$5 = function (inject) {
12384
+ const __vue_inject_styles__$6 = function (inject) {
12338
12385
  if (!inject) return
12339
12386
  inject("data-v-1291c294_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,uCAAuC;EACvC,uCAAuC;EACvC,mDAAmD;EACnD,4BAA4B;EAC5B,4BAA4B;EAC5B,0BAA0B;EAC1B,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,gCAAgC;EAChC,4BAA4B;EAC5B,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;AAEA;EACE,4DAA4D;AAC9D;AAEA;EACE,4DAA4D;AAC9D;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-064: rgba(0, 0, 0, 0.64);\n --idoole-black-088: rgba(0, 0, 0, 0.88);\n --idoole-black-016: rgba(0, 0, 0, 0.16);\n --idooel-disabled-border-color: rgba(0, 0, 0, 0.16);\n --idoole-success-06: #52C41A;\n --idoole-warning-06: #FAAD14;\n --idoole-error-06: #F5222D;\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-row-even-color: #F0FAFF;\n --idooel-row-odd-color: #FFF;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n.ant-input-disabled {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n.ant-select-disabled .ant-select-selection {\n border-color: var(--idooel-disabled-border-color) !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
12340
12387
  ,inject("data-v-1291c294_1", { source: ".ele-modal-confirm__content[data-v-1291c294] {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\modal-confirm\\src\\index.vue","index.vue"],"names":[],"mappings":"AAkGA;EACA,eAAA;EACA,8BAAA;EACA,eAAA;EACA,iBAAA;ACjGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <ele-modal :title=\"title\" :value=\"value\" :size=\"size\" @cancel=\"onCancel\" v-on=\"overrideEvents\" :buttonGroupMeta=\"buttonGroupMeta\">\r\n <ele-alert v-if=\"alert\" v-bind=\"alert\"></ele-alert>\r\n <div v-if=\"contentText\" class=\"ele-modal-confirm__content\">\r\n {{ contentText }}\r\n </div>\r\n </ele-modal>\r\n</template>\r\n\r\n<script>\r\nimport { CONTEXT } from '../../../utils'\r\nexport default {\r\n name: 'ele-modal-confirm',\r\n model: {\r\n event: 'change',\r\n prop: 'value'\r\n },\r\n props: {\r\n title: {\r\n type: String\r\n },\r\n size: {\r\n type: String,\r\n default: 'small'\r\n },\r\n alert: {\r\n type: [Object, Boolean],\r\n default: () => ({\r\n type: 'warning',\r\n message: '确定要删除吗?',\r\n description: '删除后将无法恢复',\r\n closable: false\r\n })\r\n },\r\n contentText: {\r\n type: String\r\n },\r\n value: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonGroupMeta: {\r\n type: Object\r\n },\r\n //!deprecated\r\n contextProp: {\r\n type: Object,\r\n default: () => ({})\r\n }\r\n },\r\n inject: {\r\n [CONTEXT]: {\r\n default: () => (() => ({}))\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n currentContext () {\r\n const { exposed: exposedData = {} } = this[CONTEXT]()\r\n const exposed = Object.assign({}, exposedData, { closeModalConfirm: this.closeModalConfirm })\r\n return {\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta,\r\n ...this[CONTEXT](),\r\n exposed\r\n }\r\n },\r\n overrideEvents () {\r\n if (!this.buttonGroupMeta) return {}\r\n const { elements = [] } = this.buttonGroupMeta\r\n const events = elements.reduce((ret, ele) =>{\r\n ret[ele.eventName || 'click'] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e, ...this.currentContext })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events\r\n }\r\n }\r\n },\r\n methods: {\r\n closeModalConfirm () {\r\n this.$emit('change', false)\r\n },\r\n onCancel () {\r\n this.$emit('change', false)\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\">\r\n@import '../../../theme/index';\r\n</style>\r\n<style lang=\"scss\" scoped>\r\n.ele-modal-confirm__content {\r\n margin-top: 8px;\r\n color: var(--idoole-black-088);\r\n font-size: 14px;\r\n line-height: 22px;\r\n}\r\n</style>",".ele-modal-confirm__content {\n margin-top: 8px;\n color: var(--idoole-black-088);\n font-size: 14px;\n line-height: 22px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
12341
12388
 
12342
12389
  };
12343
12390
  /* scoped */
12344
- const __vue_scope_id__$5 = "data-v-1291c294";
12391
+ const __vue_scope_id__$6 = "data-v-1291c294";
12345
12392
  /* module identifier */
12346
- const __vue_module_identifier__$5 = undefined;
12393
+ const __vue_module_identifier__$6 = undefined;
12347
12394
  /* functional template */
12348
- const __vue_is_functional_template__$5 = false;
12395
+ const __vue_is_functional_template__$6 = false;
12349
12396
  /* style inject SSR */
12350
12397
 
12351
12398
  /* style inject shadow dom */
12352
12399
 
12353
12400
 
12354
12401
 
12355
- const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
12356
- { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
12357
- __vue_inject_styles__$5,
12358
- __vue_script__$5,
12359
- __vue_scope_id__$5,
12360
- __vue_is_functional_template__$5,
12361
- __vue_module_identifier__$5,
12402
+ const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
12403
+ { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
12404
+ __vue_inject_styles__$6,
12405
+ __vue_script__$6,
12406
+ __vue_scope_id__$6,
12407
+ __vue_is_functional_template__$6,
12408
+ __vue_module_identifier__$6,
12362
12409
  false,
12363
12410
  createInjector,
12364
12411
  undefined,
12365
12412
  undefined
12366
12413
  );
12367
12414
 
12368
- __vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
12415
+ __vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
12369
12416
 
12370
12417
  //
12371
- var script$4 = {
12418
+ var script$5 = {
12372
12419
  name: 'ele-modal-table',
12373
12420
  model: {
12374
12421
  event: 'change',
@@ -12478,10 +12525,10 @@ var script$4 = {
12478
12525
  };
12479
12526
 
12480
12527
  /* script */
12481
- const __vue_script__$4 = script$4;
12528
+ const __vue_script__$5 = script$5;
12482
12529
 
12483
12530
  /* template */
12484
- var __vue_render__$4 = function () {
12531
+ var __vue_render__$5 = function () {
12485
12532
  var _vm = this;
12486
12533
  var _h = _vm.$createElement;
12487
12534
  var _c = _vm._self._c || _h;
@@ -12531,17 +12578,191 @@ var __vue_render__$4 = function () {
12531
12578
  1
12532
12579
  )
12533
12580
  };
12581
+ var __vue_staticRenderFns__$5 = [];
12582
+ __vue_render__$5._withStripped = true;
12583
+
12584
+ /* style */
12585
+ const __vue_inject_styles__$5 = function (inject) {
12586
+ if (!inject) return
12587
+ inject("data-v-ee208728_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
12588
+
12589
+ };
12590
+ /* scoped */
12591
+ const __vue_scope_id__$5 = "data-v-ee208728";
12592
+ /* module identifier */
12593
+ const __vue_module_identifier__$5 = undefined;
12594
+ /* functional template */
12595
+ const __vue_is_functional_template__$5 = false;
12596
+ /* style inject SSR */
12597
+
12598
+ /* style inject shadow dom */
12599
+
12600
+
12601
+
12602
+ const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
12603
+ { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
12604
+ __vue_inject_styles__$5,
12605
+ __vue_script__$5,
12606
+ __vue_scope_id__$5,
12607
+ __vue_is_functional_template__$5,
12608
+ __vue_module_identifier__$5,
12609
+ false,
12610
+ createInjector,
12611
+ undefined,
12612
+ undefined
12613
+ );
12614
+
12615
+ __vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
12616
+
12617
+ //
12618
+ //
12619
+ //
12620
+ //
12621
+ //
12622
+ //
12623
+ //
12624
+ //
12625
+ //
12626
+ //
12627
+ //
12628
+ //
12629
+ //
12630
+ //
12631
+ //
12632
+ //
12633
+ //
12634
+ //
12635
+ //
12636
+ //
12637
+ //
12638
+ //
12639
+
12640
+ var script$4 = {
12641
+ name: 'ele-form-img-crop',
12642
+ model: {
12643
+ prop: 'value',
12644
+ event: 'change'
12645
+ },
12646
+ props: {
12647
+ value: {
12648
+ type: [String, Number]
12649
+ },
12650
+ modalTitle: {
12651
+ type: String
12652
+ },
12653
+ operText: {
12654
+ type: String,
12655
+ default: '更改头像'
12656
+ },
12657
+ width: {
12658
+ type: [Number, String],
12659
+ default: 200
12660
+ },
12661
+ height: {
12662
+ type: [Number, String],
12663
+ default: 200
12664
+ }
12665
+ },
12666
+ data() {
12667
+ return {
12668
+ showModalImgCropValue: false
12669
+ };
12670
+ },
12671
+ computed: {
12672
+ style() {
12673
+ return {
12674
+ width: this.width + 'px',
12675
+ height: this.height + 'px'
12676
+ };
12677
+ },
12678
+ imageUrl() {
12679
+ return `/api-file/workbench/file/stream/${this.value}?origin=true`;
12680
+ }
12681
+ },
12682
+ methods: {
12683
+ handleClick() {
12684
+ this.showModalImgCropValue = true;
12685
+ },
12686
+ onChangeModalCropImg(fileId) {
12687
+ console.log('fileId', fileId);
12688
+ this.$emit('change', fileId);
12689
+ }
12690
+ }
12691
+ };
12692
+
12693
+ /* script */
12694
+ const __vue_script__$4 = script$4;
12695
+
12696
+ /* template */
12697
+ var __vue_render__$4 = function () {
12698
+ var _vm = this;
12699
+ var _h = _vm.$createElement;
12700
+ var _c = _vm._self._c || _h;
12701
+ return _c(
12702
+ "div",
12703
+ { staticClass: "ele__img--form" },
12704
+ [
12705
+ _c(
12706
+ "div",
12707
+ {
12708
+ staticClass: "form__img--wrapper",
12709
+ style: _vm.style,
12710
+ on: { click: _vm.handleClick },
12711
+ },
12712
+ [
12713
+ _vm.value
12714
+ ? _c("div", { staticClass: "form__img--preivew" }, [
12715
+ _c("img", {
12716
+ staticStyle: { width: "100%", height: "100%" },
12717
+ attrs: { src: _vm.imageUrl, alt: "", srcset: "" },
12718
+ }),
12719
+ ])
12720
+ : _vm._e(),
12721
+ _vm._v(" "),
12722
+ _c(
12723
+ "div",
12724
+ { staticClass: "form__icon--wrapper" },
12725
+ [
12726
+ _c("ele-icon", {
12727
+ staticClass: "icon--oper",
12728
+ attrs: { type: "icon-camera" },
12729
+ }),
12730
+ _vm._v(" "),
12731
+ _c("span", { staticClass: "icon__text--oper" }, [
12732
+ _vm._v(_vm._s(_vm.operText)),
12733
+ ]),
12734
+ ],
12735
+ 1
12736
+ ),
12737
+ ]
12738
+ ),
12739
+ _vm._v(" "),
12740
+ _c("ele-modal-img-crop", {
12741
+ attrs: { imageId: _vm.value, title: _vm.modalTitle },
12742
+ on: { change: _vm.onChangeModalCropImg },
12743
+ model: {
12744
+ value: _vm.showModalImgCropValue,
12745
+ callback: function ($$v) {
12746
+ _vm.showModalImgCropValue = $$v;
12747
+ },
12748
+ expression: "showModalImgCropValue",
12749
+ },
12750
+ }),
12751
+ ],
12752
+ 1
12753
+ )
12754
+ };
12534
12755
  var __vue_staticRenderFns__$4 = [];
12535
12756
  __vue_render__$4._withStripped = true;
12536
12757
 
12537
12758
  /* style */
12538
12759
  const __vue_inject_styles__$4 = function (inject) {
12539
12760
  if (!inject) return
12540
- inject("data-v-ee208728_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
12761
+ inject("data-v-40138cb1_0", { source: ".ele__img--form .form__img--wrapper[data-v-40138cb1] {\n cursor: pointer;\n border-radius: 4px;\n background: #000;\n opacity: 0.3;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n}\n.ele__img--form .form__img--wrapper .form__img--preivew[data-v-40138cb1] {\n position: absolute;\n color: red;\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.ele__img--form .form__img--wrapper .form__icon--wrapper[data-v-40138cb1] {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n color: #fff;\n}\n.ele__img--form .form__img--wrapper .form__icon--wrapper .icon--oper[data-v-40138cb1] {\n font-size: 40px;\n}\n.ele__img--form .form__img--wrapper .form__icon--wrapper .icon__text--oper[data-v-40138cb1] {\n font-size: 16px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\code\\OnlineStudy-Base\\base-elearning-frontend-model\\packages\\components\\packages\\composite-components\\form-img-crop\\src\\index.vue","index.vue"],"names":[],"mappings":"AA+EA;EACA,eAAA;EACA,kBAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,uBAAA;EACA,kBAAA;AC9EA;AD+EA;EACA,kBAAA;EACA,UAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;AC7EA;AD+EA;EACA,kBAAA;EACA,aAAA;EACA,sBAAA;EACA,mBAAA;EACA,WAAA;AC7EA;AD8EA;EACA,eAAA;AC5EA;AD8EA;EACA,eAAA;AC5EA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele__img--form\">\r\n <div class=\"form__img--wrapper\" \r\n @click=\"handleClick\" \r\n :style=\"style\">\r\n <div class=\"form__img--preivew\" v-if=\"value\">\r\n <img style=\"width:100%;height:100%\" :src=\"imageUrl\" alt=\"\" srcset=\"\">\r\n </div>\r\n <div class=\"form__icon--wrapper\">\r\n <ele-icon class=\"icon--oper\" type=\"icon-camera\"></ele-icon>\r\n <span class=\"icon__text--oper\">{{ operText }}</span>\r\n </div>\r\n </div>\r\n <ele-modal-img-crop \r\n v-model=\"showModalImgCropValue\"\r\n @change=\"onChangeModalCropImg\"\r\n :imageId=\"value\"\r\n :title=\"modalTitle\">\r\n </ele-modal-img-crop>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-form-img-crop',\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n value: {\r\n type: [String, Number]\r\n },\r\n modalTitle: {\r\n type: String\r\n },\r\n operText: {\r\n type: String,\r\n default: '更改头像'\r\n },\r\n width: {\r\n type: [Number, String],\r\n default: 200\r\n },\r\n height: {\r\n type: [Number, String],\r\n default: 200\r\n }\r\n },\r\n data() {\r\n return {\r\n showModalImgCropValue: false\r\n }\r\n },\r\n computed: {\r\n style () {\r\n return {\r\n width: this.width + 'px',\r\n height: this.height + 'px'\r\n }\r\n },\r\n imageUrl () {\r\n return `/api-file/workbench/file/stream/${this.value}?origin=true`\r\n }\r\n },\r\n methods: {\r\n handleClick () {\r\n this.showModalImgCropValue = true\r\n },\r\n onChangeModalCropImg (fileId) {\r\n console.log('fileId', fileId)\r\n this.$emit('change', fileId)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele__img--form {\r\n .form__img--wrapper {\r\n cursor: pointer;\r\n border-radius: 4px;\r\n background: #000;\r\n opacity: 0.3;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: center;\r\n position: relative;\r\n .form__img--preivew {\r\n position: absolute;\r\n color: red;\r\n width: 100%;\r\n height: 100%;\r\n border-radius: 4px;\r\n }\r\n .form__icon--wrapper {\r\n position: absolute;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n color: #fff;\r\n .icon--oper {\r\n font-size: 40px;\r\n }\r\n .icon__text--oper {\r\n font-size: 16px;\r\n }\r\n }\r\n }\r\n}\r\n</style>",".ele__img--form .form__img--wrapper {\n cursor: pointer;\n border-radius: 4px;\n background: #000;\n opacity: 0.3;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n position: relative;\n}\n.ele__img--form .form__img--wrapper .form__img--preivew {\n position: absolute;\n color: red;\n width: 100%;\n height: 100%;\n border-radius: 4px;\n}\n.ele__img--form .form__img--wrapper .form__icon--wrapper {\n position: absolute;\n display: flex;\n flex-direction: column;\n align-items: center;\n color: #fff;\n}\n.ele__img--form .form__img--wrapper .form__icon--wrapper .icon--oper {\n font-size: 40px;\n}\n.ele__img--form .form__img--wrapper .form__icon--wrapper .icon__text--oper {\n font-size: 16px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
12541
12762
 
12542
12763
  };
12543
12764
  /* scoped */
12544
- const __vue_scope_id__$4 = "data-v-ee208728";
12765
+ const __vue_scope_id__$4 = "data-v-40138cb1";
12545
12766
  /* module identifier */
12546
12767
  const __vue_module_identifier__$4 = undefined;
12547
12768
  /* functional template */
@@ -13286,18 +13507,18 @@ __vue_render__._withStripped = true;
13286
13507
 
13287
13508
  __vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
13288
13509
 
13289
- __vue_component__$x.install = Vue => Vue.component(__vue_component__$x.name, __vue_component__$x);
13290
-
13291
- __vue_component__$v.install = Vue => Vue.component(__vue_component__$v.name, __vue_component__$v);
13510
+ __vue_component__$y.install = Vue => Vue.component(__vue_component__$y.name, __vue_component__$y);
13292
13511
 
13293
13512
  __vue_component__$w.install = Vue => Vue.component(__vue_component__$w.name, __vue_component__$w);
13294
13513
 
13295
- __vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
13514
+ __vue_component__$x.install = Vue => Vue.component(__vue_component__$x.name, __vue_component__$x);
13515
+
13516
+ __vue_component__$v.install = Vue => Vue.component(__vue_component__$v.name, __vue_component__$v);
13296
13517
 
13297
- const compositeComponents = [__vue_component__$8, __vue_component__$9, __vue_component__$7, __vue_component__$6, __vue_component__$e, __vue_component__$5, __vue_component__$4];
13518
+ const compositeComponents = [__vue_component__$9, __vue_component__$a, __vue_component__$8, __vue_component__$7, __vue_component__$f, __vue_component__$6, __vue_component__$5, __vue_component__$4];
13298
13519
  const businessComponents = [__vue_component__$3, __vue_component__$2, __vue_component__$1, __vue_component__];
13299
- const models = [__vue_component__$x, __vue_component__$v, __vue_component__$w, __vue_component__$u];
13300
- const components = [__vue_component__$E, __vue_component__$D, __vue_component__$C, __vue_component__$B, __vue_component__$z, __vue_component__$y, __vue_component__$t, __vue_component__$s, __vue_component__$r, __vue_component__$q, __vue_component__$p, __vue_component__$o, __vue_component__$n, __vue_component__$m, __vue_component__$l, __vue_component__$k, __vue_component__$j, __vue_component__$i, __vue_component__$h, __vue_component__$g, __vue_component__$f, __vue_component__$d, __vue_component__$c, __vue_component__$b, ...compositeComponents, ...businessComponents, ...models];
13520
+ const models = [__vue_component__$y, __vue_component__$w, __vue_component__$x, __vue_component__$v];
13521
+ const components = [__vue_component__$F, __vue_component__$E, __vue_component__$D, __vue_component__$C, __vue_component__$A, __vue_component__$z, __vue_component__$u, __vue_component__$t, __vue_component__$s, __vue_component__$r, __vue_component__$q, __vue_component__$p, __vue_component__$o, __vue_component__$n, __vue_component__$m, __vue_component__$l, __vue_component__$k, __vue_component__$j, __vue_component__$i, __vue_component__$h, __vue_component__$g, __vue_component__$e, __vue_component__$d, __vue_component__$c, ...compositeComponents, ...businessComponents, ...models];
13301
13522
  const install = Vue => {
13302
13523
  if (install.installed) return;
13303
13524
  install.installed = true;
@@ -13306,4 +13527,4 @@ const install = Vue => {
13306
13527
  });
13307
13528
  };
13308
13529
 
13309
- export { __vue_component__$r as EleAlert, __vue_component__$j as EleBatchExport, __vue_component__$E as EleButton, __vue_component__$8 as EleButtonGroup, __vue_component__$l as EleCheckbox, __vue_component__$D as EleDate, __vue_component__$i as EleDateRange, __vue_component__$s as EleForm, __vue_component__$w as EleFormGroupModel, __vue_component__$v as EleFormPageModel, __vue_component__$o as EleIcon, __vue_component__$C as EleInput, __vue_component__$n as EleInputNumber, __vue_component__$b as EleLoading, __vue_component__$m as EleModal, __vue_component__$5 as EleModalConfirm, __vue_component__$7 as EleModalForm, __vue_component__$1 as EleModalFsm, __vue_component__$e as EleModalImgCrop, __vue_component__$3 as EleModalImport, __vue_component__$4 as EleModalTable, __vue_component__$2 as EleModalTimeline, __vue_component__$6 as EleModalTree, __vue_component__$k as EleRadio, __vue_component__$9 as EleSearchArea, __vue_component__$B as EleSelect, __vue_component__$p as EleSelectEntity, __vue_component__$u as EleStepModel, __vue_component__$z as EleTable, __vue_component__$f as EleTabs, __vue_component__ as EleTabsSubCenter, __vue_component__$g as EleText, __vue_component__$d as EleTextEditor, __vue_component__$c as EleTextarea, __vue_component__$h as EleTimeline, __vue_component__$t as EleTpl, __vue_component__$y as EleTree, __vue_component__$x as EleTreeTableModel, __vue_component__$q as EleUpload, install as default, models };
13530
+ export { __vue_component__$s as EleAlert, __vue_component__$k as EleBatchExport, __vue_component__$F as EleButton, __vue_component__$9 as EleButtonGroup, __vue_component__$m as EleCheckbox, __vue_component__$E as EleDate, __vue_component__$j as EleDateRange, __vue_component__$t as EleForm, __vue_component__$x as EleFormGroupModel, __vue_component__$4 as EleFormImgCrop, __vue_component__$w as EleFormPageModel, __vue_component__$p as EleIcon, __vue_component__$D as EleInput, __vue_component__$o as EleInputNumber, __vue_component__$c as EleLoading, __vue_component__$n as EleModal, __vue_component__$6 as EleModalConfirm, __vue_component__$8 as EleModalForm, __vue_component__$1 as EleModalFsm, __vue_component__$f as EleModalImgCrop, __vue_component__$3 as EleModalImport, __vue_component__$5 as EleModalTable, __vue_component__$2 as EleModalTimeline, __vue_component__$7 as EleModalTree, __vue_component__$l as EleRadio, __vue_component__$a as EleSearchArea, __vue_component__$C as EleSelect, __vue_component__$q as EleSelectEntity, __vue_component__$v as EleStepModel, __vue_component__$A as EleTable, __vue_component__$g as EleTabs, __vue_component__ as EleTabsSubCenter, __vue_component__$h as EleText, __vue_component__$e as EleTextEditor, __vue_component__$d as EleTextarea, __vue_component__$i as EleTimeline, __vue_component__$u as EleTpl, __vue_component__$z as EleTree, __vue_component__$y as EleTreeTableModel, __vue_component__$r as EleUpload, install as default, models };