@idooel/components 0.0.1-beta.21 → 0.0.1-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@idooel/components.esm.js +954 -584
- package/dist/@idooel/components.umd.js +964 -592
- package/package.json +49 -46
- package/packages/alert/index.js +4 -4
- package/packages/alert/src/index.vue +45 -45
- package/packages/batch-export/index.js +4 -4
- package/packages/batch-export/src/index.vue +108 -106
- package/packages/button/index.js +4 -4
- package/packages/button/src/index.vue +54 -54
- package/packages/checkbox/index.js +4 -4
- package/packages/checkbox/src/index.vue +43 -43
- package/packages/composite-components/attachment/src/index.vue +14 -14
- package/packages/composite-components/button-group/index.js +4 -4
- package/packages/composite-components/button-group/src/index.vue +53 -45
- package/packages/composite-components/modal-import/index.js +4 -4
- package/packages/composite-components/modal-import/src/index.vue +27 -27
- package/packages/composite-components/search-area/index.js +4 -4
- package/packages/composite-components/search-area/src/index.vue +225 -225
- package/packages/composite-components/search-area/src/label.vue +35 -35
- package/packages/date/index.js +4 -4
- package/packages/date/src/index.vue +39 -39
- package/packages/date-range/index.js +4 -4
- package/packages/date-range/src/index.vue +47 -47
- package/packages/form/index.js +4 -4
- package/packages/form/src/index.vue +212 -212
- package/packages/form-group-model/index.js +4 -4
- package/packages/form-group-model/src/index.vue +273 -273
- package/packages/form-model/index.js +4 -4
- package/packages/form-model/src/index.vue +165 -165
- package/packages/icon/index.js +4 -4
- package/packages/icon/src/index.vue +31 -31
- package/packages/img-crop/index.js +5 -0
- package/packages/img-crop/src/index.vue +181 -0
- package/packages/index.js +89 -84
- package/packages/input/index.js +4 -4
- package/packages/input/src/index.vue +35 -35
- package/packages/input-number/index.js +4 -4
- package/packages/input-number/src/index.vue +23 -23
- package/packages/modal/index.js +4 -4
- package/packages/modal/src/index.vue +146 -141
- package/packages/radio/index.js +4 -4
- package/packages/radio/src/index.vue +51 -51
- package/packages/select/index.js +4 -4
- package/packages/select/src/index.vue +92 -92
- package/packages/select-entity/index.js +4 -4
- package/packages/select-entity/src/index.vue +113 -113
- package/packages/step-model/index.js +4 -4
- package/packages/step-model/src/index.vue +196 -173
- package/packages/table/index.js +4 -4
- package/packages/table/src/action.vue +131 -131
- package/packages/table/src/index.vue +157 -157
- package/packages/tabs/index.js +4 -4
- package/packages/tabs/src/index.vue +55 -54
- package/packages/text-editor/index.js +5 -0
- package/packages/text-editor/src/index.vue +73 -0
- package/packages/textarea/index.js +4 -4
- package/packages/textarea/src/index.vue +57 -57
- package/packages/theme/form.scss +21 -21
- package/packages/theme/index.scss +31 -27
- package/packages/theme/styleClass.scss +3 -0
- package/packages/theme/variables.scss +55 -55
- package/packages/tpl/index.js +4 -4
- package/packages/tpl/src/index.vue +55 -55
- package/packages/tree/index.js +4 -4
- package/packages/tree/src/TreeNode.vue +29 -29
- package/packages/tree/src/index.vue +101 -101
- package/packages/tree-table-model/index.js +4 -4
- package/packages/tree-table-model/src/index.vue +314 -314
- package/packages/upload/index.js +4 -4
- package/packages/upload/src/index.vue +348 -348
- package/packages/utils/index.js +23 -23
- package/scripts/rollup.config.js +35 -35
- package/scripts/rollup.esm.config.js +11 -11
- package/scripts/rollup.umd.config.js +14 -14
|
@@ -20,7 +20,7 @@ import FileUpload from 'vue-upload-component';
|
|
|
20
20
|
//
|
|
21
21
|
//
|
|
22
22
|
|
|
23
|
-
var script$
|
|
23
|
+
var script$u = {
|
|
24
24
|
name: 'ele-button',
|
|
25
25
|
props: {
|
|
26
26
|
record: {
|
|
@@ -138,10 +138,10 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/* script */
|
|
141
|
-
const __vue_script__$
|
|
141
|
+
const __vue_script__$u = script$u;
|
|
142
142
|
|
|
143
143
|
/* template */
|
|
144
|
-
var __vue_render__$
|
|
144
|
+
var __vue_render__$u = function () {
|
|
145
145
|
var _vm = this;
|
|
146
146
|
var _h = _vm.$createElement;
|
|
147
147
|
var _c = _vm._self._c || _h;
|
|
@@ -187,17 +187,17 @@ var __vue_render__$s = function () {
|
|
|
187
187
|
2
|
|
188
188
|
)
|
|
189
189
|
};
|
|
190
|
-
var __vue_staticRenderFns__$
|
|
191
|
-
__vue_render__$
|
|
190
|
+
var __vue_staticRenderFns__$u = [];
|
|
191
|
+
__vue_render__$u._withStripped = true;
|
|
192
192
|
|
|
193
193
|
/* style */
|
|
194
|
-
const __vue_inject_styles__$
|
|
194
|
+
const __vue_inject_styles__$u = undefined;
|
|
195
195
|
/* scoped */
|
|
196
|
-
const __vue_scope_id__$
|
|
196
|
+
const __vue_scope_id__$u = undefined;
|
|
197
197
|
/* module identifier */
|
|
198
|
-
const __vue_module_identifier__$
|
|
198
|
+
const __vue_module_identifier__$u = undefined;
|
|
199
199
|
/* functional template */
|
|
200
|
-
const __vue_is_functional_template__$
|
|
200
|
+
const __vue_is_functional_template__$u = false;
|
|
201
201
|
/* style inject */
|
|
202
202
|
|
|
203
203
|
/* style inject SSR */
|
|
@@ -206,20 +206,20 @@ __vue_render__$s._withStripped = true;
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
const __vue_component__$
|
|
210
|
-
{ render: __vue_render__$
|
|
211
|
-
__vue_inject_styles__$
|
|
212
|
-
__vue_script__$
|
|
213
|
-
__vue_scope_id__$
|
|
214
|
-
__vue_is_functional_template__$
|
|
215
|
-
__vue_module_identifier__$
|
|
209
|
+
const __vue_component__$u = /*#__PURE__*/normalizeComponent(
|
|
210
|
+
{ render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
|
|
211
|
+
__vue_inject_styles__$u,
|
|
212
|
+
__vue_script__$u,
|
|
213
|
+
__vue_scope_id__$u,
|
|
214
|
+
__vue_is_functional_template__$u,
|
|
215
|
+
__vue_module_identifier__$u,
|
|
216
216
|
false,
|
|
217
217
|
undefined,
|
|
218
218
|
undefined,
|
|
219
219
|
undefined
|
|
220
220
|
);
|
|
221
221
|
|
|
222
|
-
__vue_component__$
|
|
222
|
+
__vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
|
|
223
223
|
|
|
224
224
|
//
|
|
225
225
|
//
|
|
@@ -234,7 +234,7 @@ __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __v
|
|
|
234
234
|
//
|
|
235
235
|
//
|
|
236
236
|
|
|
237
|
-
var script$
|
|
237
|
+
var script$t = {
|
|
238
238
|
name: 'ele-date',
|
|
239
239
|
props: {
|
|
240
240
|
value: {
|
|
@@ -262,10 +262,10 @@ var script$r = {
|
|
|
262
262
|
};
|
|
263
263
|
|
|
264
264
|
/* script */
|
|
265
|
-
const __vue_script__$
|
|
265
|
+
const __vue_script__$t = script$t;
|
|
266
266
|
|
|
267
267
|
/* template */
|
|
268
|
-
var __vue_render__$
|
|
268
|
+
var __vue_render__$t = function () {
|
|
269
269
|
var _vm = this;
|
|
270
270
|
var _h = _vm.$createElement;
|
|
271
271
|
var _c = _vm._self._c || _h;
|
|
@@ -280,17 +280,17 @@ var __vue_render__$r = function () {
|
|
|
280
280
|
on: { focus: _vm.onFocus, panelChange: _vm.onPanelChange },
|
|
281
281
|
})
|
|
282
282
|
};
|
|
283
|
-
var __vue_staticRenderFns__$
|
|
284
|
-
__vue_render__$
|
|
283
|
+
var __vue_staticRenderFns__$t = [];
|
|
284
|
+
__vue_render__$t._withStripped = true;
|
|
285
285
|
|
|
286
286
|
/* style */
|
|
287
|
-
const __vue_inject_styles__$
|
|
287
|
+
const __vue_inject_styles__$t = undefined;
|
|
288
288
|
/* scoped */
|
|
289
|
-
const __vue_scope_id__$
|
|
289
|
+
const __vue_scope_id__$t = undefined;
|
|
290
290
|
/* module identifier */
|
|
291
|
-
const __vue_module_identifier__$
|
|
291
|
+
const __vue_module_identifier__$t = undefined;
|
|
292
292
|
/* functional template */
|
|
293
|
-
const __vue_is_functional_template__$
|
|
293
|
+
const __vue_is_functional_template__$t = false;
|
|
294
294
|
/* style inject */
|
|
295
295
|
|
|
296
296
|
/* style inject SSR */
|
|
@@ -299,27 +299,27 @@ __vue_render__$r._withStripped = true;
|
|
|
299
299
|
|
|
300
300
|
|
|
301
301
|
|
|
302
|
-
const __vue_component__$
|
|
303
|
-
{ render: __vue_render__$
|
|
304
|
-
__vue_inject_styles__$
|
|
305
|
-
__vue_script__$
|
|
306
|
-
__vue_scope_id__$
|
|
307
|
-
__vue_is_functional_template__$
|
|
308
|
-
__vue_module_identifier__$
|
|
302
|
+
const __vue_component__$t = /*#__PURE__*/normalizeComponent(
|
|
303
|
+
{ render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
|
|
304
|
+
__vue_inject_styles__$t,
|
|
305
|
+
__vue_script__$t,
|
|
306
|
+
__vue_scope_id__$t,
|
|
307
|
+
__vue_is_functional_template__$t,
|
|
308
|
+
__vue_module_identifier__$t,
|
|
309
309
|
false,
|
|
310
310
|
undefined,
|
|
311
311
|
undefined,
|
|
312
312
|
undefined
|
|
313
313
|
);
|
|
314
314
|
|
|
315
|
-
__vue_component__$
|
|
315
|
+
__vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
|
|
316
316
|
|
|
317
317
|
//
|
|
318
318
|
//
|
|
319
319
|
//
|
|
320
320
|
//
|
|
321
321
|
|
|
322
|
-
var script$
|
|
322
|
+
var script$s = {
|
|
323
323
|
name: 'ele-input',
|
|
324
324
|
model: {
|
|
325
325
|
prop: 'value',
|
|
@@ -391,10 +391,10 @@ function addStyle(id, css) {
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
/* script */
|
|
394
|
-
const __vue_script__$
|
|
394
|
+
const __vue_script__$s = script$s;
|
|
395
395
|
|
|
396
396
|
/* template */
|
|
397
|
-
var __vue_render__$
|
|
397
|
+
var __vue_render__$s = function () {
|
|
398
398
|
var _vm = this;
|
|
399
399
|
var _h = _vm.$createElement;
|
|
400
400
|
var _c = _vm._self._c || _h;
|
|
@@ -407,44 +407,44 @@ var __vue_render__$q = function () {
|
|
|
407
407
|
on: { change: _vm.onChange },
|
|
408
408
|
})
|
|
409
409
|
};
|
|
410
|
-
var __vue_staticRenderFns__$
|
|
411
|
-
__vue_render__$
|
|
410
|
+
var __vue_staticRenderFns__$s = [];
|
|
411
|
+
__vue_render__$s._withStripped = true;
|
|
412
412
|
|
|
413
413
|
/* style */
|
|
414
|
-
const __vue_inject_styles__$
|
|
414
|
+
const __vue_inject_styles__$s = function (inject) {
|
|
415
415
|
if (!inject) return
|
|
416
|
-
inject("data-v-
|
|
416
|
+
inject("data-v-c04139c8_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 });
|
|
417
417
|
|
|
418
418
|
};
|
|
419
419
|
/* scoped */
|
|
420
|
-
const __vue_scope_id__$
|
|
420
|
+
const __vue_scope_id__$s = "data-v-c04139c8";
|
|
421
421
|
/* module identifier */
|
|
422
|
-
const __vue_module_identifier__$
|
|
422
|
+
const __vue_module_identifier__$s = undefined;
|
|
423
423
|
/* functional template */
|
|
424
|
-
const __vue_is_functional_template__$
|
|
424
|
+
const __vue_is_functional_template__$s = false;
|
|
425
425
|
/* style inject SSR */
|
|
426
426
|
|
|
427
427
|
/* style inject shadow dom */
|
|
428
428
|
|
|
429
429
|
|
|
430
430
|
|
|
431
|
-
const __vue_component__$
|
|
432
|
-
{ render: __vue_render__$
|
|
433
|
-
__vue_inject_styles__$
|
|
434
|
-
__vue_script__$
|
|
435
|
-
__vue_scope_id__$
|
|
436
|
-
__vue_is_functional_template__$
|
|
437
|
-
__vue_module_identifier__$
|
|
431
|
+
const __vue_component__$s = /*#__PURE__*/normalizeComponent(
|
|
432
|
+
{ render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
|
|
433
|
+
__vue_inject_styles__$s,
|
|
434
|
+
__vue_script__$s,
|
|
435
|
+
__vue_scope_id__$s,
|
|
436
|
+
__vue_is_functional_template__$s,
|
|
437
|
+
__vue_module_identifier__$s,
|
|
438
438
|
false,
|
|
439
439
|
createInjector,
|
|
440
440
|
undefined,
|
|
441
441
|
undefined
|
|
442
442
|
);
|
|
443
443
|
|
|
444
|
-
__vue_component__$
|
|
444
|
+
__vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
|
|
445
445
|
|
|
446
446
|
//
|
|
447
|
-
var script$
|
|
447
|
+
var script$r = {
|
|
448
448
|
name: 'ele-select',
|
|
449
449
|
props: {
|
|
450
450
|
disabled: {
|
|
@@ -529,10 +529,10 @@ var script$p = {
|
|
|
529
529
|
};
|
|
530
530
|
|
|
531
531
|
/* script */
|
|
532
|
-
const __vue_script__$
|
|
532
|
+
const __vue_script__$r = script$r;
|
|
533
533
|
|
|
534
534
|
/* template */
|
|
535
|
-
var __vue_render__$
|
|
535
|
+
var __vue_render__$r = function () {
|
|
536
536
|
var _vm = this;
|
|
537
537
|
var _h = _vm.$createElement;
|
|
538
538
|
var _c = _vm._self._c || _h;
|
|
@@ -553,41 +553,41 @@ var __vue_render__$p = function () {
|
|
|
553
553
|
1
|
|
554
554
|
)
|
|
555
555
|
};
|
|
556
|
-
var __vue_staticRenderFns__$
|
|
557
|
-
__vue_render__$
|
|
556
|
+
var __vue_staticRenderFns__$r = [];
|
|
557
|
+
__vue_render__$r._withStripped = true;
|
|
558
558
|
|
|
559
559
|
/* style */
|
|
560
|
-
const __vue_inject_styles__$
|
|
560
|
+
const __vue_inject_styles__$r = function (inject) {
|
|
561
561
|
if (!inject) return
|
|
562
|
-
inject("data-v-
|
|
562
|
+
inject("data-v-1fbed5ac_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
563
563
|
|
|
564
564
|
};
|
|
565
565
|
/* scoped */
|
|
566
|
-
const __vue_scope_id__$
|
|
566
|
+
const __vue_scope_id__$r = "data-v-1fbed5ac";
|
|
567
567
|
/* module identifier */
|
|
568
|
-
const __vue_module_identifier__$
|
|
568
|
+
const __vue_module_identifier__$r = undefined;
|
|
569
569
|
/* functional template */
|
|
570
|
-
const __vue_is_functional_template__$
|
|
570
|
+
const __vue_is_functional_template__$r = false;
|
|
571
571
|
/* style inject SSR */
|
|
572
572
|
|
|
573
573
|
/* style inject shadow dom */
|
|
574
574
|
|
|
575
575
|
|
|
576
576
|
|
|
577
|
-
const __vue_component__$
|
|
578
|
-
{ render: __vue_render__$
|
|
579
|
-
__vue_inject_styles__$
|
|
580
|
-
__vue_script__$
|
|
581
|
-
__vue_scope_id__$
|
|
582
|
-
__vue_is_functional_template__$
|
|
583
|
-
__vue_module_identifier__$
|
|
577
|
+
const __vue_component__$r = /*#__PURE__*/normalizeComponent(
|
|
578
|
+
{ render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
|
|
579
|
+
__vue_inject_styles__$r,
|
|
580
|
+
__vue_script__$r,
|
|
581
|
+
__vue_scope_id__$r,
|
|
582
|
+
__vue_is_functional_template__$r,
|
|
583
|
+
__vue_module_identifier__$r,
|
|
584
584
|
false,
|
|
585
585
|
createInjector,
|
|
586
586
|
undefined,
|
|
587
587
|
undefined
|
|
588
588
|
);
|
|
589
589
|
|
|
590
|
-
__vue_component__$
|
|
590
|
+
__vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
|
|
591
591
|
|
|
592
592
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
593
593
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -1221,7 +1221,7 @@ const parse = (expression, props = {}) => {
|
|
|
1221
1221
|
|
|
1222
1222
|
//
|
|
1223
1223
|
const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
|
|
1224
|
-
var script$
|
|
1224
|
+
var script$q = {
|
|
1225
1225
|
props: {
|
|
1226
1226
|
record: {
|
|
1227
1227
|
type: Object
|
|
@@ -1319,10 +1319,10 @@ var script$o = {
|
|
|
1319
1319
|
};
|
|
1320
1320
|
|
|
1321
1321
|
/* script */
|
|
1322
|
-
const __vue_script__$
|
|
1322
|
+
const __vue_script__$q = script$q;
|
|
1323
1323
|
|
|
1324
1324
|
/* template */
|
|
1325
|
-
var __vue_render__$
|
|
1325
|
+
var __vue_render__$q = function () {
|
|
1326
1326
|
var _vm = this;
|
|
1327
1327
|
var _h = _vm.$createElement;
|
|
1328
1328
|
var _c = _vm._self._c || _h;
|
|
@@ -1422,34 +1422,34 @@ var __vue_render__$o = function () {
|
|
|
1422
1422
|
0
|
|
1423
1423
|
)
|
|
1424
1424
|
};
|
|
1425
|
-
var __vue_staticRenderFns__$
|
|
1426
|
-
__vue_render__$
|
|
1425
|
+
var __vue_staticRenderFns__$q = [];
|
|
1426
|
+
__vue_render__$q._withStripped = true;
|
|
1427
1427
|
|
|
1428
1428
|
/* style */
|
|
1429
|
-
const __vue_inject_styles__$
|
|
1429
|
+
const __vue_inject_styles__$q = function (inject) {
|
|
1430
1430
|
if (!inject) return
|
|
1431
|
-
inject("data-v-
|
|
1431
|
+
inject("data-v-5e9f9cdc_0", { source: ".g-table__action[data-v-5e9f9cdc] {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item[data-v-5e9f9cdc] {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item[data-v-5e9f9cdc]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/table/src/action.vue","action.vue"],"names":[],"mappings":"AAsHA;EACA,aAAA;EACA,mBAAA;ACrHA;ADsHA;EACA,eAAA;EACA,cAAA;EACA,iBAAA;EACA,eAAA;ACpHA;ADqHA;EACA,cAAA;ACnHA;;AAEA,qCAAqC","file":"action.vue","sourcesContent":["<template>\n <div class=\"g-table__action\">\n <div class=\"table-action__item\" v-for=\"(item, idx) in execOperationExpression(dataSource)\" :key=\"idx\">\n <template v-if=\"item.type == 'text'\">\n <span @click=\"handleClickText(item)\">{{ item.label }}</span>\n </template>\n <template v-else-if=\"item.type == 'dropdown'\">\n <a-dropdown>\n <a-menu slot=\"overlay\" @click=\"handleDropdownClick\">\n <a-menu-item :key=\"`${item.key || ''}${menuKeyDelimiter}${opt.value || ''}`\" v-for=\"opt in execOperationExpression(item.optionList)\">\n <template v-if=\"opt.type == 'confirm'\">\n <a-popconfirm :title=\"opt.message\" @confirm=\"handleClickConfirm(opt)\">\n {{ opt.label }}\n </a-popconfirm>\n </template>\n <template v-else>\n {{ opt.label }}\n </template>\n </a-menu-item>\n </a-menu>\n <span>{{ item.label }}</span>\n </a-dropdown>\n </template>\n </div>\n </div>\n</template>\n\n<script>\nimport { v5 as uuidv5 } from 'uuid'\nimport { type, route } from '@idooel/shared'\nimport { parse } from '@idooel/expression'\nconst MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002'\nexport default {\n props: {\n record: {\n type: Object\n },\n dataSource: {\n type: Array,\n default: () => []\n }\n },\n inject: {\n requestTreeData: {\n default: void 0\n },\n requestTableData: {\n default: void 0\n }\n },\n computed: {\n menuKeyDelimiter () {\n return uuidv5('_', MENU_KEY_NAMESPACE)\n },\n builtInMethods () {\n return { \n requestTreeData: this.requestTreeData, \n requestTableData: this.requestTableData \n }\n }\n },\n methods: {\n execOperationExpression (dataSource = []) {\n const ret = dataSource.map(item => {\n const { show } = item\n if (type.isUndefined(show)) {\n return item\n } else if (type.isBool(show)) {\n if (show) return item\n } else if (type.isStr(show)) {\n const parseRet = parse(show, { \n ...this.record, \n _route: route.searchToQueryParams(window.location.search) \n })\n if (parseRet) return item\n }\n }).filter(item => item)\n return ret\n },\n handleClickConfirm (props) {\n //TODO generate event by special rule\n const { eventName, value } = props\n this.$emit(eventName, { \n key: value, \n record: this.record,\n builtInMethods: this.builtInMethods \n })\n },\n handleDropdownClick (props) {\n const { key } = props\n const [parent, child] = key.split(this.menuKeyDelimiter)\n if (!parent || !child) {\n throw new Error('key is required')\n }\n const currentDropdown = this.dataSource.find(item => item.key === parent)\n const currentClickTarget = currentDropdown.optionList.find(item => item.value === child)\n const { eventName, type } = currentClickTarget\n //TODO generate event by special rule\n if (type === 'confirm') return\n this.$emit(eventName, { \n key: child, \n record: this.record, \n builtInMethods: this.builtInMethods \n })\n },\n handleClickText (props) {\n const { eventName, key } = props\n this.$emit(eventName, { \n key, \n record: this.record, \n builtInMethods: this.builtInMethods \n })\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-table__action {\n display: flex;\n flex-direction: row;\n .table-action__item {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n &:first-child {\n margin-left: 0;\n }\n }\n}\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 });
|
|
1432
1432
|
|
|
1433
1433
|
};
|
|
1434
1434
|
/* scoped */
|
|
1435
|
-
const __vue_scope_id__$
|
|
1435
|
+
const __vue_scope_id__$q = "data-v-5e9f9cdc";
|
|
1436
1436
|
/* module identifier */
|
|
1437
|
-
const __vue_module_identifier__$
|
|
1437
|
+
const __vue_module_identifier__$q = undefined;
|
|
1438
1438
|
/* functional template */
|
|
1439
|
-
const __vue_is_functional_template__$
|
|
1439
|
+
const __vue_is_functional_template__$q = false;
|
|
1440
1440
|
/* style inject SSR */
|
|
1441
1441
|
|
|
1442
1442
|
/* style inject shadow dom */
|
|
1443
1443
|
|
|
1444
1444
|
|
|
1445
1445
|
|
|
1446
|
-
const __vue_component__$
|
|
1447
|
-
{ render: __vue_render__$
|
|
1448
|
-
__vue_inject_styles__$
|
|
1449
|
-
__vue_script__$
|
|
1450
|
-
__vue_scope_id__$
|
|
1451
|
-
__vue_is_functional_template__$
|
|
1452
|
-
__vue_module_identifier__$
|
|
1446
|
+
const __vue_component__$q = /*#__PURE__*/normalizeComponent(
|
|
1447
|
+
{ render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
|
|
1448
|
+
__vue_inject_styles__$q,
|
|
1449
|
+
__vue_script__$q,
|
|
1450
|
+
__vue_scope_id__$q,
|
|
1451
|
+
__vue_is_functional_template__$q,
|
|
1452
|
+
__vue_module_identifier__$q,
|
|
1453
1453
|
false,
|
|
1454
1454
|
createInjector,
|
|
1455
1455
|
undefined,
|
|
@@ -1457,10 +1457,10 @@ __vue_render__$o._withStripped = true;
|
|
|
1457
1457
|
);
|
|
1458
1458
|
|
|
1459
1459
|
//
|
|
1460
|
-
var script$
|
|
1460
|
+
var script$p = {
|
|
1461
1461
|
name: 'ele-table',
|
|
1462
1462
|
components: {
|
|
1463
|
-
Actions: __vue_component__$
|
|
1463
|
+
Actions: __vue_component__$q
|
|
1464
1464
|
},
|
|
1465
1465
|
props: {
|
|
1466
1466
|
actions: {
|
|
@@ -1503,10 +1503,10 @@ var script$n = {
|
|
|
1503
1503
|
};
|
|
1504
1504
|
|
|
1505
1505
|
/* script */
|
|
1506
|
-
const __vue_script__$
|
|
1506
|
+
const __vue_script__$p = script$p;
|
|
1507
1507
|
|
|
1508
1508
|
/* template */
|
|
1509
|
-
var __vue_render__$
|
|
1509
|
+
var __vue_render__$p = function () {
|
|
1510
1510
|
var _vm = this;
|
|
1511
1511
|
var _h = _vm.$createElement;
|
|
1512
1512
|
var _c = _vm._self._c || _h;
|
|
@@ -1565,41 +1565,41 @@ var __vue_render__$n = function () {
|
|
|
1565
1565
|
1
|
|
1566
1566
|
)
|
|
1567
1567
|
};
|
|
1568
|
-
var __vue_staticRenderFns__$
|
|
1569
|
-
__vue_render__$
|
|
1568
|
+
var __vue_staticRenderFns__$p = [];
|
|
1569
|
+
__vue_render__$p._withStripped = true;
|
|
1570
1570
|
|
|
1571
1571
|
/* style */
|
|
1572
|
-
const __vue_inject_styles__$
|
|
1572
|
+
const __vue_inject_styles__$p = function (inject) {
|
|
1573
1573
|
if (!inject) return
|
|
1574
|
-
inject("data-v-6f3faf52_0", { source: ".g-table__wrapper[data-v-6f3faf52] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper[data-v-6f3faf52] .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-6f3faf52] .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper[data-v-6f3faf52] .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-6f3faf52] .ant-table-wrapper .ant-table-body {\n border-top-width: calc(var(--idooel-border-width) * 1px);\n border-top-style: solid;\n border-top-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-6f3faf52] .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-6f3faf52] .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-6f3faf52] .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-6f3faf52] .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-6f3faf52] .ant-table-wrapper .ant-table-fixed-right {\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-6f3faf52] .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-6f3faf52] .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 .g-table__pagination[data-v-6f3faf52] {\n /* margin-top: 8px; */\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}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\table\\src\\index.vue","index.vue"],"names":[],"mappings":"AA4EA;EAgEA,aAAA;EACA,kBAAA;AC1IA;AD2EA;EACA,oDAAA;EACA,mBAAA;EACA,wCAAA;ACzEA;AD4EA;EACA,iDAAA;AC1EA;AD+EA;EACA,+CAAA;EACA,2DAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;AC7EA;ADiFA;EACA,wDAAA;EACA,uBAAA;EACA,4CAAA;AC/EA;ADiFA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;AC/EA;ADgFA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;AC9EA;ADgFA;EACA,0DAAA;EACA,yBAAA;EACA,8CAAA;AC9EA;ADgFA;EACA,0DAAA;EACA,8CAAA;EACA,yBAAA;AC9EA;ADiFA;EAMA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACpFA;AD6EA;EACA,2DAAA;EACA,+CAAA;EACA,0BAAA;AC3EA;ADgFA;EACA,yDAAA;EACA,wBAAA;EACA,6CAAA;AC9EA;ADsFA;EACA,qBAAA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;EACA,oDAAA;EACA,wCAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;ACpFA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"g-table__wrapper\">\r\n <a-table\r\n :pagination=\"false\"\r\n :loading=\"loading\"\r\n :columns=\"columns\"\r\n :row-class-name=\"setRowClassName\"\r\n :data-source=\"dataSource\"\r\n :scroll=\"{ x: 1500, y: 500 }\">\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=\"total => `共 ${total} 条数据`\"\r\n show-size-changer \r\n show-quick-jumper\r\n :pageSize=\"pageSize\"\r\n :pageSizeOptions=\"pageSizeOptions\"\r\n @change=\"onChangePagination\" \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 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 methods: {\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, pagrSize) {\r\n this.$emit('change-page', page, pagrSize)\r\n }\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-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 }\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 .g-table__row--even {}\r\n .g-table__row--odd {}\r\n .g-table__pagination {\r\n /* margin-top: 8px; */\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 }\r\n}\r\n</style>",".g-table__wrapper {\n padding: 16px;\n padding-top: unset;\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-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-body {\n border-top-width: calc(var(--idooel-border-width) * 1px);\n border-top-style: solid;\n border-top-color: var(--idooel-border-color);\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 {\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-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 .g-table__pagination {\n /* margin-top: 8px; */\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}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1574
|
+
inject("data-v-70a1f03f_0", { source: ".g-table__wrapper[data-v-70a1f03f] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper[data-v-70a1f03f] .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-70a1f03f] .ant-table-wrapper .ant-table-header .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n}\n.g-table__wrapper[data-v-70a1f03f] .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-70a1f03f] .ant-table-wrapper .ant-table-body {\n border-top-width: calc(var(--idooel-border-width) * 1px);\n border-top-style: solid;\n border-top-color: var(--idooel-border-color);\n}\n.g-table__wrapper[data-v-70a1f03f] .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-70a1f03f] .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-70a1f03f] .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-70a1f03f] .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-70a1f03f] .ant-table-wrapper .ant-table-fixed-right {\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-70a1f03f] .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-70a1f03f] .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 .g-table__pagination[data-v-70a1f03f] {\n /* margin-top: 8px; */\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}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/table/src/index.vue","index.vue"],"names":[],"mappings":"AA4EA;EAgEA,aAAA;EACA,kBAAA;AC1IA;AD2EA;EACA,oDAAA;EACA,mBAAA;EACA,wCAAA;ACzEA;AD4EA;EACA,iDAAA;AC1EA;AD+EA;EACA,+CAAA;EACA,2DAAA;EACA,mBAAA;EACA,iBAAA;EACA,kBAAA;AC7EA;ADiFA;EACA,wDAAA;EACA,uBAAA;EACA,4CAAA;AC/EA;ADiFA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;AC/EA;ADgFA;EACA,2DAAA;EACA,0BAAA;EACA,+CAAA;AC9EA;ADgFA;EACA,0DAAA;EACA,yBAAA;EACA,8CAAA;AC9EA;ADgFA;EACA,0DAAA;EACA,8CAAA;EACA,yBAAA;AC9EA;ADiFA;EAMA,2DAAA;EACA,0BAAA;EACA,+CAAA;ACpFA;AD6EA;EACA,2DAAA;EACA,+CAAA;EACA,0BAAA;AC3EA;ADgFA;EACA,yDAAA;EACA,wBAAA;EACA,6CAAA;AC9EA;ADsFA;EACA,qBAAA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;EACA,oDAAA;EACA,wCAAA;EACA,mBAAA;EACA,iBAAA;EACA,gBAAA;EACA,mBAAA;ACpFA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"g-table__wrapper\">\n <a-table\n :pagination=\"false\"\n :loading=\"loading\"\n :columns=\"columns\"\n :row-class-name=\"setRowClassName\"\n :data-source=\"dataSource\"\n :scroll=\"{ x: 1500, y: 500 }\">\n <template slot=\"action\" slot-scope=\"record\">\n <Actions v-on=\"$listeners\" :data-source=\"actions\" :record=\"record\"></Actions>\n </template>\n </a-table>\n <div class=\"g-table__pagination\">\n <a-pagination\n :show-total=\"total => `共 ${total} 条数据`\"\n show-size-changer \n show-quick-jumper\n :pageSize=\"pageSize\"\n :pageSizeOptions=\"pageSizeOptions\"\n @change=\"onChangePagination\" \n :total=\"total\">\n </a-pagination>\n </div>\n </div>\n</template>\n\n<script>\nimport Actions from './action.vue'\nexport default {\n name: 'ele-table',\n components: {\n Actions\n },\n props: {\n actions: {\n type: Array,\n default: () => []\n },\n total: {\n type: Number,\n default: 0\n },\n loading: {\n type: Boolean,\n default: false\n },\n columns: {\n type: Array,\n default: () => []\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n pageSize: {\n type: Number,\n default: 10\n },\n pageSizeOptions: {\n type: Array,\n default: () => ['10', '20', '30', '40']\n }\n },\n methods: {\n setRowClassName (record, idx) {\n return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'\n },\n onChangePagination (page, pagrSize) {\n this.$emit('change-page', page, pagrSize)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-table__wrapper {\n ::v-deep .ant-table-wrapper {\n .ant-table {\n border-width: calc(var(--idooel-border-width) * 1px);\n border-style: solid;\n border-color: var(--idooel-border-color);\n }\n .ant-table-header {\n .ant-table-fixed {\n /* border-bottom: 2px solid #53a8ff !important; */\n }\n }\n .ant-table-tbody {\n tr {\n 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 }\n }\n .ant-table-body {\n border-top-width: calc(var(--idooel-border-width) * 1px);\n border-top-style: solid;\n border-top-color: var(--idooel-border-color);\n }\n .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 .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 .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 .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 }\n .ant-table-fixed-right {\n .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 border-bottom-width: calc(var(--idooel-border-width) * 1px);\n border-bottom-style: solid;\n border-bottom-color: var(--idooel-border-color);\n .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 }\n }\n padding: 16px;\n padding-top: unset;\n .g-table__row--even {}\n .g-table__row--odd {}\n .g-table__pagination {\n /* margin-top: 8px; */\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 }\n}\n</style>",".g-table__wrapper {\n padding: 16px;\n padding-top: unset;\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-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-body {\n border-top-width: calc(var(--idooel-border-width) * 1px);\n border-top-style: solid;\n border-top-color: var(--idooel-border-color);\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 {\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-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 .g-table__pagination {\n /* margin-top: 8px; */\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}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1575
1575
|
|
|
1576
1576
|
};
|
|
1577
1577
|
/* scoped */
|
|
1578
|
-
const __vue_scope_id__$
|
|
1578
|
+
const __vue_scope_id__$p = "data-v-70a1f03f";
|
|
1579
1579
|
/* module identifier */
|
|
1580
|
-
const __vue_module_identifier__$
|
|
1580
|
+
const __vue_module_identifier__$p = undefined;
|
|
1581
1581
|
/* functional template */
|
|
1582
|
-
const __vue_is_functional_template__$
|
|
1582
|
+
const __vue_is_functional_template__$p = false;
|
|
1583
1583
|
/* style inject SSR */
|
|
1584
1584
|
|
|
1585
1585
|
/* style inject shadow dom */
|
|
1586
1586
|
|
|
1587
1587
|
|
|
1588
1588
|
|
|
1589
|
-
const __vue_component__$
|
|
1590
|
-
{ render: __vue_render__$
|
|
1591
|
-
__vue_inject_styles__$
|
|
1592
|
-
__vue_script__$
|
|
1593
|
-
__vue_scope_id__$
|
|
1594
|
-
__vue_is_functional_template__$
|
|
1595
|
-
__vue_module_identifier__$
|
|
1589
|
+
const __vue_component__$p = /*#__PURE__*/normalizeComponent(
|
|
1590
|
+
{ render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
|
|
1591
|
+
__vue_inject_styles__$p,
|
|
1592
|
+
__vue_script__$p,
|
|
1593
|
+
__vue_scope_id__$p,
|
|
1594
|
+
__vue_is_functional_template__$p,
|
|
1595
|
+
__vue_module_identifier__$p,
|
|
1596
1596
|
false,
|
|
1597
1597
|
createInjector,
|
|
1598
1598
|
undefined,
|
|
1599
1599
|
undefined
|
|
1600
1600
|
);
|
|
1601
1601
|
|
|
1602
|
-
__vue_component__$
|
|
1602
|
+
__vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
|
|
1603
1603
|
|
|
1604
1604
|
//
|
|
1605
1605
|
//
|
|
@@ -1625,7 +1625,7 @@ __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __v
|
|
|
1625
1625
|
//
|
|
1626
1626
|
//
|
|
1627
1627
|
|
|
1628
|
-
var script$
|
|
1628
|
+
var script$o = {
|
|
1629
1629
|
name: 'ele-tree',
|
|
1630
1630
|
props: {
|
|
1631
1631
|
treeData: {
|
|
@@ -1688,10 +1688,10 @@ var script$m = {
|
|
|
1688
1688
|
};
|
|
1689
1689
|
|
|
1690
1690
|
/* script */
|
|
1691
|
-
const __vue_script__$
|
|
1691
|
+
const __vue_script__$o = script$o;
|
|
1692
1692
|
|
|
1693
1693
|
/* template */
|
|
1694
|
-
var __vue_render__$
|
|
1694
|
+
var __vue_render__$o = function () {
|
|
1695
1695
|
var _vm = this;
|
|
1696
1696
|
var _h = _vm.$createElement;
|
|
1697
1697
|
var _c = _vm._self._c || _h;
|
|
@@ -1748,41 +1748,41 @@ var __vue_render__$m = function () {
|
|
|
1748
1748
|
1
|
|
1749
1749
|
)
|
|
1750
1750
|
};
|
|
1751
|
-
var __vue_staticRenderFns__$
|
|
1752
|
-
__vue_render__$
|
|
1751
|
+
var __vue_staticRenderFns__$o = [];
|
|
1752
|
+
__vue_render__$o._withStripped = true;
|
|
1753
1753
|
|
|
1754
1754
|
/* style */
|
|
1755
|
-
const __vue_inject_styles__$
|
|
1755
|
+
const __vue_inject_styles__$o = function (inject) {
|
|
1756
1756
|
if (!inject) return
|
|
1757
|
-
inject("data-v-
|
|
1757
|
+
inject("data-v-0cdfa85c_0", { source: ".g-tree__wrapper[data-v-0cdfa85c] {\n overflow: hidden;\n}\n.g-tree__wrapper[data-v-0cdfa85c] .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-0cdfa85c] .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/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>\n <div class=\"g-tree__wrapper\">\n <a-tree\n v-if=\"innerTreeData.length\"\n :tree-data=\"innerTreeData\"\n @select=\"selectTreeNode\"\n :replaceFields=\"replaceFields\"\n :default-expanded-keys=\"defaultExpandedKeys\"\n :default-selected-keys=\"defaultSelectedKeys\"\n blockNode \n :show-icon=\"showIcon\">\n <template #title=\"{ title }\">\n <span :title=\"title\" class=\"tree-node__title\">\n {{ title }}\n </span>\n </template>\n <template slot=\"custom\" slot-scope=\"{ scopedSlots }\">\n <a-icon :type=\"scopedSlots.iconName\"></a-icon>\n </template>\n </a-tree>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-tree',\n props: {\n treeData: {\n type: Array,\n default: () => []\n },\n replaceFields: {\n type: Object,\n default: () => ({\n title: 'title',\n key: 'id',\n children: 'children'\n })\n },\n defaultExpandedKeys: {\n type: Array\n },\n defaultSelectedKeys: {\n type: Array\n },\n showIcon: {\n type: Boolean,\n default: true\n }\n },\n data () {\n return {}\n },\n computed: {\n innerTreeData () {\n return this.treeData\n // return [\n // {\n // title: 'parent 1',\n // key: 1,\n // scopedSlots: {\n // icon: 'custom',\n // iconName: 'smile-o'\n // },\n // children: [\n // {\n // title: '2',\n // key: 2,\n // scopedSlots: {\n // icon: 'custom',\n // iconName: 'frown-o'\n // }\n // }\n // ]\n // }\n // ]\n }\n },\n methods: {\n refreshTreeStatus (props = {}) {},\n selectTreeNode (selectedKeys, e) {\n this.$emit('select', selectedKeys, e)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-tree__wrapper {\n overflow: hidden;\n ::v-deep .ant-tree {\n .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n .ant-tree-node-selected {\n color: #fff;\n }\n }\n}\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 });
|
|
1758
1758
|
|
|
1759
1759
|
};
|
|
1760
1760
|
/* scoped */
|
|
1761
|
-
const __vue_scope_id__$
|
|
1761
|
+
const __vue_scope_id__$o = "data-v-0cdfa85c";
|
|
1762
1762
|
/* module identifier */
|
|
1763
|
-
const __vue_module_identifier__$
|
|
1763
|
+
const __vue_module_identifier__$o = undefined;
|
|
1764
1764
|
/* functional template */
|
|
1765
|
-
const __vue_is_functional_template__$
|
|
1765
|
+
const __vue_is_functional_template__$o = false;
|
|
1766
1766
|
/* style inject SSR */
|
|
1767
1767
|
|
|
1768
1768
|
/* style inject shadow dom */
|
|
1769
1769
|
|
|
1770
1770
|
|
|
1771
1771
|
|
|
1772
|
-
const __vue_component__$
|
|
1773
|
-
{ render: __vue_render__$
|
|
1774
|
-
__vue_inject_styles__$
|
|
1775
|
-
__vue_script__$
|
|
1776
|
-
__vue_scope_id__$
|
|
1777
|
-
__vue_is_functional_template__$
|
|
1778
|
-
__vue_module_identifier__$
|
|
1772
|
+
const __vue_component__$o = /*#__PURE__*/normalizeComponent(
|
|
1773
|
+
{ render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
|
|
1774
|
+
__vue_inject_styles__$o,
|
|
1775
|
+
__vue_script__$o,
|
|
1776
|
+
__vue_scope_id__$o,
|
|
1777
|
+
__vue_is_functional_template__$o,
|
|
1778
|
+
__vue_module_identifier__$o,
|
|
1779
1779
|
false,
|
|
1780
1780
|
createInjector,
|
|
1781
1781
|
undefined,
|
|
1782
1782
|
undefined
|
|
1783
1783
|
);
|
|
1784
1784
|
|
|
1785
|
-
__vue_component__$
|
|
1785
|
+
__vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
|
|
1786
1786
|
|
|
1787
1787
|
//
|
|
1788
1788
|
//
|
|
@@ -1792,7 +1792,7 @@ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __v
|
|
|
1792
1792
|
//
|
|
1793
1793
|
//
|
|
1794
1794
|
|
|
1795
|
-
var script$
|
|
1795
|
+
var script$n = {
|
|
1796
1796
|
props: {
|
|
1797
1797
|
label: {
|
|
1798
1798
|
type: String
|
|
@@ -1801,10 +1801,10 @@ var script$l = {
|
|
|
1801
1801
|
};
|
|
1802
1802
|
|
|
1803
1803
|
/* script */
|
|
1804
|
-
const __vue_script__$
|
|
1804
|
+
const __vue_script__$n = script$n;
|
|
1805
1805
|
|
|
1806
1806
|
/* template */
|
|
1807
|
-
var __vue_render__$
|
|
1807
|
+
var __vue_render__$n = function () {
|
|
1808
1808
|
var _vm = this;
|
|
1809
1809
|
var _h = _vm.$createElement;
|
|
1810
1810
|
var _c = _vm._self._c || _h;
|
|
@@ -1814,34 +1814,34 @@ var __vue_render__$l = function () {
|
|
|
1814
1814
|
_c("span", { staticClass: "label__suffix" }, [_vm._v(":")]),
|
|
1815
1815
|
])
|
|
1816
1816
|
};
|
|
1817
|
-
var __vue_staticRenderFns__$
|
|
1818
|
-
__vue_render__$
|
|
1817
|
+
var __vue_staticRenderFns__$n = [];
|
|
1818
|
+
__vue_render__$n._withStripped = true;
|
|
1819
1819
|
|
|
1820
1820
|
/* style */
|
|
1821
|
-
const __vue_inject_styles__$
|
|
1821
|
+
const __vue_inject_styles__$n = function (inject) {
|
|
1822
1822
|
if (!inject) return
|
|
1823
|
-
inject("data-v-
|
|
1823
|
+
inject("data-v-07e596bf_0", { source: ".g-search__label[data-v-07e596bf] {\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-07e596bf], .g-search__label .label__suffix[data-v-07e596bf] {\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-07e596bf] {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/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>\n <div class=\"g-search__label\">\n <span class=\"label__title\">{{ label }}</span>\n <span class=\"label__suffix\">:</span>\n </div>\n</template>\n\n<script>\nexport default {\n props: {\n label: {\n type: String\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.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 .label__title, .label__suffix {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n }\n .label__suffix {\n margin-left: 4px;\n }\n}\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 });
|
|
1824
1824
|
|
|
1825
1825
|
};
|
|
1826
1826
|
/* scoped */
|
|
1827
|
-
const __vue_scope_id__$
|
|
1827
|
+
const __vue_scope_id__$n = "data-v-07e596bf";
|
|
1828
1828
|
/* module identifier */
|
|
1829
|
-
const __vue_module_identifier__$
|
|
1829
|
+
const __vue_module_identifier__$n = undefined;
|
|
1830
1830
|
/* functional template */
|
|
1831
|
-
const __vue_is_functional_template__$
|
|
1831
|
+
const __vue_is_functional_template__$n = false;
|
|
1832
1832
|
/* style inject SSR */
|
|
1833
1833
|
|
|
1834
1834
|
/* style inject shadow dom */
|
|
1835
1835
|
|
|
1836
1836
|
|
|
1837
1837
|
|
|
1838
|
-
const __vue_component__$
|
|
1839
|
-
{ render: __vue_render__$
|
|
1840
|
-
__vue_inject_styles__$
|
|
1841
|
-
__vue_script__$
|
|
1842
|
-
__vue_scope_id__$
|
|
1843
|
-
__vue_is_functional_template__$
|
|
1844
|
-
__vue_module_identifier__$
|
|
1838
|
+
const __vue_component__$n = /*#__PURE__*/normalizeComponent(
|
|
1839
|
+
{ render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
|
|
1840
|
+
__vue_inject_styles__$n,
|
|
1841
|
+
__vue_script__$n,
|
|
1842
|
+
__vue_scope_id__$n,
|
|
1843
|
+
__vue_is_functional_template__$n,
|
|
1844
|
+
__vue_module_identifier__$n,
|
|
1845
1845
|
false,
|
|
1846
1846
|
createInjector,
|
|
1847
1847
|
undefined,
|
|
@@ -1849,14 +1849,14 @@ __vue_render__$l._withStripped = true;
|
|
|
1849
1849
|
);
|
|
1850
1850
|
|
|
1851
1851
|
//
|
|
1852
|
-
var script$
|
|
1852
|
+
var script$m = {
|
|
1853
1853
|
name: 'ele-search-area',
|
|
1854
1854
|
components: {
|
|
1855
|
-
EleInput: __vue_component__$
|
|
1856
|
-
EleSelect: __vue_component__$
|
|
1857
|
-
ELeButton: __vue_component__$
|
|
1858
|
-
Label: __vue_component__$
|
|
1859
|
-
EleDate: __vue_component__$
|
|
1855
|
+
EleInput: __vue_component__$s,
|
|
1856
|
+
EleSelect: __vue_component__$r,
|
|
1857
|
+
ELeButton: __vue_component__$u,
|
|
1858
|
+
Label: __vue_component__$n,
|
|
1859
|
+
EleDate: __vue_component__$t
|
|
1860
1860
|
},
|
|
1861
1861
|
props: {
|
|
1862
1862
|
gutter: {
|
|
@@ -1991,10 +1991,10 @@ var script$k = {
|
|
|
1991
1991
|
};
|
|
1992
1992
|
|
|
1993
1993
|
/* script */
|
|
1994
|
-
const __vue_script__$
|
|
1994
|
+
const __vue_script__$m = script$m;
|
|
1995
1995
|
|
|
1996
1996
|
/* template */
|
|
1997
|
-
var __vue_render__$
|
|
1997
|
+
var __vue_render__$m = function () {
|
|
1998
1998
|
var _vm = this;
|
|
1999
1999
|
var _h = _vm.$createElement;
|
|
2000
2000
|
var _c = _vm._self._c || _h;
|
|
@@ -2166,34 +2166,34 @@ var __vue_render__$k = function () {
|
|
|
2166
2166
|
1
|
|
2167
2167
|
)
|
|
2168
2168
|
};
|
|
2169
|
-
var __vue_staticRenderFns__$
|
|
2170
|
-
__vue_render__$
|
|
2169
|
+
var __vue_staticRenderFns__$m = [];
|
|
2170
|
+
__vue_render__$m._withStripped = true;
|
|
2171
2171
|
|
|
2172
2172
|
/* style */
|
|
2173
|
-
const __vue_inject_styles__$
|
|
2173
|
+
const __vue_inject_styles__$m = function (inject) {
|
|
2174
2174
|
if (!inject) return
|
|
2175
|
-
inject("data-v-4cecf96f_0", { source: ".search-area__wrapper[data-v-4cecf96f] {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper[data-v-4cecf96f] .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item[data-v-4cecf96f] {\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-4cecf96f] {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse[data-v-4cecf96f] {\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-4cecf96f] {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon[data-v-4cecf96f] {\n font-size: 16px;\n margin-left: 8px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\composite-components\\search-area\\src\\index.vue","index.vue"],"names":[],"mappings":"AA4LA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;AC3LA;AD6LA;EACA,YAAA;AC3LA;AD8LA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AC5LA;AD6LA;EACA,oBAAA;AC3LA;AD6LA;EACA,gBAAA;EACA,YAAA;EACA,iBAAA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,uBAAA;EACA,eAAA;AC3LA;AD4LA;EACA,eAAA;AC1LA;AD4LA;EACA,eAAA;EACA,gBAAA;AC1LA;;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 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\" :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 EleInput from '../../../input/src/index.vue'\r\nimport EleSelect from '../../../select/src/index.vue'\r\nimport ELeButton from '../../../button/src/index.vue'\r\nimport EleDate from '../../../date/src/index.vue'\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 EleInput,\r\n EleSelect,\r\n ELeButton,\r\n Label,\r\n EleDate\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 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 Object.assign(ret, this.buildMapto(item.mapTo, item._value))\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 handleClickReset () {\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-picker':\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 //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}\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 });
|
|
2175
|
+
inject("data-v-276237e6_0", { source: ".search-area__wrapper[data-v-276237e6] {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper[data-v-276237e6] .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item[data-v-276237e6] {\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-276237e6] {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse[data-v-276237e6] {\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-276237e6] {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon[data-v-276237e6] {\n font-size: 16px;\n margin-left: 8px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/search-area/src/index.vue","index.vue"],"names":[],"mappings":"AA4LA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;AC3LA;AD6LA;EACA,YAAA;AC3LA;AD8LA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;AC5LA;AD6LA;EACA,oBAAA;AC3LA;AD6LA;EACA,gBAAA;EACA,YAAA;EACA,iBAAA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,uBAAA;EACA,eAAA;AC3LA;AD4LA;EACA,eAAA;AC1LA;AD4LA;EACA,eAAA;EACA,gBAAA;AC1LA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"search-area__wrapper\">\n <a-row :gutter=\"gutter\">\n <template v-for=\"(item, idx) in innerDataSource\">\n <a-col v-if=\"item._show\" :span=\"item.span || span\" :key=\"idx\">\n <div v-if=\"item.type == '_action'\" class=\"search-area__item search-area--action\">\n <ele-button icon=\"search\" type=\"primary\" @click=\"handleClickSearch\">查询</ele-button>\n <ele-button style=\"margin-left:8px;\" icon=\"reload\" @click=\"handleClickReset\">重置</ele-button>\n <div class=\"expand-collapse\" @click=\"handleClickExpandCollapse\">\n <span class=\"expand-collapse__text\">{{ isExpand ? '收起' : '展开' }}</span>\n <span class=\"expand-collapse__icon\">\n <a-icon v-if=\"isExpand\" type=\"up\" />\n <a-icon v-else type=\"down\" />\n </span>\n </div>\n </div>\n <div v-else class=\"search-area__item\">\n <template v-if=\"item.type == 'Input'\">\n <Label :label=\"item.label\"></Label>\n <ele-input v-model=\"item._value\"></ele-input>\n </template>\n <template v-else-if=\"item.type == 'Select'\">\n <Label :label=\"item.label\"></Label>\n <ele-select v-model=\"item._value\" :data-source=\"item.optionList\"></ele-select>\n </template>\n <template v-else-if=\"item.type == 'DatePicker'\">\n <Label :label=\"item.label\"></Label>\n <ele-date v-model=\"item._value\" :format=\"item.format\"></ele-date>\n </template>\n <template v-else-if=\"item.type == 'ele-date-range'\">\n <Label :label=\"item.label\"></Label>\n <ele-date-range v-model=\"item._value\" :format=\"item.format\" :show-time=\"item.showTime\"></ele-date-range>\n </template>\n </div>\n </a-col>\n </template>\n </a-row>\n </div>\n</template>\n\n<script>\nimport EleInput from '../../../input/src/index.vue'\nimport EleSelect from '../../../select/src/index.vue'\nimport ELeButton from '../../../button/src/index.vue'\nimport EleDate from '../../../date/src/index.vue'\nimport Label from './label.vue'\nimport moment from 'moment'\nimport { parse } from '@idooel/expression'\nexport default {\n name: 'ele-search-area',\n components: {\n EleInput,\n EleSelect,\n ELeButton,\n Label,\n EleDate\n },\n props: {\n gutter: {\n type: [Number, Array, Object],\n default: () => ([\n 16, 8\n ])\n },\n span: {\n type: Number,\n default: 8\n },\n dataSource: {\n type: Array,\n required: true\n }\n },\n data() {\n return {\n isExpand: false\n }\n },\n computed: {\n cuttingFormula () {\n return (24 / this.span - 1)\n },\n buildDataSource () {\n return this.controlDisplayByFormula(this.mapDefaultValueToValue())\n },\n innerDataSource () {\n return [ ...this.buildDataSource, { type: '_action', _show: true }]\n }\n },\n created() {},\n methods: {\n controlDisplayByFormula (dataSource = []) {\n if (this.isExpand) {\n dataSource.forEach(item => {\n this.$set(item, '_show', true)\n })\n } else {\n dataSource.forEach((item, idx) => {\n if (idx < this.cuttingFormula) {\n this.$set(item, '_show', true)\n } else {\n this.$set(item, '_show', false)\n }\n })\n }\n return dataSource\n },\n buildDefaultValue (arg) {\n if (!arg || arg.charAt(0) !== '_') return arg\n return parse(arg, {\n _route: this.$route.query\n })\n },\n mapDefaultValueToValue () {\n this.dataSource.forEach(props => {\n this.$set(props, '_show', this.isExpand)\n if (props.defaultValue) {\n this.$set(props, '_value', this.buildDefaultValue(props.defaultValue))\n }\n })\n return this.dataSource\n },\n handleClickExpandCollapse () {\n this.isExpand = !this.isExpand\n },\n handleClickSearch () {\n const querys = this.extractValues()\n this.$emit('search', querys)\n },\n buildMapto (mapTo = [], dataSource) {\n const [ startField, endField ] = mapTo\n const [ startValue, endValue ] = dataSource || [null, null]\n return {\n [startField]: startValue,\n [endField]: endValue\n }\n },\n extractValues () {\n let ret = {}\n this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {\n switch (item.type) {\n case 'DatePicker':\n ret[item.name] = typeof item._value == 'undefined' ? undefined : moment(item._value).format(item.format)\n break\n case 'ele-date-range':\n Object.assign(ret, this.buildMapto(item.mapTo, item._value))\n break\n default:\n ret[item.name] = item._value\n break\n }\n })\n return ret\n },\n handleClickReset () {\n this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {\n const { defaultValue } = item\n switch (item.type) {\n case 'Select':\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', null)\n break\n case 'DatePicker':\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', undefined)\n break\n case 'ele-date-picker':\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', [])\n break\n default:\n defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue))\n !defaultValue && this.$set(item, '_value', null)\n break\n }\n })\n //TODO defaultValue\n const querys = this.extractValues()\n this.$emit('search', querys)\n },\n onChangeSelect (value, props) {\n this.$set(props, '_value', value)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.search-area__wrapper {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n ::v-deep .ant-col {\n &:last-child {\n float: right;\n }\n }\n .search-area__item {\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n &.search-area--action {\n justify-content: end;\n }\n .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 .expand-collapse__text {\n font-size: 14px;\n }\n .expand-collapse__icon {\n font-size: 16px;\n margin-left: 8px;\n }\n }\n }\n}\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 });
|
|
2176
2176
|
|
|
2177
2177
|
};
|
|
2178
2178
|
/* scoped */
|
|
2179
|
-
const __vue_scope_id__$
|
|
2179
|
+
const __vue_scope_id__$m = "data-v-276237e6";
|
|
2180
2180
|
/* module identifier */
|
|
2181
|
-
const __vue_module_identifier__$
|
|
2181
|
+
const __vue_module_identifier__$m = undefined;
|
|
2182
2182
|
/* functional template */
|
|
2183
|
-
const __vue_is_functional_template__$
|
|
2183
|
+
const __vue_is_functional_template__$m = false;
|
|
2184
2184
|
/* style inject SSR */
|
|
2185
2185
|
|
|
2186
2186
|
/* style inject shadow dom */
|
|
2187
2187
|
|
|
2188
2188
|
|
|
2189
2189
|
|
|
2190
|
-
const __vue_component__$
|
|
2191
|
-
{ render: __vue_render__$
|
|
2192
|
-
__vue_inject_styles__$
|
|
2193
|
-
__vue_script__$
|
|
2194
|
-
__vue_scope_id__$
|
|
2195
|
-
__vue_is_functional_template__$
|
|
2196
|
-
__vue_module_identifier__$
|
|
2190
|
+
const __vue_component__$m = /*#__PURE__*/normalizeComponent(
|
|
2191
|
+
{ render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
|
|
2192
|
+
__vue_inject_styles__$m,
|
|
2193
|
+
__vue_script__$m,
|
|
2194
|
+
__vue_scope_id__$m,
|
|
2195
|
+
__vue_is_functional_template__$m,
|
|
2196
|
+
__vue_module_identifier__$m,
|
|
2197
2197
|
false,
|
|
2198
2198
|
createInjector,
|
|
2199
2199
|
undefined,
|
|
@@ -2201,81 +2201,92 @@ __vue_render__$k._withStripped = true;
|
|
|
2201
2201
|
);
|
|
2202
2202
|
|
|
2203
2203
|
//
|
|
2204
|
-
var script$
|
|
2204
|
+
var script$l = {
|
|
2205
2205
|
name: 'ele-button-group',
|
|
2206
2206
|
components: {
|
|
2207
|
-
EleButton: __vue_component__$
|
|
2207
|
+
EleButton: __vue_component__$u
|
|
2208
2208
|
},
|
|
2209
2209
|
props: {
|
|
2210
2210
|
dataSource: {
|
|
2211
2211
|
type: Array,
|
|
2212
2212
|
default: () => []
|
|
2213
2213
|
}
|
|
2214
|
+
},
|
|
2215
|
+
methods: {
|
|
2216
|
+
isBool(arg) {
|
|
2217
|
+
return type.isBool(arg);
|
|
2218
|
+
}
|
|
2214
2219
|
}
|
|
2215
2220
|
};
|
|
2216
2221
|
|
|
2217
2222
|
/* script */
|
|
2218
|
-
const __vue_script__$
|
|
2223
|
+
const __vue_script__$l = script$l;
|
|
2219
2224
|
|
|
2220
2225
|
/* template */
|
|
2221
|
-
var __vue_render__$
|
|
2226
|
+
var __vue_render__$l = function () {
|
|
2222
2227
|
var _vm = this;
|
|
2223
2228
|
var _h = _vm.$createElement;
|
|
2224
2229
|
var _c = _vm._self._c || _h;
|
|
2225
2230
|
return _c(
|
|
2226
2231
|
"div",
|
|
2227
2232
|
{ staticClass: "button-group__wrapper" },
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2233
|
+
[
|
|
2234
|
+
_vm._l(_vm.dataSource, function (item, idx) {
|
|
2235
|
+
return [
|
|
2236
|
+
(_vm.isBool(item._show) ? item._show : true)
|
|
2237
|
+
? _c(
|
|
2238
|
+
"ele-button",
|
|
2239
|
+
_vm._g(
|
|
2240
|
+
{
|
|
2241
|
+
key: idx,
|
|
2242
|
+
attrs: {
|
|
2243
|
+
type: item.type,
|
|
2244
|
+
icon: item.icon,
|
|
2245
|
+
mode: item.mode,
|
|
2246
|
+
"data-source": item.optionList,
|
|
2247
|
+
"event-name": item.eventName,
|
|
2248
|
+
record: item,
|
|
2249
|
+
},
|
|
2250
|
+
},
|
|
2251
|
+
_vm.$listeners
|
|
2252
|
+
),
|
|
2253
|
+
[_vm._v("\n " + _vm._s(item.label) + "\n ")]
|
|
2254
|
+
)
|
|
2255
|
+
: _vm._e(),
|
|
2256
|
+
]
|
|
2257
|
+
}),
|
|
2258
|
+
],
|
|
2259
|
+
2
|
|
2249
2260
|
)
|
|
2250
2261
|
};
|
|
2251
|
-
var __vue_staticRenderFns__$
|
|
2252
|
-
__vue_render__$
|
|
2262
|
+
var __vue_staticRenderFns__$l = [];
|
|
2263
|
+
__vue_render__$l._withStripped = true;
|
|
2253
2264
|
|
|
2254
2265
|
/* style */
|
|
2255
|
-
const __vue_inject_styles__$
|
|
2266
|
+
const __vue_inject_styles__$l = function (inject) {
|
|
2256
2267
|
if (!inject) return
|
|
2257
|
-
inject("data-v-
|
|
2268
|
+
inject("data-v-7ad453d7_0", { source: ".button-group__wrapper[data-v-7ad453d7] {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn[data-v-7ad453d7] {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn[data-v-7ad453d7]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/composite-components/button-group/src/index.vue","index.vue"],"names":[],"mappings":"AA0CA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;ACzCA;AD0CA;EACA,gBAAA;ACxCA;ADyCA;EACA,cAAA;ACvCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"button-group__wrapper\">\n <template v-for=\"(item, idx) in dataSource\" >\n <ele-button\n v-if=\"isBool(item._show) ? item._show : true\"\n :type=\"item.type\"\n :icon=\"item.icon\"\n :mode=\"item.mode\"\n :data-source=\"item.optionList\"\n :event-name=\"item.eventName\"\n :record=\"item\"\n v-on=\"$listeners\"\n :key=\"idx\">\n {{ item.label }}\n </ele-button>\n </template>\n </div>\n</template>\n\n<script>\nimport EleButton from '../../../button/src/index.vue'\nimport { type } from '@idooel/shared'\nexport default {\n name: 'ele-button-group',\n components: {\n EleButton\n },\n props: {\n dataSource: {\n type: Array,\n default: () => []\n }\n },\n methods: {\n isBool (arg) {\n return type.isBool(arg)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n .ant-btn {\n margin-left: 8px;\n &:first-child {\n margin-left: 0;\n }\n }\n}\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 });
|
|
2258
2269
|
|
|
2259
2270
|
};
|
|
2260
2271
|
/* scoped */
|
|
2261
|
-
const __vue_scope_id__$
|
|
2272
|
+
const __vue_scope_id__$l = "data-v-7ad453d7";
|
|
2262
2273
|
/* module identifier */
|
|
2263
|
-
const __vue_module_identifier__$
|
|
2274
|
+
const __vue_module_identifier__$l = undefined;
|
|
2264
2275
|
/* functional template */
|
|
2265
|
-
const __vue_is_functional_template__$
|
|
2276
|
+
const __vue_is_functional_template__$l = false;
|
|
2266
2277
|
/* style inject SSR */
|
|
2267
2278
|
|
|
2268
2279
|
/* style inject shadow dom */
|
|
2269
2280
|
|
|
2270
2281
|
|
|
2271
2282
|
|
|
2272
|
-
const __vue_component__$
|
|
2273
|
-
{ render: __vue_render__$
|
|
2274
|
-
__vue_inject_styles__$
|
|
2275
|
-
__vue_script__$
|
|
2276
|
-
__vue_scope_id__$
|
|
2277
|
-
__vue_is_functional_template__$
|
|
2278
|
-
__vue_module_identifier__$
|
|
2283
|
+
const __vue_component__$l = /*#__PURE__*/normalizeComponent(
|
|
2284
|
+
{ render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
|
|
2285
|
+
__vue_inject_styles__$l,
|
|
2286
|
+
__vue_script__$l,
|
|
2287
|
+
__vue_scope_id__$l,
|
|
2288
|
+
__vue_is_functional_template__$l,
|
|
2289
|
+
__vue_module_identifier__$l,
|
|
2279
2290
|
false,
|
|
2280
2291
|
createInjector,
|
|
2281
2292
|
undefined,
|
|
@@ -2283,13 +2294,13 @@ __vue_render__$j._withStripped = true;
|
|
|
2283
2294
|
);
|
|
2284
2295
|
|
|
2285
2296
|
//
|
|
2286
|
-
var script$
|
|
2297
|
+
var script$k = {
|
|
2287
2298
|
name: 'ele-tree-table-model',
|
|
2288
2299
|
components: {
|
|
2289
|
-
EleTree: __vue_component__$
|
|
2290
|
-
EleTable: __vue_component__$
|
|
2291
|
-
EleSearchArea: __vue_component__$
|
|
2292
|
-
EleButtonGroup: __vue_component__$
|
|
2300
|
+
EleTree: __vue_component__$o,
|
|
2301
|
+
EleTable: __vue_component__$p,
|
|
2302
|
+
EleSearchArea: __vue_component__$m,
|
|
2303
|
+
EleButtonGroup: __vue_component__$l
|
|
2293
2304
|
},
|
|
2294
2305
|
props: {
|
|
2295
2306
|
treeMeta: {
|
|
@@ -2568,10 +2579,10 @@ var script$i = {
|
|
|
2568
2579
|
};
|
|
2569
2580
|
|
|
2570
2581
|
/* script */
|
|
2571
|
-
const __vue_script__$
|
|
2582
|
+
const __vue_script__$k = script$k;
|
|
2572
2583
|
|
|
2573
2584
|
/* template */
|
|
2574
|
-
var __vue_render__$
|
|
2585
|
+
var __vue_render__$k = function () {
|
|
2575
2586
|
var _vm = this;
|
|
2576
2587
|
var _h = _vm.$createElement;
|
|
2577
2588
|
var _c = _vm._self._c || _h;
|
|
@@ -2651,34 +2662,34 @@ var __vue_render__$i = function () {
|
|
|
2651
2662
|
]),
|
|
2652
2663
|
])
|
|
2653
2664
|
};
|
|
2654
|
-
var __vue_staticRenderFns__$
|
|
2655
|
-
__vue_render__$
|
|
2665
|
+
var __vue_staticRenderFns__$k = [];
|
|
2666
|
+
__vue_render__$k._withStripped = true;
|
|
2656
2667
|
|
|
2657
2668
|
/* style */
|
|
2658
|
-
const __vue_inject_styles__$
|
|
2669
|
+
const __vue_inject_styles__$k = function (inject) {
|
|
2659
2670
|
if (!inject) return
|
|
2660
|
-
inject("data-v-fe2ee33e_0", { source: ".ele.model__tree-table[data-v-fe2ee33e] {\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-fe2ee33e] {\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-fe2ee33e] {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper[data-v-fe2ee33e] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\tree-table-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AAgSA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;AC/RA;ADiSA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;AC/RA;ADkSA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;AChSA;ADiSA;EACA,gBAAA;AC/RA;;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\">\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\">\r\n <div class=\"model__table--title\"></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 <ele-button-group v-on=\"$listeners\" :ref=\"buttonGroup\" @click=\"handleClickButtonGroup\" style=\"margin-top: 16px\" :data-source=\"getButtonGroupElements\"></ele-button-group>\r\n <ele-table\r\n v-on=\"$listeners\"\r\n :loading=\"loading\" \r\n :columns=\"columns\"\r\n :total=\"total\"\r\n :actions=\"actions\"\r\n :pageSize=\"pageSize\"\r\n :pageSizeOptions=\"pageSizeOptions\"\r\n :data-source=\"tableData\"\r\n @change-page=\"onChangePage\" \r\n style=\"margin-top: 8px;\"\r\n ></ele-table>\r\n </section>\r\n </section>\r\n </section>\r\n</template>\r\n\r\n<script>\r\nimport EleTree from '../../tree/src/index.vue'\r\nimport EleTable from '../../table/src/index.vue'\r\nimport EleSearchArea from '../../composite-components/search-area/src/index.vue'\r\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\r\nimport { type, net } from '@idooel/shared'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nexport default {\r\n name: 'ele-tree-table-model',\r\n components: {\r\n EleTree,\r\n EleTable,\r\n EleSearchArea,\r\n EleButtonGroup\r\n },\r\n props: {\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 },\r\n provide () {\r\n return {\r\n requestTreeData: this.requestTreeData,\r\n requestTableData: this.requestTableData\r\n }\r\n },\r\n data () {\r\n return {\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 }\r\n },\r\n computed: {\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 return operations.elements\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 if (item.render) {\r\n return {\r\n title: item.title,\r\n dataIndex: item.dataIndex,\r\n width: item.width,\r\n align: item.align,\r\n fixed: item.fixed,\r\n customRender: (text, record, index) => {\r\n const { $createElement } = this\r\n return item.render.call(this, { h: $createElement, ctx: this }, typeof text == 'string' ? text : text[item.dataIndex], record, index)\r\n }\r\n }\r\n }\r\n return {\r\n title: item.title,\r\n dataIndex: item.dataIndex,\r\n width: item.width,\r\n align: item.align,\r\n fixed: item.fixed\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 { fieldMap } = this.tableMeta\r\n this.tableData = await this.requestTableData(this.execTableFieldMap(fieldMap, this.currentTreeNodeData))\r\n },\r\n methods: {\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 this.tableQuerys = Object.assign(this.tableQuerys, props)\r\n this.tableData = await this.requestTableData()\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 this.tableData = await this.requestTableData(execFieldMapRet)\r\n },\r\n async requestTreeData () {\r\n const { url, requestType } = this.treeMeta\r\n const ret = await net.get(\r\n url\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, page = {} } = this.tableMeta\r\n const { pageSize = 10 } = page\r\n this.tableQuerys = Object.assign(this.tableQuerys, { currentPage: 1, pageSize }, props)\r\n const ret = await net.get(\r\n url,\r\n this.tableQuerys\r\n ).then(resp => {\r\n const { data = [], count } = resp || {}\r\n this.total = count\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 refreshTreeStatus (props = {}) {},\r\n refreshTableStatus (props = {}) {},\r\n getModelTableWrapperHeight () {},\r\n setModelTreeWrapperHeight (height) {\r\n this.$refs[this.modelTreeWrapper].style.height = height\r\n },\r\n setModelTableWrapperHeight () {\r\n const { top } = this.$refs[this.modelTableWrapper].getBoundingClientRect()\r\n const height = `calc(100vh - ${top}px)`\r\n this.$refs[this.modelTableWrapper].style.height = height\r\n this.setModelTreeWrapperHeight(height)\r\n },\r\n getSearchAreaHeight () {\r\n return this.$refs[this.searchArea].$el.clientHeight\r\n },\r\n getButtonGroupHeight () {\r\n return this.$refs[this.buttonGroup].$el.clientHeight\r\n }\r\n },\r\n mounted () {\r\n //TODO\r\n // this.setModelTableWrapperHeight()\r\n // this.resizeObserverModelTableWrapper = new ResizeObserver(entries => {\r\n // for (let entry of entries) {\r\n // this.modelTableWrapperHeight = entry.contentRect.height\r\n // console.log('this.modelTableWrapperHeight:', this.modelTableWrapperHeight)\r\n // console.log('getSearchAreaHeight', this.getSearchAreaHeight())\r\n // console.log('getButtonGroupHeight', this.getButtonGroupHeight())\r\n // const tableHeight = this.modelTableWrapperHeight - this.getSearchAreaHeight() - this.getButtonGroupHeight()\r\n // console.log('tableHeight', tableHeight)\r\n // }\r\n // })\r\n // this.resizeObserverModelTableWrapper.observe(this.$refs[this.modelTableWrapper])\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--wrapper {\r\n background: #fff;\r\n }\r\n }\r\n }\r\n}\r\n</style>",".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--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2671
|
+
inject("data-v-3541b780_0", { source: ".ele.model__tree-table[data-v-3541b780] {\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-3541b780] {\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-3541b780] {\n width: 100%;\n min-width: 0;\n background: #fff;\n}\n.ele.model__tree-table .model__table--container .model__table--wrapper[data-v-3541b780] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/tree-table-model/src/index.vue","index.vue"],"names":[],"mappings":"AAgSA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;AC/RA;ADiSA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;AC/RA;ADkSA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;AChSA;ADiSA;EACA,gBAAA;AC/RA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <section class=\"ele model__tree-table\">\n <section class=\"model__tree-table--container\" v-if=\"showTree\">\n <div class=\"model__tree--title\"></div>\n <section :ref=\"modelTreeWrapper\" class=\"model__tree--wrapper\">\n <ele-tree \n :tree-data=\"treeData\"\n :defaultExpandedKeys=\"defaultExpandedKeys\"\n :defaultSelectedKeys=\"defaultSelectedKeys\"\n @select=\"selectTreeNode\"\n :replace-fields=\"treeMeta.replaceFields || replaceFields\">\n </ele-tree>\n </section>\n </section>\n <section class=\"model__table--container\">\n <div class=\"model__table--title\"></div>\n <section :ref=\"modelTableWrapper\" class=\"model__table--wrapper\">\n <ele-search-area :ref=\"searchArea\" @search=\"onSearch\" :data-source=\"searchMeta.elements\"></ele-search-area>\n <ele-button-group v-on=\"$listeners\" :ref=\"buttonGroup\" @click=\"handleClickButtonGroup\" style=\"margin-top: 16px\" :data-source=\"getButtonGroupElements\"></ele-button-group>\n <ele-table\n v-on=\"$listeners\"\n :loading=\"loading\" \n :columns=\"columns\"\n :total=\"total\"\n :actions=\"actions\"\n :pageSize=\"pageSize\"\n :pageSizeOptions=\"pageSizeOptions\"\n :data-source=\"tableData\"\n @change-page=\"onChangePage\" \n style=\"margin-top: 8px;\"\n ></ele-table>\n </section>\n </section>\n </section>\n</template>\n\n<script>\nimport EleTree from '../../tree/src/index.vue'\nimport EleTable from '../../table/src/index.vue'\nimport EleSearchArea from '../../composite-components/search-area/src/index.vue'\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\nimport { type, net } from '@idooel/shared'\nimport { v4 as uuidv4 } from 'uuid'\nexport default {\n name: 'ele-tree-table-model',\n components: {\n EleTree,\n EleTable,\n EleSearchArea,\n EleButtonGroup\n },\n props: {\n treeMeta: {\n type: Object,\n default: () => ({})\n },\n searchMeta: {\n type: Object,\n default: () => ({})\n },\n buttonGroupMeta: {\n typeof: Object,\n default: () => ({})\n },\n tableMeta: {\n type: Object,\n default: () => ({})\n }\n },\n provide () {\n return {\n requestTreeData: this.requestTreeData,\n requestTableData: this.requestTableData\n }\n },\n data () {\n return {\n treeData: [],\n tableData: [],\n defaultExpandedKeys: [],\n defaultSelectedKeys: [],\n replaceFields: {\n title: 'title',\n children: 'children',\n key: 'id'\n },\n loading: false,\n total: 0,\n tableQuerys: {},\n resizeObserverModelTableWrapper: null,\n modelTableWrapperHeight: 0,\n currentTreeNodeData: {}\n }\n },\n computed: {\n showTree () {\n return !!Object.keys(this.treeMeta).length\n },\n buttonGroup () {\n return uuidv4()\n },\n searchArea () {\n return uuidv4()\n },\n modelTreeWrapper () {\n return uuidv4()\n },\n modelTableWrapper () {\n return uuidv4()\n },\n actions () {\n const { operations } = this.tableMeta\n return operations.elements\n },\n pageSize () {\n const { page = {} } = this.tableMeta\n return page.pageSize || 10\n },\n pageSizeOptions () {\n const { page = {} } = this.tableMeta\n return page.pageSizeOptions || ['10', '20', '30', '40']\n },\n columns () {\n const { columns, operations } = this.tableMeta\n if (type.get(columns) === 'array') {\n const columnsOptions = columns.map(item => {\n if (item.render) {\n return {\n title: item.title,\n dataIndex: item.dataIndex,\n width: item.width,\n align: item.align,\n fixed: item.fixed,\n customRender: (text, record, index) => {\n const { $createElement } = this\n return item.render.call(this, { h: $createElement, ctx: this }, typeof text == 'string' ? text : text[item.dataIndex], record, index)\n }\n }\n }\n return {\n title: item.title,\n dataIndex: item.dataIndex,\n width: item.width,\n align: item.align,\n fixed: item.fixed\n }\n })\n if (operations) {\n return [\n ...columnsOptions,\n {\n title: '操作',\n width: operations.width,\n key: 'action',\n fixed: 'right',\n scopedSlots: { customRender: 'action' }\n }\n ]\n }\n return columnsOptions\n } else {\n console.error('Error: columns is invalid, please check it')\n return []\n }\n },\n getButtonGroupElements () {\n const { elements } = this.buttonGroupMeta\n if (type.get(elements) === 'function') {\n return elements.call(this)\n } else if (type.get(elements) === 'array') {\n return elements\n } else {\n return []\n }\n }\n },\n async created () {\n if (this.showTree) {\n this.treeData = await this.requestTreeData()\n const [defaultTreeNode = {}] = this.treeData\n this.defaultExpandedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.defaultSelectedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.currentTreeNodeData = defaultTreeNode\n }\n const { fieldMap } = this.tableMeta\n this.tableData = await this.requestTableData(this.execTableFieldMap(fieldMap, this.currentTreeNodeData))\n },\n methods: {\n handleClickButtonGroup (props) {\n const { eventName } = props\n this.$emit(eventName, { currentTreeNode: this.currentTreeNodeData })\n },\n watchViewPort () {\n const modelTableWrapper = this.$refs[this.modelTableWrapper]\n console.log(modelTableWrapper.getBoundingClientRect())\n const { top } = modelTableWrapper.getBoundingClientRect()\n this.$refs[this.modelTreeWrapper].style.height = `calc(100vh - ${top}px)`\n },\n async onSearch (props) {\n this.tableQuerys = Object.assign(this.tableQuerys, props)\n this.tableData = await this.requestTableData()\n },\n execTableFieldMap (fieldMap = {}, props) {\n let ret = {}\n const keys = Object.keys(fieldMap)\n keys.forEach(key => {\n const field = fieldMap[key]\n ret[field] = props[key]\n })\n return ret\n },\n async selectTreeNode (selectedKeys, e) {\n const { fieldMap } = this.tableMeta\n this.currentTreeNodeData = e.node.$vnode.data.props.dataRef\n const execFieldMapRet = this.execTableFieldMap(fieldMap, e.node.$vnode.data.props.dataRef)\n this.tableData = await this.requestTableData(execFieldMapRet)\n },\n async requestTreeData () {\n const { url, requestType } = this.treeMeta\n const ret = await net.get(\n url\n ).then(resp => {\n const { data } = resp || {}\n return data\n })\n return ret\n },\n async onChangePage (page, pageSize) {\n this.tableData = await this.requestTableData({ currentPage: page, pageSize })\n },\n async requestTableData (props = {}) {\n const { url, requestType, page = {} } = this.tableMeta\n const { pageSize = 10 } = page\n this.tableQuerys = Object.assign(this.tableQuerys, { currentPage: 1, pageSize }, props)\n const ret = await net.get(\n url,\n this.tableQuerys\n ).then(resp => {\n const { data = [], count } = resp || {}\n this.total = count\n return data.map(item => {\n return {\n key: uuidv4(),\n ...item\n }\n })\n })\n return ret\n },\n refreshTreeStatus (props = {}) {},\n refreshTableStatus (props = {}) {},\n getModelTableWrapperHeight () {},\n setModelTreeWrapperHeight (height) {\n this.$refs[this.modelTreeWrapper].style.height = height\n },\n setModelTableWrapperHeight () {\n const { top } = this.$refs[this.modelTableWrapper].getBoundingClientRect()\n const height = `calc(100vh - ${top}px)`\n this.$refs[this.modelTableWrapper].style.height = height\n this.setModelTreeWrapperHeight(height)\n },\n getSearchAreaHeight () {\n return this.$refs[this.searchArea].$el.clientHeight\n },\n getButtonGroupHeight () {\n return this.$refs[this.buttonGroup].$el.clientHeight\n }\n },\n mounted () {\n //TODO\n // this.setModelTableWrapperHeight()\n // this.resizeObserverModelTableWrapper = new ResizeObserver(entries => {\n // for (let entry of entries) {\n // this.modelTableWrapperHeight = entry.contentRect.height\n // console.log('this.modelTableWrapperHeight:', this.modelTableWrapperHeight)\n // console.log('getSearchAreaHeight', this.getSearchAreaHeight())\n // console.log('getButtonGroupHeight', this.getButtonGroupHeight())\n // const tableHeight = this.modelTableWrapperHeight - this.getSearchAreaHeight() - this.getButtonGroupHeight()\n // console.log('tableHeight', tableHeight)\n // }\n // })\n // this.resizeObserverModelTableWrapper.observe(this.$refs[this.modelTableWrapper])\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele {\n &.model__tree-table {\n background: transparent; \n display: flex;\n flex-direction: row;\n width: 100%;\n .model__tree-table--container {\n .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 }\n .model__table--container {\n width: 100%;\n min-width: 0;\n background: #fff;\n .model__table--wrapper {\n background: #fff;\n }\n }\n }\n}\n</style>",".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--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2661
2672
|
|
|
2662
2673
|
};
|
|
2663
2674
|
/* scoped */
|
|
2664
|
-
const __vue_scope_id__$
|
|
2675
|
+
const __vue_scope_id__$k = "data-v-3541b780";
|
|
2665
2676
|
/* module identifier */
|
|
2666
|
-
const __vue_module_identifier__$
|
|
2677
|
+
const __vue_module_identifier__$k = undefined;
|
|
2667
2678
|
/* functional template */
|
|
2668
|
-
const __vue_is_functional_template__$
|
|
2679
|
+
const __vue_is_functional_template__$k = false;
|
|
2669
2680
|
/* style inject SSR */
|
|
2670
2681
|
|
|
2671
2682
|
/* style inject shadow dom */
|
|
2672
2683
|
|
|
2673
2684
|
|
|
2674
2685
|
|
|
2675
|
-
const __vue_component__$
|
|
2676
|
-
{ render: __vue_render__$
|
|
2677
|
-
__vue_inject_styles__$
|
|
2678
|
-
__vue_script__$
|
|
2679
|
-
__vue_scope_id__$
|
|
2680
|
-
__vue_is_functional_template__$
|
|
2681
|
-
__vue_module_identifier__$
|
|
2686
|
+
const __vue_component__$k = /*#__PURE__*/normalizeComponent(
|
|
2687
|
+
{ render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
|
|
2688
|
+
__vue_inject_styles__$k,
|
|
2689
|
+
__vue_script__$k,
|
|
2690
|
+
__vue_scope_id__$k,
|
|
2691
|
+
__vue_is_functional_template__$k,
|
|
2692
|
+
__vue_module_identifier__$k,
|
|
2682
2693
|
false,
|
|
2683
2694
|
createInjector,
|
|
2684
2695
|
undefined,
|
|
@@ -2698,7 +2709,7 @@ __vue_render__$i._withStripped = true;
|
|
|
2698
2709
|
//
|
|
2699
2710
|
//
|
|
2700
2711
|
|
|
2701
|
-
var script$
|
|
2712
|
+
var script$j = {
|
|
2702
2713
|
name: 'ele-textarea',
|
|
2703
2714
|
model: {
|
|
2704
2715
|
prop: 'value',
|
|
@@ -2740,10 +2751,10 @@ var script$h = {
|
|
|
2740
2751
|
};
|
|
2741
2752
|
|
|
2742
2753
|
/* script */
|
|
2743
|
-
const __vue_script__$
|
|
2754
|
+
const __vue_script__$j = script$j;
|
|
2744
2755
|
|
|
2745
2756
|
/* template */
|
|
2746
|
-
var __vue_render__$
|
|
2757
|
+
var __vue_render__$j = function () {
|
|
2747
2758
|
var _vm = this;
|
|
2748
2759
|
var _h = _vm.$createElement;
|
|
2749
2760
|
var _c = _vm._self._c || _h;
|
|
@@ -2759,34 +2770,34 @@ var __vue_render__$h = function () {
|
|
|
2759
2770
|
on: { change: _vm.onChange },
|
|
2760
2771
|
})
|
|
2761
2772
|
};
|
|
2762
|
-
var __vue_staticRenderFns__$
|
|
2763
|
-
__vue_render__$
|
|
2773
|
+
var __vue_staticRenderFns__$j = [];
|
|
2774
|
+
__vue_render__$j._withStripped = true;
|
|
2764
2775
|
|
|
2765
2776
|
/* style */
|
|
2766
|
-
const __vue_inject_styles__$
|
|
2777
|
+
const __vue_inject_styles__$j = function (inject) {
|
|
2767
2778
|
if (!inject) return
|
|
2768
|
-
inject("data-v-
|
|
2779
|
+
inject("data-v-27d78bca_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 });
|
|
2769
2780
|
|
|
2770
2781
|
};
|
|
2771
2782
|
/* scoped */
|
|
2772
|
-
const __vue_scope_id__$
|
|
2783
|
+
const __vue_scope_id__$j = "data-v-27d78bca";
|
|
2773
2784
|
/* module identifier */
|
|
2774
|
-
const __vue_module_identifier__$
|
|
2785
|
+
const __vue_module_identifier__$j = undefined;
|
|
2775
2786
|
/* functional template */
|
|
2776
|
-
const __vue_is_functional_template__$
|
|
2787
|
+
const __vue_is_functional_template__$j = false;
|
|
2777
2788
|
/* style inject SSR */
|
|
2778
2789
|
|
|
2779
2790
|
/* style inject shadow dom */
|
|
2780
2791
|
|
|
2781
2792
|
|
|
2782
2793
|
|
|
2783
|
-
const __vue_component__$
|
|
2784
|
-
{ render: __vue_render__$
|
|
2785
|
-
__vue_inject_styles__$
|
|
2786
|
-
__vue_script__$
|
|
2787
|
-
__vue_scope_id__$
|
|
2788
|
-
__vue_is_functional_template__$
|
|
2789
|
-
__vue_module_identifier__$
|
|
2794
|
+
const __vue_component__$j = /*#__PURE__*/normalizeComponent(
|
|
2795
|
+
{ render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
|
|
2796
|
+
__vue_inject_styles__$j,
|
|
2797
|
+
__vue_script__$j,
|
|
2798
|
+
__vue_scope_id__$j,
|
|
2799
|
+
__vue_is_functional_template__$j,
|
|
2800
|
+
__vue_module_identifier__$j,
|
|
2790
2801
|
false,
|
|
2791
2802
|
createInjector,
|
|
2792
2803
|
undefined,
|
|
@@ -2803,7 +2814,7 @@ __vue_render__$h._withStripped = true;
|
|
|
2803
2814
|
//
|
|
2804
2815
|
//
|
|
2805
2816
|
|
|
2806
|
-
var script$
|
|
2817
|
+
var script$i = {
|
|
2807
2818
|
name: 'ele-icon',
|
|
2808
2819
|
props: {
|
|
2809
2820
|
type: {
|
|
@@ -2826,10 +2837,10 @@ var script$g = {
|
|
|
2826
2837
|
};
|
|
2827
2838
|
|
|
2828
2839
|
/* script */
|
|
2829
|
-
const __vue_script__$
|
|
2840
|
+
const __vue_script__$i = script$i;
|
|
2830
2841
|
|
|
2831
2842
|
/* template */
|
|
2832
|
-
var __vue_render__$
|
|
2843
|
+
var __vue_render__$i = function () {
|
|
2833
2844
|
var _vm = this;
|
|
2834
2845
|
var _h = _vm.$createElement;
|
|
2835
2846
|
var _c = _vm._self._c || _h;
|
|
@@ -2837,17 +2848,17 @@ var __vue_render__$g = function () {
|
|
|
2837
2848
|
? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
|
|
2838
2849
|
: _c("i", { class: ["iconfont", _vm.type] })
|
|
2839
2850
|
};
|
|
2840
|
-
var __vue_staticRenderFns__$
|
|
2841
|
-
__vue_render__$
|
|
2851
|
+
var __vue_staticRenderFns__$i = [];
|
|
2852
|
+
__vue_render__$i._withStripped = true;
|
|
2842
2853
|
|
|
2843
2854
|
/* style */
|
|
2844
|
-
const __vue_inject_styles__$
|
|
2855
|
+
const __vue_inject_styles__$i = undefined;
|
|
2845
2856
|
/* scoped */
|
|
2846
|
-
const __vue_scope_id__$
|
|
2857
|
+
const __vue_scope_id__$i = undefined;
|
|
2847
2858
|
/* module identifier */
|
|
2848
|
-
const __vue_module_identifier__$
|
|
2859
|
+
const __vue_module_identifier__$i = undefined;
|
|
2849
2860
|
/* functional template */
|
|
2850
|
-
const __vue_is_functional_template__$
|
|
2861
|
+
const __vue_is_functional_template__$i = false;
|
|
2851
2862
|
/* style inject */
|
|
2852
2863
|
|
|
2853
2864
|
/* style inject SSR */
|
|
@@ -2856,13 +2867,13 @@ __vue_render__$g._withStripped = true;
|
|
|
2856
2867
|
|
|
2857
2868
|
|
|
2858
2869
|
|
|
2859
|
-
const __vue_component__$
|
|
2860
|
-
{ render: __vue_render__$
|
|
2861
|
-
__vue_inject_styles__$
|
|
2862
|
-
__vue_script__$
|
|
2863
|
-
__vue_scope_id__$
|
|
2864
|
-
__vue_is_functional_template__$
|
|
2865
|
-
__vue_module_identifier__$
|
|
2870
|
+
const __vue_component__$i = /*#__PURE__*/normalizeComponent(
|
|
2871
|
+
{ render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
|
|
2872
|
+
__vue_inject_styles__$i,
|
|
2873
|
+
__vue_script__$i,
|
|
2874
|
+
__vue_scope_id__$i,
|
|
2875
|
+
__vue_is_functional_template__$i,
|
|
2876
|
+
__vue_module_identifier__$i,
|
|
2866
2877
|
false,
|
|
2867
2878
|
undefined,
|
|
2868
2879
|
undefined,
|
|
@@ -2870,11 +2881,11 @@ __vue_render__$g._withStripped = true;
|
|
|
2870
2881
|
);
|
|
2871
2882
|
|
|
2872
2883
|
//
|
|
2873
|
-
var script$
|
|
2884
|
+
var script$h = {
|
|
2874
2885
|
name: 'ele-upload',
|
|
2875
2886
|
components: {
|
|
2876
2887
|
FileUpload,
|
|
2877
|
-
EleIcon: __vue_component__$
|
|
2888
|
+
EleIcon: __vue_component__$i
|
|
2878
2889
|
},
|
|
2879
2890
|
model: {
|
|
2880
2891
|
prop: 'value',
|
|
@@ -3104,10 +3115,10 @@ var script$f = {
|
|
|
3104
3115
|
};
|
|
3105
3116
|
|
|
3106
3117
|
/* script */
|
|
3107
|
-
const __vue_script__$
|
|
3118
|
+
const __vue_script__$h = script$h;
|
|
3108
3119
|
|
|
3109
3120
|
/* template */
|
|
3110
|
-
var __vue_render__$
|
|
3121
|
+
var __vue_render__$h = function () {
|
|
3111
3122
|
var _vm = this;
|
|
3112
3123
|
var _h = _vm.$createElement;
|
|
3113
3124
|
var _c = _vm._self._c || _h;
|
|
@@ -3245,34 +3256,34 @@ var __vue_render__$f = function () {
|
|
|
3245
3256
|
1
|
|
3246
3257
|
)
|
|
3247
3258
|
};
|
|
3248
|
-
var __vue_staticRenderFns__$
|
|
3249
|
-
__vue_render__$
|
|
3259
|
+
var __vue_staticRenderFns__$h = [];
|
|
3260
|
+
__vue_render__$h._withStripped = true;
|
|
3250
3261
|
|
|
3251
3262
|
/* style */
|
|
3252
|
-
const __vue_inject_styles__$
|
|
3263
|
+
const __vue_inject_styles__$h = function (inject) {
|
|
3253
3264
|
if (!inject) return
|
|
3254
|
-
inject("data-v-7a628fc7_0", { source: "[data-v-7a628fc7] .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-7a628fc7] .ele-upload__inner:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n.ele-upload__wrapper[data-v-7a628fc7] {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area[data-v-7a628fc7] {\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 .anticon-cloud-upload[data-v-7a628fc7] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text[data-v-7a628fc7] {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message[data-v-7a628fc7] {\n font-size: 16px;\n color: var(--idoole-black-008);\n text-align: left;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__ext[data-v-7a628fc7] {\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-7a628fc7] {\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-7a628fc7] {\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-7a628fc7] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete[data-v-7a628fc7] {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon[data-v-7a628fc7] {\n margin-left: 8px;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\upload\\src\\index.vue","index.vue"],"names":[],"mappings":"AAoRA;EACA,qBAAA;EACA,eAAA;EACA,wDAAA;EACA,yDAAA;EAIA,+CAAA;ACtRA;ADmRA;EACA,0DAAA;ACjRA;ADqRA;EACA,WAAA;AClRA;ADmRA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;ACjRA;ADmRA;EACA,eAAA;EACA,kCAAA;ACjRA;ADoRA;EACA,iBAAA;AClRA;ADmRA;EACA,eAAA;EACA,8BAAA;EACA,gBAAA;ACjRA;ADmRA;EACA,gBAAA;EACA,eAAA;EACA,6BAAA;ACjRA;ADsRA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EACA,+CAAA;EACA,8CAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACpRA;ADsRA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;ACpRA;ADqRA;EACA,gBAAA;EACA,uBAAA;ACnRA;ADsRA;EACA,gBAAA;ACpRA;ADqRA;EACA,gBAAA;EACA,eAAA;ACnRA;;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 :size=\"fileSizeLimit\"\r\n :post-action=\"postAction\"\r\n :multiple=\"multiple\"\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 <ele-icon type=\"cloud-upload\"></ele-icon>\r\n </div>\r\n <div class=\"ele-upload__area--text\">\r\n <div class=\"ele-upload__message\">单击或拖动文件到该区域以上传</div>\r\n <div class=\"ele-upload__ext\">文件小于{{ 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 files\" :key=\"idx\">\r\n <div class=\"ele-file__suffix--icon\">\r\n <ele-icon type=\"icon-doc\"></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\" 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\">\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 } from '@idooel/shared'\r\nimport EleIcon from '../../icon/src/index.vue'\r\nexport default {\r\n name: 'ele-upload',\r\n components: {\r\n FileUpload,\r\n EleIcon\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 default: '/zuul/api-file/workbench/file'\r\n },\r\n size: {\r\n type: Number,\r\n default: 100\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: 'c81f993f-f044-45bb-b3af-2977d335042d',\r\n _t: new Date().valueOf()\r\n })\r\n },\r\n headers: {\r\n type: Object,\r\n default: () => ({})\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 saveToServerAsyncPageTimer: null\r\n }\r\n },\r\n computed: {\r\n getPayloads () {\r\n return {\r\n override: false\r\n }\r\n },\r\n chunkConfig () {\r\n const ret = route.toQueryString(this.querys)\r\n return {\r\n action: `${window.prefixPath}/zuul/api-file/workbench/file/temp/chunk/vue`,\r\n headers: {\r\n 'X-XSRF-TOKEN': localStorage.getItem('token')\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.files.length >= this.maximum) {\r\n return false\r\n } else {\r\n return true\r\n }\r\n } else {\r\n if (this.isFileUploadSuccessed && this.files.length >= 1) {\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 `${window.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 }\r\n },\r\n fileIds () {\r\n const fileIds = this.files.map(file => {\r\n return file.response.data.fileID\r\n })\r\n return this.multiple ? fileIds : fileIds[0]\r\n }\r\n },\r\n methods: {\r\n handleClickDownload (file) {\r\n console.log('download file', file)\r\n },\r\n handleClickDelete (file) {\r\n this.$refs[this.uploadRef].remove(file)\r\n this.$emit('change', this.fileIds)\r\n },\r\n onWatchFiles (files) {\r\n this.files = files\r\n if (this.isFileUploadSuccessed) {\r\n this.$emit('change', this.fileIds)\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 .anticon-cloud-upload {\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-008);\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 .anticon-cloud-upload {\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-008);\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 });
|
|
3265
|
+
inject("data-v-5b271004_0", { source: "[data-v-5b271004] .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-5b271004] .ele-upload__inner:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n.ele-upload__wrapper[data-v-5b271004] {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area[data-v-5b271004] {\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 .anticon-cloud-upload[data-v-5b271004] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text[data-v-5b271004] {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message[data-v-5b271004] {\n font-size: 16px;\n color: var(--idoole-black-008);\n text-align: left;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__ext[data-v-5b271004] {\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-5b271004] {\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-5b271004] {\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-5b271004] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete[data-v-5b271004] {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon[data-v-5b271004] {\n margin-left: 8px;\n cursor: pointer;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/upload/src/index.vue","index.vue"],"names":[],"mappings":"AAoRA;EACA,qBAAA;EACA,eAAA;EACA,wDAAA;EACA,yDAAA;EAIA,+CAAA;ACtRA;ADmRA;EACA,0DAAA;ACjRA;ADqRA;EACA,WAAA;AClRA;ADmRA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;ACjRA;ADmRA;EACA,eAAA;EACA,kCAAA;ACjRA;ADoRA;EACA,iBAAA;AClRA;ADmRA;EACA,eAAA;EACA,8BAAA;EACA,gBAAA;ACjRA;ADmRA;EACA,gBAAA;EACA,eAAA;EACA,6BAAA;ACjRA;ADsRA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EACA,+CAAA;EACA,8CAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACpRA;ADsRA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;ACpRA;ADqRA;EACA,gBAAA;EACA,uBAAA;ACnRA;ADsRA;EACA,gBAAA;ACpRA;ADqRA;EACA,gBAAA;EACA,eAAA;ACnRA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-upload__wrapper\">\n <FileUpload\n class=\"ele-upload__inner\"\n v-show=\"isShowUploadContainer\"\n v-model=\"files\"\n :ref=\"uploadRef\"\n :drop=\"drop\"\n :chunk-enabled=\"chunkEnabled\"\n :chunk=\"chunkConfig\"\n :accept=\"accept\"\n :size=\"fileSizeLimit\"\n :post-action=\"postAction\"\n :multiple=\"multiple\"\n :maximum=\"getMaximum\"\n @input-file=\"onWatchInputFiles\"\n @input=\"onWatchFiles\"\n style=\"width: 100%;\">\n <section class=\"ele-upload__area\">\n <div class=\"ele-upload__area--icon\">\n <ele-icon type=\"cloud-upload\"></ele-icon>\n </div>\n <div class=\"ele-upload__area--text\">\n <div class=\"ele-upload__message\">单击或拖动文件到该区域以上传</div>\n <div class=\"ele-upload__ext\">文件小于{{ size }}M</div>\n </div>\n </section>\n </FileUpload>\n <section class=\"ele-files__wrapper\">\n <div class=\"ele-file__item\" v-for=\"(file, idx) in files\" :key=\"idx\">\n <div class=\"ele-file__suffix--icon\">\n <ele-icon type=\"icon-doc\"></ele-icon>\n </div>\n <div class=\"ele-file__name\">\n <div class=\"ele-file__inner\" @click=\"handleClickDownload(file)\">{{ file.name }}</div>\n <div v-if=\"!file.success\" class=\"ele-uplpad__progress\">\n <a-progress :strokeWidth=\"2\" :percent=\"Number(file.progress)\" size=\"small\" />\n </div>\n </div>\n <div class=\"ele-file__delete\" v-if=\"file.success || file.error\">\n <span class=\"ele-file__size\">{{ (file.size / byteConversion).toFixed(2) }}M</span>\n <span class=\"ele-file__delete--icon\" @click=\"handleClickDelete(file)\">\n <ele-icon type=\"delete\"></ele-icon>\n </span>\n </div>\n </div>\n </section>\n </div>\n</template>\n\n<script>\nimport FileUpload from 'vue-upload-component'\nimport { v4 as uuidv4 } from 'uuid'\nimport { route, net } from '@idooel/shared'\nimport EleIcon from '../../icon/src/index.vue'\nexport default {\n name: 'ele-upload',\n components: {\n FileUpload,\n EleIcon\n },\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n url: {\n type: String,\n default: '/zuul/api-file/workbench/file'\n },\n size: {\n type: Number,\n default: 100\n },\n accept: {\n type: String\n },\n maximum: {\n type: Number,\n default: 10\n },\n multiple: {\n type: Boolean,\n default: false\n },\n drop: {\n type: Boolean,\n default: true\n },\n value: {\n type: [String, Array]\n },\n querys: {\n type: Object,\n default: () => ({\n _csrf: 'c81f993f-f044-45bb-b3af-2977d335042d',\n _t: new Date().valueOf()\n })\n },\n headers: {\n type: Object,\n default: () => ({})\n },\n byteConversion: {\n type: Number,\n default: 1024 * 1024\n },\n chunkEnabled: {\n type: Boolean,\n default: true\n }\n },\n data() {\n return {\n files: [],\n saveToServerAsyncPageTimer: null\n }\n },\n computed: {\n getPayloads () {\n return {\n override: false\n }\n },\n chunkConfig () {\n const ret = route.toQueryString(this.querys)\n return {\n action: `${window.prefixPath}/zuul/api-file/workbench/file/temp/chunk/vue`,\n headers: {\n 'X-XSRF-TOKEN': localStorage.getItem('token')\n },\n minSize: 3 * this.byteConversion,\n maxActive: 3,\n maxRetries: 5,\n startBody: {\n override: true,\n path: '/cw'\n },\n uploadBody: {\n override: true,\n path: '/cw'\n },\n finishBody: {\n override: true,\n path: '/cw'\n }\n }\n },\n isFileUploadSuccessed () {\n return this.files.every(file => file.success)\n },\n isShowUploadContainer () {\n if (this.multiple) {\n if (this.isFileUploadSuccessed && this.files.length >= this.maximum) {\n return false\n } else {\n return true\n }\n } else {\n if (this.isFileUploadSuccessed && this.files.length >= 1) {\n return false\n } else {\n return true\n }\n }\n },\n getMaximum () {\n return this.multiple ? this.maximum : 1\n },\n fileSizeLimit () {\n return this.size * this.byteConversion\n },\n postAction () {\n const ret = route.toQueryString(this.querys)\n return `${window.prefixPath}${this.url}?${ret}`\n },\n uploadRef () {\n return uuidv4()\n },\n fileSuffixIcon () {\n return {\n 'doc': { name: 'icon-doc' },\n }\n },\n fileIds () {\n const fileIds = this.files.map(file => {\n return file.response.data.fileID\n })\n return this.multiple ? fileIds : fileIds[0]\n }\n },\n methods: {\n handleClickDownload (file) {\n console.log('download file', file)\n },\n handleClickDelete (file) {\n this.$refs[this.uploadRef].remove(file)\n this.$emit('change', this.fileIds)\n },\n onWatchFiles (files) {\n this.files = files\n if (this.isFileUploadSuccessed) {\n this.$emit('change', this.fileIds)\n }\n },\n async saveToServerAsyncPage (payloads = {}) {\n net.post('zuul/api-file/workbench/file/temp/saveToServerAsyncPage', payloads, { \n headers: {\n 'Content-Type': 'multipart/form-data'\n }\n }).then(resp =>{\n const { data } = resp\n if (data !== 'saveToServerAsyncPage') {\n clearInterval(this.saveToServerAsyncPageTimer)\n }\n })\n // const ret = await net.post({\n // url: 'zuul/api-file/workbench/file/temp/saveToServerAsyncPage',\n // method: 'POST',\n // data: { ...payloads }\n // }).then(resp => {\n // const { data: { data, code, message } } = resp\n // if (code !== '2000') {\n // this.$Message.error(message)\n // return\n // }\n // if (data !== 'saveToServerAsyncPage') {\n // clearInterval(timer)\n // const { fileID, size } = data\n // this.$emit('on-success', { ...data, fileId: fileID })\n // this.$Message.success('同步成功')\n // return { fileId: fileID, size }\n // }\n // })\n // return ret\n },\n onWatchInputFiles (newFile, oldFile) {\n if (newFile && !oldFile) {\n // add file\n console.log('add', newFile)\n }\n if (newFile && oldFile) {\n // update file\n console.log('update', newFile)\n const { success, active, chunk, response } = newFile\n if (chunk && success && !active) {\n console.log('chunk end')\n const { data: { file, type } } = response\n const payloads = {\n filePath: file.match(/\\/cw(.*)/)[0],\n asyncID: uuidv4(),\n isDeleteOrigin: false,\n toImage: type === 'pdf' ? true : false,\n unzip: type === 'zip' ? true : false,\n _csrf: localStorage.getItem('token')\n }\n this.saveToServerAsyncPageTimer = setInterval(() => {\n this.saveToServerAsyncPage(payloads)\n }, 2000)\n }\n }\n if (!newFile && oldFile) {\n // delete file\n console.log('delete')\n }\n if (Boolean(newFile) !== Boolean(oldFile) || oldFile.error !== newFile.error) {\n if (!this.$refs[this.uploadRef].active) {\n this.$refs[this.uploadRef].active = true\n }\n }\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n::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 &:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n }\n border-radius: var(--idooel-form-border-radius);\n}\n.ele-upload__wrapper {\n width: 100%;\n .ele-upload__area {\n padding: 16px;\n width: 100%;\n height: 80px;\n display: flex;\n flex-direction: row;\n .ele-upload__area--icon {\n .anticon-cloud-upload {\n font-size: 48px;\n color: var(--idooel-primary-color);\n }\n }\n .ele-upload__area--text {\n margin-left: 16px;\n .ele-upload__message {\n font-size: 16px;\n color: var(--idoole-black-008);\n text-align: left;\n }\n .ele-upload__ext {\n text-align: left;\n font-size: 14px;\n color: var(--idoole-black-06);\n }\n }\n }\n .ele-files__wrapper {\n .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 .ele-file__suffix--icon {}\n .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 .ele-file__inner {\n overflow: hidden;\n text-overflow: ellipsis;\n }\n }\n .ele-file__delete {\n margin-left: 8px;\n .ele-file__delete--icon {\n margin-left: 8px;\n cursor: pointer;\n }\n }\n }\n }\n}\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 .anticon-cloud-upload {\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-008);\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 });
|
|
3255
3266
|
|
|
3256
3267
|
};
|
|
3257
3268
|
/* scoped */
|
|
3258
|
-
const __vue_scope_id__$
|
|
3269
|
+
const __vue_scope_id__$h = "data-v-5b271004";
|
|
3259
3270
|
/* module identifier */
|
|
3260
|
-
const __vue_module_identifier__$
|
|
3271
|
+
const __vue_module_identifier__$h = undefined;
|
|
3261
3272
|
/* functional template */
|
|
3262
|
-
const __vue_is_functional_template__$
|
|
3273
|
+
const __vue_is_functional_template__$h = false;
|
|
3263
3274
|
/* style inject SSR */
|
|
3264
3275
|
|
|
3265
3276
|
/* style inject shadow dom */
|
|
3266
3277
|
|
|
3267
3278
|
|
|
3268
3279
|
|
|
3269
|
-
const __vue_component__$
|
|
3270
|
-
{ render: __vue_render__$
|
|
3271
|
-
__vue_inject_styles__$
|
|
3272
|
-
__vue_script__$
|
|
3273
|
-
__vue_scope_id__$
|
|
3274
|
-
__vue_is_functional_template__$
|
|
3275
|
-
__vue_module_identifier__$
|
|
3280
|
+
const __vue_component__$h = /*#__PURE__*/normalizeComponent(
|
|
3281
|
+
{ render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
|
|
3282
|
+
__vue_inject_styles__$h,
|
|
3283
|
+
__vue_script__$h,
|
|
3284
|
+
__vue_scope_id__$h,
|
|
3285
|
+
__vue_is_functional_template__$h,
|
|
3286
|
+
__vue_module_identifier__$h,
|
|
3276
3287
|
false,
|
|
3277
3288
|
createInjector,
|
|
3278
3289
|
undefined,
|
|
@@ -3298,7 +3309,7 @@ __vue_render__$f._withStripped = true;
|
|
|
3298
3309
|
//
|
|
3299
3310
|
//
|
|
3300
3311
|
|
|
3301
|
-
var script$
|
|
3312
|
+
var script$g = {
|
|
3302
3313
|
name: 'ele-select-entity',
|
|
3303
3314
|
props: {
|
|
3304
3315
|
value: {
|
|
@@ -3355,10 +3366,10 @@ var script$e = {
|
|
|
3355
3366
|
};
|
|
3356
3367
|
|
|
3357
3368
|
/* script */
|
|
3358
|
-
const __vue_script__$
|
|
3369
|
+
const __vue_script__$g = script$g;
|
|
3359
3370
|
|
|
3360
3371
|
/* template */
|
|
3361
|
-
var __vue_render__$
|
|
3372
|
+
var __vue_render__$g = function () {
|
|
3362
3373
|
var _vm = this;
|
|
3363
3374
|
var _h = _vm.$createElement;
|
|
3364
3375
|
var _c = _vm._self._c || _h;
|
|
@@ -3408,34 +3419,34 @@ var __vue_render__$e = function () {
|
|
|
3408
3419
|
2
|
|
3409
3420
|
)
|
|
3410
3421
|
};
|
|
3411
|
-
var __vue_staticRenderFns__$
|
|
3412
|
-
__vue_render__$
|
|
3422
|
+
var __vue_staticRenderFns__$g = [];
|
|
3423
|
+
__vue_render__$g._withStripped = true;
|
|
3413
3424
|
|
|
3414
3425
|
/* style */
|
|
3415
|
-
const __vue_inject_styles__$
|
|
3426
|
+
const __vue_inject_styles__$g = function (inject) {
|
|
3416
3427
|
if (!inject) return
|
|
3417
|
-
inject("data-v-
|
|
3428
|
+
inject("data-v-611a11f1_0", { source: ".g-select-entity__wrapper[data-v-611a11f1] {\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-611a11f1]:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input[data-v-611a11f1] {\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-611a11f1] {\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-611a11f1] {\n border-color: var(--idooel-form-border-err-color);\n}\n.g-select-entity__disabled .select-entity__input[data-v-611a11f1] {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/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>\n <div class=\"g-select-entity__wrapper\" :class=\"disabled ? 'g-select-entity__disabled' : ''\">\n <span class=\"select-entity__input\">\n <a-tag\n v-for=\"(item, inx) in getValueList()\"\n :key=\"item.value\"\n :closable=\"!disabled && !getIsMaxCount()\"\n @close=\"onClose(...arguments, inx)\"\n >\n {{ item.label }}\n </a-tag>\n <a-tag v-if=\"getIsMaxCount()\">......</a-tag>\n </span>\n <span class=\"select-entity__addon\" @click=\"onChange\">{{ addonAfter }}</span>\n <slot></slot>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-select-entity',\n props: {\n value: {\n type: [Array, Object]\n },\n multiple: {\n type: Boolean,\n default: true\n },\n maxCount: {\n type: Number,\n default: 7\n },\n disabled: {\n type: Boolean,\n default: false\n },\n addonAfter: {\n type: String,\n default: '选择'\n }\n },\n methods: {\n getValueList () {\n if (this.value) {\n if (this.multiple) {\n return this.getIsMaxCount() ? this.value.slice(0, this.maxCount) : this.value\n }\n return [this.value]\n }\n return []\n },\n getIsMaxCount () {\n if (this.value && this.multiple) {\n return this.value.length >= this.maxCount\n }\n return false\n },\n onChange () {\n if (this.disabled) return\n this.$emit('change', this.value)\n },\n onClose (e, inx) {\n e = window.event || e\n e.preventDefault()\n if (!this.multiple) {\n this.$emit('change', null)\n return\n }\n this.value.splice(inx, 1)\n this.$emit('change', this.value)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.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 &:hover {\n border-color: var(--idooel-primary-color);\n }\n .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 .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.g-select-entity__disabled .select-entity__input {\n background-color: var(--idoole-black-02);\n}\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 });
|
|
3418
3429
|
|
|
3419
3430
|
};
|
|
3420
3431
|
/* scoped */
|
|
3421
|
-
const __vue_scope_id__$
|
|
3432
|
+
const __vue_scope_id__$g = "data-v-611a11f1";
|
|
3422
3433
|
/* module identifier */
|
|
3423
|
-
const __vue_module_identifier__$
|
|
3434
|
+
const __vue_module_identifier__$g = undefined;
|
|
3424
3435
|
/* functional template */
|
|
3425
|
-
const __vue_is_functional_template__$
|
|
3436
|
+
const __vue_is_functional_template__$g = false;
|
|
3426
3437
|
/* style inject SSR */
|
|
3427
3438
|
|
|
3428
3439
|
/* style inject shadow dom */
|
|
3429
3440
|
|
|
3430
3441
|
|
|
3431
3442
|
|
|
3432
|
-
const __vue_component__$
|
|
3433
|
-
{ render: __vue_render__$
|
|
3434
|
-
__vue_inject_styles__$
|
|
3435
|
-
__vue_script__$
|
|
3436
|
-
__vue_scope_id__$
|
|
3437
|
-
__vue_is_functional_template__$
|
|
3438
|
-
__vue_module_identifier__$
|
|
3443
|
+
const __vue_component__$g = /*#__PURE__*/normalizeComponent(
|
|
3444
|
+
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
|
|
3445
|
+
__vue_inject_styles__$g,
|
|
3446
|
+
__vue_script__$g,
|
|
3447
|
+
__vue_scope_id__$g,
|
|
3448
|
+
__vue_is_functional_template__$g,
|
|
3449
|
+
__vue_module_identifier__$g,
|
|
3439
3450
|
false,
|
|
3440
3451
|
createInjector,
|
|
3441
3452
|
undefined,
|
|
@@ -3449,7 +3460,7 @@ __vue_render__$e._withStripped = true;
|
|
|
3449
3460
|
//
|
|
3450
3461
|
//
|
|
3451
3462
|
|
|
3452
|
-
var script$
|
|
3463
|
+
var script$f = {
|
|
3453
3464
|
name: 'ele-input-number',
|
|
3454
3465
|
props: {
|
|
3455
3466
|
precision: {
|
|
@@ -3467,10 +3478,10 @@ var script$d = {
|
|
|
3467
3478
|
};
|
|
3468
3479
|
|
|
3469
3480
|
/* script */
|
|
3470
|
-
const __vue_script__$
|
|
3481
|
+
const __vue_script__$f = script$f;
|
|
3471
3482
|
|
|
3472
3483
|
/* template */
|
|
3473
|
-
var __vue_render__$
|
|
3484
|
+
var __vue_render__$f = function () {
|
|
3474
3485
|
var _vm = this;
|
|
3475
3486
|
var _h = _vm.$createElement;
|
|
3476
3487
|
var _c = _vm._self._c || _h;
|
|
@@ -3494,17 +3505,17 @@ var __vue_render__$d = function () {
|
|
|
3494
3505
|
1
|
|
3495
3506
|
)
|
|
3496
3507
|
};
|
|
3497
|
-
var __vue_staticRenderFns__$
|
|
3498
|
-
__vue_render__$
|
|
3508
|
+
var __vue_staticRenderFns__$f = [];
|
|
3509
|
+
__vue_render__$f._withStripped = true;
|
|
3499
3510
|
|
|
3500
3511
|
/* style */
|
|
3501
|
-
const __vue_inject_styles__$
|
|
3512
|
+
const __vue_inject_styles__$f = undefined;
|
|
3502
3513
|
/* scoped */
|
|
3503
|
-
const __vue_scope_id__$
|
|
3514
|
+
const __vue_scope_id__$f = undefined;
|
|
3504
3515
|
/* module identifier */
|
|
3505
|
-
const __vue_module_identifier__$
|
|
3516
|
+
const __vue_module_identifier__$f = undefined;
|
|
3506
3517
|
/* functional template */
|
|
3507
|
-
const __vue_is_functional_template__$
|
|
3518
|
+
const __vue_is_functional_template__$f = false;
|
|
3508
3519
|
/* style inject */
|
|
3509
3520
|
|
|
3510
3521
|
/* style inject SSR */
|
|
@@ -3513,13 +3524,13 @@ __vue_render__$d._withStripped = true;
|
|
|
3513
3524
|
|
|
3514
3525
|
|
|
3515
3526
|
|
|
3516
|
-
const __vue_component__$
|
|
3517
|
-
{ render: __vue_render__$
|
|
3518
|
-
__vue_inject_styles__$
|
|
3519
|
-
__vue_script__$
|
|
3520
|
-
__vue_scope_id__$
|
|
3521
|
-
__vue_is_functional_template__$
|
|
3522
|
-
__vue_module_identifier__$
|
|
3527
|
+
const __vue_component__$f = /*#__PURE__*/normalizeComponent(
|
|
3528
|
+
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
|
|
3529
|
+
__vue_inject_styles__$f,
|
|
3530
|
+
__vue_script__$f,
|
|
3531
|
+
__vue_scope_id__$f,
|
|
3532
|
+
__vue_is_functional_template__$f,
|
|
3533
|
+
__vue_module_identifier__$f,
|
|
3523
3534
|
false,
|
|
3524
3535
|
undefined,
|
|
3525
3536
|
undefined,
|
|
@@ -3531,7 +3542,7 @@ __vue_render__$d._withStripped = true;
|
|
|
3531
3542
|
//
|
|
3532
3543
|
//
|
|
3533
3544
|
|
|
3534
|
-
var script$
|
|
3545
|
+
var script$e = {
|
|
3535
3546
|
name: 'ele-checkbox',
|
|
3536
3547
|
props: {
|
|
3537
3548
|
value: {
|
|
@@ -3555,10 +3566,10 @@ var script$c = {
|
|
|
3555
3566
|
};
|
|
3556
3567
|
|
|
3557
3568
|
/* script */
|
|
3558
|
-
const __vue_script__$
|
|
3569
|
+
const __vue_script__$e = script$e;
|
|
3559
3570
|
|
|
3560
3571
|
/* template */
|
|
3561
|
-
var __vue_render__$
|
|
3572
|
+
var __vue_render__$e = function () {
|
|
3562
3573
|
var _vm = this;
|
|
3563
3574
|
var _h = _vm.$createElement;
|
|
3564
3575
|
var _c = _vm._self._c || _h;
|
|
@@ -3571,34 +3582,34 @@ var __vue_render__$c = function () {
|
|
|
3571
3582
|
on: { change: _vm.onChange },
|
|
3572
3583
|
})
|
|
3573
3584
|
};
|
|
3574
|
-
var __vue_staticRenderFns__$
|
|
3575
|
-
__vue_render__$
|
|
3585
|
+
var __vue_staticRenderFns__$e = [];
|
|
3586
|
+
__vue_render__$e._withStripped = true;
|
|
3576
3587
|
|
|
3577
3588
|
/* style */
|
|
3578
|
-
const __vue_inject_styles__$
|
|
3589
|
+
const __vue_inject_styles__$e = function (inject) {
|
|
3579
3590
|
if (!inject) return
|
|
3580
|
-
inject("data-v-
|
|
3591
|
+
inject("data-v-b24f06c0_0", { source: ".ant-checkbox-group[data-v-b24f06c0] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-checkbox-group[data-v-b24f06c0] .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group[data-v-b24f06c0] .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/checkbox/src/index.vue","index.vue"],"names":[],"mappings":"AA6BA;EACA,gBAAA;EACA,iBAAA;AC5BA;ADgCA;EACA,0CAAA;AC7BA;AD+BA;EACA,iDAAA;AC7BA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <a-checkbox-group :options=\"dataSource\" :disabled=\"disabled\" :defaultValue=\"value\" @change=\"onChange\"></a-checkbox-group>\n</template>\n\n<script>\nexport default {\n name: 'ele-checkbox',\n props: {\n value: {\n type: Array\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n disabled: {\n type: Boolean,\n default: false\n }\n },\n methods: {\n onChange (value) {\n this.$emit('change', value)\n this.$emit('input', value)\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.ant-checkbox-group {\n text-align: left;\n line-height: 32px;\n}\n.has-error {\n .ant-checkbox-group {\n ::v-deep .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n }\n ::v-deep .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n }\n }\n}\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 });
|
|
3581
3592
|
|
|
3582
3593
|
};
|
|
3583
3594
|
/* scoped */
|
|
3584
|
-
const __vue_scope_id__$
|
|
3595
|
+
const __vue_scope_id__$e = "data-v-b24f06c0";
|
|
3585
3596
|
/* module identifier */
|
|
3586
|
-
const __vue_module_identifier__$
|
|
3597
|
+
const __vue_module_identifier__$e = undefined;
|
|
3587
3598
|
/* functional template */
|
|
3588
|
-
const __vue_is_functional_template__$
|
|
3599
|
+
const __vue_is_functional_template__$e = false;
|
|
3589
3600
|
/* style inject SSR */
|
|
3590
3601
|
|
|
3591
3602
|
/* style inject shadow dom */
|
|
3592
3603
|
|
|
3593
3604
|
|
|
3594
3605
|
|
|
3595
|
-
const __vue_component__$
|
|
3596
|
-
{ render: __vue_render__$
|
|
3597
|
-
__vue_inject_styles__$
|
|
3598
|
-
__vue_script__$
|
|
3599
|
-
__vue_scope_id__$
|
|
3600
|
-
__vue_is_functional_template__$
|
|
3601
|
-
__vue_module_identifier__$
|
|
3606
|
+
const __vue_component__$e = /*#__PURE__*/normalizeComponent(
|
|
3607
|
+
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
|
|
3608
|
+
__vue_inject_styles__$e,
|
|
3609
|
+
__vue_script__$e,
|
|
3610
|
+
__vue_scope_id__$e,
|
|
3611
|
+
__vue_is_functional_template__$e,
|
|
3612
|
+
__vue_module_identifier__$e,
|
|
3602
3613
|
false,
|
|
3603
3614
|
createInjector,
|
|
3604
3615
|
undefined,
|
|
@@ -3614,7 +3625,7 @@ __vue_render__$c._withStripped = true;
|
|
|
3614
3625
|
//
|
|
3615
3626
|
//
|
|
3616
3627
|
|
|
3617
|
-
var script$
|
|
3628
|
+
var script$d = {
|
|
3618
3629
|
name: 'ele-radio',
|
|
3619
3630
|
model: {
|
|
3620
3631
|
prop: 'value',
|
|
@@ -3642,10 +3653,10 @@ var script$b = {
|
|
|
3642
3653
|
};
|
|
3643
3654
|
|
|
3644
3655
|
/* script */
|
|
3645
|
-
const __vue_script__$
|
|
3656
|
+
const __vue_script__$d = script$d;
|
|
3646
3657
|
|
|
3647
3658
|
/* template */
|
|
3648
|
-
var __vue_render__$
|
|
3659
|
+
var __vue_render__$d = function () {
|
|
3649
3660
|
var _vm = this;
|
|
3650
3661
|
var _h = _vm.$createElement;
|
|
3651
3662
|
var _c = _vm._self._c || _h;
|
|
@@ -3663,34 +3674,34 @@ var __vue_render__$b = function () {
|
|
|
3663
3674
|
1
|
|
3664
3675
|
)
|
|
3665
3676
|
};
|
|
3666
|
-
var __vue_staticRenderFns__$
|
|
3667
|
-
__vue_render__$
|
|
3677
|
+
var __vue_staticRenderFns__$d = [];
|
|
3678
|
+
__vue_render__$d._withStripped = true;
|
|
3668
3679
|
|
|
3669
3680
|
/* style */
|
|
3670
|
-
const __vue_inject_styles__$
|
|
3681
|
+
const __vue_inject_styles__$d = function (inject) {
|
|
3671
3682
|
if (!inject) return
|
|
3672
|
-
inject("data-v-
|
|
3683
|
+
inject("data-v-ec29379c_0", { source: ".ant-radio-group[data-v-ec29379c] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-radio-group[data-v-ec29379c] .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group[data-v-ec29379c] .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/radio/src/index.vue","index.vue"],"names":[],"mappings":"AAqCA;EACA,gBAAA;EACA,iBAAA;ACpCA;ADwCA;EACA,0CAAA;ACrCA;ADuCA;EACA,iDAAA;ACrCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <a-radio-group :value=\"value\" @change=\"onChange\" :disabled=\"disabled\">\n <a-radio v-for=\"item in dataSource\" :key=\"item.value\" :value=\"item.value\">\n {{ item.label }}\n </a-radio>\n </a-radio-group>\n</template>\n\n<script>\nexport default {\n name: 'ele-radio',\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n value: {\n type: [String, Array, Number]\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n disabled: {\n type: Boolean,\n default: false\n }\n },\n methods: {\n onChange (e) {\n this.$emit('change', e.target.value)\n this.$emit('input', e.target.value)\n }\n }\n}\n</script>\n<style lang=\"scss\" scoped>\n.ant-radio-group {\n text-align: left;\n line-height: 32px;\n}\n.has-error {\n .ant-radio-group {\n ::v-deep .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n }\n ::v-deep .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n }\n }\n}\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 });
|
|
3673
3684
|
|
|
3674
3685
|
};
|
|
3675
3686
|
/* scoped */
|
|
3676
|
-
const __vue_scope_id__$
|
|
3687
|
+
const __vue_scope_id__$d = "data-v-ec29379c";
|
|
3677
3688
|
/* module identifier */
|
|
3678
|
-
const __vue_module_identifier__$
|
|
3689
|
+
const __vue_module_identifier__$d = undefined;
|
|
3679
3690
|
/* functional template */
|
|
3680
|
-
const __vue_is_functional_template__$
|
|
3691
|
+
const __vue_is_functional_template__$d = false;
|
|
3681
3692
|
/* style inject SSR */
|
|
3682
3693
|
|
|
3683
3694
|
/* style inject shadow dom */
|
|
3684
3695
|
|
|
3685
3696
|
|
|
3686
3697
|
|
|
3687
|
-
const __vue_component__$
|
|
3688
|
-
{ render: __vue_render__$
|
|
3689
|
-
__vue_inject_styles__$
|
|
3690
|
-
__vue_script__$
|
|
3691
|
-
__vue_scope_id__$
|
|
3692
|
-
__vue_is_functional_template__$
|
|
3693
|
-
__vue_module_identifier__$
|
|
3698
|
+
const __vue_component__$d = /*#__PURE__*/normalizeComponent(
|
|
3699
|
+
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
|
|
3700
|
+
__vue_inject_styles__$d,
|
|
3701
|
+
__vue_script__$d,
|
|
3702
|
+
__vue_scope_id__$d,
|
|
3703
|
+
__vue_is_functional_template__$d,
|
|
3704
|
+
__vue_module_identifier__$d,
|
|
3694
3705
|
false,
|
|
3695
3706
|
createInjector,
|
|
3696
3707
|
undefined,
|
|
@@ -3698,17 +3709,17 @@ __vue_render__$b._withStripped = true;
|
|
|
3698
3709
|
);
|
|
3699
3710
|
|
|
3700
3711
|
//
|
|
3701
|
-
var script$
|
|
3712
|
+
var script$c = {
|
|
3702
3713
|
name: 'ele-form',
|
|
3703
3714
|
components: {
|
|
3704
|
-
EleSelect: __vue_component__$
|
|
3705
|
-
EleInput: __vue_component__$
|
|
3706
|
-
EleTextarea: __vue_component__$
|
|
3707
|
-
EleUpload: __vue_component__$
|
|
3708
|
-
EleSelectEntity: __vue_component__$
|
|
3709
|
-
EleInputNumber: __vue_component__$
|
|
3710
|
-
EleCheckbox: __vue_component__$
|
|
3711
|
-
EleRadio: __vue_component__$
|
|
3715
|
+
EleSelect: __vue_component__$r,
|
|
3716
|
+
EleInput: __vue_component__$s,
|
|
3717
|
+
EleTextarea: __vue_component__$j,
|
|
3718
|
+
EleUpload: __vue_component__$h,
|
|
3719
|
+
EleSelectEntity: __vue_component__$g,
|
|
3720
|
+
EleInputNumber: __vue_component__$f,
|
|
3721
|
+
EleCheckbox: __vue_component__$e,
|
|
3722
|
+
EleRadio: __vue_component__$d
|
|
3712
3723
|
},
|
|
3713
3724
|
props: {
|
|
3714
3725
|
formName: {
|
|
@@ -3807,10 +3818,10 @@ var script$a = {
|
|
|
3807
3818
|
};
|
|
3808
3819
|
|
|
3809
3820
|
/* script */
|
|
3810
|
-
const __vue_script__$
|
|
3821
|
+
const __vue_script__$c = script$c;
|
|
3811
3822
|
|
|
3812
3823
|
/* template */
|
|
3813
|
-
var __vue_render__$
|
|
3824
|
+
var __vue_render__$c = function () {
|
|
3814
3825
|
var _vm = this;
|
|
3815
3826
|
var _h = _vm.$createElement;
|
|
3816
3827
|
var _c = _vm._self._c || _h;
|
|
@@ -4109,34 +4120,34 @@ var __vue_render__$a = function () {
|
|
|
4109
4120
|
1
|
|
4110
4121
|
)
|
|
4111
4122
|
};
|
|
4112
|
-
var __vue_staticRenderFns__$
|
|
4113
|
-
__vue_render__$
|
|
4123
|
+
var __vue_staticRenderFns__$c = [];
|
|
4124
|
+
__vue_render__$c._withStripped = true;
|
|
4114
4125
|
|
|
4115
4126
|
/* style */
|
|
4116
|
-
const __vue_inject_styles__$
|
|
4127
|
+
const __vue_inject_styles__$c = function (inject) {
|
|
4117
4128
|
if (!inject) return
|
|
4118
|
-
inject("data-v-
|
|
4129
|
+
inject("data-v-5c2df4d3_0", { source: ".ele__form--wrapper[data-v-5c2df4d3] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/form/src/index.vue","index.vue"],"names":[],"mappings":"AA+MA;EACA,gBAAA;AC9MA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele__form--wrapper\">\n <a-form :form=\"form\" layout=\"vertical\" class=\"ant-advanced-search-form\">\n <a-row :gutter=\"24\">\n <a-col :span=\"ele.span\" v-for=\"ele in elements\" :key=\"ele.name\">\n <template v-if=\"ele.type == 'Input'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-input \n @change=\"onChange($event, ele)\" \n :disabled=\"executeExpression(ele._disabled)\" \n :max-length=\"ele.maxLength\" \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n style=\"width:100%;\">\n </ele-input>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Textarea'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-textarea \n @change=\"onChange($event, ele)\"\n :max-length=\"ele.maxLength\"\n :autosize=\"ele.autosize\"\n :disabled=\"executeExpression(ele._disabled)\"\n :allow-clear=\"ele.allowClear\"\n :placeholder=\"ele.placeholder\"\n v-decorator=\"[ele.name, { rules: ele.rules }]\"\n style=\"width:100%;\">\n </ele-textarea>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Select'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-select \n :data-source=\"ele.optionList\" \n :disabled=\"executeExpression(ele._disabled)\"\n :multiple=\"ele.multiple\"\n :mode=\"ele.mode\"\n :code=\"ele.code\" \n :params=\"ele.params\" \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n style=\"width:100%;\">\n </ele-select>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'ele-upload'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-upload v-decorator=\"[ele.name, { rules: ele.rules }]\" style=\"width:100%;\"></ele-upload>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'ele-date-range'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-date-range \n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n style=\"width:100%;\">\n </ele-date-range>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'SelectEntity'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-select-entity \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n style=\"width:100%;\">\n </ele-select-entity>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'InputNumber'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-input-number \n @change=\"onChange($event, ele)\" \n :precision=\"ele.precision\" \n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n v-bind=\"ele.props\" \n style=\"width:100%;\">\n </ele-input-number>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Checkbox'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-checkbox \n :data-source=\"ele.optionList\" \n :disabled=\"executeExpression(ele._disabled)\" \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n style=\"width:100%;\">\n </ele-checkbox>\n </a-form-item>\n </template>\n <template v-else-if=\"ele.type == 'Radio'\">\n <a-form-item :label=\"`${ele.label}:`\">\n <ele-radio \n @change=\"onChange($event, ele)\" \n :disabled=\"executeExpression(ele._disabled)\" \n :data-source=\"ele.optionList\" \n v-decorator=\"[ele.name, { rules: ele.rules }]\" \n style=\"width:100%;\">\n </ele-radio>\n </a-form-item>\n </template>\n </a-col>\n </a-row>\n </a-form>\n </div>\n</template>\n\n<script>\nimport EleSelect from '../../select/src/index.vue'\nimport EleInput from '../../input/src/index.vue'\nimport EleTextarea from '../../textarea/src/index.vue'\nimport EleUpload from '../../upload/src/index.vue'\nimport EleSelectEntity from '../../select-entity/src/index.vue'\nimport EleInputNumber from '../../input-number/src/index.vue'\nimport EleCheckbox from '../../checkbox/src/index.vue'\nimport EleRadio from '../../radio/src/index.vue'\nimport { parse } from '@idooel/expression'\nimport { type } from '@idooel/shared'\nexport default {\n name: 'ele-form',\n components: {\n EleSelect,\n EleInput,\n EleTextarea,\n EleUpload,\n EleSelectEntity,\n EleInputNumber,\n EleCheckbox,\n EleRadio\n },\n props: {\n formName: {\n type: [Number, String],\n default: 'coordinated'\n },\n elements: {\n type: Array,\n default: () => []\n }\n },\n data () {\n return {}\n },\n computed: {\n form () {\n return this.$form.createForm(this, { name: this.formName })\n },\n exposedMethods () {\n return {\n setFieldsValue: this.setFieldsValue,\n getFieldsValue: this.getFieldsValue\n }\n }\n },\n methods: {\n evalDisabledExpression () {\n this.elements.forEach(ele => {\n const { disabled } = ele\n const ret = this.executeExpression(disabled)\n this.$set(ele, '_disabled', ret)\n })\n },\n executeExpression (expression) {\n if (type.isBool(expression)) return expression\n if (type.isEmpty(expression)) return false\n return parse(expression, { ...this.getFieldsValue() })\n },\n onChange (value, props) {\n const { name } = props\n this.setFieldsValue({ [name]: value })\n this.evalDisabledExpression()\n this.$emit('change', { value, props, exposed: { ...this.exposedMethods } })\n },\n collectDefaultValues () {\n const ret = this.elements.reduce((ret, props) => {\n const { name, defaultValue } = props\n if (defaultValue) {\n ret[name] = defaultValue\n }\n return ret\n }, {})\n return ret\n },\n setDefaultValues () {\n const defaultValues = this.collectDefaultValues()\n this.setFieldsValue(defaultValues)\n },\n validateFields () {\n let ret = false\n this.form.validateFields((error, values) => {\n ret = !error\n })\n return ret\n },\n setFieldsValue (props = {}) {\n this.form.setFieldsValue(props)\n },\n getFieldsValue () {\n return this.form.getFieldsValue()\n }\n },\n mounted() {\n this.setDefaultValues()\n this.evalDisabledExpression()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele__form--wrapper {\n background: #fff;\n .ant-form-item {\n }\n}\n</style>",".ele__form--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4119
4130
|
|
|
4120
4131
|
};
|
|
4121
4132
|
/* scoped */
|
|
4122
|
-
const __vue_scope_id__$
|
|
4133
|
+
const __vue_scope_id__$c = "data-v-5c2df4d3";
|
|
4123
4134
|
/* module identifier */
|
|
4124
|
-
const __vue_module_identifier__$
|
|
4135
|
+
const __vue_module_identifier__$c = undefined;
|
|
4125
4136
|
/* functional template */
|
|
4126
|
-
const __vue_is_functional_template__$
|
|
4137
|
+
const __vue_is_functional_template__$c = false;
|
|
4127
4138
|
/* style inject SSR */
|
|
4128
4139
|
|
|
4129
4140
|
/* style inject shadow dom */
|
|
4130
4141
|
|
|
4131
4142
|
|
|
4132
4143
|
|
|
4133
|
-
const __vue_component__$
|
|
4134
|
-
{ render: __vue_render__$
|
|
4135
|
-
__vue_inject_styles__$
|
|
4136
|
-
__vue_script__$
|
|
4137
|
-
__vue_scope_id__$
|
|
4138
|
-
__vue_is_functional_template__$
|
|
4139
|
-
__vue_module_identifier__$
|
|
4144
|
+
const __vue_component__$c = /*#__PURE__*/normalizeComponent(
|
|
4145
|
+
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
|
|
4146
|
+
__vue_inject_styles__$c,
|
|
4147
|
+
__vue_script__$c,
|
|
4148
|
+
__vue_scope_id__$c,
|
|
4149
|
+
__vue_is_functional_template__$c,
|
|
4150
|
+
__vue_module_identifier__$c,
|
|
4140
4151
|
false,
|
|
4141
4152
|
createInjector,
|
|
4142
4153
|
undefined,
|
|
@@ -4164,11 +4175,11 @@ const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
|
|
|
4164
4175
|
};
|
|
4165
4176
|
|
|
4166
4177
|
//
|
|
4167
|
-
var script$
|
|
4178
|
+
var script$b = {
|
|
4168
4179
|
name: 'ele-form-group-model',
|
|
4169
4180
|
components: {
|
|
4170
|
-
[__vue_component__$
|
|
4171
|
-
[__vue_component__$
|
|
4181
|
+
[__vue_component__$c.name]: __vue_component__$c,
|
|
4182
|
+
[__vue_component__$l.name]: __vue_component__$l
|
|
4172
4183
|
},
|
|
4173
4184
|
props: {
|
|
4174
4185
|
mode: {
|
|
@@ -4442,10 +4453,10 @@ var script$9 = {
|
|
|
4442
4453
|
};
|
|
4443
4454
|
|
|
4444
4455
|
/* script */
|
|
4445
|
-
const __vue_script__$
|
|
4456
|
+
const __vue_script__$b = script$b;
|
|
4446
4457
|
|
|
4447
4458
|
/* template */
|
|
4448
|
-
var __vue_render__$
|
|
4459
|
+
var __vue_render__$b = function () {
|
|
4449
4460
|
var _vm = this;
|
|
4450
4461
|
var _h = _vm.$createElement;
|
|
4451
4462
|
var _c = _vm._self._c || _h;
|
|
@@ -4547,34 +4558,34 @@ var __vue_render__$9 = function () {
|
|
|
4547
4558
|
2
|
|
4548
4559
|
)
|
|
4549
4560
|
};
|
|
4550
|
-
var __vue_staticRenderFns__$
|
|
4551
|
-
__vue_render__$
|
|
4561
|
+
var __vue_staticRenderFns__$b = [];
|
|
4562
|
+
__vue_render__$b._withStripped = true;
|
|
4552
4563
|
|
|
4553
4564
|
/* style */
|
|
4554
|
-
const __vue_inject_styles__$
|
|
4565
|
+
const __vue_inject_styles__$b = function (inject) {
|
|
4555
4566
|
if (!inject) return
|
|
4556
|
-
inject("data-v-8651e654_0", { source: ".ele.form-group-model__wrapper[data-v-8651e654] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-8651e654] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-8651e654]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-8651e654] {\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-8651e654] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-8651e654] {\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:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\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 Form from '../../form/src/index.vue'\r\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap } from '../../utils'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { type, net } from '@idooel/shared'\r\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\r\nexport default {\r\n name: 'ele-form-group-model',\r\n components: {\r\n [Form.name]: Form,\r\n [EleButtonGroup.name]: EleButtonGroup\r\n },\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 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) 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.setFieldsValue(formGroupValues)\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 })\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 });
|
|
4567
|
+
inject("data-v-e56f039c_0", { source: ".ele.form-group-model__wrapper[data-v-e56f039c] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-e56f039c] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-e56f039c]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-e56f039c] {\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-e56f039c] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-e56f039c] {\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":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/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>\n <div class=\"ele form-group-model__wrapper\">\n <template v-for=\"(group, idx) in innerGroupMeta\">\n <div \n class=\"form-group-model__from\"\n v-if=\"!group.isGenTpl\"\n :key=\"group.key || idx\">\n <div class=\"form-group-model__form--title\">\n <div>{{ group.title }}</div>\n <div class=\"form-group-model__form--buttons\">\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>\n </div>\n </div>\n <div class=\"form-group-model__form--content\">\n <ele-form @change=\"onChangeFormStatus($event, group.key || idx)\" :form-name=\"group.key || idx\" :ref=\"group.key || `${formRefBase}__${idx}`\" :elements=\"group.elements\"></ele-form>\n </div>\n </div>\n </template>\n <div v-if=\"showFooterMeta\" class=\"form-group-model__form--footer\">\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\n </div>\n </div>\n</template>\n\n<script>\nimport Form from '../../form/src/index.vue'\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap } from '../../utils'\nimport { v4 as uuidv4 } from 'uuid'\nimport { type, net } from '@idooel/shared'\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\nexport default {\n name: 'ele-form-group-model',\n components: {\n [Form.name]: Form,\n [EleButtonGroup.name]: EleButtonGroup\n },\n props: {\n mode: {\n type: String\n },\n fieldName: {\n type: String,\n default: 'formGroup'\n },\n groupMeta: {\n type: Function,\n default: () => []\n },\n footerMeta: {\n type: Object,\n default: () => {}\n },\n preRequest: {\n type: Object,\n default: () => {}\n },\n infoRequest: {\n type: Object,\n default: () => {}\n },\n submitRequest: {\n type: Object,\n default: () => {}\n }\n },\n data () {\n return {\n increaseCount: 1,\n innerGroupMeta: []\n }\n },\n watch: {\n readOnlyGroupMeta: {\n handler (meta) {\n this.innerGroupMeta = meta\n },\n immediate: true\n }\n },\n computed: {\n readOnlyGroupMeta () {\n return this.groupMeta.call(this)\n },\n showFooterMeta () {\n return !type.isEmpty(this.footerMeta)\n },\n formRefBase () {\n return uuidv4()\n },\n footerElements () {\n const { elements } = this.footerMeta\n return elements.call(this)\n },\n assignAttrForEvents () {\n const events = this.footerElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL],\n [BUILT_IN_EVENT_NAMES.INCREASE]: this[BUILT_IN_EVENT_NAMES.INCREASE]\n }\n },\n getFormRefs () {\n return this.innerGroupMeta.map((group, idx) => {\n if (!group.isGenTpl) {\n return this.$refs[group.key || `${this.formRefBase}__${idx}`]\n }\n return void 0\n }).filter(item => !!item).flat()\n },\n formModels () {\n if (this.mode === 'increase') {\n //TODO increase mode to return formModels\n return this.getFormRefs.map(form => {\n return form.getFieldsValue()\n })\n } else {\n return this.getFormRefs.map(form => {\n const { $vnode: { data: { ref } } } = form\n return {\n key: ref,\n value: form.getFieldsValue()\n }\n }).reduce((ret, props) => {\n ret[props.key] = props.value\n return ret\n }, {})\n }\n }\n },\n methods: {\n execFieldMap (fieldMap = {}, dataSource = {}) {\n const ret = parseFieldMap(fieldMap, { _route: this.$route.query, ...dataSource})\n return ret\n },\n onChangeFormStatus (props, key) {\n this.$emit(RESERVE_EVENT_NAMES.WATCH_FORM_STATUS, { key, ...props })\n },\n async infoRequestTrigger () {\n if (!this.infoRequest) return\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\n if (!url) return\n net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\n const { data = {} } = resp\n if (this.mode === 'increase') {\n this.renderIncreaseForm(data)\n }\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n })\n },\n async preRequestTrigger () {\n if (!this.preRequest) return\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\n if (!url) return\n net[requestType.toLowerCase()](url, { ...params, ...fieldMap }, { ...headers }).then(resp => {\n const { data = {} } = resp\n if (this.mode === 'increase') {\n this.renderIncreaseForm(data)\n }\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n })\n },\n renderIncreaseForm (data = {}) {\n const formGroupValuesLength = data[this.fieldName].length\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\n const notGenTplPoolLength = this.readOnlyGroupMeta.filter(item => !item.isGenTpl).length\n const genNum = formGroupValuesLength - notGenTplPoolLength\n new Array(genNum).fill().forEach(() => {\n const form = this.genForm(genTplTarget)\n this.innerGroupMeta.push(form)\n })\n const formGroupValues = data[this.fieldName]\n this.setFieldsValue(formGroupValues)\n },\n async submitRequestTrigger (props = {}) {\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\n if (!url) return\n const ret = await net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels }), [this.fieldName]: this.formModels }, { headers }).then(resp => {\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\n return resp.data\n })\n return ret\n },\n setFieldsValue (data = []) {\n this.getFormRefs.forEach((form, idx) => {\n form.setFieldsValue(data[idx])\n })\n },\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\n const status = this.getFormRefs.map(form => {\n const status = form.validateFields()\n return status\n }).every(item => item)\n if (status) {\n return this.submitRequestTrigger(props)\n } else {\n return false\n }\n },\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\n },\n genForm (base) {\n const { elements, title, buttonGroupMeta } = base\n return {\n elements: JSON.parse(JSON.stringify(elements)),\n buttonGroupMeta,\n title: `${title}${this.increaseCount++}`,\n _gen: true\n }\n },\n handleClickDelete (props = {}, attr = {}, idx) {\n this.innerGroupMeta.splice(idx, 1)\n this.$emit(BUILT_IN_EVENT_NAMES.DELETE, { ...props })\n },\n [BUILT_IN_EVENT_NAMES.INCREASE] (props) {\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\n const form = this.genForm(genTplTarget)\n this.innerGroupMeta.push(form)\n }\n },\n async mounted() {\n await this.preRequestTrigger()\n await this.infoRequestTrigger()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele {\n &.form-group-model__wrapper {\n background: unset;\n padding-bottom: 80px;\n .form-group-model__from {\n background: #fff;\n margin-top: 16px;\n &:first-child {\n margin-top: unset;\n }\n .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 .form-group-model__form--content {\n padding: 16px;\n }\n }\n .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}\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 });
|
|
4557
4568
|
|
|
4558
4569
|
};
|
|
4559
4570
|
/* scoped */
|
|
4560
|
-
const __vue_scope_id__$
|
|
4571
|
+
const __vue_scope_id__$b = "data-v-e56f039c";
|
|
4561
4572
|
/* module identifier */
|
|
4562
|
-
const __vue_module_identifier__$
|
|
4573
|
+
const __vue_module_identifier__$b = undefined;
|
|
4563
4574
|
/* functional template */
|
|
4564
|
-
const __vue_is_functional_template__$
|
|
4575
|
+
const __vue_is_functional_template__$b = false;
|
|
4565
4576
|
/* style inject SSR */
|
|
4566
4577
|
|
|
4567
4578
|
/* style inject shadow dom */
|
|
4568
4579
|
|
|
4569
4580
|
|
|
4570
4581
|
|
|
4571
|
-
const __vue_component__$
|
|
4572
|
-
{ render: __vue_render__$
|
|
4573
|
-
__vue_inject_styles__$
|
|
4574
|
-
__vue_script__$
|
|
4575
|
-
__vue_scope_id__$
|
|
4576
|
-
__vue_is_functional_template__$
|
|
4577
|
-
__vue_module_identifier__$
|
|
4582
|
+
const __vue_component__$b = /*#__PURE__*/normalizeComponent(
|
|
4583
|
+
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
|
|
4584
|
+
__vue_inject_styles__$b,
|
|
4585
|
+
__vue_script__$b,
|
|
4586
|
+
__vue_scope_id__$b,
|
|
4587
|
+
__vue_is_functional_template__$b,
|
|
4588
|
+
__vue_module_identifier__$b,
|
|
4578
4589
|
false,
|
|
4579
4590
|
createInjector,
|
|
4580
4591
|
undefined,
|
|
@@ -4582,10 +4593,10 @@ __vue_render__$9._withStripped = true;
|
|
|
4582
4593
|
);
|
|
4583
4594
|
|
|
4584
4595
|
//
|
|
4585
|
-
var script$
|
|
4596
|
+
var script$a = {
|
|
4586
4597
|
name: 'ele-form-model',
|
|
4587
4598
|
components: {
|
|
4588
|
-
EleButtonGroup: __vue_component__$
|
|
4599
|
+
EleButtonGroup: __vue_component__$l
|
|
4589
4600
|
},
|
|
4590
4601
|
props: {
|
|
4591
4602
|
title: {
|
|
@@ -4767,10 +4778,10 @@ var script$8 = {
|
|
|
4767
4778
|
};
|
|
4768
4779
|
|
|
4769
4780
|
/* script */
|
|
4770
|
-
const __vue_script__$
|
|
4781
|
+
const __vue_script__$a = script$a;
|
|
4771
4782
|
|
|
4772
4783
|
/* template */
|
|
4773
|
-
var __vue_render__$
|
|
4784
|
+
var __vue_render__$a = function () {
|
|
4774
4785
|
var _vm = this;
|
|
4775
4786
|
var _h = _vm.$createElement;
|
|
4776
4787
|
var _c = _vm._self._c || _h;
|
|
@@ -4806,34 +4817,34 @@ var __vue_render__$8 = function () {
|
|
|
4806
4817
|
: _vm._e(),
|
|
4807
4818
|
])
|
|
4808
4819
|
};
|
|
4809
|
-
var __vue_staticRenderFns__$
|
|
4810
|
-
__vue_render__$
|
|
4820
|
+
var __vue_staticRenderFns__$a = [];
|
|
4821
|
+
__vue_render__$a._withStripped = true;
|
|
4811
4822
|
|
|
4812
4823
|
/* style */
|
|
4813
|
-
const __vue_inject_styles__$
|
|
4824
|
+
const __vue_inject_styles__$a = function (inject) {
|
|
4814
4825
|
if (!inject) return
|
|
4815
|
-
inject("data-v-
|
|
4826
|
+
inject("data-v-681ef9d8_0", { source: ".form__model--wrapper[data-v-681ef9d8] {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title[data-v-681ef9d8] {\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-681ef9d8] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-681ef9d8] {\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":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/form-model/src/index.vue","index.vue"],"names":[],"mappings":"AAyIA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,gBAAA;ACxIA;ADyIA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8DAAA;ACvIA;ADyIA;EACA,aAAA;ACvIA;ADyIA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACvIA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"form__model--wrapper\">\n <div class=\"form-model__title\" v-if=\"title\">\n {{ title }}\n </div>\n <div class=\"form-model__content\">\n <ele-form :ref=\"formRef\" :elements=\"elements\"></ele-form>\n </div>\n <div class=\"form-model__footer\" v-if=\"footerMeta\">\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\n </div>\n </div>\n</template>\n\n<script>\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\nimport { BUILT_IN_EVENT_NAMES, parseFieldMap, RESERVE_EVENT_NAMES } from '../../utils'\nimport { v4 as uuidv4 } from 'uuid'\nimport { net } from '@idooel/shared'\nexport default {\n name: 'ele-form-model',\n components: {\n EleButtonGroup\n },\n props: {\n title: {\n type: String\n },\n formMeta: {\n type: Object\n },\n footerMeta: {\n type: Object\n }\n },\n data() {\n return {}\n },\n computed: {\n formRef () {\n return uuidv4()\n },\n assignAttrForEvents () {\n const events = this.footerElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.$emit(ele.eventName || 'click', { ...e, formModel: this.formModels })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL]\n }\n },\n elements () {\n const { elements } = this.formMeta\n return elements\n },\n preRequest () {\n const { preRequest } = this.formMeta\n return preRequest\n },\n infoRequest () {\n const { infoRequest } = this.formMeta\n return infoRequest\n },\n submitRequest () {\n const { submitRequest } = this.formMeta\n return submitRequest\n },\n footerElements () {\n const { elements } = this.footerMeta\n return elements.call(this)\n },\n formModels () {\n return this.$refs[this.formRef].getFieldsValue()\n }\n },\n methods: {\n execFieldMap (fieldMap = {}, dataSource = {}) {\n const ret = parseFieldMap(fieldMap, { _route: this.$route.query, ...dataSource})\n return ret\n },\n async submitRequestTrigger (props = {}) {\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\n if (!url) return\n const ret = await net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels }), ...this.formModels }, { headers }).then(resp => {\n console.log(resp.data)\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\n return resp.data\n })\n return ret\n },\n async infoRequestTrigger () {\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\n if (!url) return\n net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\n const { data = {} } = resp\n this.setFieldsValue(data)\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n })\n },\n async preRequestTrigger () {\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\n if (!url) return\n const { data } = await net[requestType.toLowerCase()](url, { ...params, ...fieldMap }, { ...headers })\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\n },\n setFieldsValue (props) {\n this.$refs[this.formRef].setFieldsValue(props)\n },\n validateFields () {\n return this.$refs[this.formRef].validateFields()\n },\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\n const status = this.$refs[this.formRef].validateFields()\n if (status) {\n //TODO fieldMap\n return this.submitRequestTrigger(props)\n } else {\n return false\n }\n },\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\n }\n },\n async mounted() {\n await this.preRequestTrigger()\n await this.infoRequestTrigger()\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.form__model--wrapper {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n .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__content {\n padding: 16px;\n }\n .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</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 });
|
|
4816
4827
|
|
|
4817
4828
|
};
|
|
4818
4829
|
/* scoped */
|
|
4819
|
-
const __vue_scope_id__$
|
|
4830
|
+
const __vue_scope_id__$a = "data-v-681ef9d8";
|
|
4820
4831
|
/* module identifier */
|
|
4821
|
-
const __vue_module_identifier__$
|
|
4832
|
+
const __vue_module_identifier__$a = undefined;
|
|
4822
4833
|
/* functional template */
|
|
4823
|
-
const __vue_is_functional_template__$
|
|
4834
|
+
const __vue_is_functional_template__$a = false;
|
|
4824
4835
|
/* style inject SSR */
|
|
4825
4836
|
|
|
4826
4837
|
/* style inject shadow dom */
|
|
4827
4838
|
|
|
4828
4839
|
|
|
4829
4840
|
|
|
4830
|
-
const __vue_component__$
|
|
4831
|
-
{ render: __vue_render__$
|
|
4832
|
-
__vue_inject_styles__$
|
|
4833
|
-
__vue_script__$
|
|
4834
|
-
__vue_scope_id__$
|
|
4835
|
-
__vue_is_functional_template__$
|
|
4836
|
-
__vue_module_identifier__$
|
|
4841
|
+
const __vue_component__$a = /*#__PURE__*/normalizeComponent(
|
|
4842
|
+
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
|
|
4843
|
+
__vue_inject_styles__$a,
|
|
4844
|
+
__vue_script__$a,
|
|
4845
|
+
__vue_scope_id__$a,
|
|
4846
|
+
__vue_is_functional_template__$a,
|
|
4847
|
+
__vue_module_identifier__$a,
|
|
4837
4848
|
false,
|
|
4838
4849
|
createInjector,
|
|
4839
4850
|
undefined,
|
|
@@ -4841,10 +4852,10 @@ __vue_render__$8._withStripped = true;
|
|
|
4841
4852
|
);
|
|
4842
4853
|
|
|
4843
4854
|
//
|
|
4844
|
-
var script$
|
|
4855
|
+
var script$9 = {
|
|
4845
4856
|
name: 'ele-step-model',
|
|
4846
4857
|
components: {
|
|
4847
|
-
EleButtonGroup: __vue_component__$
|
|
4858
|
+
EleButtonGroup: __vue_component__$l
|
|
4848
4859
|
},
|
|
4849
4860
|
props: {
|
|
4850
4861
|
stepMeta: {
|
|
@@ -4859,22 +4870,27 @@ var script$7 = {
|
|
|
4859
4870
|
data() {
|
|
4860
4871
|
return {
|
|
4861
4872
|
current: 0,
|
|
4862
|
-
currentSlotComponentRef: null
|
|
4873
|
+
currentSlotComponentRef: null,
|
|
4874
|
+
innerFooterElements: []
|
|
4863
4875
|
};
|
|
4864
4876
|
},
|
|
4865
4877
|
computed: {
|
|
4878
|
+
expressionData() {
|
|
4879
|
+
return {
|
|
4880
|
+
current: this.current,
|
|
4881
|
+
_route: this.$route.query
|
|
4882
|
+
};
|
|
4883
|
+
},
|
|
4866
4884
|
currentSlotName() {
|
|
4867
4885
|
return this.scopedSlotsNames[this.current];
|
|
4868
4886
|
},
|
|
4869
4887
|
footerElements() {
|
|
4870
|
-
|
|
4871
|
-
elements
|
|
4872
|
-
} = this.footerMeta;
|
|
4873
|
-
return elements.call(this);
|
|
4888
|
+
return this.innerFooterElements;
|
|
4874
4889
|
},
|
|
4875
4890
|
assignAttrForEvents() {
|
|
4876
4891
|
const events = this.footerElements.reduce((ret, ele) => {
|
|
4877
4892
|
ret[ele.eventName] = e => {
|
|
4893
|
+
this.evalShowExpressionForFooterElements();
|
|
4878
4894
|
this.$emit(ele.eventName || 'click', {
|
|
4879
4895
|
...e,
|
|
4880
4896
|
exposed: this.exposedMethods
|
|
@@ -4931,7 +4947,23 @@ var script$7 = {
|
|
|
4931
4947
|
immediate: true
|
|
4932
4948
|
}
|
|
4933
4949
|
},
|
|
4950
|
+
created() {
|
|
4951
|
+
const {
|
|
4952
|
+
elements
|
|
4953
|
+
} = this.footerMeta;
|
|
4954
|
+
this.innerFooterElements = elements.call(this);
|
|
4955
|
+
this.evalShowExpressionForFooterElements();
|
|
4956
|
+
},
|
|
4934
4957
|
methods: {
|
|
4958
|
+
evalShowExpressionForFooterElements() {
|
|
4959
|
+
this.innerFooterElements = this.innerFooterElements.map(element => {
|
|
4960
|
+
const {
|
|
4961
|
+
show
|
|
4962
|
+
} = element;
|
|
4963
|
+
show && this.$set(element, '_show', parse(show, this.expressionData));
|
|
4964
|
+
return element;
|
|
4965
|
+
});
|
|
4966
|
+
},
|
|
4935
4967
|
getCurrentSlotComponentRef() {
|
|
4936
4968
|
const includeMetaCmp = this.$children.find(child => child.meta);
|
|
4937
4969
|
if (!includeMetaCmp) return null;
|
|
@@ -4943,14 +4975,17 @@ var script$7 = {
|
|
|
4943
4975
|
},
|
|
4944
4976
|
setCurrentStep(index) {
|
|
4945
4977
|
this.current = index;
|
|
4978
|
+
this.evalShowExpressionForFooterElements();
|
|
4946
4979
|
},
|
|
4947
4980
|
nextStep() {
|
|
4948
4981
|
if (this.current >= this.elements.length - 1) return;
|
|
4949
4982
|
this.current++;
|
|
4983
|
+
this.evalShowExpressionForFooterElements();
|
|
4950
4984
|
},
|
|
4951
4985
|
prevStep() {
|
|
4952
4986
|
if (this.current <= 0) return;
|
|
4953
4987
|
this.current--;
|
|
4988
|
+
this.evalShowExpressionForFooterElements();
|
|
4954
4989
|
},
|
|
4955
4990
|
[BUILT_IN_EVENT_NAMES.NEXT](props) {
|
|
4956
4991
|
this.$emit(BUILT_IN_EVENT_NAMES.NEXT, {
|
|
@@ -4972,10 +5007,10 @@ var script$7 = {
|
|
|
4972
5007
|
};
|
|
4973
5008
|
|
|
4974
5009
|
/* script */
|
|
4975
|
-
const __vue_script__$
|
|
5010
|
+
const __vue_script__$9 = script$9;
|
|
4976
5011
|
|
|
4977
5012
|
/* template */
|
|
4978
|
-
var __vue_render__$
|
|
5013
|
+
var __vue_render__$9 = function () {
|
|
4979
5014
|
var _vm = this;
|
|
4980
5015
|
var _h = _vm.$createElement;
|
|
4981
5016
|
var _c = _vm._self._c || _h;
|
|
@@ -5041,34 +5076,34 @@ var __vue_render__$7 = function () {
|
|
|
5041
5076
|
),
|
|
5042
5077
|
])
|
|
5043
5078
|
};
|
|
5044
|
-
var __vue_staticRenderFns__$
|
|
5045
|
-
__vue_render__$
|
|
5079
|
+
var __vue_staticRenderFns__$9 = [];
|
|
5080
|
+
__vue_render__$9._withStripped = true;
|
|
5046
5081
|
|
|
5047
5082
|
/* style */
|
|
5048
|
-
const __vue_inject_styles__$
|
|
5083
|
+
const __vue_inject_styles__$9 = function (inject) {
|
|
5049
5084
|
if (!inject) return
|
|
5050
|
-
inject("data-v-
|
|
5085
|
+
inject("data-v-f634c298_0", { source: ".ele-step-model__wrapper[data-v-f634c298] {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper[data-v-f634c298] {\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-f634c298] {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper[data-v-f634c298] {\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-f634c298] {\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":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/step-model/src/index.vue","index.vue"],"names":[],"mappings":"AA6JA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;AC5JA;AD6JA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,gBAAA;AC3JA;AD6JA;EACA,gBAAA;AC3JA;AD+JA;EACA,WAAA;EACA,WAAA;EACA,gBAAA;EACA,mBAAA;EACA,+CAAA;EACA,cAAA;AC7JA;AD+JA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC7JA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele-step-model__wrapper\">\n <div class=\"ele-step-model__step--wrapper\">\n <a-steps class=\"ele-steps\" :current=\"current\" size=\"small\">\n <a-step v-for=\"step in elements\" :title=\"step.title\" :key=\"step.key\" />\n </a-steps>\n </div>\n <div class=\"ele-step-model__content--wrapper\">\n <template v-for=\"name in scopedSlotsNames\">\n <div :key=\"name\" v-if=\"currentSlotName == name\" :class=\"['ele-step-model__slot', `ele-step-model__slot--${name}`]\">\n <slot :name=\"name\"></slot>\n </div>\n </template>\n </div>\n <div class=\"ele-step-model__footer--wrapper\">\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\n </div>\n </div>\n</template>\n\n<script>\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\nimport { BUILT_IN_EVENT_NAMES } from '../../utils'\nimport { parse } from '@idooel/expression'\nexport default {\n name: 'ele-step-model',\n components: {\n EleButtonGroup\n },\n props: {\n stepMeta: {\n type: Object,\n default: () => ({})\n },\n footerMeta: {\n type: Object,\n default: () => ({})\n }\n },\n data() {\n return {\n current: 0,\n currentSlotComponentRef: null,\n innerFooterElements: []\n }\n },\n computed: {\n expressionData () {\n return {\n current: this.current,\n _route: this.$route.query\n }\n },\n currentSlotName () {\n return this.scopedSlotsNames[this.current]\n },\n footerElements () {\n return this.innerFooterElements\n },\n assignAttrForEvents () {\n const events = this.footerElements.reduce((ret, ele) => {\n ret[ele.eventName] = (e) => {\n this.evalShowExpressionForFooterElements()\n this.$emit(ele.eventName || 'click', { ...e, exposed: this.exposedMethods })\n }\n return ret\n }, {})\n return {\n ...this.$listeners,\n ...events,\n [BUILT_IN_EVENT_NAMES.NEXT]: this[BUILT_IN_EVENT_NAMES.NEXT],\n [BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS]\n }\n },\n activeIndex () {\n const { activeIndex } = this.stepMeta\n return activeIndex\n },\n elements () {\n const { elements } = this.stepMeta\n return elements\n },\n scopedSlotsNames () {\n const slotNames = this.elements.map(item => item.key)\n return slotNames\n },\n exposedMethods () {\n return {\n slotRef: this.currentSlotComponentRef,\n setCurrentStep: this.setCurrentStep,\n next: this.nextStep,\n prev: this.prevStep,\n current: this.current\n }\n }\n },\n watch: {\n activeIndex: {\n handler (idx) {\n this.current = idx\n },\n immediate: true\n },\n current: {\n handler () {\n this.$nextTick(() => {\n this.currentSlotComponentRef = this.getCurrentSlotComponentRef()\n })\n },\n immediate: true\n }\n },\n created () {\n const { elements } = this.footerMeta\n this.innerFooterElements = elements.call(this)\n this.evalShowExpressionForFooterElements()\n },\n methods: {\n evalShowExpressionForFooterElements () {\n this.innerFooterElements = this.innerFooterElements.map(element => {\n const { show } = element\n show && this.$set(element, '_show', parse(show, this.expressionData))\n return element\n })\n },\n getCurrentSlotComponentRef () {\n const includeMetaCmp = this.$children.find(child => child.meta)\n if (!includeMetaCmp) return null\n const { $children: components } = includeMetaCmp\n const target = components.find(cmp => cmp.$options._componentTag === 'ele-tpl')\n return target.getModel ? target.getModel() : null\n },\n setCurrentStep (index) {\n this.current = index\n this.evalShowExpressionForFooterElements()\n },\n nextStep () {\n if (this.current >= this.elements.length - 1) return\n this.current ++\n this.evalShowExpressionForFooterElements()\n },\n prevStep () {\n if (this.current <= 0) return\n this.current --\n this.evalShowExpressionForFooterElements()\n },\n [BUILT_IN_EVENT_NAMES.NEXT] (props) {\n this.$emit(BUILT_IN_EVENT_NAMES.NEXT, { ...props, exposed: { ...this.exposedMethods } })\n },\n [BUILT_IN_EVENT_NAMES.PREVIOUS] (props) {\n this.$emit(BUILT_IN_EVENT_NAMES.PREVIOUS, { ...props, exposed: { ...this.exposedMethods } })\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele-step-model__wrapper {\n width: 100%;\n height: 100vh;\n position: relative;\n .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 .ele-steps {\n .ant-steps-item {\n text-align: left;\n }\n }\n }\n .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__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</style>import meta from '@/views/tree-table-page/meta'\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 });
|
|
5051
5086
|
|
|
5052
5087
|
};
|
|
5053
5088
|
/* scoped */
|
|
5054
|
-
const __vue_scope_id__$
|
|
5089
|
+
const __vue_scope_id__$9 = "data-v-f634c298";
|
|
5055
5090
|
/* module identifier */
|
|
5056
|
-
const __vue_module_identifier__$
|
|
5091
|
+
const __vue_module_identifier__$9 = undefined;
|
|
5057
5092
|
/* functional template */
|
|
5058
|
-
const __vue_is_functional_template__$
|
|
5093
|
+
const __vue_is_functional_template__$9 = false;
|
|
5059
5094
|
/* style inject SSR */
|
|
5060
5095
|
|
|
5061
5096
|
/* style inject shadow dom */
|
|
5062
5097
|
|
|
5063
5098
|
|
|
5064
5099
|
|
|
5065
|
-
const __vue_component__$
|
|
5066
|
-
{ render: __vue_render__$
|
|
5067
|
-
__vue_inject_styles__$
|
|
5068
|
-
__vue_script__$
|
|
5069
|
-
__vue_scope_id__$
|
|
5070
|
-
__vue_is_functional_template__$
|
|
5071
|
-
__vue_module_identifier__$
|
|
5100
|
+
const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
|
|
5101
|
+
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
|
|
5102
|
+
__vue_inject_styles__$9,
|
|
5103
|
+
__vue_script__$9,
|
|
5104
|
+
__vue_scope_id__$9,
|
|
5105
|
+
__vue_is_functional_template__$9,
|
|
5106
|
+
__vue_module_identifier__$9,
|
|
5072
5107
|
false,
|
|
5073
5108
|
createInjector,
|
|
5074
5109
|
undefined,
|
|
@@ -5076,7 +5111,7 @@ __vue_render__$7._withStripped = true;
|
|
|
5076
5111
|
);
|
|
5077
5112
|
|
|
5078
5113
|
//
|
|
5079
|
-
var script$
|
|
5114
|
+
var script$8 = {
|
|
5080
5115
|
name: 'ele-tpl',
|
|
5081
5116
|
props: {
|
|
5082
5117
|
modelName: {
|
|
@@ -5084,10 +5119,10 @@ var script$6 = {
|
|
|
5084
5119
|
}
|
|
5085
5120
|
},
|
|
5086
5121
|
components: {
|
|
5087
|
-
[__vue_component__$
|
|
5122
|
+
[__vue_component__$k.name]: __vue_component__$k,
|
|
5123
|
+
[__vue_component__$b.name]: __vue_component__$b,
|
|
5088
5124
|
[__vue_component__$9.name]: __vue_component__$9,
|
|
5089
|
-
[__vue_component__$
|
|
5090
|
-
[__vue_component__$8.name]: __vue_component__$8
|
|
5125
|
+
[__vue_component__$a.name]: __vue_component__$a
|
|
5091
5126
|
},
|
|
5092
5127
|
computed: {
|
|
5093
5128
|
modelNameValidator() {
|
|
@@ -5109,10 +5144,10 @@ var script$6 = {
|
|
|
5109
5144
|
};
|
|
5110
5145
|
|
|
5111
5146
|
/* script */
|
|
5112
|
-
const __vue_script__$
|
|
5147
|
+
const __vue_script__$8 = script$8;
|
|
5113
5148
|
|
|
5114
5149
|
/* template */
|
|
5115
|
-
var __vue_render__$
|
|
5150
|
+
var __vue_render__$8 = function () {
|
|
5116
5151
|
var _vm = this;
|
|
5117
5152
|
var _h = _vm.$createElement;
|
|
5118
5153
|
var _c = _vm._self._c || _h;
|
|
@@ -5150,43 +5185,43 @@ var __vue_render__$6 = function () {
|
|
|
5150
5185
|
domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
|
|
5151
5186
|
})
|
|
5152
5187
|
};
|
|
5153
|
-
var __vue_staticRenderFns__$
|
|
5154
|
-
__vue_render__$
|
|
5188
|
+
var __vue_staticRenderFns__$8 = [];
|
|
5189
|
+
__vue_render__$8._withStripped = true;
|
|
5155
5190
|
|
|
5156
5191
|
/* style */
|
|
5157
|
-
const __vue_inject_styles__$
|
|
5192
|
+
const __vue_inject_styles__$8 = function (inject) {
|
|
5158
5193
|
if (!inject) return
|
|
5159
|
-
inject("data-v-
|
|
5194
|
+
inject("data-v-46431deb_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-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\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/*# 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,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;;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-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\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/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5160
5195
|
|
|
5161
5196
|
};
|
|
5162
5197
|
/* scoped */
|
|
5163
|
-
const __vue_scope_id__$
|
|
5198
|
+
const __vue_scope_id__$8 = undefined;
|
|
5164
5199
|
/* module identifier */
|
|
5165
|
-
const __vue_module_identifier__$
|
|
5200
|
+
const __vue_module_identifier__$8 = undefined;
|
|
5166
5201
|
/* functional template */
|
|
5167
|
-
const __vue_is_functional_template__$
|
|
5202
|
+
const __vue_is_functional_template__$8 = false;
|
|
5168
5203
|
/* style inject SSR */
|
|
5169
5204
|
|
|
5170
5205
|
/* style inject shadow dom */
|
|
5171
5206
|
|
|
5172
5207
|
|
|
5173
5208
|
|
|
5174
|
-
const __vue_component__$
|
|
5175
|
-
{ render: __vue_render__$
|
|
5176
|
-
__vue_inject_styles__$
|
|
5177
|
-
__vue_script__$
|
|
5178
|
-
__vue_scope_id__$
|
|
5179
|
-
__vue_is_functional_template__$
|
|
5180
|
-
__vue_module_identifier__$
|
|
5209
|
+
const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
|
|
5210
|
+
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
|
|
5211
|
+
__vue_inject_styles__$8,
|
|
5212
|
+
__vue_script__$8,
|
|
5213
|
+
__vue_scope_id__$8,
|
|
5214
|
+
__vue_is_functional_template__$8,
|
|
5215
|
+
__vue_module_identifier__$8,
|
|
5181
5216
|
false,
|
|
5182
5217
|
createInjector,
|
|
5183
5218
|
undefined,
|
|
5184
5219
|
undefined
|
|
5185
5220
|
);
|
|
5186
5221
|
|
|
5187
|
-
__vue_component__$
|
|
5222
|
+
__vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
|
|
5188
5223
|
|
|
5189
|
-
__vue_component__$
|
|
5224
|
+
__vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
|
|
5190
5225
|
|
|
5191
5226
|
//
|
|
5192
5227
|
//
|
|
@@ -5200,7 +5235,7 @@ __vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __v
|
|
|
5200
5235
|
//
|
|
5201
5236
|
//
|
|
5202
5237
|
|
|
5203
|
-
var script$
|
|
5238
|
+
var script$7 = {
|
|
5204
5239
|
name: 'ele-alert',
|
|
5205
5240
|
props: {
|
|
5206
5241
|
type: {
|
|
@@ -5229,10 +5264,10 @@ var script$5 = {
|
|
|
5229
5264
|
};
|
|
5230
5265
|
|
|
5231
5266
|
/* script */
|
|
5232
|
-
const __vue_script__$
|
|
5267
|
+
const __vue_script__$7 = script$7;
|
|
5233
5268
|
|
|
5234
5269
|
/* template */
|
|
5235
|
-
var __vue_render__$
|
|
5270
|
+
var __vue_render__$7 = function () {
|
|
5236
5271
|
var _vm = this;
|
|
5237
5272
|
var _h = _vm.$createElement;
|
|
5238
5273
|
var _c = _vm._self._c || _h;
|
|
@@ -5248,49 +5283,49 @@ var __vue_render__$5 = function () {
|
|
|
5248
5283
|
},
|
|
5249
5284
|
})
|
|
5250
5285
|
};
|
|
5251
|
-
var __vue_staticRenderFns__$
|
|
5252
|
-
__vue_render__$
|
|
5286
|
+
var __vue_staticRenderFns__$7 = [];
|
|
5287
|
+
__vue_render__$7._withStripped = true;
|
|
5253
5288
|
|
|
5254
5289
|
/* style */
|
|
5255
|
-
const __vue_inject_styles__$
|
|
5290
|
+
const __vue_inject_styles__$7 = function (inject) {
|
|
5256
5291
|
if (!inject) return
|
|
5257
|
-
inject("data-v-
|
|
5292
|
+
inject("data-v-ee7d6de4_0", { source: ".ele-alert[data-v-ee7d6de4] {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/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>\n <a-alert\n class=\"ele-alert\"\n :message=\"message\" \n :description=\"description\" \n :type=\"type\"\n :closable=\"closable\"\n :closeText=\"closeText\"\n :show-icon=\"showIcon\" />\n</template>\n\n<script>\nexport default {\n name: 'ele-alert',\n props: {\n type: {\n type: String,\n default: 'success'\n },\n showIcon: {\n type: Boolean,\n default: true\n },\n message: {\n type: String,\n default: 'Success Tips'\n },\n description: {\n type: String\n },\n closable: {\n type: Boolean,\n default: true\n },\n closeText: {\n type: String\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.ele-alert {\n text-align: left !important;\n}\n</style>",".ele-alert {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5258
5293
|
|
|
5259
5294
|
};
|
|
5260
5295
|
/* scoped */
|
|
5261
|
-
const __vue_scope_id__$
|
|
5296
|
+
const __vue_scope_id__$7 = "data-v-ee7d6de4";
|
|
5262
5297
|
/* module identifier */
|
|
5263
|
-
const __vue_module_identifier__$
|
|
5298
|
+
const __vue_module_identifier__$7 = undefined;
|
|
5264
5299
|
/* functional template */
|
|
5265
|
-
const __vue_is_functional_template__$
|
|
5300
|
+
const __vue_is_functional_template__$7 = false;
|
|
5266
5301
|
/* style inject SSR */
|
|
5267
5302
|
|
|
5268
5303
|
/* style inject shadow dom */
|
|
5269
5304
|
|
|
5270
5305
|
|
|
5271
5306
|
|
|
5272
|
-
const __vue_component__$
|
|
5273
|
-
{ render: __vue_render__$
|
|
5274
|
-
__vue_inject_styles__$
|
|
5275
|
-
__vue_script__$
|
|
5276
|
-
__vue_scope_id__$
|
|
5277
|
-
__vue_is_functional_template__$
|
|
5278
|
-
__vue_module_identifier__$
|
|
5307
|
+
const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
|
|
5308
|
+
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
|
|
5309
|
+
__vue_inject_styles__$7,
|
|
5310
|
+
__vue_script__$7,
|
|
5311
|
+
__vue_scope_id__$7,
|
|
5312
|
+
__vue_is_functional_template__$7,
|
|
5313
|
+
__vue_module_identifier__$7,
|
|
5279
5314
|
false,
|
|
5280
5315
|
createInjector,
|
|
5281
5316
|
undefined,
|
|
5282
5317
|
undefined
|
|
5283
5318
|
);
|
|
5284
5319
|
|
|
5285
|
-
__vue_component__$
|
|
5286
|
-
|
|
5287
|
-
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
5320
|
+
__vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
|
|
5288
5321
|
|
|
5289
|
-
__vue_component__$
|
|
5322
|
+
__vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
|
|
5290
5323
|
|
|
5291
5324
|
__vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
|
|
5292
5325
|
|
|
5293
|
-
__vue_component__$
|
|
5326
|
+
__vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
|
|
5327
|
+
|
|
5328
|
+
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
5294
5329
|
|
|
5295
5330
|
//
|
|
5296
5331
|
//
|
|
@@ -5324,7 +5359,7 @@ __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __v
|
|
|
5324
5359
|
//
|
|
5325
5360
|
//
|
|
5326
5361
|
|
|
5327
|
-
var script$
|
|
5362
|
+
var script$6 = {
|
|
5328
5363
|
name: 'ele-modal',
|
|
5329
5364
|
props: {
|
|
5330
5365
|
value: {
|
|
@@ -5376,6 +5411,11 @@ var script$4 = {
|
|
|
5376
5411
|
buttonGroupMeta: {
|
|
5377
5412
|
type: Object,
|
|
5378
5413
|
default: () => ({})
|
|
5414
|
+
},
|
|
5415
|
+
// 是否展示组件默认底部按钮
|
|
5416
|
+
showDefaultFooter: {
|
|
5417
|
+
type: Boolean,
|
|
5418
|
+
default: false
|
|
5379
5419
|
}
|
|
5380
5420
|
},
|
|
5381
5421
|
watch: {
|
|
@@ -5435,10 +5475,10 @@ var script$4 = {
|
|
|
5435
5475
|
};
|
|
5436
5476
|
|
|
5437
5477
|
/* script */
|
|
5438
|
-
const __vue_script__$
|
|
5478
|
+
const __vue_script__$6 = script$6;
|
|
5439
5479
|
|
|
5440
5480
|
/* template */
|
|
5441
|
-
var __vue_render__$
|
|
5481
|
+
var __vue_render__$6 = function () {
|
|
5442
5482
|
var _vm = this;
|
|
5443
5483
|
var _h = _vm.$createElement;
|
|
5444
5484
|
var _c = _vm._self._c || _h;
|
|
@@ -5469,41 +5509,43 @@ var __vue_render__$4 = function () {
|
|
|
5469
5509
|
[
|
|
5470
5510
|
_vm._t("default"),
|
|
5471
5511
|
_vm._v(" "),
|
|
5472
|
-
|
|
5473
|
-
_c(
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5512
|
+
!_vm.showDefaultFooter
|
|
5513
|
+
? _c("template", { slot: "footer" }, [
|
|
5514
|
+
_c(
|
|
5515
|
+
"div",
|
|
5516
|
+
{ staticClass: "ele-modal__footer" },
|
|
5517
|
+
_vm._l(_vm.buttonGroupMeta.elements, function (btn) {
|
|
5518
|
+
return _c(
|
|
5519
|
+
"ele-button",
|
|
5520
|
+
_vm._g(
|
|
5521
|
+
{
|
|
5522
|
+
key: btn.key,
|
|
5523
|
+
attrs: { type: btn.type, "event-name": btn.eventName },
|
|
5524
|
+
},
|
|
5525
|
+
_vm.$listeners
|
|
5526
|
+
),
|
|
5527
|
+
[_vm._v("\n " + _vm._s(btn.label) + "\n ")]
|
|
5528
|
+
)
|
|
5529
|
+
}),
|
|
5530
|
+
1
|
|
5531
|
+
),
|
|
5532
|
+
])
|
|
5533
|
+
: _vm._e(),
|
|
5534
|
+
],
|
|
5535
|
+
2
|
|
5536
|
+
)
|
|
5537
|
+
};
|
|
5538
|
+
var __vue_staticRenderFns__$6 = [];
|
|
5539
|
+
__vue_render__$6._withStripped = true;
|
|
5498
5540
|
|
|
5499
5541
|
/* style */
|
|
5500
|
-
const __vue_inject_styles__$
|
|
5542
|
+
const __vue_inject_styles__$6 = undefined;
|
|
5501
5543
|
/* scoped */
|
|
5502
|
-
const __vue_scope_id__$
|
|
5544
|
+
const __vue_scope_id__$6 = undefined;
|
|
5503
5545
|
/* module identifier */
|
|
5504
|
-
const __vue_module_identifier__$
|
|
5546
|
+
const __vue_module_identifier__$6 = undefined;
|
|
5505
5547
|
/* functional template */
|
|
5506
|
-
const __vue_is_functional_template__$
|
|
5548
|
+
const __vue_is_functional_template__$6 = false;
|
|
5507
5549
|
/* style inject */
|
|
5508
5550
|
|
|
5509
5551
|
/* style inject SSR */
|
|
@@ -5512,30 +5554,30 @@ __vue_render__$4._withStripped = true;
|
|
|
5512
5554
|
|
|
5513
5555
|
|
|
5514
5556
|
|
|
5515
|
-
const __vue_component__$
|
|
5516
|
-
{ render: __vue_render__$
|
|
5517
|
-
__vue_inject_styles__$
|
|
5518
|
-
__vue_script__$
|
|
5519
|
-
__vue_scope_id__$
|
|
5520
|
-
__vue_is_functional_template__$
|
|
5521
|
-
__vue_module_identifier__$
|
|
5557
|
+
const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
|
|
5558
|
+
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
|
|
5559
|
+
__vue_inject_styles__$6,
|
|
5560
|
+
__vue_script__$6,
|
|
5561
|
+
__vue_scope_id__$6,
|
|
5562
|
+
__vue_is_functional_template__$6,
|
|
5563
|
+
__vue_module_identifier__$6,
|
|
5522
5564
|
false,
|
|
5523
5565
|
undefined,
|
|
5524
5566
|
undefined,
|
|
5525
5567
|
undefined
|
|
5526
5568
|
);
|
|
5527
5569
|
|
|
5528
|
-
__vue_component__$
|
|
5570
|
+
__vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
|
|
5529
5571
|
|
|
5530
|
-
__vue_component__$
|
|
5572
|
+
__vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
|
|
5531
5573
|
|
|
5532
|
-
__vue_component__$
|
|
5574
|
+
__vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
|
|
5533
5575
|
|
|
5534
5576
|
//
|
|
5535
|
-
var script$
|
|
5577
|
+
var script$5 = {
|
|
5536
5578
|
name: 'ele-batch-export',
|
|
5537
5579
|
components: {
|
|
5538
|
-
EleIcon: __vue_component__$
|
|
5580
|
+
EleIcon: __vue_component__$i
|
|
5539
5581
|
},
|
|
5540
5582
|
props: {
|
|
5541
5583
|
value: {
|
|
@@ -5579,10 +5621,10 @@ var script$3 = {
|
|
|
5579
5621
|
};
|
|
5580
5622
|
|
|
5581
5623
|
/* script */
|
|
5582
|
-
const __vue_script__$
|
|
5624
|
+
const __vue_script__$5 = script$5;
|
|
5583
5625
|
|
|
5584
5626
|
/* template */
|
|
5585
|
-
var __vue_render__$
|
|
5627
|
+
var __vue_render__$5 = function () {
|
|
5586
5628
|
var _vm = this;
|
|
5587
5629
|
var _h = _vm.$createElement;
|
|
5588
5630
|
var _c = _vm._self._c || _h;
|
|
@@ -5641,41 +5683,42 @@ var __vue_render__$3 = function () {
|
|
|
5641
5683
|
]
|
|
5642
5684
|
)
|
|
5643
5685
|
};
|
|
5644
|
-
var __vue_staticRenderFns__$
|
|
5645
|
-
__vue_render__$
|
|
5686
|
+
var __vue_staticRenderFns__$5 = [];
|
|
5687
|
+
__vue_render__$5._withStripped = true;
|
|
5646
5688
|
|
|
5647
5689
|
/* style */
|
|
5648
|
-
const __vue_inject_styles__$
|
|
5690
|
+
const __vue_inject_styles__$5 = function (inject) {
|
|
5649
5691
|
if (!inject) return
|
|
5650
|
-
inject("data-v-
|
|
5692
|
+
inject("data-v-cb24907c_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-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\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/*# 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,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;;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-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\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/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
|
|
5693
|
+
,inject("data-v-cb24907c_1", { source: ".ele-batch-export__content[data-v-cb24907c] {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container[data-v-cb24907c] {\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-cb24907c] {\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-cb24907c] {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn[data-v-cb24907c] {\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-cb24907c] {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message[data-v-cb24907c] {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/batch-export/src/index.vue","index.vue"],"names":[],"mappings":"AA2EA;EACA,aAAA;AC1EA;AD2EA;EACA,iBAAA;EACA,oBAAA;EACA,YAAA;EACA,mCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,eAAA;ACzEA;AD0EA;EACA,eAAA;EACA,4BAAA;ACxEA;AD0EA;EACA,iBAAA;ACxEA;ADyEA;EACA,4BAAA;EACA,eAAA;EACA,eAAA;ACvEA;ADyEA;EACA,4BAAA;EACA,eAAA;ACvEA;AD2EA;EACA,4BAAA;EACA,eAAA;ACzEA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <ele-modal \n v-model=\"innerValue\" \n v-on=\"$listeners\"\n :buttonGroupMeta=\"buttonGroupMeta\" \n title=\"批量导出\">\n <div class=\"ele-batch-export__content\">\n <div class=\"ele-batch-export__container\">\n <ele-icon class=\"ele-batch-export__icon\" type=\"download\"></ele-icon>\n <div class=\"ele-batch-export__handle\">\n <div class=\"ele-batch-export__btn\" @click=\"handleClick\">导出任务处理中..... 请点击此按钮跳转到“批处理管理”菜单查看任务进度</div>\n <div class=\"ele-batch-export__btn--hint\">批处理任务的准备工作会在后台运行</div>\n </div>\n </div>\n <div class=\"ele-batch-export__message\">\n 您可以请点击上方按钮查看任务进度或关闭弹框\n </div>\n </div>\n </ele-modal>\n</template>\n\n<script>\nimport EleIcon from '../../icon/src/index.vue'\nexport default {\n name: 'ele-batch-export',\n components: {\n EleIcon\n },\n props: {\n value: {\n type: Boolean,\n default: false\n },\n buttonGroupMeta: {\n type: Object,\n default: () => {\n return {\n elements: [\n {\n label: '关闭',\n key: 'close',\n type: 'primary',\n eventName: 'handleClose'\n }\n ]\n }\n }\n }\n },\n data() {\n return {\n innerValue: false\n }\n },\n watch: {\n value: {\n handler (value) {\n this.$nextTick(() => {\n this.innerValue = value\n })\n },\n immediate: true\n }\n },\n methods: {\n handleClick () {\n this.$emit('on-batch-export')\n }\n }\n}\n</script>\n<style lang=\"scss\">\n@import '../../theme/index.scss';\n</style>\n<style lang=\"scss\" scoped>\n.ele-batch-export__content {\n height: 106px;\n .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 .ele-batch-export__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n }\n .ele-batch-export__handle {\n margin-left: 16px;\n .ele-batch-export__btn {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n }\n .ele-batch-export__btn--hint {\n color: var(--idooel-link-03);\n font-size: 14px;\n }\n }\n }\n .ele-batch-export__message {\n color: var(--idooel-link-06);\n font-size: 14px;\n }\n}\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 });
|
|
5651
5694
|
|
|
5652
5695
|
};
|
|
5653
5696
|
/* scoped */
|
|
5654
|
-
const __vue_scope_id__$
|
|
5697
|
+
const __vue_scope_id__$5 = "data-v-cb24907c";
|
|
5655
5698
|
/* module identifier */
|
|
5656
|
-
const __vue_module_identifier__$
|
|
5699
|
+
const __vue_module_identifier__$5 = undefined;
|
|
5657
5700
|
/* functional template */
|
|
5658
|
-
const __vue_is_functional_template__$
|
|
5701
|
+
const __vue_is_functional_template__$5 = false;
|
|
5659
5702
|
/* style inject SSR */
|
|
5660
5703
|
|
|
5661
5704
|
/* style inject shadow dom */
|
|
5662
5705
|
|
|
5663
5706
|
|
|
5664
5707
|
|
|
5665
|
-
const __vue_component__$
|
|
5666
|
-
{ render: __vue_render__$
|
|
5667
|
-
__vue_inject_styles__$
|
|
5668
|
-
__vue_script__$
|
|
5669
|
-
__vue_scope_id__$
|
|
5670
|
-
__vue_is_functional_template__$
|
|
5671
|
-
__vue_module_identifier__$
|
|
5708
|
+
const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
|
|
5709
|
+
{ render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
|
|
5710
|
+
__vue_inject_styles__$5,
|
|
5711
|
+
__vue_script__$5,
|
|
5712
|
+
__vue_scope_id__$5,
|
|
5713
|
+
__vue_is_functional_template__$5,
|
|
5714
|
+
__vue_module_identifier__$5,
|
|
5672
5715
|
false,
|
|
5673
5716
|
createInjector,
|
|
5674
5717
|
undefined,
|
|
5675
5718
|
undefined
|
|
5676
5719
|
);
|
|
5677
5720
|
|
|
5678
|
-
__vue_component__$
|
|
5721
|
+
__vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
|
|
5679
5722
|
|
|
5680
5723
|
//
|
|
5681
5724
|
//
|
|
@@ -5689,7 +5732,7 @@ __vue_component__$3.install = Vue => Vue.component(__vue_component__$3.name, __v
|
|
|
5689
5732
|
//
|
|
5690
5733
|
//
|
|
5691
5734
|
|
|
5692
|
-
var script$
|
|
5735
|
+
var script$4 = {
|
|
5693
5736
|
name: 'ele-date-range',
|
|
5694
5737
|
model: {
|
|
5695
5738
|
prop: 'value',
|
|
@@ -5720,10 +5763,10 @@ var script$2 = {
|
|
|
5720
5763
|
};
|
|
5721
5764
|
|
|
5722
5765
|
/* script */
|
|
5723
|
-
const __vue_script__$
|
|
5766
|
+
const __vue_script__$4 = script$4;
|
|
5724
5767
|
|
|
5725
5768
|
/* template */
|
|
5726
|
-
var __vue_render__$
|
|
5769
|
+
var __vue_render__$4 = function () {
|
|
5727
5770
|
var _vm = this;
|
|
5728
5771
|
var _h = _vm.$createElement;
|
|
5729
5772
|
var _c = _vm._self._c || _h;
|
|
@@ -5738,52 +5781,52 @@ var __vue_render__$2 = function () {
|
|
|
5738
5781
|
on: { change: _vm.onChange },
|
|
5739
5782
|
})
|
|
5740
5783
|
};
|
|
5741
|
-
var __vue_staticRenderFns__$
|
|
5742
|
-
__vue_render__$
|
|
5784
|
+
var __vue_staticRenderFns__$4 = [];
|
|
5785
|
+
__vue_render__$4._withStripped = true;
|
|
5743
5786
|
|
|
5744
5787
|
/* style */
|
|
5745
|
-
const __vue_inject_styles__$
|
|
5788
|
+
const __vue_inject_styles__$4 = function (inject) {
|
|
5746
5789
|
if (!inject) return
|
|
5747
|
-
inject("data-v-
|
|
5790
|
+
inject("data-v-eee16c3c_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
5748
5791
|
|
|
5749
5792
|
};
|
|
5750
5793
|
/* scoped */
|
|
5751
|
-
const __vue_scope_id__$
|
|
5794
|
+
const __vue_scope_id__$4 = "data-v-eee16c3c";
|
|
5752
5795
|
/* module identifier */
|
|
5753
|
-
const __vue_module_identifier__$
|
|
5796
|
+
const __vue_module_identifier__$4 = undefined;
|
|
5754
5797
|
/* functional template */
|
|
5755
|
-
const __vue_is_functional_template__$
|
|
5798
|
+
const __vue_is_functional_template__$4 = false;
|
|
5756
5799
|
/* style inject SSR */
|
|
5757
5800
|
|
|
5758
5801
|
/* style inject shadow dom */
|
|
5759
5802
|
|
|
5760
5803
|
|
|
5761
5804
|
|
|
5762
|
-
const __vue_component__$
|
|
5763
|
-
{ render: __vue_render__$
|
|
5764
|
-
__vue_inject_styles__$
|
|
5765
|
-
__vue_script__$
|
|
5766
|
-
__vue_scope_id__$
|
|
5767
|
-
__vue_is_functional_template__$
|
|
5768
|
-
__vue_module_identifier__$
|
|
5805
|
+
const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
|
|
5806
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
5807
|
+
__vue_inject_styles__$4,
|
|
5808
|
+
__vue_script__$4,
|
|
5809
|
+
__vue_scope_id__$4,
|
|
5810
|
+
__vue_is_functional_template__$4,
|
|
5811
|
+
__vue_module_identifier__$4,
|
|
5769
5812
|
false,
|
|
5770
5813
|
createInjector,
|
|
5771
5814
|
undefined,
|
|
5772
5815
|
undefined
|
|
5773
5816
|
);
|
|
5774
5817
|
|
|
5775
|
-
__vue_component__$
|
|
5818
|
+
__vue_component__$4.install = Vue => Vue.component(__vue_component__$4.name, __vue_component__$4);
|
|
5776
5819
|
|
|
5777
|
-
__vue_component__$
|
|
5820
|
+
__vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
|
|
5778
5821
|
|
|
5779
|
-
__vue_component__$
|
|
5822
|
+
__vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
|
|
5780
5823
|
|
|
5781
5824
|
//
|
|
5782
5825
|
//
|
|
5783
5826
|
//
|
|
5784
5827
|
//
|
|
5785
5828
|
|
|
5786
|
-
var script$
|
|
5829
|
+
var script$3 = {
|
|
5787
5830
|
name: 'ele-modal-import',
|
|
5788
5831
|
model: {
|
|
5789
5832
|
prop: 'value',
|
|
@@ -5803,10 +5846,10 @@ var script$1 = {
|
|
|
5803
5846
|
};
|
|
5804
5847
|
|
|
5805
5848
|
/* script */
|
|
5806
|
-
const __vue_script__$
|
|
5849
|
+
const __vue_script__$3 = script$3;
|
|
5807
5850
|
|
|
5808
5851
|
/* template */
|
|
5809
|
-
var __vue_render__$
|
|
5852
|
+
var __vue_render__$3 = function () {
|
|
5810
5853
|
var _vm = this;
|
|
5811
5854
|
var _h = _vm.$createElement;
|
|
5812
5855
|
var _c = _vm._self._c || _h;
|
|
@@ -5820,49 +5863,49 @@ var __vue_render__$1 = function () {
|
|
|
5820
5863
|
},
|
|
5821
5864
|
})
|
|
5822
5865
|
};
|
|
5823
|
-
var __vue_staticRenderFns__$
|
|
5824
|
-
__vue_render__$
|
|
5866
|
+
var __vue_staticRenderFns__$3 = [];
|
|
5867
|
+
__vue_render__$3._withStripped = true;
|
|
5825
5868
|
|
|
5826
5869
|
/* style */
|
|
5827
|
-
const __vue_inject_styles__$
|
|
5870
|
+
const __vue_inject_styles__$3 = function (inject) {
|
|
5828
5871
|
if (!inject) return
|
|
5829
|
-
inject("data-v-
|
|
5872
|
+
inject("data-v-fb6f0796_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", map: {"version":3,"sources":[],"names":[],"mappings":"","file":"index.vue"}, media: undefined });
|
|
5830
5873
|
|
|
5831
5874
|
};
|
|
5832
5875
|
/* scoped */
|
|
5833
|
-
const __vue_scope_id__$
|
|
5876
|
+
const __vue_scope_id__$3 = "data-v-fb6f0796";
|
|
5834
5877
|
/* module identifier */
|
|
5835
|
-
const __vue_module_identifier__$
|
|
5878
|
+
const __vue_module_identifier__$3 = undefined;
|
|
5836
5879
|
/* functional template */
|
|
5837
|
-
const __vue_is_functional_template__$
|
|
5880
|
+
const __vue_is_functional_template__$3 = false;
|
|
5838
5881
|
/* style inject SSR */
|
|
5839
5882
|
|
|
5840
5883
|
/* style inject shadow dom */
|
|
5841
5884
|
|
|
5842
5885
|
|
|
5843
5886
|
|
|
5844
|
-
const __vue_component__$
|
|
5845
|
-
{ render: __vue_render__$
|
|
5846
|
-
__vue_inject_styles__$
|
|
5847
|
-
__vue_script__$
|
|
5848
|
-
__vue_scope_id__$
|
|
5849
|
-
__vue_is_functional_template__$
|
|
5850
|
-
__vue_module_identifier__$
|
|
5887
|
+
const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
|
|
5888
|
+
{ render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
|
|
5889
|
+
__vue_inject_styles__$3,
|
|
5890
|
+
__vue_script__$3,
|
|
5891
|
+
__vue_scope_id__$3,
|
|
5892
|
+
__vue_is_functional_template__$3,
|
|
5893
|
+
__vue_module_identifier__$3,
|
|
5851
5894
|
false,
|
|
5852
5895
|
createInjector,
|
|
5853
5896
|
undefined,
|
|
5854
5897
|
undefined
|
|
5855
5898
|
);
|
|
5856
5899
|
|
|
5857
|
-
__vue_component__$
|
|
5900
|
+
__vue_component__$3.install = Vue => Vue.component(__vue_component__$3.name, __vue_component__$3);
|
|
5858
5901
|
|
|
5859
|
-
__vue_component__$
|
|
5902
|
+
__vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
|
|
5860
5903
|
|
|
5861
|
-
__vue_component__$
|
|
5904
|
+
__vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __vue_component__$a);
|
|
5862
5905
|
|
|
5863
|
-
__vue_component__$
|
|
5906
|
+
__vue_component__$b.install = Vue => Vue.component(__vue_component__$b.name, __vue_component__$b);
|
|
5864
5907
|
|
|
5865
|
-
__vue_component__$
|
|
5908
|
+
__vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __vue_component__$9);
|
|
5866
5909
|
|
|
5867
5910
|
//
|
|
5868
5911
|
//
|
|
@@ -5879,9 +5922,13 @@ __vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __v
|
|
|
5879
5922
|
//
|
|
5880
5923
|
//
|
|
5881
5924
|
|
|
5882
|
-
var script = {
|
|
5925
|
+
var script$2 = {
|
|
5883
5926
|
name: 'ele-tabs',
|
|
5884
5927
|
components: {},
|
|
5928
|
+
model: {
|
|
5929
|
+
prop: 'value',
|
|
5930
|
+
event: 'change'
|
|
5931
|
+
},
|
|
5885
5932
|
props: {
|
|
5886
5933
|
activeKey: {
|
|
5887
5934
|
type: Number,
|
|
@@ -5911,10 +5958,10 @@ var script = {
|
|
|
5911
5958
|
};
|
|
5912
5959
|
|
|
5913
5960
|
/* script */
|
|
5914
|
-
const __vue_script__ = script;
|
|
5961
|
+
const __vue_script__$2 = script$2;
|
|
5915
5962
|
|
|
5916
5963
|
/* template */
|
|
5917
|
-
var __vue_render__ = function () {
|
|
5964
|
+
var __vue_render__$2 = function () {
|
|
5918
5965
|
var _vm = this;
|
|
5919
5966
|
var _h = _vm.$createElement;
|
|
5920
5967
|
var _c = _vm._self._c || _h;
|
|
@@ -5924,7 +5971,6 @@ var __vue_render__ = function () {
|
|
|
5924
5971
|
_c(
|
|
5925
5972
|
"a-tabs",
|
|
5926
5973
|
{
|
|
5927
|
-
staticClass: "tabclass",
|
|
5928
5974
|
attrs: {
|
|
5929
5975
|
"default-active-key": _vm.activeKey,
|
|
5930
5976
|
tabBarGutter: _vm.tabBarGutter,
|
|
@@ -5966,17 +6012,341 @@ var __vue_render__ = function () {
|
|
|
5966
6012
|
1
|
|
5967
6013
|
)
|
|
5968
6014
|
};
|
|
6015
|
+
var __vue_staticRenderFns__$2 = [];
|
|
6016
|
+
__vue_render__$2._withStripped = true;
|
|
6017
|
+
|
|
6018
|
+
/* style */
|
|
6019
|
+
const __vue_inject_styles__$2 = function (inject) {
|
|
6020
|
+
if (!inject) return
|
|
6021
|
+
inject("data-v-508efd50_0", { source: "[data-v-508efd50] .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/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>\n <div>\n <a-tabs :default-active-key=\"activeKey\" :tabBarGutter=\"tabBarGutter\" :tabBarStyle=\"tabBarStyle\" @change=\"changeHandle\">\n <a-tab-pane v-for=\"(item, index) in tabsList\" :key=\"index\" :tab=\"item.tabName\" :disabled=\"item.disabled\">\n <template #tab>\n <component v-if=\"item.renderHeader\" :is=\"item.renderHeader\" ></component>\n <span v-else>{{ item.tabName }}</span>\n </template>\n <component :is=\"item.content\"></component>\n </a-tab-pane>\n </a-tabs>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'ele-tabs',\n components: {},\n model: {\n prop: 'value',\n event: 'change'\n },\n props: {\n activeKey: {\n type: Number,\n default: 0\n },\n tabsList: {\n type: Array,\n default () {\n return []\n }\n },\n tabBarStyle: {\n type: Object,\n default () {\n return {}\n }\n },\n tabBarGutter: {\n type: Number\n }\n },\n methods: {\n changeHandle (key) {\n this.$emit('changeActiveKey', key)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n::v-deep .ant-tabs-nav-scroll {\n float: left !important;\n}\n</style>","::v-deep .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6022
|
+
|
|
6023
|
+
};
|
|
6024
|
+
/* scoped */
|
|
6025
|
+
const __vue_scope_id__$2 = "data-v-508efd50";
|
|
6026
|
+
/* module identifier */
|
|
6027
|
+
const __vue_module_identifier__$2 = undefined;
|
|
6028
|
+
/* functional template */
|
|
6029
|
+
const __vue_is_functional_template__$2 = false;
|
|
6030
|
+
/* style inject SSR */
|
|
6031
|
+
|
|
6032
|
+
/* style inject shadow dom */
|
|
6033
|
+
|
|
6034
|
+
|
|
6035
|
+
|
|
6036
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
6037
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
6038
|
+
__vue_inject_styles__$2,
|
|
6039
|
+
__vue_script__$2,
|
|
6040
|
+
__vue_scope_id__$2,
|
|
6041
|
+
__vue_is_functional_template__$2,
|
|
6042
|
+
__vue_module_identifier__$2,
|
|
6043
|
+
false,
|
|
6044
|
+
createInjector,
|
|
6045
|
+
undefined,
|
|
6046
|
+
undefined
|
|
6047
|
+
);
|
|
6048
|
+
|
|
6049
|
+
__vue_component__$2.install = Vue => Vue.component(__vue_component__$2.name, __vue_component__$2);
|
|
6050
|
+
|
|
6051
|
+
//
|
|
6052
|
+
var script$1 = {
|
|
6053
|
+
name: 'ele-img-crop',
|
|
6054
|
+
components: {
|
|
6055
|
+
EleModal: __vue_component__$6,
|
|
6056
|
+
EleIcon: __vue_component__$i
|
|
6057
|
+
},
|
|
6058
|
+
model: {
|
|
6059
|
+
prop: 'value'
|
|
6060
|
+
},
|
|
6061
|
+
props: {
|
|
6062
|
+
maskClosable: {
|
|
6063
|
+
type: Boolean,
|
|
6064
|
+
default() {
|
|
6065
|
+
return false;
|
|
6066
|
+
}
|
|
6067
|
+
},
|
|
6068
|
+
size: {
|
|
6069
|
+
type: String,
|
|
6070
|
+
default() {
|
|
6071
|
+
return 'big';
|
|
6072
|
+
}
|
|
6073
|
+
},
|
|
6074
|
+
showTestModal: {
|
|
6075
|
+
type: Boolean,
|
|
6076
|
+
default() {
|
|
6077
|
+
return false;
|
|
6078
|
+
}
|
|
6079
|
+
}
|
|
6080
|
+
},
|
|
6081
|
+
data() {
|
|
6082
|
+
return {
|
|
6083
|
+
haveImg: false,
|
|
6084
|
+
imgtips: '照片名称',
|
|
6085
|
+
isFail: false,
|
|
6086
|
+
title: '图像裁剪',
|
|
6087
|
+
cancelText: '取消'
|
|
6088
|
+
};
|
|
6089
|
+
},
|
|
6090
|
+
methods: {
|
|
6091
|
+
openModal() {
|
|
6092
|
+
this.$refs[this.getEleModal].openModal();
|
|
6093
|
+
},
|
|
6094
|
+
handleChange(e) {
|
|
6095
|
+
let file = e.target.files ? e.target.files[0] : e.target;
|
|
6096
|
+
const allowedExtensions = ['png', 'jpeg', 'jpg'];
|
|
6097
|
+
// 获取文件后缀名
|
|
6098
|
+
const fileExtension = file.name.split('.').pop().toLowerCase();
|
|
6099
|
+
if (!allowedExtensions.includes(fileExtension)) {
|
|
6100
|
+
this.$Message.error('不支持该文件类型');
|
|
6101
|
+
return;
|
|
6102
|
+
}
|
|
6103
|
+
console.log((file.size / 1048576).toFixed(2));
|
|
6104
|
+
if ((file.size / 1048576).toFixed(2) > 1) {
|
|
6105
|
+
//大于1M,超大
|
|
6106
|
+
this.imgtips = '上传失败(网络传输等问题/文件格式不符/文件大小超出限制)';
|
|
6107
|
+
this.isFail = true;
|
|
6108
|
+
} else {
|
|
6109
|
+
this.imgtips = file.name;
|
|
6110
|
+
this.isFail = false;
|
|
6111
|
+
}
|
|
6112
|
+
this.haveImg = true;
|
|
6113
|
+
}
|
|
6114
|
+
},
|
|
6115
|
+
computed: {
|
|
6116
|
+
getEleModal() {
|
|
6117
|
+
return v4();
|
|
6118
|
+
}
|
|
6119
|
+
}
|
|
6120
|
+
};
|
|
6121
|
+
|
|
6122
|
+
/* script */
|
|
6123
|
+
const __vue_script__$1 = script$1;
|
|
6124
|
+
|
|
6125
|
+
/* template */
|
|
6126
|
+
var __vue_render__$1 = function () {
|
|
6127
|
+
var _vm = this;
|
|
6128
|
+
var _h = _vm.$createElement;
|
|
6129
|
+
var _c = _vm._self._c || _h;
|
|
6130
|
+
return _c(
|
|
6131
|
+
"div",
|
|
6132
|
+
[
|
|
6133
|
+
_c(
|
|
6134
|
+
"EleModal",
|
|
6135
|
+
{
|
|
6136
|
+
ref: _vm.getEleModal,
|
|
6137
|
+
attrs: {
|
|
6138
|
+
title: _vm.title,
|
|
6139
|
+
cancelText: _vm.cancelText,
|
|
6140
|
+
maskClosable: _vm.maskClosable,
|
|
6141
|
+
size: _vm.size,
|
|
6142
|
+
showDefaultFooter: true,
|
|
6143
|
+
},
|
|
6144
|
+
model: {
|
|
6145
|
+
value: _vm.showTestModal,
|
|
6146
|
+
callback: function ($$v) {
|
|
6147
|
+
_vm.showTestModal = $$v;
|
|
6148
|
+
},
|
|
6149
|
+
expression: "showTestModal",
|
|
6150
|
+
},
|
|
6151
|
+
},
|
|
6152
|
+
[
|
|
6153
|
+
_c("div", { staticClass: "ele-imgCrop__wrapper" }, [
|
|
6154
|
+
_c("div", { staticClass: "ele-imgCrop__left ele-imgCrop__item" }, [
|
|
6155
|
+
_c(
|
|
6156
|
+
"div",
|
|
6157
|
+
{ staticClass: "ele-imgCrop__noImg" },
|
|
6158
|
+
[
|
|
6159
|
+
_c("input", {
|
|
6160
|
+
ref: "input",
|
|
6161
|
+
staticClass: "ele-imgCrop__update",
|
|
6162
|
+
attrs: {
|
|
6163
|
+
type: "file",
|
|
6164
|
+
accept: "image/png, image/jpeg, image/jpg",
|
|
6165
|
+
id: "fileinput1",
|
|
6166
|
+
},
|
|
6167
|
+
on: { change: _vm.handleChange },
|
|
6168
|
+
}),
|
|
6169
|
+
_vm._v(" "),
|
|
6170
|
+
_c("ele-icon", {
|
|
6171
|
+
staticClass: "ele-imgCrop__icon",
|
|
6172
|
+
attrs: { type: "icon-InBox" },
|
|
6173
|
+
}),
|
|
6174
|
+
_vm._v(" "),
|
|
6175
|
+
_c(
|
|
6176
|
+
"span",
|
|
6177
|
+
{
|
|
6178
|
+
staticClass: "ele-imgCrop__font1",
|
|
6179
|
+
class: _vm.isFail ? "ele-imgCrop__error" : "",
|
|
6180
|
+
},
|
|
6181
|
+
[_vm._v("单击或拖动文件到该区域以上传")]
|
|
6182
|
+
),
|
|
6183
|
+
_vm._v(" "),
|
|
6184
|
+
_c(
|
|
6185
|
+
"span",
|
|
6186
|
+
{
|
|
6187
|
+
staticClass: "ele-imgCrop__font2",
|
|
6188
|
+
class: _vm.isFail ? "ele-imgCrop__error2" : "",
|
|
6189
|
+
},
|
|
6190
|
+
[_vm._v("文件小于100M")]
|
|
6191
|
+
),
|
|
6192
|
+
],
|
|
6193
|
+
1
|
|
6194
|
+
),
|
|
6195
|
+
_vm._v(" "),
|
|
6196
|
+
_c(
|
|
6197
|
+
"div",
|
|
6198
|
+
{ staticClass: "margin-t-8" },
|
|
6199
|
+
[
|
|
6200
|
+
_c(
|
|
6201
|
+
"span",
|
|
6202
|
+
{
|
|
6203
|
+
staticClass: "ele-imgCrop__font1 ele-imgCrop__tips",
|
|
6204
|
+
class: _vm.isFail ? "ele-imgCrop__error" : "",
|
|
6205
|
+
},
|
|
6206
|
+
[_vm._v(_vm._s(_vm.imgtips))]
|
|
6207
|
+
),
|
|
6208
|
+
_vm._v(" "),
|
|
6209
|
+
_c("a-icon", {
|
|
6210
|
+
staticStyle: { float: "right", "line-height": "24px" },
|
|
6211
|
+
attrs: { type: "close" },
|
|
6212
|
+
}),
|
|
6213
|
+
],
|
|
6214
|
+
1
|
|
6215
|
+
),
|
|
6216
|
+
]),
|
|
6217
|
+
_vm._v(" "),
|
|
6218
|
+
_c("div", { staticClass: "ele-imgCrop__right ele-imgCrop__item" }, [
|
|
6219
|
+
_c("span", { staticClass: "ele-imgCrop__font2" }, [
|
|
6220
|
+
_vm._v("左侧上传图片后可预览"),
|
|
6221
|
+
]),
|
|
6222
|
+
]),
|
|
6223
|
+
]),
|
|
6224
|
+
]
|
|
6225
|
+
),
|
|
6226
|
+
],
|
|
6227
|
+
1
|
|
6228
|
+
)
|
|
6229
|
+
};
|
|
6230
|
+
var __vue_staticRenderFns__$1 = [];
|
|
6231
|
+
__vue_render__$1._withStripped = true;
|
|
6232
|
+
|
|
6233
|
+
/* style */
|
|
6234
|
+
const __vue_inject_styles__$1 = function (inject) {
|
|
6235
|
+
if (!inject) return
|
|
6236
|
+
inject("data-v-40c0f4e6_0", { source: "[data-v-40c0f4e6] .ant-modal-body {\n padding: 16px;\n}\n[data-v-40c0f4e6] .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper[data-v-40c0f4e6] {\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-40c0f4e6] {\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 .ele-imgCrop__font1[data-v-40c0f4e6] {\n color: var(--idoole-black-008);\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-40c0f4e6] {\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-40c0f4e6] {\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-40c0f4e6] {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span[data-v-40c0f4e6] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item[data-v-40c0f4e6] {\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-40c0f4e6] {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error[data-v-40c0f4e6] {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2[data-v-40c0f4e6] {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon[data-v-40c0f4e6] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/img-crop/src/index.vue","index.vue"],"names":[],"mappings":"AA4GA;EACA,aAAA;AC3GA;AD6GA;EACA,aAAA;AC1GA;AD4GA;EACA,aAAA;EACA,SAAA;EACA,uBAAA;EACA,mBAAA;ACzGA;AD2GA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ACzGA;AD0GA;EACA,8BAAA;EACA,eAAA;EACA,4BAAA;ACxGA;AD0GA;EACA,6BAAA;EACA,eAAA;EACA,iBAAA;ACxGA;AD2GA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;ACzGA;AD4GA;EACA,kBAAA;AC1GA;AD2GA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;ACzGA;AD4GA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,wDAAA;EACA,8CAAA;AC1GA;AD6GA;EACA,WAAA;EACA,UAAA;AC1GA;AD4GA;EACA,qDAAA;ACzGA;AD2GA;EACA,kDAAA;ACxGA;AD0GA;EACA,eAAA;EACA,4BAAA;ACvGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div>\n <EleModal\n :ref=\"getEleModal\"\n :title=\"title\"\n :cancelText=\"cancelText\"\n :maskClosable=\"maskClosable\"\n :size=\"size\"\n v-model=\"showTestModal\"\n :showDefaultFooter=\"true\"\n >\n <div class=\"ele-imgCrop__wrapper\">\n <div class=\"ele-imgCrop__left ele-imgCrop__item\">\n <div class=\"ele-imgCrop__noImg\">\n <input @change=\"handleChange\" ref=\"input\" type=\"file\" accept=\"image/png, image/jpeg, image/jpg\" id=\"fileinput1\" class=\"ele-imgCrop__update\"/>\n <ele-icon type=\"icon-InBox\" class=\"ele-imgCrop__icon\"></ele-icon>\n <span class=\"ele-imgCrop__font1\" :class=\"isFail ? 'ele-imgCrop__error' : ''\">单击或拖动文件到该区域以上传</span>\n <span class=\"ele-imgCrop__font2\" :class=\"isFail ? 'ele-imgCrop__error2' : ''\">文件小于100M</span>\n </div>\n <div class=\"margin-t-8\">\n <span class=\"ele-imgCrop__font1 ele-imgCrop__tips\" :class=\"isFail? 'ele-imgCrop__error' : ''\">{{ imgtips }}</span>\n <a-icon type=\"close\" style=\"float: right; line-height: 24px;\"/>\n </div>\n </div>\n <div class=\"ele-imgCrop__right ele-imgCrop__item\">\n <span class=\"ele-imgCrop__font2\">左侧上传图片后可预览</span>\n </div>\n </div>\n </EleModal>\n </div>\n</template>\n\n<script>\nimport { v4 as uuidv4 } from 'uuid'\nimport EleModal from '../../modal/src/index.vue'\nimport EleIcon from '../../icon/src/index.vue'\nexport default {\n name: 'ele-img-crop',\n components: {\n EleModal,\n EleIcon\n },\n model: {\n prop: 'value'\n },\n props: {\n maskClosable: {\n type: Boolean,\n default () {\n return false\n }\n },\n size: {\n type: String,\n default () {\n return 'big'\n }\n },\n showTestModal: {\n type: Boolean,\n default () {\n return false\n }\n }\n },\n data () {\n return {\n haveImg: false,\n imgtips: '照片名称',\n isFail: false,\n title: '图像裁剪',\n cancelText: '取消'\n }\n },\n methods: {\n openModal () {\n this.$refs[this.getEleModal].openModal()\n },\n handleChange (e) {\n let file = e.target.files ? e.target.files[0] : e.target\n const allowedExtensions = ['png', 'jpeg', 'jpg']\n // 获取文件后缀名\n const fileExtension = file.name.split('.').pop().toLowerCase()\n if (!allowedExtensions.includes(fileExtension)) {\n this.$Message.error('不支持该文件类型')\n return\n }\n console.log((file.size / 1048576).toFixed(2))\n if ((file.size / 1048576).toFixed(2) > 1) {\n //大于1M,超大\n this.imgtips = '上传失败(网络传输等问题/文件格式不符/文件大小超出限制)'\n this.isFail = true\n } else {\n this.imgtips = file.name\n this.isFail = false\n }\n this.haveImg = true\n }\n },\n computed: {\n getEleModal () {\n return uuidv4()\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n::v-deep .ant-modal-body {\n padding: 16px;\n}\n::v-deep .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n .ele-imgCrop__left {\n .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 .ele-imgCrop__font1 {\n color: var(--idoole-black-008);\n font-size: 16px;\n line-height: 24px !important;\n }\n .ele-imgCrop__font2 {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px; \n }\n }\n .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 }\n .ele-imgCrop__right {\n position: relative;\n span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n .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.ele-imgCrop__error {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2 {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\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 .ele-imgCrop__font1 {\n color: var(--idoole-black-008);\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__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 });
|
|
6237
|
+
|
|
6238
|
+
};
|
|
6239
|
+
/* scoped */
|
|
6240
|
+
const __vue_scope_id__$1 = "data-v-40c0f4e6";
|
|
6241
|
+
/* module identifier */
|
|
6242
|
+
const __vue_module_identifier__$1 = undefined;
|
|
6243
|
+
/* functional template */
|
|
6244
|
+
const __vue_is_functional_template__$1 = false;
|
|
6245
|
+
/* style inject SSR */
|
|
6246
|
+
|
|
6247
|
+
/* style inject shadow dom */
|
|
6248
|
+
|
|
6249
|
+
|
|
6250
|
+
|
|
6251
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
6252
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
6253
|
+
__vue_inject_styles__$1,
|
|
6254
|
+
__vue_script__$1,
|
|
6255
|
+
__vue_scope_id__$1,
|
|
6256
|
+
__vue_is_functional_template__$1,
|
|
6257
|
+
__vue_module_identifier__$1,
|
|
6258
|
+
false,
|
|
6259
|
+
createInjector,
|
|
6260
|
+
undefined,
|
|
6261
|
+
undefined
|
|
6262
|
+
);
|
|
6263
|
+
|
|
6264
|
+
__vue_component__$1.install = Vue => Vue.component(__vue_component__$1.name, __vue_component__$1);
|
|
6265
|
+
|
|
6266
|
+
//
|
|
6267
|
+
var script = {
|
|
6268
|
+
name: 'ele-text-editor',
|
|
6269
|
+
props: {
|
|
6270
|
+
editorWidth: {
|
|
6271
|
+
type: String
|
|
6272
|
+
},
|
|
6273
|
+
editorHeight: {
|
|
6274
|
+
type: String
|
|
6275
|
+
},
|
|
6276
|
+
maxLength: {
|
|
6277
|
+
type: Number,
|
|
6278
|
+
default() {
|
|
6279
|
+
return 10;
|
|
6280
|
+
}
|
|
6281
|
+
}
|
|
6282
|
+
},
|
|
6283
|
+
data() {
|
|
6284
|
+
return {
|
|
6285
|
+
editorConfig: {},
|
|
6286
|
+
textEditorRef: null
|
|
6287
|
+
};
|
|
6288
|
+
},
|
|
6289
|
+
computed: {
|
|
6290
|
+
innerContent() {
|
|
6291
|
+
let content = this.textEditorRef ? this.textEditorRef.getContent() : '';
|
|
6292
|
+
if (this.textEditorRef && content.length > this.maxLength) {
|
|
6293
|
+
content = content.substring(0, this.maxLength);
|
|
6294
|
+
this.$nextTick(() => {
|
|
6295
|
+
this.textEditorRef.setContent(content);
|
|
6296
|
+
});
|
|
6297
|
+
}
|
|
6298
|
+
this.$emit('input', content);
|
|
6299
|
+
return content;
|
|
6300
|
+
},
|
|
6301
|
+
getVueditor() {
|
|
6302
|
+
return v4();
|
|
6303
|
+
}
|
|
6304
|
+
},
|
|
6305
|
+
watch: {},
|
|
6306
|
+
methods: {},
|
|
6307
|
+
mounted() {
|
|
6308
|
+
this.textEditorRef = this.$refs[this.getVueditor];
|
|
6309
|
+
}
|
|
6310
|
+
};
|
|
6311
|
+
|
|
6312
|
+
/* script */
|
|
6313
|
+
const __vue_script__ = script;
|
|
6314
|
+
|
|
6315
|
+
/* template */
|
|
6316
|
+
var __vue_render__ = function () {
|
|
6317
|
+
var _vm = this;
|
|
6318
|
+
var _h = _vm.$createElement;
|
|
6319
|
+
var _c = _vm._self._c || _h;
|
|
6320
|
+
return _c(
|
|
6321
|
+
"div",
|
|
6322
|
+
{
|
|
6323
|
+
staticClass: "ele-editor__wrapper",
|
|
6324
|
+
style: { width: _vm.editorWidth, height: _vm.editorHeight },
|
|
6325
|
+
},
|
|
6326
|
+
[
|
|
6327
|
+
_c("Vueditor", {
|
|
6328
|
+
ref: _vm.getVueditor,
|
|
6329
|
+
style: { width: _vm.editorWidth, height: _vm.editorHeight },
|
|
6330
|
+
}),
|
|
6331
|
+
_vm._v(" "),
|
|
6332
|
+
_c("div", { staticClass: "ele-editor__bottom" }, [
|
|
6333
|
+
_c("span", [_vm._v(_vm._s(_vm.innerContent.length) + "字")]),
|
|
6334
|
+
]),
|
|
6335
|
+
],
|
|
6336
|
+
1
|
|
6337
|
+
)
|
|
6338
|
+
};
|
|
5969
6339
|
var __vue_staticRenderFns__ = [];
|
|
5970
6340
|
__vue_render__._withStripped = true;
|
|
5971
6341
|
|
|
5972
6342
|
/* style */
|
|
5973
6343
|
const __vue_inject_styles__ = function (inject) {
|
|
5974
6344
|
if (!inject) return
|
|
5975
|
-
inject("data-v-
|
|
6345
|
+
inject("data-v-01907d28_0", { source: ".ele-editor__bottom[data-v-01907d28] {\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-01907d28] {\n color: var(--idoole-black-008);\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":["/Users/huangshan/Goldgov/front/ganjiao/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>\n <div class=\"ele-editor__wrapper\" :style=\"{width: editorWidth, height: editorHeight}\">\n <Vueditor :ref=\"getVueditor\" :style=\"{width: editorWidth, height: editorHeight}\"></Vueditor>\n <div class=\"ele-editor__bottom\">\n <span>{{ innerContent.length }}字</span>\n </div>\n </div>\n</template>\n\n<script>\nimport { v4 as uuidv4 } from 'uuid'\nexport default {\n name: 'ele-text-editor',\n props: {\n editorWidth: {\n type: String\n },\n editorHeight: {\n type: String\n },\n maxLength: {\n type: Number,\n default () {\n return 10\n }\n }\n },\n data() {\n return {\n editorConfig: {},\n textEditorRef: null\n }\n },\n computed: {\n innerContent () {\n let content = this.textEditorRef ? this.textEditorRef.getContent() : ''\n if (this.textEditorRef && content.length > this.maxLength) {\n content = content.substring(0, this.maxLength)\n this.$nextTick(() => {\n this.textEditorRef.setContent(content)\n })\n }\n this.$emit('input', content)\n return content\n },\n getVueditor () {\n return uuidv4()\n }\n },\n watch: {},\n methods: {},\n mounted () {\n this.textEditorRef = this.$refs[this.getVueditor]\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.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 span {\n color: var(--idoole-black-008);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n }\n}\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-008);\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 });
|
|
5976
6346
|
|
|
5977
6347
|
};
|
|
5978
6348
|
/* scoped */
|
|
5979
|
-
const __vue_scope_id__ =
|
|
6349
|
+
const __vue_scope_id__ = "data-v-01907d28";
|
|
5980
6350
|
/* module identifier */
|
|
5981
6351
|
const __vue_module_identifier__ = undefined;
|
|
5982
6352
|
/* functional template */
|
|
@@ -6002,9 +6372,9 @@ __vue_render__._withStripped = true;
|
|
|
6002
6372
|
|
|
6003
6373
|
__vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
|
|
6004
6374
|
|
|
6005
|
-
const compositeComponents = [__vue_component__$
|
|
6006
|
-
const models = [__vue_component__$
|
|
6007
|
-
const components = [__vue_component__$
|
|
6375
|
+
const compositeComponents = [__vue_component__$l, __vue_component__$m, __vue_component__$3];
|
|
6376
|
+
const models = [__vue_component__$k, __vue_component__$a, __vue_component__$b, __vue_component__$9];
|
|
6377
|
+
const components = [__vue_component__$u, __vue_component__$t, __vue_component__$s, __vue_component__$r, __vue_component__$p, __vue_component__$o, __vue_component__$8, __vue_component__$c, __vue_component__$7, __vue_component__$h, __vue_component__$g, __vue_component__$i, __vue_component__$f, __vue_component__$6, __vue_component__$e, __vue_component__$d, __vue_component__$5, __vue_component__$4, ...compositeComponents, ...models, __vue_component__$2, __vue_component__$1, __vue_component__];
|
|
6008
6378
|
const install = Vue => {
|
|
6009
6379
|
if (install.installed) return;
|
|
6010
6380
|
install.installed = true;
|
|
@@ -6013,4 +6383,4 @@ const install = Vue => {
|
|
|
6013
6383
|
});
|
|
6014
6384
|
};
|
|
6015
6385
|
|
|
6016
|
-
export { __vue_component__$
|
|
6386
|
+
export { __vue_component__$u as EleButton, __vue_component__$t as EleDate, __vue_component__$1 as EleImgCrop, __vue_component__$s as EleInput, __vue_component__$6 as EleModal, __vue_component__$r as EleSelect, __vue_component__$p as EleTable, __vue_component__$2 as EleTabs, __vue_component__ as EleTextEditor, __vue_component__$8 as EleTpl, __vue_component__$o as EleTree, install as default, models };
|