@idooel/components 0.0.1-beta.20 → 0.0.1-beta.21
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 +728 -534
- package/dist/@idooel/components.umd.js +736 -541
- package/package.json +46 -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 +106 -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 +45 -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 -42
- package/packages/form/index.js +4 -4
- package/packages/form/src/index.vue +212 -210
- package/packages/form-group-model/index.js +4 -4
- package/packages/form-group-model/src/index.vue +273 -257
- package/packages/form-model/index.js +4 -4
- package/packages/form-model/src/index.vue +165 -163
- package/packages/icon/index.js +4 -4
- package/packages/icon/src/index.vue +31 -31
- package/packages/index.js +84 -81
- 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 +141 -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 -77
- 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 +173 -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 +5 -0
- package/packages/tabs/src/index.vue +55 -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 +27 -27
- 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 -22
- package/scripts/rollup.config.js +35 -35
- package/scripts/rollup.esm.config.js +11 -11
- package/scripts/rollup.umd.config.js +14 -14
- package/dist/@idooel/components.esm.css +0 -123
- package/dist/@idooel/components.umd.css +0 -117
|
@@ -20,7 +20,7 @@ import FileUpload from 'vue-upload-component';
|
|
|
20
20
|
//
|
|
21
21
|
//
|
|
22
22
|
|
|
23
|
-
var script$
|
|
23
|
+
var script$s = {
|
|
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__$s = script$s;
|
|
142
142
|
|
|
143
143
|
/* template */
|
|
144
|
-
var __vue_render__$
|
|
144
|
+
var __vue_render__$s = 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__$r = function () {
|
|
|
187
187
|
2
|
|
188
188
|
)
|
|
189
189
|
};
|
|
190
|
-
var __vue_staticRenderFns__$
|
|
191
|
-
__vue_render__$
|
|
190
|
+
var __vue_staticRenderFns__$s = [];
|
|
191
|
+
__vue_render__$s._withStripped = true;
|
|
192
192
|
|
|
193
193
|
/* style */
|
|
194
|
-
const __vue_inject_styles__$
|
|
194
|
+
const __vue_inject_styles__$s = undefined;
|
|
195
195
|
/* scoped */
|
|
196
|
-
const __vue_scope_id__$
|
|
196
|
+
const __vue_scope_id__$s = undefined;
|
|
197
197
|
/* module identifier */
|
|
198
|
-
const __vue_module_identifier__$
|
|
198
|
+
const __vue_module_identifier__$s = undefined;
|
|
199
199
|
/* functional template */
|
|
200
|
-
const __vue_is_functional_template__$
|
|
200
|
+
const __vue_is_functional_template__$s = false;
|
|
201
201
|
/* style inject */
|
|
202
202
|
|
|
203
203
|
/* style inject SSR */
|
|
@@ -206,20 +206,20 @@ __vue_render__$r._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__$s = /*#__PURE__*/normalizeComponent(
|
|
210
|
+
{ render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
|
|
211
|
+
__vue_inject_styles__$s,
|
|
212
|
+
__vue_script__$s,
|
|
213
|
+
__vue_scope_id__$s,
|
|
214
|
+
__vue_is_functional_template__$s,
|
|
215
|
+
__vue_module_identifier__$s,
|
|
216
216
|
false,
|
|
217
217
|
undefined,
|
|
218
218
|
undefined,
|
|
219
219
|
undefined
|
|
220
220
|
);
|
|
221
221
|
|
|
222
|
-
__vue_component__$
|
|
222
|
+
__vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
|
|
223
223
|
|
|
224
224
|
//
|
|
225
225
|
//
|
|
@@ -234,7 +234,7 @@ __vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __v
|
|
|
234
234
|
//
|
|
235
235
|
//
|
|
236
236
|
|
|
237
|
-
var script$
|
|
237
|
+
var script$r = {
|
|
238
238
|
name: 'ele-date',
|
|
239
239
|
props: {
|
|
240
240
|
value: {
|
|
@@ -262,10 +262,10 @@ var script$q = {
|
|
|
262
262
|
};
|
|
263
263
|
|
|
264
264
|
/* script */
|
|
265
|
-
const __vue_script__$
|
|
265
|
+
const __vue_script__$r = script$r;
|
|
266
266
|
|
|
267
267
|
/* template */
|
|
268
|
-
var __vue_render__$
|
|
268
|
+
var __vue_render__$r = 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__$q = 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__$r = [];
|
|
284
|
+
__vue_render__$r._withStripped = true;
|
|
285
285
|
|
|
286
286
|
/* style */
|
|
287
|
-
const __vue_inject_styles__$
|
|
287
|
+
const __vue_inject_styles__$r = undefined;
|
|
288
288
|
/* scoped */
|
|
289
|
-
const __vue_scope_id__$
|
|
289
|
+
const __vue_scope_id__$r = undefined;
|
|
290
290
|
/* module identifier */
|
|
291
|
-
const __vue_module_identifier__$
|
|
291
|
+
const __vue_module_identifier__$r = undefined;
|
|
292
292
|
/* functional template */
|
|
293
|
-
const __vue_is_functional_template__$
|
|
293
|
+
const __vue_is_functional_template__$r = false;
|
|
294
294
|
/* style inject */
|
|
295
295
|
|
|
296
296
|
/* style inject SSR */
|
|
@@ -299,27 +299,27 @@ __vue_render__$q._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__$r = /*#__PURE__*/normalizeComponent(
|
|
303
|
+
{ render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
|
|
304
|
+
__vue_inject_styles__$r,
|
|
305
|
+
__vue_script__$r,
|
|
306
|
+
__vue_scope_id__$r,
|
|
307
|
+
__vue_is_functional_template__$r,
|
|
308
|
+
__vue_module_identifier__$r,
|
|
309
309
|
false,
|
|
310
310
|
undefined,
|
|
311
311
|
undefined,
|
|
312
312
|
undefined
|
|
313
313
|
);
|
|
314
314
|
|
|
315
|
-
__vue_component__$
|
|
315
|
+
__vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
|
|
316
316
|
|
|
317
317
|
//
|
|
318
318
|
//
|
|
319
319
|
//
|
|
320
320
|
//
|
|
321
321
|
|
|
322
|
-
var script$
|
|
322
|
+
var script$q = {
|
|
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__$q = script$q;
|
|
395
395
|
|
|
396
396
|
/* template */
|
|
397
|
-
var __vue_render__$
|
|
397
|
+
var __vue_render__$q = 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__$p = function () {
|
|
|
407
407
|
on: { change: _vm.onChange },
|
|
408
408
|
})
|
|
409
409
|
};
|
|
410
|
-
var __vue_staticRenderFns__$
|
|
411
|
-
__vue_render__$
|
|
410
|
+
var __vue_staticRenderFns__$q = [];
|
|
411
|
+
__vue_render__$q._withStripped = true;
|
|
412
412
|
|
|
413
413
|
/* style */
|
|
414
|
-
const __vue_inject_styles__$
|
|
414
|
+
const __vue_inject_styles__$q = function (inject) {
|
|
415
415
|
if (!inject) return
|
|
416
|
-
inject("data-v-
|
|
416
|
+
inject("data-v-2dfc23ac_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__$q = "data-v-2dfc23ac";
|
|
421
421
|
/* module identifier */
|
|
422
|
-
const __vue_module_identifier__$
|
|
422
|
+
const __vue_module_identifier__$q = undefined;
|
|
423
423
|
/* functional template */
|
|
424
|
-
const __vue_is_functional_template__$
|
|
424
|
+
const __vue_is_functional_template__$q = 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__$q = /*#__PURE__*/normalizeComponent(
|
|
432
|
+
{ render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
|
|
433
|
+
__vue_inject_styles__$q,
|
|
434
|
+
__vue_script__$q,
|
|
435
|
+
__vue_scope_id__$q,
|
|
436
|
+
__vue_is_functional_template__$q,
|
|
437
|
+
__vue_module_identifier__$q,
|
|
438
438
|
false,
|
|
439
439
|
createInjector,
|
|
440
440
|
undefined,
|
|
441
441
|
undefined
|
|
442
442
|
);
|
|
443
443
|
|
|
444
|
-
__vue_component__$
|
|
444
|
+
__vue_component__$q.install = Vue => Vue.component(__vue_component__$q.name, __vue_component__$q);
|
|
445
445
|
|
|
446
446
|
//
|
|
447
|
-
var script$
|
|
447
|
+
var script$p = {
|
|
448
448
|
name: 'ele-select',
|
|
449
449
|
props: {
|
|
450
450
|
disabled: {
|
|
@@ -471,6 +471,13 @@ var script$o = {
|
|
|
471
471
|
params: {
|
|
472
472
|
type: Object,
|
|
473
473
|
default: () => ({})
|
|
474
|
+
},
|
|
475
|
+
mode: {
|
|
476
|
+
type: String
|
|
477
|
+
},
|
|
478
|
+
multiple: {
|
|
479
|
+
type: Boolean,
|
|
480
|
+
default: false
|
|
474
481
|
}
|
|
475
482
|
},
|
|
476
483
|
data() {
|
|
@@ -478,6 +485,14 @@ var script$o = {
|
|
|
478
485
|
innerDataSource: []
|
|
479
486
|
};
|
|
480
487
|
},
|
|
488
|
+
computed: {
|
|
489
|
+
getMode() {
|
|
490
|
+
if (this.multiple) {
|
|
491
|
+
return 'multiple';
|
|
492
|
+
}
|
|
493
|
+
return this.mode;
|
|
494
|
+
}
|
|
495
|
+
},
|
|
481
496
|
watch: {
|
|
482
497
|
dataSource: {
|
|
483
498
|
handler(dataSource) {
|
|
@@ -514,10 +529,10 @@ var script$o = {
|
|
|
514
529
|
};
|
|
515
530
|
|
|
516
531
|
/* script */
|
|
517
|
-
const __vue_script__$
|
|
532
|
+
const __vue_script__$p = script$p;
|
|
518
533
|
|
|
519
534
|
/* template */
|
|
520
|
-
var __vue_render__$
|
|
535
|
+
var __vue_render__$p = function () {
|
|
521
536
|
var _vm = this;
|
|
522
537
|
var _h = _vm.$createElement;
|
|
523
538
|
var _c = _vm._self._c || _h;
|
|
@@ -525,7 +540,7 @@ var __vue_render__$o = function () {
|
|
|
525
540
|
"a-select",
|
|
526
541
|
{
|
|
527
542
|
staticStyle: { width: "100%" },
|
|
528
|
-
attrs: { disabled: _vm.disabled, value: _vm.value },
|
|
543
|
+
attrs: { disabled: _vm.disabled, mode: _vm.getMode, value: _vm.value },
|
|
529
544
|
on: { change: _vm.onChange },
|
|
530
545
|
},
|
|
531
546
|
_vm._l(_vm.innerDataSource, function (item) {
|
|
@@ -538,41 +553,41 @@ var __vue_render__$o = function () {
|
|
|
538
553
|
1
|
|
539
554
|
)
|
|
540
555
|
};
|
|
541
|
-
var __vue_staticRenderFns__$
|
|
542
|
-
__vue_render__$
|
|
556
|
+
var __vue_staticRenderFns__$p = [];
|
|
557
|
+
__vue_render__$p._withStripped = true;
|
|
543
558
|
|
|
544
559
|
/* style */
|
|
545
|
-
const __vue_inject_styles__$
|
|
560
|
+
const __vue_inject_styles__$p = function (inject) {
|
|
546
561
|
if (!inject) return
|
|
547
|
-
inject("data-v-
|
|
562
|
+
inject("data-v-ccfe5f1e_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
548
563
|
|
|
549
564
|
};
|
|
550
565
|
/* scoped */
|
|
551
|
-
const __vue_scope_id__$
|
|
566
|
+
const __vue_scope_id__$p = "data-v-ccfe5f1e";
|
|
552
567
|
/* module identifier */
|
|
553
|
-
const __vue_module_identifier__$
|
|
568
|
+
const __vue_module_identifier__$p = undefined;
|
|
554
569
|
/* functional template */
|
|
555
|
-
const __vue_is_functional_template__$
|
|
570
|
+
const __vue_is_functional_template__$p = false;
|
|
556
571
|
/* style inject SSR */
|
|
557
572
|
|
|
558
573
|
/* style inject shadow dom */
|
|
559
574
|
|
|
560
575
|
|
|
561
576
|
|
|
562
|
-
const __vue_component__$
|
|
563
|
-
{ render: __vue_render__$
|
|
564
|
-
__vue_inject_styles__$
|
|
565
|
-
__vue_script__$
|
|
566
|
-
__vue_scope_id__$
|
|
567
|
-
__vue_is_functional_template__$
|
|
568
|
-
__vue_module_identifier__$
|
|
577
|
+
const __vue_component__$p = /*#__PURE__*/normalizeComponent(
|
|
578
|
+
{ render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
|
|
579
|
+
__vue_inject_styles__$p,
|
|
580
|
+
__vue_script__$p,
|
|
581
|
+
__vue_scope_id__$p,
|
|
582
|
+
__vue_is_functional_template__$p,
|
|
583
|
+
__vue_module_identifier__$p,
|
|
569
584
|
false,
|
|
570
585
|
createInjector,
|
|
571
586
|
undefined,
|
|
572
587
|
undefined
|
|
573
588
|
);
|
|
574
589
|
|
|
575
|
-
__vue_component__$
|
|
590
|
+
__vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
|
|
576
591
|
|
|
577
592
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
578
593
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -1206,7 +1221,7 @@ const parse = (expression, props = {}) => {
|
|
|
1206
1221
|
|
|
1207
1222
|
//
|
|
1208
1223
|
const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
|
|
1209
|
-
var script$
|
|
1224
|
+
var script$o = {
|
|
1210
1225
|
props: {
|
|
1211
1226
|
record: {
|
|
1212
1227
|
type: Object
|
|
@@ -1304,10 +1319,10 @@ var script$n = {
|
|
|
1304
1319
|
};
|
|
1305
1320
|
|
|
1306
1321
|
/* script */
|
|
1307
|
-
const __vue_script__$
|
|
1322
|
+
const __vue_script__$o = script$o;
|
|
1308
1323
|
|
|
1309
1324
|
/* template */
|
|
1310
|
-
var __vue_render__$
|
|
1325
|
+
var __vue_render__$o = function () {
|
|
1311
1326
|
var _vm = this;
|
|
1312
1327
|
var _h = _vm.$createElement;
|
|
1313
1328
|
var _c = _vm._self._c || _h;
|
|
@@ -1407,34 +1422,34 @@ var __vue_render__$n = function () {
|
|
|
1407
1422
|
0
|
|
1408
1423
|
)
|
|
1409
1424
|
};
|
|
1410
|
-
var __vue_staticRenderFns__$
|
|
1411
|
-
__vue_render__$
|
|
1425
|
+
var __vue_staticRenderFns__$o = [];
|
|
1426
|
+
__vue_render__$o._withStripped = true;
|
|
1412
1427
|
|
|
1413
1428
|
/* style */
|
|
1414
|
-
const __vue_inject_styles__$
|
|
1429
|
+
const __vue_inject_styles__$o = function (inject) {
|
|
1415
1430
|
if (!inject) return
|
|
1416
|
-
inject("data-v-
|
|
1431
|
+
inject("data-v-572820bc_0", { source: ".g-table__action[data-v-572820bc] {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item[data-v-572820bc] {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item[data-v-572820bc]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\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>\r\n <div class=\"g-table__action\">\r\n <div class=\"table-action__item\" v-for=\"(item, idx) in execOperationExpression(dataSource)\" :key=\"idx\">\r\n <template v-if=\"item.type == 'text'\">\r\n <span @click=\"handleClickText(item)\">{{ item.label }}</span>\r\n </template>\r\n <template v-else-if=\"item.type == 'dropdown'\">\r\n <a-dropdown>\r\n <a-menu slot=\"overlay\" @click=\"handleDropdownClick\">\r\n <a-menu-item :key=\"`${item.key || ''}${menuKeyDelimiter}${opt.value || ''}`\" v-for=\"opt in execOperationExpression(item.optionList)\">\r\n <template v-if=\"opt.type == 'confirm'\">\r\n <a-popconfirm :title=\"opt.message\" @confirm=\"handleClickConfirm(opt)\">\r\n {{ opt.label }}\r\n </a-popconfirm>\r\n </template>\r\n <template v-else>\r\n {{ opt.label }}\r\n </template>\r\n </a-menu-item>\r\n </a-menu>\r\n <span>{{ item.label }}</span>\r\n </a-dropdown>\r\n </template>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v5 as uuidv5 } from 'uuid'\r\nimport { type, route } from '@idooel/shared'\r\nimport { parse } from '@idooel/expression'\r\nconst MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002'\r\nexport default {\r\n props: {\r\n record: {\r\n type: Object\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n inject: {\r\n requestTreeData: {\r\n default: void 0\r\n },\r\n requestTableData: {\r\n default: void 0\r\n }\r\n },\r\n computed: {\r\n menuKeyDelimiter () {\r\n return uuidv5('_', MENU_KEY_NAMESPACE)\r\n },\r\n builtInMethods () {\r\n return { \r\n requestTreeData: this.requestTreeData, \r\n requestTableData: this.requestTableData \r\n }\r\n }\r\n },\r\n methods: {\r\n execOperationExpression (dataSource = []) {\r\n const ret = dataSource.map(item => {\r\n const { show } = item\r\n if (type.isUndefined(show)) {\r\n return item\r\n } else if (type.isBool(show)) {\r\n if (show) return item\r\n } else if (type.isStr(show)) {\r\n const parseRet = parse(show, { \r\n ...this.record, \r\n _route: route.searchToQueryParams(window.location.search) \r\n })\r\n if (parseRet) return item\r\n }\r\n }).filter(item => item)\r\n return ret\r\n },\r\n handleClickConfirm (props) {\r\n //TODO generate event by special rule\r\n const { eventName, value } = props\r\n this.$emit(eventName, { \r\n key: value, \r\n record: this.record,\r\n builtInMethods: this.builtInMethods \r\n })\r\n },\r\n handleDropdownClick (props) {\r\n const { key } = props\r\n const [parent, child] = key.split(this.menuKeyDelimiter)\r\n if (!parent || !child) {\r\n throw new Error('key is required')\r\n }\r\n const currentDropdown = this.dataSource.find(item => item.key === parent)\r\n const currentClickTarget = currentDropdown.optionList.find(item => item.value === child)\r\n const { eventName, type } = currentClickTarget\r\n //TODO generate event by special rule\r\n if (type === 'confirm') return\r\n this.$emit(eventName, { \r\n key: child, \r\n record: this.record, \r\n builtInMethods: this.builtInMethods \r\n })\r\n },\r\n handleClickText (props) {\r\n const { eventName, key } = props\r\n this.$emit(eventName, { \r\n key, \r\n record: this.record, \r\n builtInMethods: this.builtInMethods \r\n })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-table__action {\r\n display: flex;\r\n flex-direction: row;\r\n .table-action__item {\r\n font-size: 14px;\r\n color: #409EFF;\r\n margin-left: 16px;\r\n cursor: pointer;\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n }\r\n}\r\n</style>",".g-table__action {\n display: flex;\n flex-direction: row;\n}\n.g-table__action .table-action__item {\n font-size: 14px;\n color: #409EFF;\n margin-left: 16px;\n cursor: pointer;\n}\n.g-table__action .table-action__item:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=action.vue.map */"]}, media: undefined });
|
|
1417
1432
|
|
|
1418
1433
|
};
|
|
1419
1434
|
/* scoped */
|
|
1420
|
-
const __vue_scope_id__$
|
|
1435
|
+
const __vue_scope_id__$o = "data-v-572820bc";
|
|
1421
1436
|
/* module identifier */
|
|
1422
|
-
const __vue_module_identifier__$
|
|
1437
|
+
const __vue_module_identifier__$o = undefined;
|
|
1423
1438
|
/* functional template */
|
|
1424
|
-
const __vue_is_functional_template__$
|
|
1439
|
+
const __vue_is_functional_template__$o = false;
|
|
1425
1440
|
/* style inject SSR */
|
|
1426
1441
|
|
|
1427
1442
|
/* style inject shadow dom */
|
|
1428
1443
|
|
|
1429
1444
|
|
|
1430
1445
|
|
|
1431
|
-
const __vue_component__$
|
|
1432
|
-
{ render: __vue_render__$
|
|
1433
|
-
__vue_inject_styles__$
|
|
1434
|
-
__vue_script__$
|
|
1435
|
-
__vue_scope_id__$
|
|
1436
|
-
__vue_is_functional_template__$
|
|
1437
|
-
__vue_module_identifier__$
|
|
1446
|
+
const __vue_component__$o = /*#__PURE__*/normalizeComponent(
|
|
1447
|
+
{ render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
|
|
1448
|
+
__vue_inject_styles__$o,
|
|
1449
|
+
__vue_script__$o,
|
|
1450
|
+
__vue_scope_id__$o,
|
|
1451
|
+
__vue_is_functional_template__$o,
|
|
1452
|
+
__vue_module_identifier__$o,
|
|
1438
1453
|
false,
|
|
1439
1454
|
createInjector,
|
|
1440
1455
|
undefined,
|
|
@@ -1442,10 +1457,10 @@ __vue_render__$n._withStripped = true;
|
|
|
1442
1457
|
);
|
|
1443
1458
|
|
|
1444
1459
|
//
|
|
1445
|
-
var script$
|
|
1460
|
+
var script$n = {
|
|
1446
1461
|
name: 'ele-table',
|
|
1447
1462
|
components: {
|
|
1448
|
-
Actions: __vue_component__$
|
|
1463
|
+
Actions: __vue_component__$o
|
|
1449
1464
|
},
|
|
1450
1465
|
props: {
|
|
1451
1466
|
actions: {
|
|
@@ -1488,10 +1503,10 @@ var script$m = {
|
|
|
1488
1503
|
};
|
|
1489
1504
|
|
|
1490
1505
|
/* script */
|
|
1491
|
-
const __vue_script__$
|
|
1506
|
+
const __vue_script__$n = script$n;
|
|
1492
1507
|
|
|
1493
1508
|
/* template */
|
|
1494
|
-
var __vue_render__$
|
|
1509
|
+
var __vue_render__$n = function () {
|
|
1495
1510
|
var _vm = this;
|
|
1496
1511
|
var _h = _vm.$createElement;
|
|
1497
1512
|
var _c = _vm._self._c || _h;
|
|
@@ -1550,41 +1565,41 @@ var __vue_render__$m = function () {
|
|
|
1550
1565
|
1
|
|
1551
1566
|
)
|
|
1552
1567
|
};
|
|
1553
|
-
var __vue_staticRenderFns__$
|
|
1554
|
-
__vue_render__$
|
|
1568
|
+
var __vue_staticRenderFns__$n = [];
|
|
1569
|
+
__vue_render__$n._withStripped = true;
|
|
1555
1570
|
|
|
1556
1571
|
/* style */
|
|
1557
|
-
const __vue_inject_styles__$
|
|
1572
|
+
const __vue_inject_styles__$n = function (inject) {
|
|
1558
1573
|
if (!inject) return
|
|
1559
|
-
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 });
|
|
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 });
|
|
1560
1575
|
|
|
1561
1576
|
};
|
|
1562
1577
|
/* scoped */
|
|
1563
|
-
const __vue_scope_id__$
|
|
1578
|
+
const __vue_scope_id__$n = "data-v-6f3faf52";
|
|
1564
1579
|
/* module identifier */
|
|
1565
|
-
const __vue_module_identifier__$
|
|
1580
|
+
const __vue_module_identifier__$n = undefined;
|
|
1566
1581
|
/* functional template */
|
|
1567
|
-
const __vue_is_functional_template__$
|
|
1582
|
+
const __vue_is_functional_template__$n = false;
|
|
1568
1583
|
/* style inject SSR */
|
|
1569
1584
|
|
|
1570
1585
|
/* style inject shadow dom */
|
|
1571
1586
|
|
|
1572
1587
|
|
|
1573
1588
|
|
|
1574
|
-
const __vue_component__$
|
|
1575
|
-
{ render: __vue_render__$
|
|
1576
|
-
__vue_inject_styles__$
|
|
1577
|
-
__vue_script__$
|
|
1578
|
-
__vue_scope_id__$
|
|
1579
|
-
__vue_is_functional_template__$
|
|
1580
|
-
__vue_module_identifier__$
|
|
1589
|
+
const __vue_component__$n = /*#__PURE__*/normalizeComponent(
|
|
1590
|
+
{ render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
|
|
1591
|
+
__vue_inject_styles__$n,
|
|
1592
|
+
__vue_script__$n,
|
|
1593
|
+
__vue_scope_id__$n,
|
|
1594
|
+
__vue_is_functional_template__$n,
|
|
1595
|
+
__vue_module_identifier__$n,
|
|
1581
1596
|
false,
|
|
1582
1597
|
createInjector,
|
|
1583
1598
|
undefined,
|
|
1584
1599
|
undefined
|
|
1585
1600
|
);
|
|
1586
1601
|
|
|
1587
|
-
__vue_component__$
|
|
1602
|
+
__vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
|
|
1588
1603
|
|
|
1589
1604
|
//
|
|
1590
1605
|
//
|
|
@@ -1610,7 +1625,7 @@ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __v
|
|
|
1610
1625
|
//
|
|
1611
1626
|
//
|
|
1612
1627
|
|
|
1613
|
-
var script$
|
|
1628
|
+
var script$m = {
|
|
1614
1629
|
name: 'ele-tree',
|
|
1615
1630
|
props: {
|
|
1616
1631
|
treeData: {
|
|
@@ -1673,10 +1688,10 @@ var script$l = {
|
|
|
1673
1688
|
};
|
|
1674
1689
|
|
|
1675
1690
|
/* script */
|
|
1676
|
-
const __vue_script__$
|
|
1691
|
+
const __vue_script__$m = script$m;
|
|
1677
1692
|
|
|
1678
1693
|
/* template */
|
|
1679
|
-
var __vue_render__$
|
|
1694
|
+
var __vue_render__$m = function () {
|
|
1680
1695
|
var _vm = this;
|
|
1681
1696
|
var _h = _vm.$createElement;
|
|
1682
1697
|
var _c = _vm._self._c || _h;
|
|
@@ -1733,41 +1748,41 @@ var __vue_render__$l = function () {
|
|
|
1733
1748
|
1
|
|
1734
1749
|
)
|
|
1735
1750
|
};
|
|
1736
|
-
var __vue_staticRenderFns__$
|
|
1737
|
-
__vue_render__$
|
|
1751
|
+
var __vue_staticRenderFns__$m = [];
|
|
1752
|
+
__vue_render__$m._withStripped = true;
|
|
1738
1753
|
|
|
1739
1754
|
/* style */
|
|
1740
|
-
const __vue_inject_styles__$
|
|
1755
|
+
const __vue_inject_styles__$m = function (inject) {
|
|
1741
1756
|
if (!inject) return
|
|
1742
|
-
inject("data-v-
|
|
1757
|
+
inject("data-v-cc99bbf0_0", { source: ".g-tree__wrapper[data-v-cc99bbf0] {\n overflow: hidden;\n}\n.g-tree__wrapper[data-v-cc99bbf0] .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-cc99bbf0] .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\tree\\src\\index.vue","index.vue"],"names":[],"mappings":"AAwFA;EACA,gBAAA;ACvFA;ADyFA;EACA,uBAAA;EACA,gBAAA;EACA,mBAAA;ACvFA;ADyFA;EACA,WAAA;ACvFA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"g-tree__wrapper\">\r\n <a-tree\r\n v-if=\"innerTreeData.length\"\r\n :tree-data=\"innerTreeData\"\r\n @select=\"selectTreeNode\"\r\n :replaceFields=\"replaceFields\"\r\n :default-expanded-keys=\"defaultExpandedKeys\"\r\n :default-selected-keys=\"defaultSelectedKeys\"\r\n blockNode \r\n :show-icon=\"showIcon\">\r\n <template #title=\"{ title }\">\r\n <span :title=\"title\" class=\"tree-node__title\">\r\n {{ title }}\r\n </span>\r\n </template>\r\n <template slot=\"custom\" slot-scope=\"{ scopedSlots }\">\r\n <a-icon :type=\"scopedSlots.iconName\"></a-icon>\r\n </template>\r\n </a-tree>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-tree',\r\n props: {\r\n treeData: {\r\n type: Array,\r\n default: () => []\r\n },\r\n replaceFields: {\r\n type: Object,\r\n default: () => ({\r\n title: 'title',\r\n key: 'id',\r\n children: 'children'\r\n })\r\n },\r\n defaultExpandedKeys: {\r\n type: Array\r\n },\r\n defaultSelectedKeys: {\r\n type: Array\r\n },\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n innerTreeData () {\r\n return this.treeData\r\n // return [\r\n // {\r\n // title: 'parent 1',\r\n // key: 1,\r\n // scopedSlots: {\r\n // icon: 'custom',\r\n // iconName: 'smile-o'\r\n // },\r\n // children: [\r\n // {\r\n // title: '2',\r\n // key: 2,\r\n // scopedSlots: {\r\n // icon: 'custom',\r\n // iconName: 'frown-o'\r\n // }\r\n // }\r\n // ]\r\n // }\r\n // ]\r\n }\r\n },\r\n methods: {\r\n refreshTreeStatus (props = {}) {},\r\n selectTreeNode (selectedKeys, e) {\r\n this.$emit('select', selectedKeys, e)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-tree__wrapper {\r\n overflow: hidden;\r\n ::v-deep .ant-tree {\r\n .ant-tree-node-content-wrapper {\r\n text-overflow: ellipsis;\r\n overflow: hidden;\r\n white-space: nowrap;\r\n }\r\n .ant-tree-node-selected {\r\n color: #fff;\r\n }\r\n }\r\n}\r\n</style>",".g-tree__wrapper {\n overflow: hidden;\n}\n.g-tree__wrapper ::v-deep .ant-tree .ant-tree-node-content-wrapper {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.g-tree__wrapper ::v-deep .ant-tree .ant-tree-node-selected {\n color: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1743
1758
|
|
|
1744
1759
|
};
|
|
1745
1760
|
/* scoped */
|
|
1746
|
-
const __vue_scope_id__$
|
|
1761
|
+
const __vue_scope_id__$m = "data-v-cc99bbf0";
|
|
1747
1762
|
/* module identifier */
|
|
1748
|
-
const __vue_module_identifier__$
|
|
1763
|
+
const __vue_module_identifier__$m = undefined;
|
|
1749
1764
|
/* functional template */
|
|
1750
|
-
const __vue_is_functional_template__$
|
|
1765
|
+
const __vue_is_functional_template__$m = false;
|
|
1751
1766
|
/* style inject SSR */
|
|
1752
1767
|
|
|
1753
1768
|
/* style inject shadow dom */
|
|
1754
1769
|
|
|
1755
1770
|
|
|
1756
1771
|
|
|
1757
|
-
const __vue_component__$
|
|
1758
|
-
{ render: __vue_render__$
|
|
1759
|
-
__vue_inject_styles__$
|
|
1760
|
-
__vue_script__$
|
|
1761
|
-
__vue_scope_id__$
|
|
1762
|
-
__vue_is_functional_template__$
|
|
1763
|
-
__vue_module_identifier__$
|
|
1772
|
+
const __vue_component__$m = /*#__PURE__*/normalizeComponent(
|
|
1773
|
+
{ render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
|
|
1774
|
+
__vue_inject_styles__$m,
|
|
1775
|
+
__vue_script__$m,
|
|
1776
|
+
__vue_scope_id__$m,
|
|
1777
|
+
__vue_is_functional_template__$m,
|
|
1778
|
+
__vue_module_identifier__$m,
|
|
1764
1779
|
false,
|
|
1765
1780
|
createInjector,
|
|
1766
1781
|
undefined,
|
|
1767
1782
|
undefined
|
|
1768
1783
|
);
|
|
1769
1784
|
|
|
1770
|
-
__vue_component__$
|
|
1785
|
+
__vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
|
|
1771
1786
|
|
|
1772
1787
|
//
|
|
1773
1788
|
//
|
|
@@ -1777,7 +1792,7 @@ __vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __v
|
|
|
1777
1792
|
//
|
|
1778
1793
|
//
|
|
1779
1794
|
|
|
1780
|
-
var script$
|
|
1795
|
+
var script$l = {
|
|
1781
1796
|
props: {
|
|
1782
1797
|
label: {
|
|
1783
1798
|
type: String
|
|
@@ -1786,10 +1801,10 @@ var script$k = {
|
|
|
1786
1801
|
};
|
|
1787
1802
|
|
|
1788
1803
|
/* script */
|
|
1789
|
-
const __vue_script__$
|
|
1804
|
+
const __vue_script__$l = script$l;
|
|
1790
1805
|
|
|
1791
1806
|
/* template */
|
|
1792
|
-
var __vue_render__$
|
|
1807
|
+
var __vue_render__$l = function () {
|
|
1793
1808
|
var _vm = this;
|
|
1794
1809
|
var _h = _vm.$createElement;
|
|
1795
1810
|
var _c = _vm._self._c || _h;
|
|
@@ -1799,34 +1814,34 @@ var __vue_render__$k = function () {
|
|
|
1799
1814
|
_c("span", { staticClass: "label__suffix" }, [_vm._v(":")]),
|
|
1800
1815
|
])
|
|
1801
1816
|
};
|
|
1802
|
-
var __vue_staticRenderFns__$
|
|
1803
|
-
__vue_render__$
|
|
1817
|
+
var __vue_staticRenderFns__$l = [];
|
|
1818
|
+
__vue_render__$l._withStripped = true;
|
|
1804
1819
|
|
|
1805
1820
|
/* style */
|
|
1806
|
-
const __vue_inject_styles__$
|
|
1821
|
+
const __vue_inject_styles__$l = function (inject) {
|
|
1807
1822
|
if (!inject) return
|
|
1808
|
-
inject("data-v-
|
|
1823
|
+
inject("data-v-40e71716_0", { source: ".g-search__label[data-v-40e71716] {\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-40e71716], .g-search__label .label__suffix[data-v-40e71716] {\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-40e71716] {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\composite-components\\search-area\\src\\label.vue","label.vue"],"names":[],"mappings":"AAkBA;EACA,iBAAA;EACA,gBAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACjBA;ADkBA;EACA,eAAA;EACA,0BAAA;EACA,mBAAA;AChBA;ADkBA;EACA,gBAAA;AChBA;;AAEA,oCAAoC","file":"label.vue","sourcesContent":["<template>\r\n <div class=\"g-search__label\">\r\n <span class=\"label__title\">{{ label }}</span>\r\n <span class=\"label__suffix\">:</span>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n props: {\r\n label: {\r\n type: String\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-search__label {\r\n /* width: 69px; */\r\n flex-basis: 69px;\r\n height: 32px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n .label__title, .label__suffix {\r\n font-size: 14px;\r\n color: rgba(0, 0, 0, 0.88);\r\n white-space: nowrap;\r\n }\r\n .label__suffix {\r\n margin-left: 4px;\r\n }\r\n}\r\n</style>",".g-search__label {\n /* width: 69px; */\n flex-basis: 69px;\n height: 32px;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.g-search__label .label__title, .g-search__label .label__suffix {\n font-size: 14px;\n color: rgba(0, 0, 0, 0.88);\n white-space: nowrap;\n}\n.g-search__label .label__suffix {\n margin-left: 4px;\n}\n\n/*# sourceMappingURL=label.vue.map */"]}, media: undefined });
|
|
1809
1824
|
|
|
1810
1825
|
};
|
|
1811
1826
|
/* scoped */
|
|
1812
|
-
const __vue_scope_id__$
|
|
1827
|
+
const __vue_scope_id__$l = "data-v-40e71716";
|
|
1813
1828
|
/* module identifier */
|
|
1814
|
-
const __vue_module_identifier__$
|
|
1829
|
+
const __vue_module_identifier__$l = undefined;
|
|
1815
1830
|
/* functional template */
|
|
1816
|
-
const __vue_is_functional_template__$
|
|
1831
|
+
const __vue_is_functional_template__$l = false;
|
|
1817
1832
|
/* style inject SSR */
|
|
1818
1833
|
|
|
1819
1834
|
/* style inject shadow dom */
|
|
1820
1835
|
|
|
1821
1836
|
|
|
1822
1837
|
|
|
1823
|
-
const __vue_component__$
|
|
1824
|
-
{ render: __vue_render__$
|
|
1825
|
-
__vue_inject_styles__$
|
|
1826
|
-
__vue_script__$
|
|
1827
|
-
__vue_scope_id__$
|
|
1828
|
-
__vue_is_functional_template__$
|
|
1829
|
-
__vue_module_identifier__$
|
|
1838
|
+
const __vue_component__$l = /*#__PURE__*/normalizeComponent(
|
|
1839
|
+
{ render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
|
|
1840
|
+
__vue_inject_styles__$l,
|
|
1841
|
+
__vue_script__$l,
|
|
1842
|
+
__vue_scope_id__$l,
|
|
1843
|
+
__vue_is_functional_template__$l,
|
|
1844
|
+
__vue_module_identifier__$l,
|
|
1830
1845
|
false,
|
|
1831
1846
|
createInjector,
|
|
1832
1847
|
undefined,
|
|
@@ -1834,14 +1849,14 @@ __vue_render__$k._withStripped = true;
|
|
|
1834
1849
|
);
|
|
1835
1850
|
|
|
1836
1851
|
//
|
|
1837
|
-
var script$
|
|
1852
|
+
var script$k = {
|
|
1838
1853
|
name: 'ele-search-area',
|
|
1839
1854
|
components: {
|
|
1840
|
-
EleInput: __vue_component__$
|
|
1841
|
-
EleSelect: __vue_component__$
|
|
1842
|
-
ELeButton: __vue_component__$
|
|
1843
|
-
Label: __vue_component__$
|
|
1844
|
-
EleDate: __vue_component__$
|
|
1855
|
+
EleInput: __vue_component__$q,
|
|
1856
|
+
EleSelect: __vue_component__$p,
|
|
1857
|
+
ELeButton: __vue_component__$s,
|
|
1858
|
+
Label: __vue_component__$l,
|
|
1859
|
+
EleDate: __vue_component__$r
|
|
1845
1860
|
},
|
|
1846
1861
|
props: {
|
|
1847
1862
|
gutter: {
|
|
@@ -1976,10 +1991,10 @@ var script$j = {
|
|
|
1976
1991
|
};
|
|
1977
1992
|
|
|
1978
1993
|
/* script */
|
|
1979
|
-
const __vue_script__$
|
|
1994
|
+
const __vue_script__$k = script$k;
|
|
1980
1995
|
|
|
1981
1996
|
/* template */
|
|
1982
|
-
var __vue_render__$
|
|
1997
|
+
var __vue_render__$k = function () {
|
|
1983
1998
|
var _vm = this;
|
|
1984
1999
|
var _h = _vm.$createElement;
|
|
1985
2000
|
var _c = _vm._self._c || _h;
|
|
@@ -2151,34 +2166,34 @@ var __vue_render__$j = function () {
|
|
|
2151
2166
|
1
|
|
2152
2167
|
)
|
|
2153
2168
|
};
|
|
2154
|
-
var __vue_staticRenderFns__$
|
|
2155
|
-
__vue_render__$
|
|
2169
|
+
var __vue_staticRenderFns__$k = [];
|
|
2170
|
+
__vue_render__$k._withStripped = true;
|
|
2156
2171
|
|
|
2157
2172
|
/* style */
|
|
2158
|
-
const __vue_inject_styles__$
|
|
2173
|
+
const __vue_inject_styles__$k = function (inject) {
|
|
2159
2174
|
if (!inject) return
|
|
2160
|
-
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 });
|
|
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 });
|
|
2161
2176
|
|
|
2162
2177
|
};
|
|
2163
2178
|
/* scoped */
|
|
2164
|
-
const __vue_scope_id__$
|
|
2179
|
+
const __vue_scope_id__$k = "data-v-4cecf96f";
|
|
2165
2180
|
/* module identifier */
|
|
2166
|
-
const __vue_module_identifier__$
|
|
2181
|
+
const __vue_module_identifier__$k = undefined;
|
|
2167
2182
|
/* functional template */
|
|
2168
|
-
const __vue_is_functional_template__$
|
|
2183
|
+
const __vue_is_functional_template__$k = false;
|
|
2169
2184
|
/* style inject SSR */
|
|
2170
2185
|
|
|
2171
2186
|
/* style inject shadow dom */
|
|
2172
2187
|
|
|
2173
2188
|
|
|
2174
2189
|
|
|
2175
|
-
const __vue_component__$
|
|
2176
|
-
{ render: __vue_render__$
|
|
2177
|
-
__vue_inject_styles__$
|
|
2178
|
-
__vue_script__$
|
|
2179
|
-
__vue_scope_id__$
|
|
2180
|
-
__vue_is_functional_template__$
|
|
2181
|
-
__vue_module_identifier__$
|
|
2190
|
+
const __vue_component__$k = /*#__PURE__*/normalizeComponent(
|
|
2191
|
+
{ render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
|
|
2192
|
+
__vue_inject_styles__$k,
|
|
2193
|
+
__vue_script__$k,
|
|
2194
|
+
__vue_scope_id__$k,
|
|
2195
|
+
__vue_is_functional_template__$k,
|
|
2196
|
+
__vue_module_identifier__$k,
|
|
2182
2197
|
false,
|
|
2183
2198
|
createInjector,
|
|
2184
2199
|
undefined,
|
|
@@ -2186,10 +2201,10 @@ __vue_render__$j._withStripped = true;
|
|
|
2186
2201
|
);
|
|
2187
2202
|
|
|
2188
2203
|
//
|
|
2189
|
-
var script$
|
|
2204
|
+
var script$j = {
|
|
2190
2205
|
name: 'ele-button-group',
|
|
2191
2206
|
components: {
|
|
2192
|
-
EleButton: __vue_component__$
|
|
2207
|
+
EleButton: __vue_component__$s
|
|
2193
2208
|
},
|
|
2194
2209
|
props: {
|
|
2195
2210
|
dataSource: {
|
|
@@ -2200,10 +2215,10 @@ var script$i = {
|
|
|
2200
2215
|
};
|
|
2201
2216
|
|
|
2202
2217
|
/* script */
|
|
2203
|
-
const __vue_script__$
|
|
2218
|
+
const __vue_script__$j = script$j;
|
|
2204
2219
|
|
|
2205
2220
|
/* template */
|
|
2206
|
-
var __vue_render__$
|
|
2221
|
+
var __vue_render__$j = function () {
|
|
2207
2222
|
var _vm = this;
|
|
2208
2223
|
var _h = _vm.$createElement;
|
|
2209
2224
|
var _c = _vm._self._c || _h;
|
|
@@ -2233,34 +2248,34 @@ var __vue_render__$i = function () {
|
|
|
2233
2248
|
1
|
|
2234
2249
|
)
|
|
2235
2250
|
};
|
|
2236
|
-
var __vue_staticRenderFns__$
|
|
2237
|
-
__vue_render__$
|
|
2251
|
+
var __vue_staticRenderFns__$j = [];
|
|
2252
|
+
__vue_render__$j._withStripped = true;
|
|
2238
2253
|
|
|
2239
2254
|
/* style */
|
|
2240
|
-
const __vue_inject_styles__$
|
|
2255
|
+
const __vue_inject_styles__$j = function (inject) {
|
|
2241
2256
|
if (!inject) return
|
|
2242
|
-
inject("data-v-
|
|
2257
|
+
inject("data-v-de67e2d2_0", { source: ".button-group__wrapper[data-v-de67e2d2] {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn[data-v-de67e2d2] {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn[data-v-de67e2d2]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\composite-components\\button-group\\src\\index.vue","index.vue"],"names":[],"mappings":"AAkCA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;ACjCA;ADkCA;EACA,gBAAA;AChCA;ADiCA;EACA,cAAA;AC/BA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"button-group__wrapper\">\r\n <ele-button \r\n v-for=\"(item, idx) in dataSource\" \r\n :type=\"item.type\"\r\n :icon=\"item.icon\"\r\n :mode=\"item.mode\"\r\n :data-source=\"item.optionList\"\r\n :event-name=\"item.eventName\"\r\n :record=\"item\"\r\n v-on=\"$listeners\"\r\n :key=\"idx\">\r\n {{ item.label }}\r\n </ele-button>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport EleButton from '../../../button/src/index.vue'\r\nexport default {\r\n name: 'ele-button-group',\r\n components: {\r\n EleButton\r\n },\r\n props: {\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.button-group__wrapper {\r\n display: flex;\r\n padding-left: 16px;\r\n padding-right: 16px;\r\n .ant-btn {\r\n margin-left: 8px;\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n }\r\n}\r\n</style>",".button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2243
2258
|
|
|
2244
2259
|
};
|
|
2245
2260
|
/* scoped */
|
|
2246
|
-
const __vue_scope_id__$
|
|
2261
|
+
const __vue_scope_id__$j = "data-v-de67e2d2";
|
|
2247
2262
|
/* module identifier */
|
|
2248
|
-
const __vue_module_identifier__$
|
|
2263
|
+
const __vue_module_identifier__$j = undefined;
|
|
2249
2264
|
/* functional template */
|
|
2250
|
-
const __vue_is_functional_template__$
|
|
2265
|
+
const __vue_is_functional_template__$j = false;
|
|
2251
2266
|
/* style inject SSR */
|
|
2252
2267
|
|
|
2253
2268
|
/* style inject shadow dom */
|
|
2254
2269
|
|
|
2255
2270
|
|
|
2256
2271
|
|
|
2257
|
-
const __vue_component__$
|
|
2258
|
-
{ render: __vue_render__$
|
|
2259
|
-
__vue_inject_styles__$
|
|
2260
|
-
__vue_script__$
|
|
2261
|
-
__vue_scope_id__$
|
|
2262
|
-
__vue_is_functional_template__$
|
|
2263
|
-
__vue_module_identifier__$
|
|
2272
|
+
const __vue_component__$j = /*#__PURE__*/normalizeComponent(
|
|
2273
|
+
{ render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
|
|
2274
|
+
__vue_inject_styles__$j,
|
|
2275
|
+
__vue_script__$j,
|
|
2276
|
+
__vue_scope_id__$j,
|
|
2277
|
+
__vue_is_functional_template__$j,
|
|
2278
|
+
__vue_module_identifier__$j,
|
|
2264
2279
|
false,
|
|
2265
2280
|
createInjector,
|
|
2266
2281
|
undefined,
|
|
@@ -2268,13 +2283,13 @@ __vue_render__$i._withStripped = true;
|
|
|
2268
2283
|
);
|
|
2269
2284
|
|
|
2270
2285
|
//
|
|
2271
|
-
var script$
|
|
2286
|
+
var script$i = {
|
|
2272
2287
|
name: 'ele-tree-table-model',
|
|
2273
2288
|
components: {
|
|
2274
|
-
EleTree: __vue_component__$
|
|
2275
|
-
EleTable: __vue_component__$
|
|
2276
|
-
EleSearchArea: __vue_component__$
|
|
2277
|
-
EleButtonGroup: __vue_component__$
|
|
2289
|
+
EleTree: __vue_component__$m,
|
|
2290
|
+
EleTable: __vue_component__$n,
|
|
2291
|
+
EleSearchArea: __vue_component__$k,
|
|
2292
|
+
EleButtonGroup: __vue_component__$j
|
|
2278
2293
|
},
|
|
2279
2294
|
props: {
|
|
2280
2295
|
treeMeta: {
|
|
@@ -2553,10 +2568,10 @@ var script$h = {
|
|
|
2553
2568
|
};
|
|
2554
2569
|
|
|
2555
2570
|
/* script */
|
|
2556
|
-
const __vue_script__$
|
|
2571
|
+
const __vue_script__$i = script$i;
|
|
2557
2572
|
|
|
2558
2573
|
/* template */
|
|
2559
|
-
var __vue_render__$
|
|
2574
|
+
var __vue_render__$i = function () {
|
|
2560
2575
|
var _vm = this;
|
|
2561
2576
|
var _h = _vm.$createElement;
|
|
2562
2577
|
var _c = _vm._self._c || _h;
|
|
@@ -2636,34 +2651,34 @@ var __vue_render__$h = function () {
|
|
|
2636
2651
|
]),
|
|
2637
2652
|
])
|
|
2638
2653
|
};
|
|
2639
|
-
var __vue_staticRenderFns__$
|
|
2640
|
-
__vue_render__$
|
|
2654
|
+
var __vue_staticRenderFns__$i = [];
|
|
2655
|
+
__vue_render__$i._withStripped = true;
|
|
2641
2656
|
|
|
2642
2657
|
/* style */
|
|
2643
|
-
const __vue_inject_styles__$
|
|
2658
|
+
const __vue_inject_styles__$i = function (inject) {
|
|
2644
2659
|
if (!inject) return
|
|
2645
|
-
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 });
|
|
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 });
|
|
2646
2661
|
|
|
2647
2662
|
};
|
|
2648
2663
|
/* scoped */
|
|
2649
|
-
const __vue_scope_id__$
|
|
2664
|
+
const __vue_scope_id__$i = "data-v-fe2ee33e";
|
|
2650
2665
|
/* module identifier */
|
|
2651
|
-
const __vue_module_identifier__$
|
|
2666
|
+
const __vue_module_identifier__$i = undefined;
|
|
2652
2667
|
/* functional template */
|
|
2653
|
-
const __vue_is_functional_template__$
|
|
2668
|
+
const __vue_is_functional_template__$i = false;
|
|
2654
2669
|
/* style inject SSR */
|
|
2655
2670
|
|
|
2656
2671
|
/* style inject shadow dom */
|
|
2657
2672
|
|
|
2658
2673
|
|
|
2659
2674
|
|
|
2660
|
-
const __vue_component__$
|
|
2661
|
-
{ render: __vue_render__$
|
|
2662
|
-
__vue_inject_styles__$
|
|
2663
|
-
__vue_script__$
|
|
2664
|
-
__vue_scope_id__$
|
|
2665
|
-
__vue_is_functional_template__$
|
|
2666
|
-
__vue_module_identifier__$
|
|
2675
|
+
const __vue_component__$i = /*#__PURE__*/normalizeComponent(
|
|
2676
|
+
{ render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
|
|
2677
|
+
__vue_inject_styles__$i,
|
|
2678
|
+
__vue_script__$i,
|
|
2679
|
+
__vue_scope_id__$i,
|
|
2680
|
+
__vue_is_functional_template__$i,
|
|
2681
|
+
__vue_module_identifier__$i,
|
|
2667
2682
|
false,
|
|
2668
2683
|
createInjector,
|
|
2669
2684
|
undefined,
|
|
@@ -2683,7 +2698,7 @@ __vue_render__$h._withStripped = true;
|
|
|
2683
2698
|
//
|
|
2684
2699
|
//
|
|
2685
2700
|
|
|
2686
|
-
var script$
|
|
2701
|
+
var script$h = {
|
|
2687
2702
|
name: 'ele-textarea',
|
|
2688
2703
|
model: {
|
|
2689
2704
|
prop: 'value',
|
|
@@ -2725,10 +2740,10 @@ var script$g = {
|
|
|
2725
2740
|
};
|
|
2726
2741
|
|
|
2727
2742
|
/* script */
|
|
2728
|
-
const __vue_script__$
|
|
2743
|
+
const __vue_script__$h = script$h;
|
|
2729
2744
|
|
|
2730
2745
|
/* template */
|
|
2731
|
-
var __vue_render__$
|
|
2746
|
+
var __vue_render__$h = function () {
|
|
2732
2747
|
var _vm = this;
|
|
2733
2748
|
var _h = _vm.$createElement;
|
|
2734
2749
|
var _c = _vm._self._c || _h;
|
|
@@ -2744,34 +2759,34 @@ var __vue_render__$g = function () {
|
|
|
2744
2759
|
on: { change: _vm.onChange },
|
|
2745
2760
|
})
|
|
2746
2761
|
};
|
|
2747
|
-
var __vue_staticRenderFns__$
|
|
2748
|
-
__vue_render__$
|
|
2762
|
+
var __vue_staticRenderFns__$h = [];
|
|
2763
|
+
__vue_render__$h._withStripped = true;
|
|
2749
2764
|
|
|
2750
2765
|
/* style */
|
|
2751
|
-
const __vue_inject_styles__$
|
|
2766
|
+
const __vue_inject_styles__$h = function (inject) {
|
|
2752
2767
|
if (!inject) return
|
|
2753
|
-
inject("data-v-
|
|
2768
|
+
inject("data-v-416114ba_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 });
|
|
2754
2769
|
|
|
2755
2770
|
};
|
|
2756
2771
|
/* scoped */
|
|
2757
|
-
const __vue_scope_id__$
|
|
2772
|
+
const __vue_scope_id__$h = "data-v-416114ba";
|
|
2758
2773
|
/* module identifier */
|
|
2759
|
-
const __vue_module_identifier__$
|
|
2774
|
+
const __vue_module_identifier__$h = undefined;
|
|
2760
2775
|
/* functional template */
|
|
2761
|
-
const __vue_is_functional_template__$
|
|
2776
|
+
const __vue_is_functional_template__$h = false;
|
|
2762
2777
|
/* style inject SSR */
|
|
2763
2778
|
|
|
2764
2779
|
/* style inject shadow dom */
|
|
2765
2780
|
|
|
2766
2781
|
|
|
2767
2782
|
|
|
2768
|
-
const __vue_component__$
|
|
2769
|
-
{ render: __vue_render__$
|
|
2770
|
-
__vue_inject_styles__$
|
|
2771
|
-
__vue_script__$
|
|
2772
|
-
__vue_scope_id__$
|
|
2773
|
-
__vue_is_functional_template__$
|
|
2774
|
-
__vue_module_identifier__$
|
|
2783
|
+
const __vue_component__$h = /*#__PURE__*/normalizeComponent(
|
|
2784
|
+
{ render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
|
|
2785
|
+
__vue_inject_styles__$h,
|
|
2786
|
+
__vue_script__$h,
|
|
2787
|
+
__vue_scope_id__$h,
|
|
2788
|
+
__vue_is_functional_template__$h,
|
|
2789
|
+
__vue_module_identifier__$h,
|
|
2775
2790
|
false,
|
|
2776
2791
|
createInjector,
|
|
2777
2792
|
undefined,
|
|
@@ -2788,7 +2803,7 @@ __vue_render__$g._withStripped = true;
|
|
|
2788
2803
|
//
|
|
2789
2804
|
//
|
|
2790
2805
|
|
|
2791
|
-
var script$
|
|
2806
|
+
var script$g = {
|
|
2792
2807
|
name: 'ele-icon',
|
|
2793
2808
|
props: {
|
|
2794
2809
|
type: {
|
|
@@ -2811,10 +2826,10 @@ var script$f = {
|
|
|
2811
2826
|
};
|
|
2812
2827
|
|
|
2813
2828
|
/* script */
|
|
2814
|
-
const __vue_script__$
|
|
2829
|
+
const __vue_script__$g = script$g;
|
|
2815
2830
|
|
|
2816
2831
|
/* template */
|
|
2817
|
-
var __vue_render__$
|
|
2832
|
+
var __vue_render__$g = function () {
|
|
2818
2833
|
var _vm = this;
|
|
2819
2834
|
var _h = _vm.$createElement;
|
|
2820
2835
|
var _c = _vm._self._c || _h;
|
|
@@ -2822,17 +2837,17 @@ var __vue_render__$f = function () {
|
|
|
2822
2837
|
? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
|
|
2823
2838
|
: _c("i", { class: ["iconfont", _vm.type] })
|
|
2824
2839
|
};
|
|
2825
|
-
var __vue_staticRenderFns__$
|
|
2826
|
-
__vue_render__$
|
|
2840
|
+
var __vue_staticRenderFns__$g = [];
|
|
2841
|
+
__vue_render__$g._withStripped = true;
|
|
2827
2842
|
|
|
2828
2843
|
/* style */
|
|
2829
|
-
const __vue_inject_styles__$
|
|
2844
|
+
const __vue_inject_styles__$g = undefined;
|
|
2830
2845
|
/* scoped */
|
|
2831
|
-
const __vue_scope_id__$
|
|
2846
|
+
const __vue_scope_id__$g = undefined;
|
|
2832
2847
|
/* module identifier */
|
|
2833
|
-
const __vue_module_identifier__$
|
|
2848
|
+
const __vue_module_identifier__$g = undefined;
|
|
2834
2849
|
/* functional template */
|
|
2835
|
-
const __vue_is_functional_template__$
|
|
2850
|
+
const __vue_is_functional_template__$g = false;
|
|
2836
2851
|
/* style inject */
|
|
2837
2852
|
|
|
2838
2853
|
/* style inject SSR */
|
|
@@ -2841,13 +2856,13 @@ __vue_render__$f._withStripped = true;
|
|
|
2841
2856
|
|
|
2842
2857
|
|
|
2843
2858
|
|
|
2844
|
-
const __vue_component__$
|
|
2845
|
-
{ render: __vue_render__$
|
|
2846
|
-
__vue_inject_styles__$
|
|
2847
|
-
__vue_script__$
|
|
2848
|
-
__vue_scope_id__$
|
|
2849
|
-
__vue_is_functional_template__$
|
|
2850
|
-
__vue_module_identifier__$
|
|
2859
|
+
const __vue_component__$g = /*#__PURE__*/normalizeComponent(
|
|
2860
|
+
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
|
|
2861
|
+
__vue_inject_styles__$g,
|
|
2862
|
+
__vue_script__$g,
|
|
2863
|
+
__vue_scope_id__$g,
|
|
2864
|
+
__vue_is_functional_template__$g,
|
|
2865
|
+
__vue_module_identifier__$g,
|
|
2851
2866
|
false,
|
|
2852
2867
|
undefined,
|
|
2853
2868
|
undefined,
|
|
@@ -2855,11 +2870,11 @@ __vue_render__$f._withStripped = true;
|
|
|
2855
2870
|
);
|
|
2856
2871
|
|
|
2857
2872
|
//
|
|
2858
|
-
var script$
|
|
2873
|
+
var script$f = {
|
|
2859
2874
|
name: 'ele-upload',
|
|
2860
2875
|
components: {
|
|
2861
2876
|
FileUpload,
|
|
2862
|
-
EleIcon: __vue_component__$
|
|
2877
|
+
EleIcon: __vue_component__$g
|
|
2863
2878
|
},
|
|
2864
2879
|
model: {
|
|
2865
2880
|
prop: 'value',
|
|
@@ -3089,10 +3104,10 @@ var script$e = {
|
|
|
3089
3104
|
};
|
|
3090
3105
|
|
|
3091
3106
|
/* script */
|
|
3092
|
-
const __vue_script__$
|
|
3107
|
+
const __vue_script__$f = script$f;
|
|
3093
3108
|
|
|
3094
3109
|
/* template */
|
|
3095
|
-
var __vue_render__$
|
|
3110
|
+
var __vue_render__$f = function () {
|
|
3096
3111
|
var _vm = this;
|
|
3097
3112
|
var _h = _vm.$createElement;
|
|
3098
3113
|
var _c = _vm._self._c || _h;
|
|
@@ -3230,34 +3245,34 @@ var __vue_render__$e = function () {
|
|
|
3230
3245
|
1
|
|
3231
3246
|
)
|
|
3232
3247
|
};
|
|
3233
|
-
var __vue_staticRenderFns__$
|
|
3234
|
-
__vue_render__$
|
|
3248
|
+
var __vue_staticRenderFns__$f = [];
|
|
3249
|
+
__vue_render__$f._withStripped = true;
|
|
3235
3250
|
|
|
3236
3251
|
/* style */
|
|
3237
|
-
const __vue_inject_styles__$
|
|
3252
|
+
const __vue_inject_styles__$f = function (inject) {
|
|
3238
3253
|
if (!inject) return
|
|
3239
|
-
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 });
|
|
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 });
|
|
3240
3255
|
|
|
3241
3256
|
};
|
|
3242
3257
|
/* scoped */
|
|
3243
|
-
const __vue_scope_id__$
|
|
3258
|
+
const __vue_scope_id__$f = "data-v-7a628fc7";
|
|
3244
3259
|
/* module identifier */
|
|
3245
|
-
const __vue_module_identifier__$
|
|
3260
|
+
const __vue_module_identifier__$f = undefined;
|
|
3246
3261
|
/* functional template */
|
|
3247
|
-
const __vue_is_functional_template__$
|
|
3262
|
+
const __vue_is_functional_template__$f = false;
|
|
3248
3263
|
/* style inject SSR */
|
|
3249
3264
|
|
|
3250
3265
|
/* style inject shadow dom */
|
|
3251
3266
|
|
|
3252
3267
|
|
|
3253
3268
|
|
|
3254
|
-
const __vue_component__$
|
|
3255
|
-
{ render: __vue_render__$
|
|
3256
|
-
__vue_inject_styles__$
|
|
3257
|
-
__vue_script__$
|
|
3258
|
-
__vue_scope_id__$
|
|
3259
|
-
__vue_is_functional_template__$
|
|
3260
|
-
__vue_module_identifier__$
|
|
3269
|
+
const __vue_component__$f = /*#__PURE__*/normalizeComponent(
|
|
3270
|
+
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
|
|
3271
|
+
__vue_inject_styles__$f,
|
|
3272
|
+
__vue_script__$f,
|
|
3273
|
+
__vue_scope_id__$f,
|
|
3274
|
+
__vue_is_functional_template__$f,
|
|
3275
|
+
__vue_module_identifier__$f,
|
|
3261
3276
|
false,
|
|
3262
3277
|
createInjector,
|
|
3263
3278
|
undefined,
|
|
@@ -3283,7 +3298,7 @@ __vue_render__$e._withStripped = true;
|
|
|
3283
3298
|
//
|
|
3284
3299
|
//
|
|
3285
3300
|
|
|
3286
|
-
var script$
|
|
3301
|
+
var script$e = {
|
|
3287
3302
|
name: 'ele-select-entity',
|
|
3288
3303
|
props: {
|
|
3289
3304
|
value: {
|
|
@@ -3340,10 +3355,10 @@ var script$d = {
|
|
|
3340
3355
|
};
|
|
3341
3356
|
|
|
3342
3357
|
/* script */
|
|
3343
|
-
const __vue_script__$
|
|
3358
|
+
const __vue_script__$e = script$e;
|
|
3344
3359
|
|
|
3345
3360
|
/* template */
|
|
3346
|
-
var __vue_render__$
|
|
3361
|
+
var __vue_render__$e = function () {
|
|
3347
3362
|
var _vm = this;
|
|
3348
3363
|
var _h = _vm.$createElement;
|
|
3349
3364
|
var _c = _vm._self._c || _h;
|
|
@@ -3393,34 +3408,34 @@ var __vue_render__$d = function () {
|
|
|
3393
3408
|
2
|
|
3394
3409
|
)
|
|
3395
3410
|
};
|
|
3396
|
-
var __vue_staticRenderFns__$
|
|
3397
|
-
__vue_render__$
|
|
3411
|
+
var __vue_staticRenderFns__$e = [];
|
|
3412
|
+
__vue_render__$e._withStripped = true;
|
|
3398
3413
|
|
|
3399
3414
|
/* style */
|
|
3400
|
-
const __vue_inject_styles__$
|
|
3415
|
+
const __vue_inject_styles__$e = function (inject) {
|
|
3401
3416
|
if (!inject) return
|
|
3402
|
-
inject("data-v-
|
|
3417
|
+
inject("data-v-328544bb_0", { source: ".g-select-entity__wrapper[data-v-328544bb] {\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-328544bb]:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input[data-v-328544bb] {\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-328544bb] {\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-328544bb] {\n border-color: var(--idooel-form-border-err-color);\n}\n.g-select-entity__disabled .select-entity__input[data-v-328544bb] {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\select-entity\\src\\index.vue","index.vue"],"names":[],"mappings":"AA6EA;EACA,eAAA;EACA,iBAAA;EACA,kBAAA;EACA,WAAA;EACA,aAAA;EACA,6BAAA;EACA,kBAAA;EACA,uDAAA;AC5EA;AD6EA;EACA,yCAAA;AC3EA;AD6EA;EACA,eAAA;EACA,sBAAA;EACA,kBAAA;EACA,YAAA;EACA,gBAAA;EACA,gBAAA;AC3EA;AD6EA;EACA,eAAA;EACA,6BAAA;EACA,wCAAA;EACA,4DAAA;EACA,eAAA;EACA,gBAAA;EACA,mBAAA;AC3EA;AD8EA;EACA,iDAAA;AC3EA;AD6EA;EACA,wCAAA;AC1EA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"g-select-entity__wrapper\" :class=\"disabled ? 'g-select-entity__disabled' : ''\">\r\n <span class=\"select-entity__input\">\r\n <a-tag\r\n v-for=\"(item, inx) in getValueList()\"\r\n :key=\"item.value\"\r\n :closable=\"!disabled && !getIsMaxCount()\"\r\n @close=\"onClose(...arguments, inx)\"\r\n >\r\n {{ item.label }}\r\n </a-tag>\r\n <a-tag v-if=\"getIsMaxCount()\">......</a-tag>\r\n </span>\r\n <span class=\"select-entity__addon\" @click=\"onChange\">{{ addonAfter }}</span>\r\n <slot></slot>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-select-entity',\r\n props: {\r\n value: {\r\n type: [Array, Object]\r\n },\r\n multiple: {\r\n type: Boolean,\r\n default: true\r\n },\r\n maxCount: {\r\n type: Number,\r\n default: 7\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n },\r\n addonAfter: {\r\n type: String,\r\n default: '选择'\r\n }\r\n },\r\n methods: {\r\n getValueList () {\r\n if (this.value) {\r\n if (this.multiple) {\r\n return this.getIsMaxCount() ? this.value.slice(0, this.maxCount) : this.value\r\n }\r\n return [this.value]\r\n }\r\n return []\r\n },\r\n getIsMaxCount () {\r\n if (this.value && this.multiple) {\r\n return this.value.length >= this.maxCount\r\n }\r\n return false\r\n },\r\n onChange () {\r\n if (this.disabled) return\r\n this.$emit('change', this.value)\r\n },\r\n onClose (e, inx) {\r\n e = window.event || e\r\n e.preventDefault()\r\n if (!this.multiple) {\r\n this.$emit('change', null)\r\n return\r\n }\r\n this.value.splice(inx, 1)\r\n this.$emit('change', this.value)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.g-select-entity__wrapper {\r\n font-size: 14px;\r\n line-height: 30px;\r\n position: relative;\r\n width: 100%;\r\n display: flex;\r\n color: var(--idoole-black-07);\r\n border-radius: 4px;\r\n border: 1px solid var(--idooel-form-title-border-color);\r\n &:hover {\r\n border-color: var(--idooel-primary-color);\r\n }\r\n .select-entity__input {\r\n padding: 0 11px;\r\n background-color: #fff;\r\n border-radius: 4px;\r\n flex-grow: 1;\r\n min-height: 30px;\r\n text-align: left;\r\n }\r\n .select-entity__addon {\r\n padding: 0 11px;\r\n color: var(--idoole-black-07);\r\n background-color: var(--idoole-black-02);\r\n border-left: 1px solid var(--idooel-form-title-border-color);\r\n cursor: pointer;\r\n min-height: 30px;\r\n white-space: nowrap;\r\n }\r\n}\r\n.has-error .g-select-entity__wrapper {\r\n border-color: var(--idooel-form-border-err-color);\r\n}\r\n.g-select-entity__disabled .select-entity__input {\r\n background-color: var(--idoole-black-02);\r\n}\r\n</style>",".g-select-entity__wrapper {\n font-size: 14px;\n line-height: 30px;\n position: relative;\n width: 100%;\n display: flex;\n color: var(--idoole-black-07);\n border-radius: 4px;\n border: 1px solid var(--idooel-form-title-border-color);\n}\n.g-select-entity__wrapper:hover {\n border-color: var(--idooel-primary-color);\n}\n.g-select-entity__wrapper .select-entity__input {\n padding: 0 11px;\n background-color: #fff;\n border-radius: 4px;\n flex-grow: 1;\n min-height: 30px;\n text-align: left;\n}\n.g-select-entity__wrapper .select-entity__addon {\n padding: 0 11px;\n color: var(--idoole-black-07);\n background-color: var(--idoole-black-02);\n border-left: 1px solid var(--idooel-form-title-border-color);\n cursor: pointer;\n min-height: 30px;\n white-space: nowrap;\n}\n\n.has-error .g-select-entity__wrapper {\n border-color: var(--idooel-form-border-err-color);\n}\n\n.g-select-entity__disabled .select-entity__input {\n background-color: var(--idoole-black-02);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3403
3418
|
|
|
3404
3419
|
};
|
|
3405
3420
|
/* scoped */
|
|
3406
|
-
const __vue_scope_id__$
|
|
3421
|
+
const __vue_scope_id__$e = "data-v-328544bb";
|
|
3407
3422
|
/* module identifier */
|
|
3408
|
-
const __vue_module_identifier__$
|
|
3423
|
+
const __vue_module_identifier__$e = undefined;
|
|
3409
3424
|
/* functional template */
|
|
3410
|
-
const __vue_is_functional_template__$
|
|
3425
|
+
const __vue_is_functional_template__$e = false;
|
|
3411
3426
|
/* style inject SSR */
|
|
3412
3427
|
|
|
3413
3428
|
/* style inject shadow dom */
|
|
3414
3429
|
|
|
3415
3430
|
|
|
3416
3431
|
|
|
3417
|
-
const __vue_component__$
|
|
3418
|
-
{ render: __vue_render__$
|
|
3419
|
-
__vue_inject_styles__$
|
|
3420
|
-
__vue_script__$
|
|
3421
|
-
__vue_scope_id__$
|
|
3422
|
-
__vue_is_functional_template__$
|
|
3423
|
-
__vue_module_identifier__$
|
|
3432
|
+
const __vue_component__$e = /*#__PURE__*/normalizeComponent(
|
|
3433
|
+
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
|
|
3434
|
+
__vue_inject_styles__$e,
|
|
3435
|
+
__vue_script__$e,
|
|
3436
|
+
__vue_scope_id__$e,
|
|
3437
|
+
__vue_is_functional_template__$e,
|
|
3438
|
+
__vue_module_identifier__$e,
|
|
3424
3439
|
false,
|
|
3425
3440
|
createInjector,
|
|
3426
3441
|
undefined,
|
|
@@ -3434,7 +3449,7 @@ __vue_render__$d._withStripped = true;
|
|
|
3434
3449
|
//
|
|
3435
3450
|
//
|
|
3436
3451
|
|
|
3437
|
-
var script$
|
|
3452
|
+
var script$d = {
|
|
3438
3453
|
name: 'ele-input-number',
|
|
3439
3454
|
props: {
|
|
3440
3455
|
precision: {
|
|
@@ -3452,10 +3467,10 @@ var script$c = {
|
|
|
3452
3467
|
};
|
|
3453
3468
|
|
|
3454
3469
|
/* script */
|
|
3455
|
-
const __vue_script__$
|
|
3470
|
+
const __vue_script__$d = script$d;
|
|
3456
3471
|
|
|
3457
3472
|
/* template */
|
|
3458
|
-
var __vue_render__$
|
|
3473
|
+
var __vue_render__$d = function () {
|
|
3459
3474
|
var _vm = this;
|
|
3460
3475
|
var _h = _vm.$createElement;
|
|
3461
3476
|
var _c = _vm._self._c || _h;
|
|
@@ -3479,17 +3494,17 @@ var __vue_render__$c = function () {
|
|
|
3479
3494
|
1
|
|
3480
3495
|
)
|
|
3481
3496
|
};
|
|
3482
|
-
var __vue_staticRenderFns__$
|
|
3483
|
-
__vue_render__$
|
|
3497
|
+
var __vue_staticRenderFns__$d = [];
|
|
3498
|
+
__vue_render__$d._withStripped = true;
|
|
3484
3499
|
|
|
3485
3500
|
/* style */
|
|
3486
|
-
const __vue_inject_styles__$
|
|
3501
|
+
const __vue_inject_styles__$d = undefined;
|
|
3487
3502
|
/* scoped */
|
|
3488
|
-
const __vue_scope_id__$
|
|
3503
|
+
const __vue_scope_id__$d = undefined;
|
|
3489
3504
|
/* module identifier */
|
|
3490
|
-
const __vue_module_identifier__$
|
|
3505
|
+
const __vue_module_identifier__$d = undefined;
|
|
3491
3506
|
/* functional template */
|
|
3492
|
-
const __vue_is_functional_template__$
|
|
3507
|
+
const __vue_is_functional_template__$d = false;
|
|
3493
3508
|
/* style inject */
|
|
3494
3509
|
|
|
3495
3510
|
/* style inject SSR */
|
|
@@ -3498,13 +3513,13 @@ __vue_render__$c._withStripped = true;
|
|
|
3498
3513
|
|
|
3499
3514
|
|
|
3500
3515
|
|
|
3501
|
-
const __vue_component__$
|
|
3502
|
-
{ render: __vue_render__$
|
|
3503
|
-
__vue_inject_styles__$
|
|
3504
|
-
__vue_script__$
|
|
3505
|
-
__vue_scope_id__$
|
|
3506
|
-
__vue_is_functional_template__$
|
|
3507
|
-
__vue_module_identifier__$
|
|
3516
|
+
const __vue_component__$d = /*#__PURE__*/normalizeComponent(
|
|
3517
|
+
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
|
|
3518
|
+
__vue_inject_styles__$d,
|
|
3519
|
+
__vue_script__$d,
|
|
3520
|
+
__vue_scope_id__$d,
|
|
3521
|
+
__vue_is_functional_template__$d,
|
|
3522
|
+
__vue_module_identifier__$d,
|
|
3508
3523
|
false,
|
|
3509
3524
|
undefined,
|
|
3510
3525
|
undefined,
|
|
@@ -3516,7 +3531,7 @@ __vue_render__$c._withStripped = true;
|
|
|
3516
3531
|
//
|
|
3517
3532
|
//
|
|
3518
3533
|
|
|
3519
|
-
var script$
|
|
3534
|
+
var script$c = {
|
|
3520
3535
|
name: 'ele-checkbox',
|
|
3521
3536
|
props: {
|
|
3522
3537
|
value: {
|
|
@@ -3540,10 +3555,10 @@ var script$b = {
|
|
|
3540
3555
|
};
|
|
3541
3556
|
|
|
3542
3557
|
/* script */
|
|
3543
|
-
const __vue_script__$
|
|
3558
|
+
const __vue_script__$c = script$c;
|
|
3544
3559
|
|
|
3545
3560
|
/* template */
|
|
3546
|
-
var __vue_render__$
|
|
3561
|
+
var __vue_render__$c = function () {
|
|
3547
3562
|
var _vm = this;
|
|
3548
3563
|
var _h = _vm.$createElement;
|
|
3549
3564
|
var _c = _vm._self._c || _h;
|
|
@@ -3556,34 +3571,34 @@ var __vue_render__$b = function () {
|
|
|
3556
3571
|
on: { change: _vm.onChange },
|
|
3557
3572
|
})
|
|
3558
3573
|
};
|
|
3559
|
-
var __vue_staticRenderFns__$
|
|
3560
|
-
__vue_render__$
|
|
3574
|
+
var __vue_staticRenderFns__$c = [];
|
|
3575
|
+
__vue_render__$c._withStripped = true;
|
|
3561
3576
|
|
|
3562
3577
|
/* style */
|
|
3563
|
-
const __vue_inject_styles__$
|
|
3578
|
+
const __vue_inject_styles__$c = function (inject) {
|
|
3564
3579
|
if (!inject) return
|
|
3565
|
-
inject("data-v-
|
|
3580
|
+
inject("data-v-63b1b120_0", { source: ".ant-checkbox-group[data-v-63b1b120] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-checkbox-group[data-v-63b1b120] .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group[data-v-63b1b120] .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\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>\r\n <a-checkbox-group :options=\"dataSource\" :disabled=\"disabled\" :defaultValue=\"value\" @change=\"onChange\"></a-checkbox-group>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-checkbox',\r\n props: {\r\n value: {\r\n type: Array\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n methods: {\r\n onChange (value) {\r\n this.$emit('change', value)\r\n this.$emit('input', value)\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ant-checkbox-group {\r\n text-align: left;\r\n line-height: 32px;\r\n}\r\n.has-error {\r\n .ant-checkbox-group {\r\n ::v-deep .ant-checkbox-wrapper {\r\n color: var(--idooel-form-border-err-color);\r\n }\r\n ::v-deep .ant-checkbox-inner {\r\n border-color: var(--idooel-form-border-err-color);\r\n }\r\n }\r\n}\r\n</style>",".ant-checkbox-group {\n text-align: left;\n line-height: 32px;\n}\n\n.has-error .ant-checkbox-group ::v-deep .ant-checkbox-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-checkbox-group ::v-deep .ant-checkbox-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3566
3581
|
|
|
3567
3582
|
};
|
|
3568
3583
|
/* scoped */
|
|
3569
|
-
const __vue_scope_id__$
|
|
3584
|
+
const __vue_scope_id__$c = "data-v-63b1b120";
|
|
3570
3585
|
/* module identifier */
|
|
3571
|
-
const __vue_module_identifier__$
|
|
3586
|
+
const __vue_module_identifier__$c = undefined;
|
|
3572
3587
|
/* functional template */
|
|
3573
|
-
const __vue_is_functional_template__$
|
|
3588
|
+
const __vue_is_functional_template__$c = false;
|
|
3574
3589
|
/* style inject SSR */
|
|
3575
3590
|
|
|
3576
3591
|
/* style inject shadow dom */
|
|
3577
3592
|
|
|
3578
3593
|
|
|
3579
3594
|
|
|
3580
|
-
const __vue_component__$
|
|
3581
|
-
{ render: __vue_render__$
|
|
3582
|
-
__vue_inject_styles__$
|
|
3583
|
-
__vue_script__$
|
|
3584
|
-
__vue_scope_id__$
|
|
3585
|
-
__vue_is_functional_template__$
|
|
3586
|
-
__vue_module_identifier__$
|
|
3595
|
+
const __vue_component__$c = /*#__PURE__*/normalizeComponent(
|
|
3596
|
+
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
|
|
3597
|
+
__vue_inject_styles__$c,
|
|
3598
|
+
__vue_script__$c,
|
|
3599
|
+
__vue_scope_id__$c,
|
|
3600
|
+
__vue_is_functional_template__$c,
|
|
3601
|
+
__vue_module_identifier__$c,
|
|
3587
3602
|
false,
|
|
3588
3603
|
createInjector,
|
|
3589
3604
|
undefined,
|
|
@@ -3599,7 +3614,7 @@ __vue_render__$b._withStripped = true;
|
|
|
3599
3614
|
//
|
|
3600
3615
|
//
|
|
3601
3616
|
|
|
3602
|
-
var script$
|
|
3617
|
+
var script$b = {
|
|
3603
3618
|
name: 'ele-radio',
|
|
3604
3619
|
model: {
|
|
3605
3620
|
prop: 'value',
|
|
@@ -3627,10 +3642,10 @@ var script$a = {
|
|
|
3627
3642
|
};
|
|
3628
3643
|
|
|
3629
3644
|
/* script */
|
|
3630
|
-
const __vue_script__$
|
|
3645
|
+
const __vue_script__$b = script$b;
|
|
3631
3646
|
|
|
3632
3647
|
/* template */
|
|
3633
|
-
var __vue_render__$
|
|
3648
|
+
var __vue_render__$b = function () {
|
|
3634
3649
|
var _vm = this;
|
|
3635
3650
|
var _h = _vm.$createElement;
|
|
3636
3651
|
var _c = _vm._self._c || _h;
|
|
@@ -3648,34 +3663,34 @@ var __vue_render__$a = function () {
|
|
|
3648
3663
|
1
|
|
3649
3664
|
)
|
|
3650
3665
|
};
|
|
3651
|
-
var __vue_staticRenderFns__$
|
|
3652
|
-
__vue_render__$
|
|
3666
|
+
var __vue_staticRenderFns__$b = [];
|
|
3667
|
+
__vue_render__$b._withStripped = true;
|
|
3653
3668
|
|
|
3654
3669
|
/* style */
|
|
3655
|
-
const __vue_inject_styles__$
|
|
3670
|
+
const __vue_inject_styles__$b = function (inject) {
|
|
3656
3671
|
if (!inject) return
|
|
3657
|
-
inject("data-v-
|
|
3672
|
+
inject("data-v-14b69fc8_0", { source: ".ant-radio-group[data-v-14b69fc8] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-radio-group[data-v-14b69fc8] .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group[data-v-14b69fc8] .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\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>\r\n <a-radio-group :value=\"value\" @change=\"onChange\" :disabled=\"disabled\">\r\n <a-radio v-for=\"item in dataSource\" :key=\"item.value\" :value=\"item.value\">\r\n {{ item.label }}\r\n </a-radio>\r\n </a-radio-group>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-radio',\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n value: {\r\n type: [String, Array, Number]\r\n },\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n },\r\n disabled: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n methods: {\r\n onChange (e) {\r\n this.$emit('change', e.target.value)\r\n this.$emit('input', e.target.value)\r\n }\r\n }\r\n}\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ant-radio-group {\r\n text-align: left;\r\n line-height: 32px;\r\n}\r\n.has-error {\r\n .ant-radio-group {\r\n ::v-deep .ant-radio-wrapper {\r\n color: var(--idooel-form-border-err-color);\r\n }\r\n ::v-deep .ant-radio-inner {\r\n border-color: var(--idooel-form-border-err-color);\r\n }\r\n }\r\n}\r\n</style>",".ant-radio-group {\n text-align: left;\n line-height: 32px;\n}\n\n.has-error .ant-radio-group ::v-deep .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group ::v-deep .ant-radio-inner {\n border-color: var(--idooel-form-border-err-color);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3658
3673
|
|
|
3659
3674
|
};
|
|
3660
3675
|
/* scoped */
|
|
3661
|
-
const __vue_scope_id__$
|
|
3676
|
+
const __vue_scope_id__$b = "data-v-14b69fc8";
|
|
3662
3677
|
/* module identifier */
|
|
3663
|
-
const __vue_module_identifier__$
|
|
3678
|
+
const __vue_module_identifier__$b = undefined;
|
|
3664
3679
|
/* functional template */
|
|
3665
|
-
const __vue_is_functional_template__$
|
|
3680
|
+
const __vue_is_functional_template__$b = false;
|
|
3666
3681
|
/* style inject SSR */
|
|
3667
3682
|
|
|
3668
3683
|
/* style inject shadow dom */
|
|
3669
3684
|
|
|
3670
3685
|
|
|
3671
3686
|
|
|
3672
|
-
const __vue_component__$
|
|
3673
|
-
{ render: __vue_render__$
|
|
3674
|
-
__vue_inject_styles__$
|
|
3675
|
-
__vue_script__$
|
|
3676
|
-
__vue_scope_id__$
|
|
3677
|
-
__vue_is_functional_template__$
|
|
3678
|
-
__vue_module_identifier__$
|
|
3687
|
+
const __vue_component__$b = /*#__PURE__*/normalizeComponent(
|
|
3688
|
+
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
|
|
3689
|
+
__vue_inject_styles__$b,
|
|
3690
|
+
__vue_script__$b,
|
|
3691
|
+
__vue_scope_id__$b,
|
|
3692
|
+
__vue_is_functional_template__$b,
|
|
3693
|
+
__vue_module_identifier__$b,
|
|
3679
3694
|
false,
|
|
3680
3695
|
createInjector,
|
|
3681
3696
|
undefined,
|
|
@@ -3683,17 +3698,17 @@ __vue_render__$a._withStripped = true;
|
|
|
3683
3698
|
);
|
|
3684
3699
|
|
|
3685
3700
|
//
|
|
3686
|
-
var script$
|
|
3701
|
+
var script$a = {
|
|
3687
3702
|
name: 'ele-form',
|
|
3688
3703
|
components: {
|
|
3689
|
-
EleSelect: __vue_component__$
|
|
3690
|
-
EleInput: __vue_component__$
|
|
3691
|
-
EleTextarea: __vue_component__$
|
|
3692
|
-
EleUpload: __vue_component__$
|
|
3693
|
-
EleSelectEntity: __vue_component__$
|
|
3694
|
-
EleInputNumber: __vue_component__$
|
|
3695
|
-
EleCheckbox: __vue_component__$
|
|
3696
|
-
EleRadio: __vue_component__$
|
|
3704
|
+
EleSelect: __vue_component__$p,
|
|
3705
|
+
EleInput: __vue_component__$q,
|
|
3706
|
+
EleTextarea: __vue_component__$h,
|
|
3707
|
+
EleUpload: __vue_component__$f,
|
|
3708
|
+
EleSelectEntity: __vue_component__$e,
|
|
3709
|
+
EleInputNumber: __vue_component__$d,
|
|
3710
|
+
EleCheckbox: __vue_component__$c,
|
|
3711
|
+
EleRadio: __vue_component__$b
|
|
3697
3712
|
},
|
|
3698
3713
|
props: {
|
|
3699
3714
|
formName: {
|
|
@@ -3792,10 +3807,10 @@ var script$9 = {
|
|
|
3792
3807
|
};
|
|
3793
3808
|
|
|
3794
3809
|
/* script */
|
|
3795
|
-
const __vue_script__$
|
|
3810
|
+
const __vue_script__$a = script$a;
|
|
3796
3811
|
|
|
3797
3812
|
/* template */
|
|
3798
|
-
var __vue_render__$
|
|
3813
|
+
var __vue_render__$a = function () {
|
|
3799
3814
|
var _vm = this;
|
|
3800
3815
|
var _h = _vm.$createElement;
|
|
3801
3816
|
var _c = _vm._self._c || _h;
|
|
@@ -3903,6 +3918,8 @@ var __vue_render__$9 = function () {
|
|
|
3903
3918
|
attrs: {
|
|
3904
3919
|
"data-source": ele.optionList,
|
|
3905
3920
|
disabled: _vm.executeExpression(ele._disabled),
|
|
3921
|
+
multiple: ele.multiple,
|
|
3922
|
+
mode: ele.mode,
|
|
3906
3923
|
code: ele.code,
|
|
3907
3924
|
params: ele.params,
|
|
3908
3925
|
},
|
|
@@ -4092,34 +4109,34 @@ var __vue_render__$9 = function () {
|
|
|
4092
4109
|
1
|
|
4093
4110
|
)
|
|
4094
4111
|
};
|
|
4095
|
-
var __vue_staticRenderFns__$
|
|
4096
|
-
__vue_render__$
|
|
4112
|
+
var __vue_staticRenderFns__$a = [];
|
|
4113
|
+
__vue_render__$a._withStripped = true;
|
|
4097
4114
|
|
|
4098
4115
|
/* style */
|
|
4099
|
-
const __vue_inject_styles__$
|
|
4116
|
+
const __vue_inject_styles__$a = function (inject) {
|
|
4100
4117
|
if (!inject) return
|
|
4101
|
-
inject("data-v-
|
|
4118
|
+
inject("data-v-39771dfa_0", { source: ".ele__form--wrapper[data-v-39771dfa] {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\form\\src\\index.vue","index.vue"],"names":[],"mappings":"AA+MA;EACA,gBAAA;AC9MA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele__form--wrapper\">\r\n <a-form :form=\"form\" layout=\"vertical\" class=\"ant-advanced-search-form\">\r\n <a-row :gutter=\"24\">\r\n <a-col :span=\"ele.span\" v-for=\"ele in elements\" :key=\"ele.name\">\r\n <template v-if=\"ele.type == 'Input'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-input \r\n @change=\"onChange($event, ele)\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n :max-length=\"ele.maxLength\" \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n style=\"width:100%;\">\r\n </ele-input>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Textarea'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-textarea \r\n @change=\"onChange($event, ele)\"\r\n :max-length=\"ele.maxLength\"\r\n :autosize=\"ele.autosize\"\r\n :disabled=\"executeExpression(ele._disabled)\"\r\n :allow-clear=\"ele.allowClear\"\r\n :placeholder=\"ele.placeholder\"\r\n v-decorator=\"[ele.name, { rules: ele.rules }]\"\r\n style=\"width:100%;\">\r\n </ele-textarea>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Select'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-select \r\n :data-source=\"ele.optionList\" \r\n :disabled=\"executeExpression(ele._disabled)\"\r\n :multiple=\"ele.multiple\"\r\n :mode=\"ele.mode\"\r\n :code=\"ele.code\" \r\n :params=\"ele.params\" \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n style=\"width:100%;\">\r\n </ele-select>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-upload'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-upload v-decorator=\"[ele.name, { rules: ele.rules }]\" style=\"width:100%;\"></ele-upload>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'ele-date-range'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-date-range \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n style=\"width:100%;\">\r\n </ele-date-range>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'SelectEntity'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-select-entity \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n style=\"width:100%;\">\r\n </ele-select-entity>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'InputNumber'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-input-number \r\n @change=\"onChange($event, ele)\" \r\n :precision=\"ele.precision\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n v-bind=\"ele.props\" \r\n style=\"width:100%;\">\r\n </ele-input-number>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Checkbox'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-checkbox \r\n :data-source=\"ele.optionList\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n style=\"width:100%;\">\r\n </ele-checkbox>\r\n </a-form-item>\r\n </template>\r\n <template v-else-if=\"ele.type == 'Radio'\">\r\n <a-form-item :label=\"`${ele.label}:`\">\r\n <ele-radio \r\n @change=\"onChange($event, ele)\" \r\n :disabled=\"executeExpression(ele._disabled)\" \r\n :data-source=\"ele.optionList\" \r\n v-decorator=\"[ele.name, { rules: ele.rules }]\" \r\n style=\"width:100%;\">\r\n </ele-radio>\r\n </a-form-item>\r\n </template>\r\n </a-col>\r\n </a-row>\r\n </a-form>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport EleSelect from '../../select/src/index.vue'\r\nimport EleInput from '../../input/src/index.vue'\r\nimport EleTextarea from '../../textarea/src/index.vue'\r\nimport EleUpload from '../../upload/src/index.vue'\r\nimport EleSelectEntity from '../../select-entity/src/index.vue'\r\nimport EleInputNumber from '../../input-number/src/index.vue'\r\nimport EleCheckbox from '../../checkbox/src/index.vue'\r\nimport EleRadio from '../../radio/src/index.vue'\r\nimport { parse } from '@idooel/expression'\r\nimport { type } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-form',\r\n components: {\r\n EleSelect,\r\n EleInput,\r\n EleTextarea,\r\n EleUpload,\r\n EleSelectEntity,\r\n EleInputNumber,\r\n EleCheckbox,\r\n EleRadio\r\n },\r\n props: {\r\n formName: {\r\n type: [Number, String],\r\n default: 'coordinated'\r\n },\r\n elements: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n form () {\r\n return this.$form.createForm(this, { name: this.formName })\r\n },\r\n exposedMethods () {\r\n return {\r\n setFieldsValue: this.setFieldsValue,\r\n getFieldsValue: this.getFieldsValue\r\n }\r\n }\r\n },\r\n methods: {\r\n evalDisabledExpression () {\r\n this.elements.forEach(ele => {\r\n const { disabled } = ele\r\n const ret = this.executeExpression(disabled)\r\n this.$set(ele, '_disabled', ret)\r\n })\r\n },\r\n executeExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.getFieldsValue() })\r\n },\r\n onChange (value, props) {\r\n const { name } = props\r\n this.setFieldsValue({ [name]: value })\r\n this.evalDisabledExpression()\r\n this.$emit('change', { value, props, exposed: { ...this.exposedMethods } })\r\n },\r\n collectDefaultValues () {\r\n const ret = this.elements.reduce((ret, props) => {\r\n const { name, defaultValue } = props\r\n if (defaultValue) {\r\n ret[name] = defaultValue\r\n }\r\n return ret\r\n }, {})\r\n return ret\r\n },\r\n setDefaultValues () {\r\n const defaultValues = this.collectDefaultValues()\r\n this.setFieldsValue(defaultValues)\r\n },\r\n validateFields () {\r\n let ret = false\r\n this.form.validateFields((error, values) => {\r\n ret = !error\r\n })\r\n return ret\r\n },\r\n setFieldsValue (props = {}) {\r\n this.form.setFieldsValue(props)\r\n },\r\n getFieldsValue () {\r\n return this.form.getFieldsValue()\r\n }\r\n },\r\n mounted() {\r\n this.setDefaultValues()\r\n this.evalDisabledExpression()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele__form--wrapper {\r\n background: #fff;\r\n .ant-form-item {\r\n }\r\n}\r\n</style>",".ele__form--wrapper {\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4102
4119
|
|
|
4103
4120
|
};
|
|
4104
4121
|
/* scoped */
|
|
4105
|
-
const __vue_scope_id__$
|
|
4122
|
+
const __vue_scope_id__$a = "data-v-39771dfa";
|
|
4106
4123
|
/* module identifier */
|
|
4107
|
-
const __vue_module_identifier__$
|
|
4124
|
+
const __vue_module_identifier__$a = undefined;
|
|
4108
4125
|
/* functional template */
|
|
4109
|
-
const __vue_is_functional_template__$
|
|
4126
|
+
const __vue_is_functional_template__$a = false;
|
|
4110
4127
|
/* style inject SSR */
|
|
4111
4128
|
|
|
4112
4129
|
/* style inject shadow dom */
|
|
4113
4130
|
|
|
4114
4131
|
|
|
4115
4132
|
|
|
4116
|
-
const __vue_component__$
|
|
4117
|
-
{ render: __vue_render__$
|
|
4118
|
-
__vue_inject_styles__$
|
|
4119
|
-
__vue_script__$
|
|
4120
|
-
__vue_scope_id__$
|
|
4121
|
-
__vue_is_functional_template__$
|
|
4122
|
-
__vue_module_identifier__$
|
|
4133
|
+
const __vue_component__$a = /*#__PURE__*/normalizeComponent(
|
|
4134
|
+
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
|
|
4135
|
+
__vue_inject_styles__$a,
|
|
4136
|
+
__vue_script__$a,
|
|
4137
|
+
__vue_scope_id__$a,
|
|
4138
|
+
__vue_is_functional_template__$a,
|
|
4139
|
+
__vue_module_identifier__$a,
|
|
4123
4140
|
false,
|
|
4124
4141
|
createInjector,
|
|
4125
4142
|
undefined,
|
|
@@ -4135,7 +4152,8 @@ const BUILT_IN_EVENT_NAMES = {
|
|
|
4135
4152
|
PREVIOUS: 'previous'
|
|
4136
4153
|
};
|
|
4137
4154
|
const RESERVE_EVENT_NAMES = {
|
|
4138
|
-
WATCH_FORM_STATUS: 'watch-form-status'
|
|
4155
|
+
WATCH_FORM_STATUS: 'watch-form-status',
|
|
4156
|
+
INIT_FORM: 'init-form'
|
|
4139
4157
|
};
|
|
4140
4158
|
const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
|
|
4141
4159
|
let ret = {};
|
|
@@ -4146,11 +4164,11 @@ const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
|
|
|
4146
4164
|
};
|
|
4147
4165
|
|
|
4148
4166
|
//
|
|
4149
|
-
var script$
|
|
4167
|
+
var script$9 = {
|
|
4150
4168
|
name: 'ele-form-group-model',
|
|
4151
4169
|
components: {
|
|
4152
|
-
[__vue_component__$
|
|
4153
|
-
[__vue_component__$
|
|
4170
|
+
[__vue_component__$a.name]: __vue_component__$a,
|
|
4171
|
+
[__vue_component__$j.name]: __vue_component__$j
|
|
4154
4172
|
},
|
|
4155
4173
|
props: {
|
|
4156
4174
|
mode: {
|
|
@@ -4161,7 +4179,7 @@ var script$8 = {
|
|
|
4161
4179
|
default: 'formGroup'
|
|
4162
4180
|
},
|
|
4163
4181
|
groupMeta: {
|
|
4164
|
-
type:
|
|
4182
|
+
type: Function,
|
|
4165
4183
|
default: () => []
|
|
4166
4184
|
},
|
|
4167
4185
|
footerMeta: {
|
|
@@ -4183,10 +4201,22 @@ var script$8 = {
|
|
|
4183
4201
|
},
|
|
4184
4202
|
data() {
|
|
4185
4203
|
return {
|
|
4186
|
-
increaseCount: 1
|
|
4204
|
+
increaseCount: 1,
|
|
4205
|
+
innerGroupMeta: []
|
|
4187
4206
|
};
|
|
4188
4207
|
},
|
|
4208
|
+
watch: {
|
|
4209
|
+
readOnlyGroupMeta: {
|
|
4210
|
+
handler(meta) {
|
|
4211
|
+
this.innerGroupMeta = meta;
|
|
4212
|
+
},
|
|
4213
|
+
immediate: true
|
|
4214
|
+
}
|
|
4215
|
+
},
|
|
4189
4216
|
computed: {
|
|
4217
|
+
readOnlyGroupMeta() {
|
|
4218
|
+
return this.groupMeta.call(this);
|
|
4219
|
+
},
|
|
4190
4220
|
showFooterMeta() {
|
|
4191
4221
|
return !type.isEmpty(this.footerMeta);
|
|
4192
4222
|
},
|
|
@@ -4217,7 +4247,7 @@ var script$8 = {
|
|
|
4217
4247
|
};
|
|
4218
4248
|
},
|
|
4219
4249
|
getFormRefs() {
|
|
4220
|
-
return this.
|
|
4250
|
+
return this.innerGroupMeta.map((group, idx) => {
|
|
4221
4251
|
if (!group.isGenTpl) {
|
|
4222
4252
|
return this.$refs[group.key || `${this.formRefBase}__${idx}`];
|
|
4223
4253
|
}
|
|
@@ -4265,6 +4295,7 @@ var script$8 = {
|
|
|
4265
4295
|
});
|
|
4266
4296
|
},
|
|
4267
4297
|
async infoRequestTrigger() {
|
|
4298
|
+
if (!this.infoRequest) return;
|
|
4268
4299
|
const {
|
|
4269
4300
|
url,
|
|
4270
4301
|
requestType,
|
|
@@ -4285,9 +4316,13 @@ var script$8 = {
|
|
|
4285
4316
|
if (this.mode === 'increase') {
|
|
4286
4317
|
this.renderIncreaseForm(data);
|
|
4287
4318
|
}
|
|
4319
|
+
this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, {
|
|
4320
|
+
...data
|
|
4321
|
+
});
|
|
4288
4322
|
});
|
|
4289
4323
|
},
|
|
4290
4324
|
async preRequestTrigger() {
|
|
4325
|
+
if (!this.preRequest) return;
|
|
4291
4326
|
const {
|
|
4292
4327
|
url,
|
|
4293
4328
|
requestType = 'GET',
|
|
@@ -4308,16 +4343,19 @@ var script$8 = {
|
|
|
4308
4343
|
if (this.mode === 'increase') {
|
|
4309
4344
|
this.renderIncreaseForm(data);
|
|
4310
4345
|
}
|
|
4346
|
+
this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, {
|
|
4347
|
+
...data
|
|
4348
|
+
});
|
|
4311
4349
|
});
|
|
4312
4350
|
},
|
|
4313
4351
|
renderIncreaseForm(data = {}) {
|
|
4314
4352
|
const formGroupValuesLength = data[this.fieldName].length;
|
|
4315
|
-
const genTplTarget = this.
|
|
4316
|
-
const notGenTplPoolLength = this.
|
|
4353
|
+
const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl);
|
|
4354
|
+
const notGenTplPoolLength = this.readOnlyGroupMeta.filter(item => !item.isGenTpl).length;
|
|
4317
4355
|
const genNum = formGroupValuesLength - notGenTplPoolLength;
|
|
4318
4356
|
new Array(genNum).fill().forEach(() => {
|
|
4319
4357
|
const form = this.genForm(genTplTarget);
|
|
4320
|
-
this.
|
|
4358
|
+
this.innerGroupMeta.push(form);
|
|
4321
4359
|
});
|
|
4322
4360
|
const formGroupValues = data[this.fieldName];
|
|
4323
4361
|
this.setFieldsValue(formGroupValues);
|
|
@@ -4386,15 +4424,15 @@ var script$8 = {
|
|
|
4386
4424
|
};
|
|
4387
4425
|
},
|
|
4388
4426
|
handleClickDelete(props = {}, attr = {}, idx) {
|
|
4389
|
-
this.
|
|
4427
|
+
this.innerGroupMeta.splice(idx, 1);
|
|
4390
4428
|
this.$emit(BUILT_IN_EVENT_NAMES.DELETE, {
|
|
4391
4429
|
...props
|
|
4392
4430
|
});
|
|
4393
4431
|
},
|
|
4394
4432
|
[BUILT_IN_EVENT_NAMES.INCREASE](props) {
|
|
4395
|
-
const genTplTarget = this.
|
|
4433
|
+
const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl);
|
|
4396
4434
|
const form = this.genForm(genTplTarget);
|
|
4397
|
-
this.
|
|
4435
|
+
this.innerGroupMeta.push(form);
|
|
4398
4436
|
}
|
|
4399
4437
|
},
|
|
4400
4438
|
async mounted() {
|
|
@@ -4404,10 +4442,10 @@ var script$8 = {
|
|
|
4404
4442
|
};
|
|
4405
4443
|
|
|
4406
4444
|
/* script */
|
|
4407
|
-
const __vue_script__$
|
|
4445
|
+
const __vue_script__$9 = script$9;
|
|
4408
4446
|
|
|
4409
4447
|
/* template */
|
|
4410
|
-
var __vue_render__$
|
|
4448
|
+
var __vue_render__$9 = function () {
|
|
4411
4449
|
var _vm = this;
|
|
4412
4450
|
var _h = _vm.$createElement;
|
|
4413
4451
|
var _c = _vm._self._c || _h;
|
|
@@ -4415,7 +4453,7 @@ var __vue_render__$8 = function () {
|
|
|
4415
4453
|
"div",
|
|
4416
4454
|
{ staticClass: "ele form-group-model__wrapper" },
|
|
4417
4455
|
[
|
|
4418
|
-
_vm._l(_vm.
|
|
4456
|
+
_vm._l(_vm.innerGroupMeta, function (group, idx) {
|
|
4419
4457
|
return [
|
|
4420
4458
|
!group.isGenTpl
|
|
4421
4459
|
? _c(
|
|
@@ -4509,34 +4547,34 @@ var __vue_render__$8 = function () {
|
|
|
4509
4547
|
2
|
|
4510
4548
|
)
|
|
4511
4549
|
};
|
|
4512
|
-
var __vue_staticRenderFns__$
|
|
4513
|
-
__vue_render__$
|
|
4550
|
+
var __vue_staticRenderFns__$9 = [];
|
|
4551
|
+
__vue_render__$9._withStripped = true;
|
|
4514
4552
|
|
|
4515
4553
|
/* style */
|
|
4516
|
-
const __vue_inject_styles__$
|
|
4554
|
+
const __vue_inject_styles__$9 = function (inject) {
|
|
4517
4555
|
if (!inject) return
|
|
4518
|
-
inject("data-v-cf97e098_0", { source: ".ele.form-group-model__wrapper[data-v-cf97e098] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-cf97e098] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-cf97e098]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-cf97e098] {\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-cf97e098] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-cf97e098] {\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":"AA4NA;EACA,iBAAA;EACA,oBAAA;AC3NA;AD4NA;EACA,gBAAA;EACA,gBAAA;AC1NA;AD2NA;EACA,iBAAA;ACzNA;AD2NA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,wBAAA;EACA,mDAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACzNA;AD2NA;EACA,aAAA;ACzNA;AD4NA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC1NA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"ele form-group-model__wrapper\">\n <template v-for=\"(group, idx) in groupMeta\">\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: Array,\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 }\n },\n computed: {\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.groupMeta.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 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 })\n },\n async preRequestTrigger () {\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 })\n },\n renderIncreaseForm (data = {}) {\n const formGroupValuesLength = data[this.fieldName].length\n const genTplTarget = this.groupMeta.find(item => item.isGenTpl)\n const notGenTplPoolLength = this.groupMeta.filter(item => !item.isGenTpl).length\n const genNum = formGroupValuesLength - notGenTplPoolLength\n new Array(genNum).fill().forEach(() => {\n const form = this.genForm(genTplTarget)\n this.groupMeta.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.groupMeta.splice(idx, 1)\n this.$emit(BUILT_IN_EVENT_NAMES.DELETE, { ...props })\n },\n [BUILT_IN_EVENT_NAMES.INCREASE] (props) {\n const genTplTarget = this.groupMeta.find(item => item.isGenTpl)\n const form = this.genForm(genTplTarget)\n this.groupMeta.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 });
|
|
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 });
|
|
4519
4557
|
|
|
4520
4558
|
};
|
|
4521
4559
|
/* scoped */
|
|
4522
|
-
const __vue_scope_id__$
|
|
4560
|
+
const __vue_scope_id__$9 = "data-v-8651e654";
|
|
4523
4561
|
/* module identifier */
|
|
4524
|
-
const __vue_module_identifier__$
|
|
4562
|
+
const __vue_module_identifier__$9 = undefined;
|
|
4525
4563
|
/* functional template */
|
|
4526
|
-
const __vue_is_functional_template__$
|
|
4564
|
+
const __vue_is_functional_template__$9 = false;
|
|
4527
4565
|
/* style inject SSR */
|
|
4528
4566
|
|
|
4529
4567
|
/* style inject shadow dom */
|
|
4530
4568
|
|
|
4531
4569
|
|
|
4532
4570
|
|
|
4533
|
-
const __vue_component__$
|
|
4534
|
-
{ render: __vue_render__$
|
|
4535
|
-
__vue_inject_styles__$
|
|
4536
|
-
__vue_script__$
|
|
4537
|
-
__vue_scope_id__$
|
|
4538
|
-
__vue_is_functional_template__$
|
|
4539
|
-
__vue_module_identifier__$
|
|
4571
|
+
const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
|
|
4572
|
+
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
|
|
4573
|
+
__vue_inject_styles__$9,
|
|
4574
|
+
__vue_script__$9,
|
|
4575
|
+
__vue_scope_id__$9,
|
|
4576
|
+
__vue_is_functional_template__$9,
|
|
4577
|
+
__vue_module_identifier__$9,
|
|
4540
4578
|
false,
|
|
4541
4579
|
createInjector,
|
|
4542
4580
|
undefined,
|
|
@@ -4544,10 +4582,10 @@ __vue_render__$8._withStripped = true;
|
|
|
4544
4582
|
);
|
|
4545
4583
|
|
|
4546
4584
|
//
|
|
4547
|
-
var script$
|
|
4585
|
+
var script$8 = {
|
|
4548
4586
|
name: 'ele-form-model',
|
|
4549
4587
|
components: {
|
|
4550
|
-
EleButtonGroup: __vue_component__$
|
|
4588
|
+
EleButtonGroup: __vue_component__$j
|
|
4551
4589
|
},
|
|
4552
4590
|
props: {
|
|
4553
4591
|
title: {
|
|
@@ -4675,6 +4713,9 @@ var script$7 = {
|
|
|
4675
4713
|
data = {}
|
|
4676
4714
|
} = resp;
|
|
4677
4715
|
this.setFieldsValue(data);
|
|
4716
|
+
this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, {
|
|
4717
|
+
...data
|
|
4718
|
+
});
|
|
4678
4719
|
});
|
|
4679
4720
|
},
|
|
4680
4721
|
async preRequestTrigger() {
|
|
@@ -4686,12 +4727,17 @@ var script$7 = {
|
|
|
4686
4727
|
headers = {}
|
|
4687
4728
|
} = this.preRequest;
|
|
4688
4729
|
if (!url) return;
|
|
4689
|
-
|
|
4730
|
+
const {
|
|
4731
|
+
data
|
|
4732
|
+
} = await net[requestType.toLowerCase()](url, {
|
|
4690
4733
|
...params,
|
|
4691
4734
|
...fieldMap
|
|
4692
4735
|
}, {
|
|
4693
4736
|
...headers
|
|
4694
4737
|
});
|
|
4738
|
+
this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, {
|
|
4739
|
+
...data
|
|
4740
|
+
});
|
|
4695
4741
|
},
|
|
4696
4742
|
setFieldsValue(props) {
|
|
4697
4743
|
this.$refs[this.formRef].setFieldsValue(props);
|
|
@@ -4721,10 +4767,10 @@ var script$7 = {
|
|
|
4721
4767
|
};
|
|
4722
4768
|
|
|
4723
4769
|
/* script */
|
|
4724
|
-
const __vue_script__$
|
|
4770
|
+
const __vue_script__$8 = script$8;
|
|
4725
4771
|
|
|
4726
4772
|
/* template */
|
|
4727
|
-
var __vue_render__$
|
|
4773
|
+
var __vue_render__$8 = function () {
|
|
4728
4774
|
var _vm = this;
|
|
4729
4775
|
var _h = _vm.$createElement;
|
|
4730
4776
|
var _c = _vm._self._c || _h;
|
|
@@ -4760,34 +4806,34 @@ var __vue_render__$7 = function () {
|
|
|
4760
4806
|
: _vm._e(),
|
|
4761
4807
|
])
|
|
4762
4808
|
};
|
|
4763
|
-
var __vue_staticRenderFns__$
|
|
4764
|
-
__vue_render__$
|
|
4809
|
+
var __vue_staticRenderFns__$8 = [];
|
|
4810
|
+
__vue_render__$8._withStripped = true;
|
|
4765
4811
|
|
|
4766
4812
|
/* style */
|
|
4767
|
-
const __vue_inject_styles__$
|
|
4813
|
+
const __vue_inject_styles__$8 = function (inject) {
|
|
4768
4814
|
if (!inject) return
|
|
4769
|
-
inject("data-v-
|
|
4815
|
+
inject("data-v-b0dc39fc_0", { source: ".form__model--wrapper[data-v-b0dc39fc] {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title[data-v-b0dc39fc] {\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-b0dc39fc] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-b0dc39fc] {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\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>\r\n <div class=\"form__model--wrapper\">\r\n <div class=\"form-model__title\" v-if=\"title\">\r\n {{ title }}\r\n </div>\r\n <div class=\"form-model__content\">\r\n <ele-form :ref=\"formRef\" :elements=\"elements\"></ele-form>\r\n </div>\r\n <div class=\"form-model__footer\" v-if=\"footerMeta\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\r\nimport { BUILT_IN_EVENT_NAMES, parseFieldMap, RESERVE_EVENT_NAMES } from '../../utils'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { net } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-form-model',\r\n components: {\r\n EleButtonGroup\r\n },\r\n props: {\r\n title: {\r\n type: String\r\n },\r\n formMeta: {\r\n type: Object\r\n },\r\n footerMeta: {\r\n type: Object\r\n }\r\n },\r\n data() {\r\n return {}\r\n },\r\n computed: {\r\n formRef () {\r\n return uuidv4()\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e, formModel: this.formModels })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\r\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL]\r\n }\r\n },\r\n elements () {\r\n const { elements } = this.formMeta\r\n return elements\r\n },\r\n preRequest () {\r\n const { preRequest } = this.formMeta\r\n return preRequest\r\n },\r\n infoRequest () {\r\n const { infoRequest } = this.formMeta\r\n return infoRequest\r\n },\r\n submitRequest () {\r\n const { submitRequest } = this.formMeta\r\n return submitRequest\r\n },\r\n footerElements () {\r\n const { elements } = this.footerMeta\r\n return elements.call(this)\r\n },\r\n formModels () {\r\n return this.$refs[this.formRef].getFieldsValue()\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 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.formModels }, { headers }).then(resp => {\r\n console.log(resp.data)\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\r\n return resp.data\r\n })\r\n return ret\r\n },\r\n async infoRequestTrigger () {\r\n 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 this.setFieldsValue(data)\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n })\r\n },\r\n async preRequestTrigger () {\r\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\r\n if (!url) return\r\n const { data } = await net[requestType.toLowerCase()](url, { ...params, ...fieldMap }, { ...headers })\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n },\r\n setFieldsValue (props) {\r\n this.$refs[this.formRef].setFieldsValue(props)\r\n },\r\n validateFields () {\r\n return this.$refs[this.formRef].validateFields()\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\r\n const status = this.$refs[this.formRef].validateFields()\r\n if (status) {\r\n //TODO fieldMap\r\n return this.submitRequestTrigger(props)\r\n } else {\r\n return false\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\r\n }\r\n },\r\n async mounted() {\r\n await this.preRequestTrigger()\r\n await this.infoRequestTrigger()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.form__model--wrapper {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n background: #fff;\r\n .form-model__title {\r\n height: 56px;\r\n padding: 0 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n border-bottom: 1px solid var(--idooel-form-title-border-color);\r\n }\r\n .form-model__content {\r\n padding: 16px;\r\n }\r\n .form-model__footer {\r\n /* width: 100%; */\r\n height: 64px;\r\n position: fixed;\r\n bottom: 0;\r\n display: flex;\r\n float: right;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n}\r\n</style>",".form__model--wrapper {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n}\n.form__model--wrapper .form-model__content {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4770
4816
|
|
|
4771
4817
|
};
|
|
4772
4818
|
/* scoped */
|
|
4773
|
-
const __vue_scope_id__$
|
|
4819
|
+
const __vue_scope_id__$8 = "data-v-b0dc39fc";
|
|
4774
4820
|
/* module identifier */
|
|
4775
|
-
const __vue_module_identifier__$
|
|
4821
|
+
const __vue_module_identifier__$8 = undefined;
|
|
4776
4822
|
/* functional template */
|
|
4777
|
-
const __vue_is_functional_template__$
|
|
4823
|
+
const __vue_is_functional_template__$8 = false;
|
|
4778
4824
|
/* style inject SSR */
|
|
4779
4825
|
|
|
4780
4826
|
/* style inject shadow dom */
|
|
4781
4827
|
|
|
4782
4828
|
|
|
4783
4829
|
|
|
4784
|
-
const __vue_component__$
|
|
4785
|
-
{ render: __vue_render__$
|
|
4786
|
-
__vue_inject_styles__$
|
|
4787
|
-
__vue_script__$
|
|
4788
|
-
__vue_scope_id__$
|
|
4789
|
-
__vue_is_functional_template__$
|
|
4790
|
-
__vue_module_identifier__$
|
|
4830
|
+
const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
|
|
4831
|
+
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
|
|
4832
|
+
__vue_inject_styles__$8,
|
|
4833
|
+
__vue_script__$8,
|
|
4834
|
+
__vue_scope_id__$8,
|
|
4835
|
+
__vue_is_functional_template__$8,
|
|
4836
|
+
__vue_module_identifier__$8,
|
|
4791
4837
|
false,
|
|
4792
4838
|
createInjector,
|
|
4793
4839
|
undefined,
|
|
@@ -4795,10 +4841,10 @@ __vue_render__$7._withStripped = true;
|
|
|
4795
4841
|
);
|
|
4796
4842
|
|
|
4797
4843
|
//
|
|
4798
|
-
var script$
|
|
4844
|
+
var script$7 = {
|
|
4799
4845
|
name: 'ele-step-model',
|
|
4800
4846
|
components: {
|
|
4801
|
-
EleButtonGroup: __vue_component__$
|
|
4847
|
+
EleButtonGroup: __vue_component__$j
|
|
4802
4848
|
},
|
|
4803
4849
|
props: {
|
|
4804
4850
|
stepMeta: {
|
|
@@ -4926,10 +4972,10 @@ var script$6 = {
|
|
|
4926
4972
|
};
|
|
4927
4973
|
|
|
4928
4974
|
/* script */
|
|
4929
|
-
const __vue_script__$
|
|
4975
|
+
const __vue_script__$7 = script$7;
|
|
4930
4976
|
|
|
4931
4977
|
/* template */
|
|
4932
|
-
var __vue_render__$
|
|
4978
|
+
var __vue_render__$7 = function () {
|
|
4933
4979
|
var _vm = this;
|
|
4934
4980
|
var _h = _vm.$createElement;
|
|
4935
4981
|
var _c = _vm._self._c || _h;
|
|
@@ -4995,34 +5041,34 @@ var __vue_render__$6 = function () {
|
|
|
4995
5041
|
),
|
|
4996
5042
|
])
|
|
4997
5043
|
};
|
|
4998
|
-
var __vue_staticRenderFns__$
|
|
4999
|
-
__vue_render__$
|
|
5044
|
+
var __vue_staticRenderFns__$7 = [];
|
|
5045
|
+
__vue_render__$7._withStripped = true;
|
|
5000
5046
|
|
|
5001
5047
|
/* style */
|
|
5002
|
-
const __vue_inject_styles__$
|
|
5048
|
+
const __vue_inject_styles__$7 = function (inject) {
|
|
5003
5049
|
if (!inject) return
|
|
5004
|
-
inject("data-v-
|
|
5050
|
+
inject("data-v-ef1ef15c_0", { source: ".ele-step-model__wrapper[data-v-ef1ef15c] {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper[data-v-ef1ef15c] {\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-ef1ef15c] {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper[data-v-ef1ef15c] {\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-ef1ef15c] {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\step-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AAsIA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;ACrIA;ADsIA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,gBAAA;ACpIA;ADsIA;EACA,gBAAA;ACpIA;ADwIA;EACA,WAAA;EACA,WAAA;EACA,gBAAA;EACA,mBAAA;EACA,+CAAA;EACA,cAAA;ACtIA;ADwIA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACtIA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-step-model__wrapper\">\r\n <div class=\"ele-step-model__step--wrapper\">\r\n <a-steps class=\"ele-steps\" :current=\"current\" size=\"small\">\r\n <a-step v-for=\"step in elements\" :title=\"step.title\" :key=\"step.key\" />\r\n </a-steps>\r\n </div>\r\n <div class=\"ele-step-model__content--wrapper\">\r\n <template v-for=\"name in scopedSlotsNames\">\r\n <div :key=\"name\" v-if=\"currentSlotName == name\" :class=\"['ele-step-model__slot', `ele-step-model__slot--${name}`]\">\r\n <slot :name=\"name\"></slot>\r\n </div>\r\n </template>\r\n </div>\r\n <div class=\"ele-step-model__footer--wrapper\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\r\nimport { BUILT_IN_EVENT_NAMES } from '../../utils'\r\nexport default {\r\n name: 'ele-step-model',\r\n components: {\r\n EleButtonGroup\r\n },\r\n props: {\r\n stepMeta: {\r\n type: Object,\r\n default: () => ({})\r\n },\r\n footerMeta: {\r\n type: Object,\r\n default: () => ({})\r\n }\r\n },\r\n data() {\r\n return {\r\n current: 0,\r\n currentSlotComponentRef: null\r\n }\r\n },\r\n computed: {\r\n currentSlotName () {\r\n return this.scopedSlotsNames[this.current]\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, exposed: this.exposedMethods })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.NEXT]: this[BUILT_IN_EVENT_NAMES.NEXT],\r\n [BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS]\r\n }\r\n },\r\n activeIndex () {\r\n const { activeIndex } = this.stepMeta\r\n return activeIndex\r\n },\r\n elements () {\r\n const { elements } = this.stepMeta\r\n return elements\r\n },\r\n scopedSlotsNames () {\r\n const slotNames = this.elements.map(item => item.key)\r\n return slotNames\r\n },\r\n exposedMethods () {\r\n return {\r\n slotRef: this.currentSlotComponentRef,\r\n setCurrentStep: this.setCurrentStep,\r\n next: this.nextStep,\r\n prev: this.prevStep,\r\n current: this.current\r\n }\r\n }\r\n },\r\n watch: {\r\n activeIndex: {\r\n handler (idx) {\r\n this.current = idx\r\n },\r\n immediate: true\r\n },\r\n current: {\r\n handler () {\r\n this.$nextTick(() => {\r\n this.currentSlotComponentRef = this.getCurrentSlotComponentRef()\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n getCurrentSlotComponentRef () {\r\n const includeMetaCmp = this.$children.find(child => child.meta)\r\n if (!includeMetaCmp) return null\r\n const { $children: components } = includeMetaCmp\r\n const target = components.find(cmp => cmp.$options._componentTag === 'ele-tpl')\r\n return target.getModel ? target.getModel() : null\r\n },\r\n setCurrentStep (index) {\r\n this.current = index\r\n },\r\n nextStep () {\r\n if (this.current >= this.elements.length - 1) return\r\n this.current ++\r\n },\r\n prevStep () {\r\n if (this.current <= 0) return\r\n this.current --\r\n },\r\n [BUILT_IN_EVENT_NAMES.NEXT] (props) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.NEXT, { ...props, exposed: { ...this.exposedMethods } })\r\n },\r\n [BUILT_IN_EVENT_NAMES.PREVIOUS] (props) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.PREVIOUS, { ...props, exposed: { ...this.exposedMethods } })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-step-model__wrapper {\r\n width: 100%;\r\n height: 100vh;\r\n position: relative;\r\n .ele-step-model__step--wrapper {\r\n width: 100%;\r\n height: 64px;\r\n padding: 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n background: #fff;\r\n .ele-steps {\r\n .ant-steps-item {\r\n text-align: left;\r\n }\r\n }\r\n }\r\n .ele-step-model__content--wrapper {\r\n width: 100%;\r\n width: 100%;\r\n margin-top: 16px;\r\n margin-bottom: 16px;\r\n height: calc(100vh - 64px - 64px - 16px - 16px);\r\n overflow: auto;\r\n }\r\n .ele-step-model__footer--wrapper {\r\n width: 100%;\r\n height: 64px;\r\n background: #fff;\r\n position: absolute;\r\n bottom: 0;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n}\r\n</style>import meta from '@/views/tree-table-page/meta'\r\n",".ele-step-model__wrapper {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper .ele-steps .ant-steps-item {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n}\n.ele-step-model__wrapper .ele-step-model__footer--wrapper {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5005
5051
|
|
|
5006
5052
|
};
|
|
5007
5053
|
/* scoped */
|
|
5008
|
-
const __vue_scope_id__$
|
|
5054
|
+
const __vue_scope_id__$7 = "data-v-ef1ef15c";
|
|
5009
5055
|
/* module identifier */
|
|
5010
|
-
const __vue_module_identifier__$
|
|
5056
|
+
const __vue_module_identifier__$7 = undefined;
|
|
5011
5057
|
/* functional template */
|
|
5012
|
-
const __vue_is_functional_template__$
|
|
5058
|
+
const __vue_is_functional_template__$7 = false;
|
|
5013
5059
|
/* style inject SSR */
|
|
5014
5060
|
|
|
5015
5061
|
/* style inject shadow dom */
|
|
5016
5062
|
|
|
5017
5063
|
|
|
5018
5064
|
|
|
5019
|
-
const __vue_component__$
|
|
5020
|
-
{ render: __vue_render__$
|
|
5021
|
-
__vue_inject_styles__$
|
|
5022
|
-
__vue_script__$
|
|
5023
|
-
__vue_scope_id__$
|
|
5024
|
-
__vue_is_functional_template__$
|
|
5025
|
-
__vue_module_identifier__$
|
|
5065
|
+
const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
|
|
5066
|
+
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
|
|
5067
|
+
__vue_inject_styles__$7,
|
|
5068
|
+
__vue_script__$7,
|
|
5069
|
+
__vue_scope_id__$7,
|
|
5070
|
+
__vue_is_functional_template__$7,
|
|
5071
|
+
__vue_module_identifier__$7,
|
|
5026
5072
|
false,
|
|
5027
5073
|
createInjector,
|
|
5028
5074
|
undefined,
|
|
@@ -5030,7 +5076,7 @@ __vue_render__$6._withStripped = true;
|
|
|
5030
5076
|
);
|
|
5031
5077
|
|
|
5032
5078
|
//
|
|
5033
|
-
var script$
|
|
5079
|
+
var script$6 = {
|
|
5034
5080
|
name: 'ele-tpl',
|
|
5035
5081
|
props: {
|
|
5036
5082
|
modelName: {
|
|
@@ -5038,10 +5084,10 @@ var script$5 = {
|
|
|
5038
5084
|
}
|
|
5039
5085
|
},
|
|
5040
5086
|
components: {
|
|
5041
|
-
[__vue_component__$
|
|
5042
|
-
[__vue_component__$
|
|
5043
|
-
[__vue_component__$
|
|
5044
|
-
[__vue_component__$
|
|
5087
|
+
[__vue_component__$i.name]: __vue_component__$i,
|
|
5088
|
+
[__vue_component__$9.name]: __vue_component__$9,
|
|
5089
|
+
[__vue_component__$7.name]: __vue_component__$7,
|
|
5090
|
+
[__vue_component__$8.name]: __vue_component__$8
|
|
5045
5091
|
},
|
|
5046
5092
|
computed: {
|
|
5047
5093
|
modelNameValidator() {
|
|
@@ -5063,10 +5109,10 @@ var script$5 = {
|
|
|
5063
5109
|
};
|
|
5064
5110
|
|
|
5065
5111
|
/* script */
|
|
5066
|
-
const __vue_script__$
|
|
5112
|
+
const __vue_script__$6 = script$6;
|
|
5067
5113
|
|
|
5068
5114
|
/* template */
|
|
5069
|
-
var __vue_render__$
|
|
5115
|
+
var __vue_render__$6 = function () {
|
|
5070
5116
|
var _vm = this;
|
|
5071
5117
|
var _h = _vm.$createElement;
|
|
5072
5118
|
var _c = _vm._self._c || _h;
|
|
@@ -5104,43 +5150,43 @@ var __vue_render__$5 = function () {
|
|
|
5104
5150
|
domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
|
|
5105
5151
|
})
|
|
5106
5152
|
};
|
|
5107
|
-
var __vue_staticRenderFns__$
|
|
5108
|
-
__vue_render__$
|
|
5153
|
+
var __vue_staticRenderFns__$6 = [];
|
|
5154
|
+
__vue_render__$6._withStripped = true;
|
|
5109
5155
|
|
|
5110
5156
|
/* style */
|
|
5111
|
-
const __vue_inject_styles__$
|
|
5157
|
+
const __vue_inject_styles__$6 = function (inject) {
|
|
5112
5158
|
if (!inject) return
|
|
5113
|
-
inject("data-v-
|
|
5159
|
+
inject("data-v-ea20e66e_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: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}\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,+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;AAC3B;;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: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}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5114
5160
|
|
|
5115
5161
|
};
|
|
5116
5162
|
/* scoped */
|
|
5117
|
-
const __vue_scope_id__$
|
|
5163
|
+
const __vue_scope_id__$6 = undefined;
|
|
5118
5164
|
/* module identifier */
|
|
5119
|
-
const __vue_module_identifier__$
|
|
5165
|
+
const __vue_module_identifier__$6 = undefined;
|
|
5120
5166
|
/* functional template */
|
|
5121
|
-
const __vue_is_functional_template__$
|
|
5167
|
+
const __vue_is_functional_template__$6 = false;
|
|
5122
5168
|
/* style inject SSR */
|
|
5123
5169
|
|
|
5124
5170
|
/* style inject shadow dom */
|
|
5125
5171
|
|
|
5126
5172
|
|
|
5127
5173
|
|
|
5128
|
-
const __vue_component__$
|
|
5129
|
-
{ render: __vue_render__$
|
|
5130
|
-
__vue_inject_styles__$
|
|
5131
|
-
__vue_script__$
|
|
5132
|
-
__vue_scope_id__$
|
|
5133
|
-
__vue_is_functional_template__$
|
|
5134
|
-
__vue_module_identifier__$
|
|
5174
|
+
const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
|
|
5175
|
+
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
|
|
5176
|
+
__vue_inject_styles__$6,
|
|
5177
|
+
__vue_script__$6,
|
|
5178
|
+
__vue_scope_id__$6,
|
|
5179
|
+
__vue_is_functional_template__$6,
|
|
5180
|
+
__vue_module_identifier__$6,
|
|
5135
5181
|
false,
|
|
5136
5182
|
createInjector,
|
|
5137
5183
|
undefined,
|
|
5138
5184
|
undefined
|
|
5139
5185
|
);
|
|
5140
5186
|
|
|
5141
|
-
__vue_component__$
|
|
5187
|
+
__vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
|
|
5142
5188
|
|
|
5143
|
-
__vue_component__$
|
|
5189
|
+
__vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __vue_component__$a);
|
|
5144
5190
|
|
|
5145
5191
|
//
|
|
5146
5192
|
//
|
|
@@ -5154,7 +5200,7 @@ __vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __v
|
|
|
5154
5200
|
//
|
|
5155
5201
|
//
|
|
5156
5202
|
|
|
5157
|
-
var script$
|
|
5203
|
+
var script$5 = {
|
|
5158
5204
|
name: 'ele-alert',
|
|
5159
5205
|
props: {
|
|
5160
5206
|
type: {
|
|
@@ -5183,10 +5229,10 @@ var script$4 = {
|
|
|
5183
5229
|
};
|
|
5184
5230
|
|
|
5185
5231
|
/* script */
|
|
5186
|
-
const __vue_script__$
|
|
5232
|
+
const __vue_script__$5 = script$5;
|
|
5187
5233
|
|
|
5188
5234
|
/* template */
|
|
5189
|
-
var __vue_render__$
|
|
5235
|
+
var __vue_render__$5 = function () {
|
|
5190
5236
|
var _vm = this;
|
|
5191
5237
|
var _h = _vm.$createElement;
|
|
5192
5238
|
var _c = _vm._self._c || _h;
|
|
@@ -5202,49 +5248,49 @@ var __vue_render__$4 = function () {
|
|
|
5202
5248
|
},
|
|
5203
5249
|
})
|
|
5204
5250
|
};
|
|
5205
|
-
var __vue_staticRenderFns__$
|
|
5206
|
-
__vue_render__$
|
|
5251
|
+
var __vue_staticRenderFns__$5 = [];
|
|
5252
|
+
__vue_render__$5._withStripped = true;
|
|
5207
5253
|
|
|
5208
5254
|
/* style */
|
|
5209
|
-
const __vue_inject_styles__$
|
|
5255
|
+
const __vue_inject_styles__$5 = function (inject) {
|
|
5210
5256
|
if (!inject) return
|
|
5211
|
-
inject("data-v-
|
|
5257
|
+
inject("data-v-5f94c62c_0", { source: ".ele-alert[data-v-5f94c62c] {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\alert\\src\\index.vue","index.vue"],"names":[],"mappings":"AA0CA;EACA,2BAAA;ACzCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <a-alert\r\n class=\"ele-alert\"\r\n :message=\"message\" \r\n :description=\"description\" \r\n :type=\"type\"\r\n :closable=\"closable\"\r\n :closeText=\"closeText\"\r\n :show-icon=\"showIcon\" />\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-alert',\r\n props: {\r\n type: {\r\n type: String,\r\n default: 'success'\r\n },\r\n showIcon: {\r\n type: Boolean,\r\n default: true\r\n },\r\n message: {\r\n type: String,\r\n default: 'Success Tips'\r\n },\r\n description: {\r\n type: String\r\n },\r\n closable: {\r\n type: Boolean,\r\n default: true\r\n },\r\n closeText: {\r\n type: String\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-alert {\r\n text-align: left !important;\r\n}\r\n</style>",".ele-alert {\n text-align: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5212
5258
|
|
|
5213
5259
|
};
|
|
5214
5260
|
/* scoped */
|
|
5215
|
-
const __vue_scope_id__$
|
|
5261
|
+
const __vue_scope_id__$5 = "data-v-5f94c62c";
|
|
5216
5262
|
/* module identifier */
|
|
5217
|
-
const __vue_module_identifier__$
|
|
5263
|
+
const __vue_module_identifier__$5 = undefined;
|
|
5218
5264
|
/* functional template */
|
|
5219
|
-
const __vue_is_functional_template__$
|
|
5265
|
+
const __vue_is_functional_template__$5 = false;
|
|
5220
5266
|
/* style inject SSR */
|
|
5221
5267
|
|
|
5222
5268
|
/* style inject shadow dom */
|
|
5223
5269
|
|
|
5224
5270
|
|
|
5225
5271
|
|
|
5226
|
-
const __vue_component__$
|
|
5227
|
-
{ render: __vue_render__$
|
|
5228
|
-
__vue_inject_styles__$
|
|
5229
|
-
__vue_script__$
|
|
5230
|
-
__vue_scope_id__$
|
|
5231
|
-
__vue_is_functional_template__$
|
|
5232
|
-
__vue_module_identifier__$
|
|
5272
|
+
const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
|
|
5273
|
+
{ render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
|
|
5274
|
+
__vue_inject_styles__$5,
|
|
5275
|
+
__vue_script__$5,
|
|
5276
|
+
__vue_scope_id__$5,
|
|
5277
|
+
__vue_is_functional_template__$5,
|
|
5278
|
+
__vue_module_identifier__$5,
|
|
5233
5279
|
false,
|
|
5234
5280
|
createInjector,
|
|
5235
5281
|
undefined,
|
|
5236
5282
|
undefined
|
|
5237
5283
|
);
|
|
5238
5284
|
|
|
5239
|
-
__vue_component__$
|
|
5285
|
+
__vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
|
|
5240
5286
|
|
|
5241
|
-
__vue_component__$
|
|
5287
|
+
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
5242
5288
|
|
|
5243
|
-
__vue_component__$
|
|
5289
|
+
__vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
|
|
5244
5290
|
|
|
5245
|
-
__vue_component__$
|
|
5291
|
+
__vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
|
|
5246
5292
|
|
|
5247
|
-
__vue_component__$
|
|
5293
|
+
__vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
|
|
5248
5294
|
|
|
5249
5295
|
//
|
|
5250
5296
|
//
|
|
@@ -5278,7 +5324,7 @@ __vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __v
|
|
|
5278
5324
|
//
|
|
5279
5325
|
//
|
|
5280
5326
|
|
|
5281
|
-
var script$
|
|
5327
|
+
var script$4 = {
|
|
5282
5328
|
name: 'ele-modal',
|
|
5283
5329
|
props: {
|
|
5284
5330
|
value: {
|
|
@@ -5389,10 +5435,10 @@ var script$3 = {
|
|
|
5389
5435
|
};
|
|
5390
5436
|
|
|
5391
5437
|
/* script */
|
|
5392
|
-
const __vue_script__$
|
|
5438
|
+
const __vue_script__$4 = script$4;
|
|
5393
5439
|
|
|
5394
5440
|
/* template */
|
|
5395
|
-
var __vue_render__$
|
|
5441
|
+
var __vue_render__$4 = function () {
|
|
5396
5442
|
var _vm = this;
|
|
5397
5443
|
var _h = _vm.$createElement;
|
|
5398
5444
|
var _c = _vm._self._c || _h;
|
|
@@ -5447,17 +5493,17 @@ var __vue_render__$3 = function () {
|
|
|
5447
5493
|
2
|
|
5448
5494
|
)
|
|
5449
5495
|
};
|
|
5450
|
-
var __vue_staticRenderFns__$
|
|
5451
|
-
__vue_render__$
|
|
5496
|
+
var __vue_staticRenderFns__$4 = [];
|
|
5497
|
+
__vue_render__$4._withStripped = true;
|
|
5452
5498
|
|
|
5453
5499
|
/* style */
|
|
5454
|
-
const __vue_inject_styles__$
|
|
5500
|
+
const __vue_inject_styles__$4 = undefined;
|
|
5455
5501
|
/* scoped */
|
|
5456
|
-
const __vue_scope_id__$
|
|
5502
|
+
const __vue_scope_id__$4 = undefined;
|
|
5457
5503
|
/* module identifier */
|
|
5458
|
-
const __vue_module_identifier__$
|
|
5504
|
+
const __vue_module_identifier__$4 = undefined;
|
|
5459
5505
|
/* functional template */
|
|
5460
|
-
const __vue_is_functional_template__$
|
|
5506
|
+
const __vue_is_functional_template__$4 = false;
|
|
5461
5507
|
/* style inject */
|
|
5462
5508
|
|
|
5463
5509
|
/* style inject SSR */
|
|
@@ -5466,30 +5512,30 @@ __vue_render__$3._withStripped = true;
|
|
|
5466
5512
|
|
|
5467
5513
|
|
|
5468
5514
|
|
|
5469
|
-
const __vue_component__$
|
|
5470
|
-
{ render: __vue_render__$
|
|
5471
|
-
__vue_inject_styles__$
|
|
5472
|
-
__vue_script__$
|
|
5473
|
-
__vue_scope_id__$
|
|
5474
|
-
__vue_is_functional_template__$
|
|
5475
|
-
__vue_module_identifier__$
|
|
5515
|
+
const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
|
|
5516
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
5517
|
+
__vue_inject_styles__$4,
|
|
5518
|
+
__vue_script__$4,
|
|
5519
|
+
__vue_scope_id__$4,
|
|
5520
|
+
__vue_is_functional_template__$4,
|
|
5521
|
+
__vue_module_identifier__$4,
|
|
5476
5522
|
false,
|
|
5477
5523
|
undefined,
|
|
5478
5524
|
undefined,
|
|
5479
5525
|
undefined
|
|
5480
5526
|
);
|
|
5481
5527
|
|
|
5482
|
-
__vue_component__$
|
|
5528
|
+
__vue_component__$4.install = Vue => Vue.component(__vue_component__$4.name, __vue_component__$4);
|
|
5483
5529
|
|
|
5484
|
-
__vue_component__$
|
|
5530
|
+
__vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
|
|
5485
5531
|
|
|
5486
|
-
__vue_component__$
|
|
5532
|
+
__vue_component__$b.install = Vue => Vue.component(__vue_component__$b.name, __vue_component__$b);
|
|
5487
5533
|
|
|
5488
5534
|
//
|
|
5489
|
-
var script$
|
|
5535
|
+
var script$3 = {
|
|
5490
5536
|
name: 'ele-batch-export',
|
|
5491
5537
|
components: {
|
|
5492
|
-
EleIcon: __vue_component__$
|
|
5538
|
+
EleIcon: __vue_component__$g
|
|
5493
5539
|
},
|
|
5494
5540
|
props: {
|
|
5495
5541
|
value: {
|
|
@@ -5533,10 +5579,10 @@ var script$2 = {
|
|
|
5533
5579
|
};
|
|
5534
5580
|
|
|
5535
5581
|
/* script */
|
|
5536
|
-
const __vue_script__$
|
|
5582
|
+
const __vue_script__$3 = script$3;
|
|
5537
5583
|
|
|
5538
5584
|
/* template */
|
|
5539
|
-
var __vue_render__$
|
|
5585
|
+
var __vue_render__$3 = function () {
|
|
5540
5586
|
var _vm = this;
|
|
5541
5587
|
var _h = _vm.$createElement;
|
|
5542
5588
|
var _c = _vm._self._c || _h;
|
|
@@ -5595,41 +5641,41 @@ var __vue_render__$2 = function () {
|
|
|
5595
5641
|
]
|
|
5596
5642
|
)
|
|
5597
5643
|
};
|
|
5598
|
-
var __vue_staticRenderFns__$
|
|
5599
|
-
__vue_render__$
|
|
5644
|
+
var __vue_staticRenderFns__$3 = [];
|
|
5645
|
+
__vue_render__$3._withStripped = true;
|
|
5600
5646
|
|
|
5601
5647
|
/* style */
|
|
5602
|
-
const __vue_inject_styles__$
|
|
5648
|
+
const __vue_inject_styles__$3 = function (inject) {
|
|
5603
5649
|
if (!inject) return
|
|
5604
|
-
inject("data-v-
|
|
5650
|
+
inject("data-v-8734c1a2_0", { source: ".ele-batch-export__content[data-v-8734c1a2] {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container[data-v-8734c1a2] {\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-8734c1a2] {\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-8734c1a2] {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn[data-v-8734c1a2] {\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-8734c1a2] {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message[data-v-8734c1a2] {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\batch-export\\src\\index.vue","index.vue"],"names":[],"mappings":"AAyEA;EACA,aAAA;ACxEA;ADyEA;EACA,iBAAA;EACA,oBAAA;EACA,YAAA;EACA,mCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,eAAA;ACvEA;ADwEA;EACA,eAAA;EACA,4BAAA;ACtEA;ADwEA;EACA,iBAAA;ACtEA;ADuEA;EACA,4BAAA;EACA,eAAA;EACA,eAAA;ACrEA;ADuEA;EACA,4BAAA;EACA,eAAA;ACrEA;ADyEA;EACA,4BAAA;EACA,eAAA;ACvEA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <ele-modal \r\n v-model=\"innerValue\" \r\n v-on=\"$listeners\"\r\n :buttonGroupMeta=\"buttonGroupMeta\" \r\n title=\"批量导出\">\r\n <div class=\"ele-batch-export__content\">\r\n <div class=\"ele-batch-export__container\">\r\n <ele-icon class=\"ele-batch-export__icon\" type=\"download\"></ele-icon>\r\n <div class=\"ele-batch-export__handle\">\r\n <div class=\"ele-batch-export__btn\" @click=\"handleClick\">导出任务处理中..... 请点击此按钮跳转到“批处理管理”菜单查看任务进度</div>\r\n <div class=\"ele-batch-export__btn--hint\">批处理任务的准备工作会在后台运行</div>\r\n </div>\r\n </div>\r\n <div class=\"ele-batch-export__message\">\r\n 您可以请点击上方按钮查看任务进度或关闭弹框\r\n </div>\r\n </div>\r\n </ele-modal>\r\n</template>\r\n\r\n<script>\r\nimport EleIcon from '../../icon/src/index.vue'\r\nexport default {\r\n name: 'ele-batch-export',\r\n components: {\r\n EleIcon\r\n },\r\n props: {\r\n value: {\r\n type: Boolean,\r\n default: false\r\n },\r\n buttonGroupMeta: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n elements: [\r\n {\r\n label: '关闭',\r\n key: 'close',\r\n type: 'primary',\r\n eventName: 'handleClose'\r\n }\r\n ]\r\n }\r\n }\r\n }\r\n },\r\n data() {\r\n return {\r\n innerValue: false\r\n }\r\n },\r\n watch: {\r\n value: {\r\n handler (value) {\r\n this.$nextTick(() => {\r\n this.innerValue = value\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n methods: {\r\n handleClick () {\r\n this.$emit('on-batch-export')\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-batch-export__content {\r\n height: 106px;\r\n .ele-batch-export__container {\r\n border-width: 1px;\r\n border-style: dashed;\r\n height: 80px;\r\n border-color: var(--idooel-link-06);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: 0 16px;\r\n .ele-batch-export__icon {\r\n font-size: 48px;\r\n color: var(--idooel-link-06);\r\n }\r\n .ele-batch-export__handle {\r\n margin-left: 16px;\r\n .ele-batch-export__btn {\r\n color: var(--idooel-link-06);\r\n font-size: 16px;\r\n cursor: pointer;\r\n }\r\n .ele-batch-export__btn--hint {\r\n color: var(--idooel-link-03);\r\n font-size: 14px;\r\n }\r\n }\r\n }\r\n .ele-batch-export__message {\r\n color: var(--idooel-link-06);\r\n font-size: 14px;\r\n }\r\n}\r\n</style>",".ele-batch-export__content {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn--hint {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5605
5651
|
|
|
5606
5652
|
};
|
|
5607
5653
|
/* scoped */
|
|
5608
|
-
const __vue_scope_id__$
|
|
5654
|
+
const __vue_scope_id__$3 = "data-v-8734c1a2";
|
|
5609
5655
|
/* module identifier */
|
|
5610
|
-
const __vue_module_identifier__$
|
|
5656
|
+
const __vue_module_identifier__$3 = undefined;
|
|
5611
5657
|
/* functional template */
|
|
5612
|
-
const __vue_is_functional_template__$
|
|
5658
|
+
const __vue_is_functional_template__$3 = false;
|
|
5613
5659
|
/* style inject SSR */
|
|
5614
5660
|
|
|
5615
5661
|
/* style inject shadow dom */
|
|
5616
5662
|
|
|
5617
5663
|
|
|
5618
5664
|
|
|
5619
|
-
const __vue_component__$
|
|
5620
|
-
{ render: __vue_render__$
|
|
5621
|
-
__vue_inject_styles__$
|
|
5622
|
-
__vue_script__$
|
|
5623
|
-
__vue_scope_id__$
|
|
5624
|
-
__vue_is_functional_template__$
|
|
5625
|
-
__vue_module_identifier__$
|
|
5665
|
+
const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
|
|
5666
|
+
{ render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
|
|
5667
|
+
__vue_inject_styles__$3,
|
|
5668
|
+
__vue_script__$3,
|
|
5669
|
+
__vue_scope_id__$3,
|
|
5670
|
+
__vue_is_functional_template__$3,
|
|
5671
|
+
__vue_module_identifier__$3,
|
|
5626
5672
|
false,
|
|
5627
5673
|
createInjector,
|
|
5628
5674
|
undefined,
|
|
5629
5675
|
undefined
|
|
5630
5676
|
);
|
|
5631
5677
|
|
|
5632
|
-
__vue_component__$
|
|
5678
|
+
__vue_component__$3.install = Vue => Vue.component(__vue_component__$3.name, __vue_component__$3);
|
|
5633
5679
|
|
|
5634
5680
|
//
|
|
5635
5681
|
//
|
|
@@ -5641,14 +5687,19 @@ __vue_component__$2.install = Vue => Vue.component(__vue_component__$2.name, __v
|
|
|
5641
5687
|
//
|
|
5642
5688
|
//
|
|
5643
5689
|
//
|
|
5690
|
+
//
|
|
5644
5691
|
|
|
5645
|
-
var script$
|
|
5692
|
+
var script$2 = {
|
|
5646
5693
|
name: 'ele-date-range',
|
|
5647
5694
|
model: {
|
|
5648
5695
|
prop: 'value',
|
|
5649
5696
|
event: 'change'
|
|
5650
5697
|
},
|
|
5651
5698
|
props: {
|
|
5699
|
+
disabled: {
|
|
5700
|
+
type: Boolean,
|
|
5701
|
+
default: false
|
|
5702
|
+
},
|
|
5652
5703
|
showTime: {
|
|
5653
5704
|
type: Object
|
|
5654
5705
|
},
|
|
@@ -5669,65 +5720,70 @@ var script$1 = {
|
|
|
5669
5720
|
};
|
|
5670
5721
|
|
|
5671
5722
|
/* script */
|
|
5672
|
-
const __vue_script__$
|
|
5723
|
+
const __vue_script__$2 = script$2;
|
|
5673
5724
|
|
|
5674
5725
|
/* template */
|
|
5675
|
-
var __vue_render__$
|
|
5726
|
+
var __vue_render__$2 = function () {
|
|
5676
5727
|
var _vm = this;
|
|
5677
5728
|
var _h = _vm.$createElement;
|
|
5678
5729
|
var _c = _vm._self._c || _h;
|
|
5679
5730
|
return _c("a-range-picker", {
|
|
5680
5731
|
staticStyle: { width: "100%" },
|
|
5681
|
-
attrs: {
|
|
5732
|
+
attrs: {
|
|
5733
|
+
disabled: _vm.disabled,
|
|
5734
|
+
"show-time": _vm.showTime,
|
|
5735
|
+
value: _vm.value,
|
|
5736
|
+
format: _vm.format,
|
|
5737
|
+
},
|
|
5682
5738
|
on: { change: _vm.onChange },
|
|
5683
5739
|
})
|
|
5684
5740
|
};
|
|
5685
|
-
var __vue_staticRenderFns__$
|
|
5686
|
-
__vue_render__$
|
|
5741
|
+
var __vue_staticRenderFns__$2 = [];
|
|
5742
|
+
__vue_render__$2._withStripped = true;
|
|
5687
5743
|
|
|
5688
5744
|
/* style */
|
|
5689
|
-
const __vue_inject_styles__$
|
|
5745
|
+
const __vue_inject_styles__$2 = function (inject) {
|
|
5690
5746
|
if (!inject) return
|
|
5691
|
-
inject("data-v-
|
|
5747
|
+
inject("data-v-547e029c_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
5692
5748
|
|
|
5693
5749
|
};
|
|
5694
5750
|
/* scoped */
|
|
5695
|
-
const __vue_scope_id__$
|
|
5751
|
+
const __vue_scope_id__$2 = "data-v-547e029c";
|
|
5696
5752
|
/* module identifier */
|
|
5697
|
-
const __vue_module_identifier__$
|
|
5753
|
+
const __vue_module_identifier__$2 = undefined;
|
|
5698
5754
|
/* functional template */
|
|
5699
|
-
const __vue_is_functional_template__$
|
|
5755
|
+
const __vue_is_functional_template__$2 = false;
|
|
5700
5756
|
/* style inject SSR */
|
|
5701
5757
|
|
|
5702
5758
|
/* style inject shadow dom */
|
|
5703
5759
|
|
|
5704
5760
|
|
|
5705
5761
|
|
|
5706
|
-
const __vue_component__$
|
|
5707
|
-
{ render: __vue_render__$
|
|
5708
|
-
__vue_inject_styles__$
|
|
5709
|
-
__vue_script__$
|
|
5710
|
-
__vue_scope_id__$
|
|
5711
|
-
__vue_is_functional_template__$
|
|
5712
|
-
__vue_module_identifier__$
|
|
5762
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
5763
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
5764
|
+
__vue_inject_styles__$2,
|
|
5765
|
+
__vue_script__$2,
|
|
5766
|
+
__vue_scope_id__$2,
|
|
5767
|
+
__vue_is_functional_template__$2,
|
|
5768
|
+
__vue_module_identifier__$2,
|
|
5713
5769
|
false,
|
|
5714
5770
|
createInjector,
|
|
5715
5771
|
undefined,
|
|
5716
5772
|
undefined
|
|
5717
5773
|
);
|
|
5718
5774
|
|
|
5719
|
-
__vue_component__$
|
|
5720
|
-
|
|
5721
|
-
__vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
|
|
5775
|
+
__vue_component__$2.install = Vue => Vue.component(__vue_component__$2.name, __vue_component__$2);
|
|
5722
5776
|
|
|
5723
5777
|
__vue_component__$j.install = Vue => Vue.component(__vue_component__$j.name, __vue_component__$j);
|
|
5724
5778
|
|
|
5779
|
+
__vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
|
|
5780
|
+
|
|
5725
5781
|
//
|
|
5726
5782
|
//
|
|
5727
5783
|
//
|
|
5728
5784
|
//
|
|
5729
5785
|
|
|
5730
|
-
var script = {
|
|
5786
|
+
var script$1 = {
|
|
5731
5787
|
name: 'ele-modal-import',
|
|
5732
5788
|
model: {
|
|
5733
5789
|
prop: 'value',
|
|
@@ -5747,10 +5803,10 @@ var script = {
|
|
|
5747
5803
|
};
|
|
5748
5804
|
|
|
5749
5805
|
/* script */
|
|
5750
|
-
const __vue_script__ = script;
|
|
5806
|
+
const __vue_script__$1 = script$1;
|
|
5751
5807
|
|
|
5752
5808
|
/* template */
|
|
5753
|
-
var __vue_render__ = function () {
|
|
5809
|
+
var __vue_render__$1 = function () {
|
|
5754
5810
|
var _vm = this;
|
|
5755
5811
|
var _h = _vm.$createElement;
|
|
5756
5812
|
var _c = _vm._self._c || _h;
|
|
@@ -5764,17 +5820,163 @@ var __vue_render__ = function () {
|
|
|
5764
5820
|
},
|
|
5765
5821
|
})
|
|
5766
5822
|
};
|
|
5823
|
+
var __vue_staticRenderFns__$1 = [];
|
|
5824
|
+
__vue_render__$1._withStripped = true;
|
|
5825
|
+
|
|
5826
|
+
/* style */
|
|
5827
|
+
const __vue_inject_styles__$1 = function (inject) {
|
|
5828
|
+
if (!inject) return
|
|
5829
|
+
inject("data-v-68861ff4_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
|
+
|
|
5831
|
+
};
|
|
5832
|
+
/* scoped */
|
|
5833
|
+
const __vue_scope_id__$1 = "data-v-68861ff4";
|
|
5834
|
+
/* module identifier */
|
|
5835
|
+
const __vue_module_identifier__$1 = undefined;
|
|
5836
|
+
/* functional template */
|
|
5837
|
+
const __vue_is_functional_template__$1 = false;
|
|
5838
|
+
/* style inject SSR */
|
|
5839
|
+
|
|
5840
|
+
/* style inject shadow dom */
|
|
5841
|
+
|
|
5842
|
+
|
|
5843
|
+
|
|
5844
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
5845
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
5846
|
+
__vue_inject_styles__$1,
|
|
5847
|
+
__vue_script__$1,
|
|
5848
|
+
__vue_scope_id__$1,
|
|
5849
|
+
__vue_is_functional_template__$1,
|
|
5850
|
+
__vue_module_identifier__$1,
|
|
5851
|
+
false,
|
|
5852
|
+
createInjector,
|
|
5853
|
+
undefined,
|
|
5854
|
+
undefined
|
|
5855
|
+
);
|
|
5856
|
+
|
|
5857
|
+
__vue_component__$1.install = Vue => Vue.component(__vue_component__$1.name, __vue_component__$1);
|
|
5858
|
+
|
|
5859
|
+
__vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
|
|
5860
|
+
|
|
5861
|
+
__vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
|
|
5862
|
+
|
|
5863
|
+
__vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __vue_component__$9);
|
|
5864
|
+
|
|
5865
|
+
__vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
|
|
5866
|
+
|
|
5867
|
+
//
|
|
5868
|
+
//
|
|
5869
|
+
//
|
|
5870
|
+
//
|
|
5871
|
+
//
|
|
5872
|
+
//
|
|
5873
|
+
//
|
|
5874
|
+
//
|
|
5875
|
+
//
|
|
5876
|
+
//
|
|
5877
|
+
//
|
|
5878
|
+
//
|
|
5879
|
+
//
|
|
5880
|
+
//
|
|
5881
|
+
|
|
5882
|
+
var script = {
|
|
5883
|
+
name: 'ele-tabs',
|
|
5884
|
+
components: {},
|
|
5885
|
+
props: {
|
|
5886
|
+
activeKey: {
|
|
5887
|
+
type: Number,
|
|
5888
|
+
default: 0
|
|
5889
|
+
},
|
|
5890
|
+
tabsList: {
|
|
5891
|
+
type: Array,
|
|
5892
|
+
default() {
|
|
5893
|
+
return [];
|
|
5894
|
+
}
|
|
5895
|
+
},
|
|
5896
|
+
tabBarStyle: {
|
|
5897
|
+
type: Object,
|
|
5898
|
+
default() {
|
|
5899
|
+
return {};
|
|
5900
|
+
}
|
|
5901
|
+
},
|
|
5902
|
+
tabBarGutter: {
|
|
5903
|
+
type: Number
|
|
5904
|
+
}
|
|
5905
|
+
},
|
|
5906
|
+
methods: {
|
|
5907
|
+
changeHandle(key) {
|
|
5908
|
+
this.$emit('changeActiveKey', key);
|
|
5909
|
+
}
|
|
5910
|
+
}
|
|
5911
|
+
};
|
|
5912
|
+
|
|
5913
|
+
/* script */
|
|
5914
|
+
const __vue_script__ = script;
|
|
5915
|
+
|
|
5916
|
+
/* template */
|
|
5917
|
+
var __vue_render__ = function () {
|
|
5918
|
+
var _vm = this;
|
|
5919
|
+
var _h = _vm.$createElement;
|
|
5920
|
+
var _c = _vm._self._c || _h;
|
|
5921
|
+
return _c(
|
|
5922
|
+
"div",
|
|
5923
|
+
[
|
|
5924
|
+
_c(
|
|
5925
|
+
"a-tabs",
|
|
5926
|
+
{
|
|
5927
|
+
staticClass: "tabclass",
|
|
5928
|
+
attrs: {
|
|
5929
|
+
"default-active-key": _vm.activeKey,
|
|
5930
|
+
tabBarGutter: _vm.tabBarGutter,
|
|
5931
|
+
tabBarStyle: _vm.tabBarStyle,
|
|
5932
|
+
},
|
|
5933
|
+
on: { change: _vm.changeHandle },
|
|
5934
|
+
},
|
|
5935
|
+
_vm._l(_vm.tabsList, function (item, index) {
|
|
5936
|
+
return _c(
|
|
5937
|
+
"a-tab-pane",
|
|
5938
|
+
{
|
|
5939
|
+
key: index,
|
|
5940
|
+
attrs: { tab: item.tabName, disabled: item.disabled },
|
|
5941
|
+
scopedSlots: _vm._u(
|
|
5942
|
+
[
|
|
5943
|
+
{
|
|
5944
|
+
key: "tab",
|
|
5945
|
+
fn: function () {
|
|
5946
|
+
return [
|
|
5947
|
+
item.renderHeader
|
|
5948
|
+
? _c(item.renderHeader, { tag: "component" })
|
|
5949
|
+
: _c("span", [_vm._v(_vm._s(item.tabName))]),
|
|
5950
|
+
]
|
|
5951
|
+
},
|
|
5952
|
+
proxy: true,
|
|
5953
|
+
},
|
|
5954
|
+
],
|
|
5955
|
+
null,
|
|
5956
|
+
true
|
|
5957
|
+
),
|
|
5958
|
+
},
|
|
5959
|
+
[_vm._v(" "), _c(item.content, { tag: "component" })],
|
|
5960
|
+
1
|
|
5961
|
+
)
|
|
5962
|
+
}),
|
|
5963
|
+
1
|
|
5964
|
+
),
|
|
5965
|
+
],
|
|
5966
|
+
1
|
|
5967
|
+
)
|
|
5968
|
+
};
|
|
5767
5969
|
var __vue_staticRenderFns__ = [];
|
|
5768
5970
|
__vue_render__._withStripped = true;
|
|
5769
5971
|
|
|
5770
5972
|
/* style */
|
|
5771
5973
|
const __vue_inject_styles__ = function (inject) {
|
|
5772
5974
|
if (!inject) return
|
|
5773
|
-
inject("data-v-
|
|
5975
|
+
inject("data-v-683a8ad6_0", { source: ".tabclass .ant-tabs-nav-animated {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\tabs\\src\\index.vue","index.vue"],"names":[],"mappings":"AAkDA;EACA,sBAAA;ACjDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div>\r\n <a-tabs class=\"tabclass\" :default-active-key=\"activeKey\" :tabBarGutter=\"tabBarGutter\" :tabBarStyle=\"tabBarStyle\" @change=\"changeHandle\">\r\n <a-tab-pane v-for=\"(item, index) in tabsList\" :key=\"index\" :tab=\"item.tabName\" :disabled=\"item.disabled\">\r\n <template #tab>\r\n <component v-if=\"item.renderHeader\" :is=\"item.renderHeader\" ></component>\r\n <span v-else>{{ item.tabName }}</span>\r\n </template>\r\n <component :is=\"item.content\"></component>\r\n </a-tab-pane>\r\n </a-tabs>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-tabs',\r\n components: {\r\n },\r\n props: {\r\n activeKey: {\r\n type: Number,\r\n default: 0\r\n },\r\n tabsList: {\r\n type: Array,\r\n default () {\r\n return []\r\n }\r\n },\r\n tabBarStyle: {\r\n type: Object,\r\n default () {\r\n return {}\r\n }\r\n },\r\n tabBarGutter: {\r\n type: Number\r\n }\r\n },\r\n methods: {\r\n changeHandle (key) {\r\n this.$emit('changeActiveKey', key)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n.tabclass {\r\n .ant-tabs-nav-animated {\r\n float: left !important;\r\n }\r\n}\r\n</style>",".tabclass .ant-tabs-nav-animated {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5774
5976
|
|
|
5775
5977
|
};
|
|
5776
5978
|
/* scoped */
|
|
5777
|
-
const __vue_scope_id__ =
|
|
5979
|
+
const __vue_scope_id__ = undefined;
|
|
5778
5980
|
/* module identifier */
|
|
5779
5981
|
const __vue_module_identifier__ = undefined;
|
|
5780
5982
|
/* functional template */
|
|
@@ -5800,17 +6002,9 @@ __vue_render__._withStripped = true;
|
|
|
5800
6002
|
|
|
5801
6003
|
__vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
|
|
5802
6004
|
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
__vue_component__$
|
|
5806
|
-
|
|
5807
|
-
__vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
|
|
5808
|
-
|
|
5809
|
-
__vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
|
|
5810
|
-
|
|
5811
|
-
const compositeComponents = [__vue_component__$i, __vue_component__$j, __vue_component__];
|
|
5812
|
-
const models = [__vue_component__$h, __vue_component__$7, __vue_component__$8, __vue_component__$6];
|
|
5813
|
-
const components = [__vue_component__$r, __vue_component__$q, __vue_component__$p, __vue_component__$o, __vue_component__$m, __vue_component__$l, __vue_component__$5, __vue_component__$9, __vue_component__$4, __vue_component__$e, __vue_component__$d, __vue_component__$f, __vue_component__$c, __vue_component__$3, __vue_component__$b, __vue_component__$a, __vue_component__$2, __vue_component__$1, ...compositeComponents, ...models];
|
|
6005
|
+
const compositeComponents = [__vue_component__$j, __vue_component__$k, __vue_component__$1];
|
|
6006
|
+
const models = [__vue_component__$i, __vue_component__$8, __vue_component__$9, __vue_component__$7];
|
|
6007
|
+
const components = [__vue_component__$s, __vue_component__$r, __vue_component__$q, __vue_component__$p, __vue_component__$n, __vue_component__$m, __vue_component__$6, __vue_component__$a, __vue_component__$5, __vue_component__$f, __vue_component__$e, __vue_component__$g, __vue_component__$d, __vue_component__$4, __vue_component__$c, __vue_component__$b, __vue_component__$3, __vue_component__$2, ...compositeComponents, ...models, __vue_component__];
|
|
5814
6008
|
const install = Vue => {
|
|
5815
6009
|
if (install.installed) return;
|
|
5816
6010
|
install.installed = true;
|
|
@@ -5819,4 +6013,4 @@ const install = Vue => {
|
|
|
5819
6013
|
});
|
|
5820
6014
|
};
|
|
5821
6015
|
|
|
5822
|
-
export { __vue_component__$
|
|
6016
|
+
export { __vue_component__$s as EleButton, __vue_component__$r as EleDate, __vue_component__$q as EleInput, __vue_component__$4 as EleModal, __vue_component__$p as EleSelect, __vue_component__$n as EleTable, __vue_component__ as EleTabs, __vue_component__$6 as EleTpl, __vue_component__$m as EleTree, install as default, models };
|