@idooel/components 0.0.1-beta.21 → 0.0.1-beta.23
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 +1018 -578
- package/dist/@idooel/components.umd.js +1028 -586
- package/package.json +7 -4
- package/packages/batch-export/src/index.vue +3 -1
- package/packages/composite-components/button-group/src/index.vue +20 -12
- package/packages/form/src/index.vue +9 -1
- package/packages/form-group-model/src/index.vue +3 -1
- package/packages/form-model/src/index.vue +27 -7
- package/packages/img-crop/index.js +5 -0
- package/packages/img-crop/src/index.vue +181 -0
- package/packages/index.js +8 -3
- package/packages/modal/src/index.vue +6 -1
- package/packages/step-model/src/index.vue +51 -5
- package/packages/tabs/src/index.vue +8 -7
- package/packages/text-editor/index.js +5 -0
- package/packages/text-editor/src/index.vue +73 -0
- package/packages/theme/index.scss +4 -0
- package/packages/theme/styleClass.scss +3 -0
- package/packages/utils/index.js +0 -1
|
@@ -20,7 +20,7 @@ import FileUpload from 'vue-upload-component';
|
|
|
20
20
|
//
|
|
21
21
|
//
|
|
22
22
|
|
|
23
|
-
var script$
|
|
23
|
+
var script$u = {
|
|
24
24
|
name: 'ele-button',
|
|
25
25
|
props: {
|
|
26
26
|
record: {
|
|
@@ -138,10 +138,10 @@ function normalizeComponent(template, style, script, scopeId, isFunctionalTempla
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/* script */
|
|
141
|
-
const __vue_script__$
|
|
141
|
+
const __vue_script__$u = script$u;
|
|
142
142
|
|
|
143
143
|
/* template */
|
|
144
|
-
var __vue_render__$
|
|
144
|
+
var __vue_render__$u = function () {
|
|
145
145
|
var _vm = this;
|
|
146
146
|
var _h = _vm.$createElement;
|
|
147
147
|
var _c = _vm._self._c || _h;
|
|
@@ -187,17 +187,17 @@ var __vue_render__$s = function () {
|
|
|
187
187
|
2
|
|
188
188
|
)
|
|
189
189
|
};
|
|
190
|
-
var __vue_staticRenderFns__$
|
|
191
|
-
__vue_render__$
|
|
190
|
+
var __vue_staticRenderFns__$u = [];
|
|
191
|
+
__vue_render__$u._withStripped = true;
|
|
192
192
|
|
|
193
193
|
/* style */
|
|
194
|
-
const __vue_inject_styles__$
|
|
194
|
+
const __vue_inject_styles__$u = undefined;
|
|
195
195
|
/* scoped */
|
|
196
|
-
const __vue_scope_id__$
|
|
196
|
+
const __vue_scope_id__$u = undefined;
|
|
197
197
|
/* module identifier */
|
|
198
|
-
const __vue_module_identifier__$
|
|
198
|
+
const __vue_module_identifier__$u = undefined;
|
|
199
199
|
/* functional template */
|
|
200
|
-
const __vue_is_functional_template__$
|
|
200
|
+
const __vue_is_functional_template__$u = false;
|
|
201
201
|
/* style inject */
|
|
202
202
|
|
|
203
203
|
/* style inject SSR */
|
|
@@ -206,20 +206,20 @@ __vue_render__$s._withStripped = true;
|
|
|
206
206
|
|
|
207
207
|
|
|
208
208
|
|
|
209
|
-
const __vue_component__$
|
|
210
|
-
{ render: __vue_render__$
|
|
211
|
-
__vue_inject_styles__$
|
|
212
|
-
__vue_script__$
|
|
213
|
-
__vue_scope_id__$
|
|
214
|
-
__vue_is_functional_template__$
|
|
215
|
-
__vue_module_identifier__$
|
|
209
|
+
const __vue_component__$u = /*#__PURE__*/normalizeComponent(
|
|
210
|
+
{ render: __vue_render__$u, staticRenderFns: __vue_staticRenderFns__$u },
|
|
211
|
+
__vue_inject_styles__$u,
|
|
212
|
+
__vue_script__$u,
|
|
213
|
+
__vue_scope_id__$u,
|
|
214
|
+
__vue_is_functional_template__$u,
|
|
215
|
+
__vue_module_identifier__$u,
|
|
216
216
|
false,
|
|
217
217
|
undefined,
|
|
218
218
|
undefined,
|
|
219
219
|
undefined
|
|
220
220
|
);
|
|
221
221
|
|
|
222
|
-
__vue_component__$
|
|
222
|
+
__vue_component__$u.install = Vue => Vue.component(__vue_component__$u.name, __vue_component__$u);
|
|
223
223
|
|
|
224
224
|
//
|
|
225
225
|
//
|
|
@@ -234,7 +234,7 @@ __vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __v
|
|
|
234
234
|
//
|
|
235
235
|
//
|
|
236
236
|
|
|
237
|
-
var script$
|
|
237
|
+
var script$t = {
|
|
238
238
|
name: 'ele-date',
|
|
239
239
|
props: {
|
|
240
240
|
value: {
|
|
@@ -262,10 +262,10 @@ var script$r = {
|
|
|
262
262
|
};
|
|
263
263
|
|
|
264
264
|
/* script */
|
|
265
|
-
const __vue_script__$
|
|
265
|
+
const __vue_script__$t = script$t;
|
|
266
266
|
|
|
267
267
|
/* template */
|
|
268
|
-
var __vue_render__$
|
|
268
|
+
var __vue_render__$t = function () {
|
|
269
269
|
var _vm = this;
|
|
270
270
|
var _h = _vm.$createElement;
|
|
271
271
|
var _c = _vm._self._c || _h;
|
|
@@ -280,17 +280,17 @@ var __vue_render__$r = function () {
|
|
|
280
280
|
on: { focus: _vm.onFocus, panelChange: _vm.onPanelChange },
|
|
281
281
|
})
|
|
282
282
|
};
|
|
283
|
-
var __vue_staticRenderFns__$
|
|
284
|
-
__vue_render__$
|
|
283
|
+
var __vue_staticRenderFns__$t = [];
|
|
284
|
+
__vue_render__$t._withStripped = true;
|
|
285
285
|
|
|
286
286
|
/* style */
|
|
287
|
-
const __vue_inject_styles__$
|
|
287
|
+
const __vue_inject_styles__$t = undefined;
|
|
288
288
|
/* scoped */
|
|
289
|
-
const __vue_scope_id__$
|
|
289
|
+
const __vue_scope_id__$t = undefined;
|
|
290
290
|
/* module identifier */
|
|
291
|
-
const __vue_module_identifier__$
|
|
291
|
+
const __vue_module_identifier__$t = undefined;
|
|
292
292
|
/* functional template */
|
|
293
|
-
const __vue_is_functional_template__$
|
|
293
|
+
const __vue_is_functional_template__$t = false;
|
|
294
294
|
/* style inject */
|
|
295
295
|
|
|
296
296
|
/* style inject SSR */
|
|
@@ -299,27 +299,27 @@ __vue_render__$r._withStripped = true;
|
|
|
299
299
|
|
|
300
300
|
|
|
301
301
|
|
|
302
|
-
const __vue_component__$
|
|
303
|
-
{ render: __vue_render__$
|
|
304
|
-
__vue_inject_styles__$
|
|
305
|
-
__vue_script__$
|
|
306
|
-
__vue_scope_id__$
|
|
307
|
-
__vue_is_functional_template__$
|
|
308
|
-
__vue_module_identifier__$
|
|
302
|
+
const __vue_component__$t = /*#__PURE__*/normalizeComponent(
|
|
303
|
+
{ render: __vue_render__$t, staticRenderFns: __vue_staticRenderFns__$t },
|
|
304
|
+
__vue_inject_styles__$t,
|
|
305
|
+
__vue_script__$t,
|
|
306
|
+
__vue_scope_id__$t,
|
|
307
|
+
__vue_is_functional_template__$t,
|
|
308
|
+
__vue_module_identifier__$t,
|
|
309
309
|
false,
|
|
310
310
|
undefined,
|
|
311
311
|
undefined,
|
|
312
312
|
undefined
|
|
313
313
|
);
|
|
314
314
|
|
|
315
|
-
__vue_component__$
|
|
315
|
+
__vue_component__$t.install = Vue => Vue.component(__vue_component__$t.name, __vue_component__$t);
|
|
316
316
|
|
|
317
317
|
//
|
|
318
318
|
//
|
|
319
319
|
//
|
|
320
320
|
//
|
|
321
321
|
|
|
322
|
-
var script$
|
|
322
|
+
var script$s = {
|
|
323
323
|
name: 'ele-input',
|
|
324
324
|
model: {
|
|
325
325
|
prop: 'value',
|
|
@@ -391,10 +391,10 @@ function addStyle(id, css) {
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
/* script */
|
|
394
|
-
const __vue_script__$
|
|
394
|
+
const __vue_script__$s = script$s;
|
|
395
395
|
|
|
396
396
|
/* template */
|
|
397
|
-
var __vue_render__$
|
|
397
|
+
var __vue_render__$s = function () {
|
|
398
398
|
var _vm = this;
|
|
399
399
|
var _h = _vm.$createElement;
|
|
400
400
|
var _c = _vm._self._c || _h;
|
|
@@ -407,44 +407,44 @@ var __vue_render__$q = function () {
|
|
|
407
407
|
on: { change: _vm.onChange },
|
|
408
408
|
})
|
|
409
409
|
};
|
|
410
|
-
var __vue_staticRenderFns__$
|
|
411
|
-
__vue_render__$
|
|
410
|
+
var __vue_staticRenderFns__$s = [];
|
|
411
|
+
__vue_render__$s._withStripped = true;
|
|
412
412
|
|
|
413
413
|
/* style */
|
|
414
|
-
const __vue_inject_styles__$
|
|
414
|
+
const __vue_inject_styles__$s = function (inject) {
|
|
415
415
|
if (!inject) return
|
|
416
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__$s = "data-v-2dfc23ac";
|
|
421
421
|
/* module identifier */
|
|
422
|
-
const __vue_module_identifier__$
|
|
422
|
+
const __vue_module_identifier__$s = undefined;
|
|
423
423
|
/* functional template */
|
|
424
|
-
const __vue_is_functional_template__$
|
|
424
|
+
const __vue_is_functional_template__$s = false;
|
|
425
425
|
/* style inject SSR */
|
|
426
426
|
|
|
427
427
|
/* style inject shadow dom */
|
|
428
428
|
|
|
429
429
|
|
|
430
430
|
|
|
431
|
-
const __vue_component__$
|
|
432
|
-
{ render: __vue_render__$
|
|
433
|
-
__vue_inject_styles__$
|
|
434
|
-
__vue_script__$
|
|
435
|
-
__vue_scope_id__$
|
|
436
|
-
__vue_is_functional_template__$
|
|
437
|
-
__vue_module_identifier__$
|
|
431
|
+
const __vue_component__$s = /*#__PURE__*/normalizeComponent(
|
|
432
|
+
{ render: __vue_render__$s, staticRenderFns: __vue_staticRenderFns__$s },
|
|
433
|
+
__vue_inject_styles__$s,
|
|
434
|
+
__vue_script__$s,
|
|
435
|
+
__vue_scope_id__$s,
|
|
436
|
+
__vue_is_functional_template__$s,
|
|
437
|
+
__vue_module_identifier__$s,
|
|
438
438
|
false,
|
|
439
439
|
createInjector,
|
|
440
440
|
undefined,
|
|
441
441
|
undefined
|
|
442
442
|
);
|
|
443
443
|
|
|
444
|
-
__vue_component__$
|
|
444
|
+
__vue_component__$s.install = Vue => Vue.component(__vue_component__$s.name, __vue_component__$s);
|
|
445
445
|
|
|
446
446
|
//
|
|
447
|
-
var script$
|
|
447
|
+
var script$r = {
|
|
448
448
|
name: 'ele-select',
|
|
449
449
|
props: {
|
|
450
450
|
disabled: {
|
|
@@ -529,10 +529,10 @@ var script$p = {
|
|
|
529
529
|
};
|
|
530
530
|
|
|
531
531
|
/* script */
|
|
532
|
-
const __vue_script__$
|
|
532
|
+
const __vue_script__$r = script$r;
|
|
533
533
|
|
|
534
534
|
/* template */
|
|
535
|
-
var __vue_render__$
|
|
535
|
+
var __vue_render__$r = function () {
|
|
536
536
|
var _vm = this;
|
|
537
537
|
var _h = _vm.$createElement;
|
|
538
538
|
var _c = _vm._self._c || _h;
|
|
@@ -553,41 +553,41 @@ var __vue_render__$p = function () {
|
|
|
553
553
|
1
|
|
554
554
|
)
|
|
555
555
|
};
|
|
556
|
-
var __vue_staticRenderFns__$
|
|
557
|
-
__vue_render__$
|
|
556
|
+
var __vue_staticRenderFns__$r = [];
|
|
557
|
+
__vue_render__$r._withStripped = true;
|
|
558
558
|
|
|
559
559
|
/* style */
|
|
560
|
-
const __vue_inject_styles__$
|
|
560
|
+
const __vue_inject_styles__$r = function (inject) {
|
|
561
561
|
if (!inject) return
|
|
562
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 });
|
|
563
563
|
|
|
564
564
|
};
|
|
565
565
|
/* scoped */
|
|
566
|
-
const __vue_scope_id__$
|
|
566
|
+
const __vue_scope_id__$r = "data-v-ccfe5f1e";
|
|
567
567
|
/* module identifier */
|
|
568
|
-
const __vue_module_identifier__$
|
|
568
|
+
const __vue_module_identifier__$r = undefined;
|
|
569
569
|
/* functional template */
|
|
570
|
-
const __vue_is_functional_template__$
|
|
570
|
+
const __vue_is_functional_template__$r = false;
|
|
571
571
|
/* style inject SSR */
|
|
572
572
|
|
|
573
573
|
/* style inject shadow dom */
|
|
574
574
|
|
|
575
575
|
|
|
576
576
|
|
|
577
|
-
const __vue_component__$
|
|
578
|
-
{ render: __vue_render__$
|
|
579
|
-
__vue_inject_styles__$
|
|
580
|
-
__vue_script__$
|
|
581
|
-
__vue_scope_id__$
|
|
582
|
-
__vue_is_functional_template__$
|
|
583
|
-
__vue_module_identifier__$
|
|
577
|
+
const __vue_component__$r = /*#__PURE__*/normalizeComponent(
|
|
578
|
+
{ render: __vue_render__$r, staticRenderFns: __vue_staticRenderFns__$r },
|
|
579
|
+
__vue_inject_styles__$r,
|
|
580
|
+
__vue_script__$r,
|
|
581
|
+
__vue_scope_id__$r,
|
|
582
|
+
__vue_is_functional_template__$r,
|
|
583
|
+
__vue_module_identifier__$r,
|
|
584
584
|
false,
|
|
585
585
|
createInjector,
|
|
586
586
|
undefined,
|
|
587
587
|
undefined
|
|
588
588
|
);
|
|
589
589
|
|
|
590
|
-
__vue_component__$
|
|
590
|
+
__vue_component__$r.install = Vue => Vue.component(__vue_component__$r.name, __vue_component__$r);
|
|
591
591
|
|
|
592
592
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
593
593
|
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
@@ -1221,7 +1221,7 @@ const parse = (expression, props = {}) => {
|
|
|
1221
1221
|
|
|
1222
1222
|
//
|
|
1223
1223
|
const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
|
|
1224
|
-
var script$
|
|
1224
|
+
var script$q = {
|
|
1225
1225
|
props: {
|
|
1226
1226
|
record: {
|
|
1227
1227
|
type: Object
|
|
@@ -1319,10 +1319,10 @@ var script$o = {
|
|
|
1319
1319
|
};
|
|
1320
1320
|
|
|
1321
1321
|
/* script */
|
|
1322
|
-
const __vue_script__$
|
|
1322
|
+
const __vue_script__$q = script$q;
|
|
1323
1323
|
|
|
1324
1324
|
/* template */
|
|
1325
|
-
var __vue_render__$
|
|
1325
|
+
var __vue_render__$q = function () {
|
|
1326
1326
|
var _vm = this;
|
|
1327
1327
|
var _h = _vm.$createElement;
|
|
1328
1328
|
var _c = _vm._self._c || _h;
|
|
@@ -1422,34 +1422,34 @@ var __vue_render__$o = function () {
|
|
|
1422
1422
|
0
|
|
1423
1423
|
)
|
|
1424
1424
|
};
|
|
1425
|
-
var __vue_staticRenderFns__$
|
|
1426
|
-
__vue_render__$
|
|
1425
|
+
var __vue_staticRenderFns__$q = [];
|
|
1426
|
+
__vue_render__$q._withStripped = true;
|
|
1427
1427
|
|
|
1428
1428
|
/* style */
|
|
1429
|
-
const __vue_inject_styles__$
|
|
1429
|
+
const __vue_inject_styles__$q = function (inject) {
|
|
1430
1430
|
if (!inject) return
|
|
1431
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 });
|
|
1432
1432
|
|
|
1433
1433
|
};
|
|
1434
1434
|
/* scoped */
|
|
1435
|
-
const __vue_scope_id__$
|
|
1435
|
+
const __vue_scope_id__$q = "data-v-572820bc";
|
|
1436
1436
|
/* module identifier */
|
|
1437
|
-
const __vue_module_identifier__$
|
|
1437
|
+
const __vue_module_identifier__$q = undefined;
|
|
1438
1438
|
/* functional template */
|
|
1439
|
-
const __vue_is_functional_template__$
|
|
1439
|
+
const __vue_is_functional_template__$q = false;
|
|
1440
1440
|
/* style inject SSR */
|
|
1441
1441
|
|
|
1442
1442
|
/* style inject shadow dom */
|
|
1443
1443
|
|
|
1444
1444
|
|
|
1445
1445
|
|
|
1446
|
-
const __vue_component__$
|
|
1447
|
-
{ render: __vue_render__$
|
|
1448
|
-
__vue_inject_styles__$
|
|
1449
|
-
__vue_script__$
|
|
1450
|
-
__vue_scope_id__$
|
|
1451
|
-
__vue_is_functional_template__$
|
|
1452
|
-
__vue_module_identifier__$
|
|
1446
|
+
const __vue_component__$q = /*#__PURE__*/normalizeComponent(
|
|
1447
|
+
{ render: __vue_render__$q, staticRenderFns: __vue_staticRenderFns__$q },
|
|
1448
|
+
__vue_inject_styles__$q,
|
|
1449
|
+
__vue_script__$q,
|
|
1450
|
+
__vue_scope_id__$q,
|
|
1451
|
+
__vue_is_functional_template__$q,
|
|
1452
|
+
__vue_module_identifier__$q,
|
|
1453
1453
|
false,
|
|
1454
1454
|
createInjector,
|
|
1455
1455
|
undefined,
|
|
@@ -1457,10 +1457,10 @@ __vue_render__$o._withStripped = true;
|
|
|
1457
1457
|
);
|
|
1458
1458
|
|
|
1459
1459
|
//
|
|
1460
|
-
var script$
|
|
1460
|
+
var script$p = {
|
|
1461
1461
|
name: 'ele-table',
|
|
1462
1462
|
components: {
|
|
1463
|
-
Actions: __vue_component__$
|
|
1463
|
+
Actions: __vue_component__$q
|
|
1464
1464
|
},
|
|
1465
1465
|
props: {
|
|
1466
1466
|
actions: {
|
|
@@ -1503,10 +1503,10 @@ var script$n = {
|
|
|
1503
1503
|
};
|
|
1504
1504
|
|
|
1505
1505
|
/* script */
|
|
1506
|
-
const __vue_script__$
|
|
1506
|
+
const __vue_script__$p = script$p;
|
|
1507
1507
|
|
|
1508
1508
|
/* template */
|
|
1509
|
-
var __vue_render__$
|
|
1509
|
+
var __vue_render__$p = function () {
|
|
1510
1510
|
var _vm = this;
|
|
1511
1511
|
var _h = _vm.$createElement;
|
|
1512
1512
|
var _c = _vm._self._c || _h;
|
|
@@ -1565,41 +1565,41 @@ var __vue_render__$n = function () {
|
|
|
1565
1565
|
1
|
|
1566
1566
|
)
|
|
1567
1567
|
};
|
|
1568
|
-
var __vue_staticRenderFns__$
|
|
1569
|
-
__vue_render__$
|
|
1568
|
+
var __vue_staticRenderFns__$p = [];
|
|
1569
|
+
__vue_render__$p._withStripped = true;
|
|
1570
1570
|
|
|
1571
1571
|
/* style */
|
|
1572
|
-
const __vue_inject_styles__$
|
|
1572
|
+
const __vue_inject_styles__$p = function (inject) {
|
|
1573
1573
|
if (!inject) return
|
|
1574
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 });
|
|
1575
1575
|
|
|
1576
1576
|
};
|
|
1577
1577
|
/* scoped */
|
|
1578
|
-
const __vue_scope_id__$
|
|
1578
|
+
const __vue_scope_id__$p = "data-v-6f3faf52";
|
|
1579
1579
|
/* module identifier */
|
|
1580
|
-
const __vue_module_identifier__$
|
|
1580
|
+
const __vue_module_identifier__$p = undefined;
|
|
1581
1581
|
/* functional template */
|
|
1582
|
-
const __vue_is_functional_template__$
|
|
1582
|
+
const __vue_is_functional_template__$p = false;
|
|
1583
1583
|
/* style inject SSR */
|
|
1584
1584
|
|
|
1585
1585
|
/* style inject shadow dom */
|
|
1586
1586
|
|
|
1587
1587
|
|
|
1588
1588
|
|
|
1589
|
-
const __vue_component__$
|
|
1590
|
-
{ render: __vue_render__$
|
|
1591
|
-
__vue_inject_styles__$
|
|
1592
|
-
__vue_script__$
|
|
1593
|
-
__vue_scope_id__$
|
|
1594
|
-
__vue_is_functional_template__$
|
|
1595
|
-
__vue_module_identifier__$
|
|
1589
|
+
const __vue_component__$p = /*#__PURE__*/normalizeComponent(
|
|
1590
|
+
{ render: __vue_render__$p, staticRenderFns: __vue_staticRenderFns__$p },
|
|
1591
|
+
__vue_inject_styles__$p,
|
|
1592
|
+
__vue_script__$p,
|
|
1593
|
+
__vue_scope_id__$p,
|
|
1594
|
+
__vue_is_functional_template__$p,
|
|
1595
|
+
__vue_module_identifier__$p,
|
|
1596
1596
|
false,
|
|
1597
1597
|
createInjector,
|
|
1598
1598
|
undefined,
|
|
1599
1599
|
undefined
|
|
1600
1600
|
);
|
|
1601
1601
|
|
|
1602
|
-
__vue_component__$
|
|
1602
|
+
__vue_component__$p.install = Vue => Vue.component(__vue_component__$p.name, __vue_component__$p);
|
|
1603
1603
|
|
|
1604
1604
|
//
|
|
1605
1605
|
//
|
|
@@ -1625,7 +1625,7 @@ __vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __v
|
|
|
1625
1625
|
//
|
|
1626
1626
|
//
|
|
1627
1627
|
|
|
1628
|
-
var script$
|
|
1628
|
+
var script$o = {
|
|
1629
1629
|
name: 'ele-tree',
|
|
1630
1630
|
props: {
|
|
1631
1631
|
treeData: {
|
|
@@ -1688,10 +1688,10 @@ var script$m = {
|
|
|
1688
1688
|
};
|
|
1689
1689
|
|
|
1690
1690
|
/* script */
|
|
1691
|
-
const __vue_script__$
|
|
1691
|
+
const __vue_script__$o = script$o;
|
|
1692
1692
|
|
|
1693
1693
|
/* template */
|
|
1694
|
-
var __vue_render__$
|
|
1694
|
+
var __vue_render__$o = function () {
|
|
1695
1695
|
var _vm = this;
|
|
1696
1696
|
var _h = _vm.$createElement;
|
|
1697
1697
|
var _c = _vm._self._c || _h;
|
|
@@ -1748,41 +1748,41 @@ var __vue_render__$m = function () {
|
|
|
1748
1748
|
1
|
|
1749
1749
|
)
|
|
1750
1750
|
};
|
|
1751
|
-
var __vue_staticRenderFns__$
|
|
1752
|
-
__vue_render__$
|
|
1751
|
+
var __vue_staticRenderFns__$o = [];
|
|
1752
|
+
__vue_render__$o._withStripped = true;
|
|
1753
1753
|
|
|
1754
1754
|
/* style */
|
|
1755
|
-
const __vue_inject_styles__$
|
|
1755
|
+
const __vue_inject_styles__$o = function (inject) {
|
|
1756
1756
|
if (!inject) return
|
|
1757
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 });
|
|
1758
1758
|
|
|
1759
1759
|
};
|
|
1760
1760
|
/* scoped */
|
|
1761
|
-
const __vue_scope_id__$
|
|
1761
|
+
const __vue_scope_id__$o = "data-v-cc99bbf0";
|
|
1762
1762
|
/* module identifier */
|
|
1763
|
-
const __vue_module_identifier__$
|
|
1763
|
+
const __vue_module_identifier__$o = undefined;
|
|
1764
1764
|
/* functional template */
|
|
1765
|
-
const __vue_is_functional_template__$
|
|
1765
|
+
const __vue_is_functional_template__$o = false;
|
|
1766
1766
|
/* style inject SSR */
|
|
1767
1767
|
|
|
1768
1768
|
/* style inject shadow dom */
|
|
1769
1769
|
|
|
1770
1770
|
|
|
1771
1771
|
|
|
1772
|
-
const __vue_component__$
|
|
1773
|
-
{ render: __vue_render__$
|
|
1774
|
-
__vue_inject_styles__$
|
|
1775
|
-
__vue_script__$
|
|
1776
|
-
__vue_scope_id__$
|
|
1777
|
-
__vue_is_functional_template__$
|
|
1778
|
-
__vue_module_identifier__$
|
|
1772
|
+
const __vue_component__$o = /*#__PURE__*/normalizeComponent(
|
|
1773
|
+
{ render: __vue_render__$o, staticRenderFns: __vue_staticRenderFns__$o },
|
|
1774
|
+
__vue_inject_styles__$o,
|
|
1775
|
+
__vue_script__$o,
|
|
1776
|
+
__vue_scope_id__$o,
|
|
1777
|
+
__vue_is_functional_template__$o,
|
|
1778
|
+
__vue_module_identifier__$o,
|
|
1779
1779
|
false,
|
|
1780
1780
|
createInjector,
|
|
1781
1781
|
undefined,
|
|
1782
1782
|
undefined
|
|
1783
1783
|
);
|
|
1784
1784
|
|
|
1785
|
-
__vue_component__$
|
|
1785
|
+
__vue_component__$o.install = Vue => Vue.component(__vue_component__$o.name, __vue_component__$o);
|
|
1786
1786
|
|
|
1787
1787
|
//
|
|
1788
1788
|
//
|
|
@@ -1792,7 +1792,7 @@ __vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __v
|
|
|
1792
1792
|
//
|
|
1793
1793
|
//
|
|
1794
1794
|
|
|
1795
|
-
var script$
|
|
1795
|
+
var script$n = {
|
|
1796
1796
|
props: {
|
|
1797
1797
|
label: {
|
|
1798
1798
|
type: String
|
|
@@ -1801,10 +1801,10 @@ var script$l = {
|
|
|
1801
1801
|
};
|
|
1802
1802
|
|
|
1803
1803
|
/* script */
|
|
1804
|
-
const __vue_script__$
|
|
1804
|
+
const __vue_script__$n = script$n;
|
|
1805
1805
|
|
|
1806
1806
|
/* template */
|
|
1807
|
-
var __vue_render__$
|
|
1807
|
+
var __vue_render__$n = function () {
|
|
1808
1808
|
var _vm = this;
|
|
1809
1809
|
var _h = _vm.$createElement;
|
|
1810
1810
|
var _c = _vm._self._c || _h;
|
|
@@ -1814,34 +1814,34 @@ var __vue_render__$l = function () {
|
|
|
1814
1814
|
_c("span", { staticClass: "label__suffix" }, [_vm._v(":")]),
|
|
1815
1815
|
])
|
|
1816
1816
|
};
|
|
1817
|
-
var __vue_staticRenderFns__$
|
|
1818
|
-
__vue_render__$
|
|
1817
|
+
var __vue_staticRenderFns__$n = [];
|
|
1818
|
+
__vue_render__$n._withStripped = true;
|
|
1819
1819
|
|
|
1820
1820
|
/* style */
|
|
1821
|
-
const __vue_inject_styles__$
|
|
1821
|
+
const __vue_inject_styles__$n = function (inject) {
|
|
1822
1822
|
if (!inject) return
|
|
1823
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 });
|
|
1824
1824
|
|
|
1825
1825
|
};
|
|
1826
1826
|
/* scoped */
|
|
1827
|
-
const __vue_scope_id__$
|
|
1827
|
+
const __vue_scope_id__$n = "data-v-40e71716";
|
|
1828
1828
|
/* module identifier */
|
|
1829
|
-
const __vue_module_identifier__$
|
|
1829
|
+
const __vue_module_identifier__$n = undefined;
|
|
1830
1830
|
/* functional template */
|
|
1831
|
-
const __vue_is_functional_template__$
|
|
1831
|
+
const __vue_is_functional_template__$n = false;
|
|
1832
1832
|
/* style inject SSR */
|
|
1833
1833
|
|
|
1834
1834
|
/* style inject shadow dom */
|
|
1835
1835
|
|
|
1836
1836
|
|
|
1837
1837
|
|
|
1838
|
-
const __vue_component__$
|
|
1839
|
-
{ render: __vue_render__$
|
|
1840
|
-
__vue_inject_styles__$
|
|
1841
|
-
__vue_script__$
|
|
1842
|
-
__vue_scope_id__$
|
|
1843
|
-
__vue_is_functional_template__$
|
|
1844
|
-
__vue_module_identifier__$
|
|
1838
|
+
const __vue_component__$n = /*#__PURE__*/normalizeComponent(
|
|
1839
|
+
{ render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
|
|
1840
|
+
__vue_inject_styles__$n,
|
|
1841
|
+
__vue_script__$n,
|
|
1842
|
+
__vue_scope_id__$n,
|
|
1843
|
+
__vue_is_functional_template__$n,
|
|
1844
|
+
__vue_module_identifier__$n,
|
|
1845
1845
|
false,
|
|
1846
1846
|
createInjector,
|
|
1847
1847
|
undefined,
|
|
@@ -1849,14 +1849,14 @@ __vue_render__$l._withStripped = true;
|
|
|
1849
1849
|
);
|
|
1850
1850
|
|
|
1851
1851
|
//
|
|
1852
|
-
var script$
|
|
1852
|
+
var script$m = {
|
|
1853
1853
|
name: 'ele-search-area',
|
|
1854
1854
|
components: {
|
|
1855
|
-
EleInput: __vue_component__$
|
|
1856
|
-
EleSelect: __vue_component__$
|
|
1857
|
-
ELeButton: __vue_component__$
|
|
1858
|
-
Label: __vue_component__$
|
|
1859
|
-
EleDate: __vue_component__$
|
|
1855
|
+
EleInput: __vue_component__$s,
|
|
1856
|
+
EleSelect: __vue_component__$r,
|
|
1857
|
+
ELeButton: __vue_component__$u,
|
|
1858
|
+
Label: __vue_component__$n,
|
|
1859
|
+
EleDate: __vue_component__$t
|
|
1860
1860
|
},
|
|
1861
1861
|
props: {
|
|
1862
1862
|
gutter: {
|
|
@@ -1991,10 +1991,10 @@ var script$k = {
|
|
|
1991
1991
|
};
|
|
1992
1992
|
|
|
1993
1993
|
/* script */
|
|
1994
|
-
const __vue_script__$
|
|
1994
|
+
const __vue_script__$m = script$m;
|
|
1995
1995
|
|
|
1996
1996
|
/* template */
|
|
1997
|
-
var __vue_render__$
|
|
1997
|
+
var __vue_render__$m = function () {
|
|
1998
1998
|
var _vm = this;
|
|
1999
1999
|
var _h = _vm.$createElement;
|
|
2000
2000
|
var _c = _vm._self._c || _h;
|
|
@@ -2166,34 +2166,34 @@ var __vue_render__$k = function () {
|
|
|
2166
2166
|
1
|
|
2167
2167
|
)
|
|
2168
2168
|
};
|
|
2169
|
-
var __vue_staticRenderFns__$
|
|
2170
|
-
__vue_render__$
|
|
2169
|
+
var __vue_staticRenderFns__$m = [];
|
|
2170
|
+
__vue_render__$m._withStripped = true;
|
|
2171
2171
|
|
|
2172
2172
|
/* style */
|
|
2173
|
-
const __vue_inject_styles__$
|
|
2173
|
+
const __vue_inject_styles__$m = function (inject) {
|
|
2174
2174
|
if (!inject) return
|
|
2175
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 });
|
|
2176
2176
|
|
|
2177
2177
|
};
|
|
2178
2178
|
/* scoped */
|
|
2179
|
-
const __vue_scope_id__$
|
|
2179
|
+
const __vue_scope_id__$m = "data-v-4cecf96f";
|
|
2180
2180
|
/* module identifier */
|
|
2181
|
-
const __vue_module_identifier__$
|
|
2181
|
+
const __vue_module_identifier__$m = undefined;
|
|
2182
2182
|
/* functional template */
|
|
2183
|
-
const __vue_is_functional_template__$
|
|
2183
|
+
const __vue_is_functional_template__$m = false;
|
|
2184
2184
|
/* style inject SSR */
|
|
2185
2185
|
|
|
2186
2186
|
/* style inject shadow dom */
|
|
2187
2187
|
|
|
2188
2188
|
|
|
2189
2189
|
|
|
2190
|
-
const __vue_component__$
|
|
2191
|
-
{ render: __vue_render__$
|
|
2192
|
-
__vue_inject_styles__$
|
|
2193
|
-
__vue_script__$
|
|
2194
|
-
__vue_scope_id__$
|
|
2195
|
-
__vue_is_functional_template__$
|
|
2196
|
-
__vue_module_identifier__$
|
|
2190
|
+
const __vue_component__$m = /*#__PURE__*/normalizeComponent(
|
|
2191
|
+
{ render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
|
|
2192
|
+
__vue_inject_styles__$m,
|
|
2193
|
+
__vue_script__$m,
|
|
2194
|
+
__vue_scope_id__$m,
|
|
2195
|
+
__vue_is_functional_template__$m,
|
|
2196
|
+
__vue_module_identifier__$m,
|
|
2197
2197
|
false,
|
|
2198
2198
|
createInjector,
|
|
2199
2199
|
undefined,
|
|
@@ -2201,81 +2201,92 @@ __vue_render__$k._withStripped = true;
|
|
|
2201
2201
|
);
|
|
2202
2202
|
|
|
2203
2203
|
//
|
|
2204
|
-
var script$
|
|
2204
|
+
var script$l = {
|
|
2205
2205
|
name: 'ele-button-group',
|
|
2206
2206
|
components: {
|
|
2207
|
-
EleButton: __vue_component__$
|
|
2207
|
+
EleButton: __vue_component__$u
|
|
2208
2208
|
},
|
|
2209
2209
|
props: {
|
|
2210
2210
|
dataSource: {
|
|
2211
2211
|
type: Array,
|
|
2212
2212
|
default: () => []
|
|
2213
2213
|
}
|
|
2214
|
+
},
|
|
2215
|
+
methods: {
|
|
2216
|
+
isBool(arg) {
|
|
2217
|
+
return type.isBool(arg);
|
|
2218
|
+
}
|
|
2214
2219
|
}
|
|
2215
2220
|
};
|
|
2216
2221
|
|
|
2217
2222
|
/* script */
|
|
2218
|
-
const __vue_script__$
|
|
2223
|
+
const __vue_script__$l = script$l;
|
|
2219
2224
|
|
|
2220
2225
|
/* template */
|
|
2221
|
-
var __vue_render__$
|
|
2226
|
+
var __vue_render__$l = function () {
|
|
2222
2227
|
var _vm = this;
|
|
2223
2228
|
var _h = _vm.$createElement;
|
|
2224
2229
|
var _c = _vm._self._c || _h;
|
|
2225
2230
|
return _c(
|
|
2226
2231
|
"div",
|
|
2227
2232
|
{ staticClass: "button-group__wrapper" },
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2233
|
+
[
|
|
2234
|
+
_vm._l(_vm.dataSource, function (item, idx) {
|
|
2235
|
+
return [
|
|
2236
|
+
(_vm.isBool(item._show) ? item._show : true)
|
|
2237
|
+
? _c(
|
|
2238
|
+
"ele-button",
|
|
2239
|
+
_vm._g(
|
|
2240
|
+
{
|
|
2241
|
+
key: idx,
|
|
2242
|
+
attrs: {
|
|
2243
|
+
type: item.type,
|
|
2244
|
+
icon: item.icon,
|
|
2245
|
+
mode: item.mode,
|
|
2246
|
+
"data-source": item.optionList,
|
|
2247
|
+
"event-name": item.eventName,
|
|
2248
|
+
record: item,
|
|
2249
|
+
},
|
|
2250
|
+
},
|
|
2251
|
+
_vm.$listeners
|
|
2252
|
+
),
|
|
2253
|
+
[_vm._v("\n " + _vm._s(item.label) + "\n ")]
|
|
2254
|
+
)
|
|
2255
|
+
: _vm._e(),
|
|
2256
|
+
]
|
|
2257
|
+
}),
|
|
2258
|
+
],
|
|
2259
|
+
2
|
|
2249
2260
|
)
|
|
2250
2261
|
};
|
|
2251
|
-
var __vue_staticRenderFns__$
|
|
2252
|
-
__vue_render__$
|
|
2262
|
+
var __vue_staticRenderFns__$l = [];
|
|
2263
|
+
__vue_render__$l._withStripped = true;
|
|
2253
2264
|
|
|
2254
2265
|
/* style */
|
|
2255
|
-
const __vue_inject_styles__$
|
|
2266
|
+
const __vue_inject_styles__$l = function (inject) {
|
|
2256
2267
|
if (!inject) return
|
|
2257
|
-
inject("data-v-
|
|
2268
|
+
inject("data-v-5766fa00_0", { source: ".button-group__wrapper[data-v-5766fa00] {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn[data-v-5766fa00] {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn[data-v-5766fa00]: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":"AA0CA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;ACzCA;AD0CA;EACA,gBAAA;ACxCA;ADyCA;EACA,cAAA;ACvCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"button-group__wrapper\">\r\n <template v-for=\"(item, idx) in dataSource\" >\r\n <ele-button\r\n v-if=\"isBool(item._show) ? item._show : true\"\r\n :type=\"item.type\"\r\n :icon=\"item.icon\"\r\n :mode=\"item.mode\"\r\n :data-source=\"item.optionList\"\r\n :event-name=\"item.eventName\"\r\n :record=\"item\"\r\n v-on=\"$listeners\"\r\n :key=\"idx\">\r\n {{ item.label }}\r\n </ele-button>\r\n </template>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport EleButton from '../../../button/src/index.vue'\r\nimport { type } from '@idooel/shared'\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 methods: {\r\n isBool (arg) {\r\n return type.isBool(arg)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.button-group__wrapper {\r\n display: flex;\r\n padding-left: 16px;\r\n padding-right: 16px;\r\n .ant-btn {\r\n margin-left: 8px;\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n }\r\n}\r\n</style>",".button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2258
2269
|
|
|
2259
2270
|
};
|
|
2260
2271
|
/* scoped */
|
|
2261
|
-
const __vue_scope_id__$
|
|
2272
|
+
const __vue_scope_id__$l = "data-v-5766fa00";
|
|
2262
2273
|
/* module identifier */
|
|
2263
|
-
const __vue_module_identifier__$
|
|
2274
|
+
const __vue_module_identifier__$l = undefined;
|
|
2264
2275
|
/* functional template */
|
|
2265
|
-
const __vue_is_functional_template__$
|
|
2276
|
+
const __vue_is_functional_template__$l = false;
|
|
2266
2277
|
/* style inject SSR */
|
|
2267
2278
|
|
|
2268
2279
|
/* style inject shadow dom */
|
|
2269
2280
|
|
|
2270
2281
|
|
|
2271
2282
|
|
|
2272
|
-
const __vue_component__$
|
|
2273
|
-
{ render: __vue_render__$
|
|
2274
|
-
__vue_inject_styles__$
|
|
2275
|
-
__vue_script__$
|
|
2276
|
-
__vue_scope_id__$
|
|
2277
|
-
__vue_is_functional_template__$
|
|
2278
|
-
__vue_module_identifier__$
|
|
2283
|
+
const __vue_component__$l = /*#__PURE__*/normalizeComponent(
|
|
2284
|
+
{ render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
|
|
2285
|
+
__vue_inject_styles__$l,
|
|
2286
|
+
__vue_script__$l,
|
|
2287
|
+
__vue_scope_id__$l,
|
|
2288
|
+
__vue_is_functional_template__$l,
|
|
2289
|
+
__vue_module_identifier__$l,
|
|
2279
2290
|
false,
|
|
2280
2291
|
createInjector,
|
|
2281
2292
|
undefined,
|
|
@@ -2283,13 +2294,13 @@ __vue_render__$j._withStripped = true;
|
|
|
2283
2294
|
);
|
|
2284
2295
|
|
|
2285
2296
|
//
|
|
2286
|
-
var script$
|
|
2297
|
+
var script$k = {
|
|
2287
2298
|
name: 'ele-tree-table-model',
|
|
2288
2299
|
components: {
|
|
2289
|
-
EleTree: __vue_component__$
|
|
2290
|
-
EleTable: __vue_component__$
|
|
2291
|
-
EleSearchArea: __vue_component__$
|
|
2292
|
-
EleButtonGroup: __vue_component__$
|
|
2300
|
+
EleTree: __vue_component__$o,
|
|
2301
|
+
EleTable: __vue_component__$p,
|
|
2302
|
+
EleSearchArea: __vue_component__$m,
|
|
2303
|
+
EleButtonGroup: __vue_component__$l
|
|
2293
2304
|
},
|
|
2294
2305
|
props: {
|
|
2295
2306
|
treeMeta: {
|
|
@@ -2568,10 +2579,10 @@ var script$i = {
|
|
|
2568
2579
|
};
|
|
2569
2580
|
|
|
2570
2581
|
/* script */
|
|
2571
|
-
const __vue_script__$
|
|
2582
|
+
const __vue_script__$k = script$k;
|
|
2572
2583
|
|
|
2573
2584
|
/* template */
|
|
2574
|
-
var __vue_render__$
|
|
2585
|
+
var __vue_render__$k = function () {
|
|
2575
2586
|
var _vm = this;
|
|
2576
2587
|
var _h = _vm.$createElement;
|
|
2577
2588
|
var _c = _vm._self._c || _h;
|
|
@@ -2651,34 +2662,34 @@ var __vue_render__$i = function () {
|
|
|
2651
2662
|
]),
|
|
2652
2663
|
])
|
|
2653
2664
|
};
|
|
2654
|
-
var __vue_staticRenderFns__$
|
|
2655
|
-
__vue_render__$
|
|
2665
|
+
var __vue_staticRenderFns__$k = [];
|
|
2666
|
+
__vue_render__$k._withStripped = true;
|
|
2656
2667
|
|
|
2657
2668
|
/* style */
|
|
2658
|
-
const __vue_inject_styles__$
|
|
2669
|
+
const __vue_inject_styles__$k = function (inject) {
|
|
2659
2670
|
if (!inject) return
|
|
2660
2671
|
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 });
|
|
2661
2672
|
|
|
2662
2673
|
};
|
|
2663
2674
|
/* scoped */
|
|
2664
|
-
const __vue_scope_id__$
|
|
2675
|
+
const __vue_scope_id__$k = "data-v-fe2ee33e";
|
|
2665
2676
|
/* module identifier */
|
|
2666
|
-
const __vue_module_identifier__$
|
|
2677
|
+
const __vue_module_identifier__$k = undefined;
|
|
2667
2678
|
/* functional template */
|
|
2668
|
-
const __vue_is_functional_template__$
|
|
2679
|
+
const __vue_is_functional_template__$k = false;
|
|
2669
2680
|
/* style inject SSR */
|
|
2670
2681
|
|
|
2671
2682
|
/* style inject shadow dom */
|
|
2672
2683
|
|
|
2673
2684
|
|
|
2674
2685
|
|
|
2675
|
-
const __vue_component__$
|
|
2676
|
-
{ render: __vue_render__$
|
|
2677
|
-
__vue_inject_styles__$
|
|
2678
|
-
__vue_script__$
|
|
2679
|
-
__vue_scope_id__$
|
|
2680
|
-
__vue_is_functional_template__$
|
|
2681
|
-
__vue_module_identifier__$
|
|
2686
|
+
const __vue_component__$k = /*#__PURE__*/normalizeComponent(
|
|
2687
|
+
{ render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
|
|
2688
|
+
__vue_inject_styles__$k,
|
|
2689
|
+
__vue_script__$k,
|
|
2690
|
+
__vue_scope_id__$k,
|
|
2691
|
+
__vue_is_functional_template__$k,
|
|
2692
|
+
__vue_module_identifier__$k,
|
|
2682
2693
|
false,
|
|
2683
2694
|
createInjector,
|
|
2684
2695
|
undefined,
|
|
@@ -2698,7 +2709,7 @@ __vue_render__$i._withStripped = true;
|
|
|
2698
2709
|
//
|
|
2699
2710
|
//
|
|
2700
2711
|
|
|
2701
|
-
var script$
|
|
2712
|
+
var script$j = {
|
|
2702
2713
|
name: 'ele-textarea',
|
|
2703
2714
|
model: {
|
|
2704
2715
|
prop: 'value',
|
|
@@ -2740,10 +2751,10 @@ var script$h = {
|
|
|
2740
2751
|
};
|
|
2741
2752
|
|
|
2742
2753
|
/* script */
|
|
2743
|
-
const __vue_script__$
|
|
2754
|
+
const __vue_script__$j = script$j;
|
|
2744
2755
|
|
|
2745
2756
|
/* template */
|
|
2746
|
-
var __vue_render__$
|
|
2757
|
+
var __vue_render__$j = function () {
|
|
2747
2758
|
var _vm = this;
|
|
2748
2759
|
var _h = _vm.$createElement;
|
|
2749
2760
|
var _c = _vm._self._c || _h;
|
|
@@ -2759,34 +2770,34 @@ var __vue_render__$h = function () {
|
|
|
2759
2770
|
on: { change: _vm.onChange },
|
|
2760
2771
|
})
|
|
2761
2772
|
};
|
|
2762
|
-
var __vue_staticRenderFns__$
|
|
2763
|
-
__vue_render__$
|
|
2773
|
+
var __vue_staticRenderFns__$j = [];
|
|
2774
|
+
__vue_render__$j._withStripped = true;
|
|
2764
2775
|
|
|
2765
2776
|
/* style */
|
|
2766
|
-
const __vue_inject_styles__$
|
|
2777
|
+
const __vue_inject_styles__$j = function (inject) {
|
|
2767
2778
|
if (!inject) return
|
|
2768
2779
|
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 });
|
|
2769
2780
|
|
|
2770
2781
|
};
|
|
2771
2782
|
/* scoped */
|
|
2772
|
-
const __vue_scope_id__$
|
|
2783
|
+
const __vue_scope_id__$j = "data-v-416114ba";
|
|
2773
2784
|
/* module identifier */
|
|
2774
|
-
const __vue_module_identifier__$
|
|
2785
|
+
const __vue_module_identifier__$j = undefined;
|
|
2775
2786
|
/* functional template */
|
|
2776
|
-
const __vue_is_functional_template__$
|
|
2787
|
+
const __vue_is_functional_template__$j = false;
|
|
2777
2788
|
/* style inject SSR */
|
|
2778
2789
|
|
|
2779
2790
|
/* style inject shadow dom */
|
|
2780
2791
|
|
|
2781
2792
|
|
|
2782
2793
|
|
|
2783
|
-
const __vue_component__$
|
|
2784
|
-
{ render: __vue_render__$
|
|
2785
|
-
__vue_inject_styles__$
|
|
2786
|
-
__vue_script__$
|
|
2787
|
-
__vue_scope_id__$
|
|
2788
|
-
__vue_is_functional_template__$
|
|
2789
|
-
__vue_module_identifier__$
|
|
2794
|
+
const __vue_component__$j = /*#__PURE__*/normalizeComponent(
|
|
2795
|
+
{ render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
|
|
2796
|
+
__vue_inject_styles__$j,
|
|
2797
|
+
__vue_script__$j,
|
|
2798
|
+
__vue_scope_id__$j,
|
|
2799
|
+
__vue_is_functional_template__$j,
|
|
2800
|
+
__vue_module_identifier__$j,
|
|
2790
2801
|
false,
|
|
2791
2802
|
createInjector,
|
|
2792
2803
|
undefined,
|
|
@@ -2803,7 +2814,7 @@ __vue_render__$h._withStripped = true;
|
|
|
2803
2814
|
//
|
|
2804
2815
|
//
|
|
2805
2816
|
|
|
2806
|
-
var script$
|
|
2817
|
+
var script$i = {
|
|
2807
2818
|
name: 'ele-icon',
|
|
2808
2819
|
props: {
|
|
2809
2820
|
type: {
|
|
@@ -2826,10 +2837,10 @@ var script$g = {
|
|
|
2826
2837
|
};
|
|
2827
2838
|
|
|
2828
2839
|
/* script */
|
|
2829
|
-
const __vue_script__$
|
|
2840
|
+
const __vue_script__$i = script$i;
|
|
2830
2841
|
|
|
2831
2842
|
/* template */
|
|
2832
|
-
var __vue_render__$
|
|
2843
|
+
var __vue_render__$i = function () {
|
|
2833
2844
|
var _vm = this;
|
|
2834
2845
|
var _h = _vm.$createElement;
|
|
2835
2846
|
var _c = _vm._self._c || _h;
|
|
@@ -2837,17 +2848,17 @@ var __vue_render__$g = function () {
|
|
|
2837
2848
|
? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
|
|
2838
2849
|
: _c("i", { class: ["iconfont", _vm.type] })
|
|
2839
2850
|
};
|
|
2840
|
-
var __vue_staticRenderFns__$
|
|
2841
|
-
__vue_render__$
|
|
2851
|
+
var __vue_staticRenderFns__$i = [];
|
|
2852
|
+
__vue_render__$i._withStripped = true;
|
|
2842
2853
|
|
|
2843
2854
|
/* style */
|
|
2844
|
-
const __vue_inject_styles__$
|
|
2855
|
+
const __vue_inject_styles__$i = undefined;
|
|
2845
2856
|
/* scoped */
|
|
2846
|
-
const __vue_scope_id__$
|
|
2857
|
+
const __vue_scope_id__$i = undefined;
|
|
2847
2858
|
/* module identifier */
|
|
2848
|
-
const __vue_module_identifier__$
|
|
2859
|
+
const __vue_module_identifier__$i = undefined;
|
|
2849
2860
|
/* functional template */
|
|
2850
|
-
const __vue_is_functional_template__$
|
|
2861
|
+
const __vue_is_functional_template__$i = false;
|
|
2851
2862
|
/* style inject */
|
|
2852
2863
|
|
|
2853
2864
|
/* style inject SSR */
|
|
@@ -2856,13 +2867,13 @@ __vue_render__$g._withStripped = true;
|
|
|
2856
2867
|
|
|
2857
2868
|
|
|
2858
2869
|
|
|
2859
|
-
const __vue_component__$
|
|
2860
|
-
{ render: __vue_render__$
|
|
2861
|
-
__vue_inject_styles__$
|
|
2862
|
-
__vue_script__$
|
|
2863
|
-
__vue_scope_id__$
|
|
2864
|
-
__vue_is_functional_template__$
|
|
2865
|
-
__vue_module_identifier__$
|
|
2870
|
+
const __vue_component__$i = /*#__PURE__*/normalizeComponent(
|
|
2871
|
+
{ render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
|
|
2872
|
+
__vue_inject_styles__$i,
|
|
2873
|
+
__vue_script__$i,
|
|
2874
|
+
__vue_scope_id__$i,
|
|
2875
|
+
__vue_is_functional_template__$i,
|
|
2876
|
+
__vue_module_identifier__$i,
|
|
2866
2877
|
false,
|
|
2867
2878
|
undefined,
|
|
2868
2879
|
undefined,
|
|
@@ -2870,11 +2881,11 @@ __vue_render__$g._withStripped = true;
|
|
|
2870
2881
|
);
|
|
2871
2882
|
|
|
2872
2883
|
//
|
|
2873
|
-
var script$
|
|
2884
|
+
var script$h = {
|
|
2874
2885
|
name: 'ele-upload',
|
|
2875
2886
|
components: {
|
|
2876
2887
|
FileUpload,
|
|
2877
|
-
EleIcon: __vue_component__$
|
|
2888
|
+
EleIcon: __vue_component__$i
|
|
2878
2889
|
},
|
|
2879
2890
|
model: {
|
|
2880
2891
|
prop: 'value',
|
|
@@ -3104,10 +3115,10 @@ var script$f = {
|
|
|
3104
3115
|
};
|
|
3105
3116
|
|
|
3106
3117
|
/* script */
|
|
3107
|
-
const __vue_script__$
|
|
3118
|
+
const __vue_script__$h = script$h;
|
|
3108
3119
|
|
|
3109
3120
|
/* template */
|
|
3110
|
-
var __vue_render__$
|
|
3121
|
+
var __vue_render__$h = function () {
|
|
3111
3122
|
var _vm = this;
|
|
3112
3123
|
var _h = _vm.$createElement;
|
|
3113
3124
|
var _c = _vm._self._c || _h;
|
|
@@ -3245,34 +3256,34 @@ var __vue_render__$f = function () {
|
|
|
3245
3256
|
1
|
|
3246
3257
|
)
|
|
3247
3258
|
};
|
|
3248
|
-
var __vue_staticRenderFns__$
|
|
3249
|
-
__vue_render__$
|
|
3259
|
+
var __vue_staticRenderFns__$h = [];
|
|
3260
|
+
__vue_render__$h._withStripped = true;
|
|
3250
3261
|
|
|
3251
3262
|
/* style */
|
|
3252
|
-
const __vue_inject_styles__$
|
|
3263
|
+
const __vue_inject_styles__$h = function (inject) {
|
|
3253
3264
|
if (!inject) return
|
|
3254
3265
|
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 });
|
|
3255
3266
|
|
|
3256
3267
|
};
|
|
3257
3268
|
/* scoped */
|
|
3258
|
-
const __vue_scope_id__$
|
|
3269
|
+
const __vue_scope_id__$h = "data-v-7a628fc7";
|
|
3259
3270
|
/* module identifier */
|
|
3260
|
-
const __vue_module_identifier__$
|
|
3271
|
+
const __vue_module_identifier__$h = undefined;
|
|
3261
3272
|
/* functional template */
|
|
3262
|
-
const __vue_is_functional_template__$
|
|
3273
|
+
const __vue_is_functional_template__$h = false;
|
|
3263
3274
|
/* style inject SSR */
|
|
3264
3275
|
|
|
3265
3276
|
/* style inject shadow dom */
|
|
3266
3277
|
|
|
3267
3278
|
|
|
3268
3279
|
|
|
3269
|
-
const __vue_component__$
|
|
3270
|
-
{ render: __vue_render__$
|
|
3271
|
-
__vue_inject_styles__$
|
|
3272
|
-
__vue_script__$
|
|
3273
|
-
__vue_scope_id__$
|
|
3274
|
-
__vue_is_functional_template__$
|
|
3275
|
-
__vue_module_identifier__$
|
|
3280
|
+
const __vue_component__$h = /*#__PURE__*/normalizeComponent(
|
|
3281
|
+
{ render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
|
|
3282
|
+
__vue_inject_styles__$h,
|
|
3283
|
+
__vue_script__$h,
|
|
3284
|
+
__vue_scope_id__$h,
|
|
3285
|
+
__vue_is_functional_template__$h,
|
|
3286
|
+
__vue_module_identifier__$h,
|
|
3276
3287
|
false,
|
|
3277
3288
|
createInjector,
|
|
3278
3289
|
undefined,
|
|
@@ -3298,7 +3309,7 @@ __vue_render__$f._withStripped = true;
|
|
|
3298
3309
|
//
|
|
3299
3310
|
//
|
|
3300
3311
|
|
|
3301
|
-
var script$
|
|
3312
|
+
var script$g = {
|
|
3302
3313
|
name: 'ele-select-entity',
|
|
3303
3314
|
props: {
|
|
3304
3315
|
value: {
|
|
@@ -3355,10 +3366,10 @@ var script$e = {
|
|
|
3355
3366
|
};
|
|
3356
3367
|
|
|
3357
3368
|
/* script */
|
|
3358
|
-
const __vue_script__$
|
|
3369
|
+
const __vue_script__$g = script$g;
|
|
3359
3370
|
|
|
3360
3371
|
/* template */
|
|
3361
|
-
var __vue_render__$
|
|
3372
|
+
var __vue_render__$g = function () {
|
|
3362
3373
|
var _vm = this;
|
|
3363
3374
|
var _h = _vm.$createElement;
|
|
3364
3375
|
var _c = _vm._self._c || _h;
|
|
@@ -3408,34 +3419,34 @@ var __vue_render__$e = function () {
|
|
|
3408
3419
|
2
|
|
3409
3420
|
)
|
|
3410
3421
|
};
|
|
3411
|
-
var __vue_staticRenderFns__$
|
|
3412
|
-
__vue_render__$
|
|
3422
|
+
var __vue_staticRenderFns__$g = [];
|
|
3423
|
+
__vue_render__$g._withStripped = true;
|
|
3413
3424
|
|
|
3414
3425
|
/* style */
|
|
3415
|
-
const __vue_inject_styles__$
|
|
3426
|
+
const __vue_inject_styles__$g = function (inject) {
|
|
3416
3427
|
if (!inject) return
|
|
3417
3428
|
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 });
|
|
3418
3429
|
|
|
3419
3430
|
};
|
|
3420
3431
|
/* scoped */
|
|
3421
|
-
const __vue_scope_id__$
|
|
3432
|
+
const __vue_scope_id__$g = "data-v-328544bb";
|
|
3422
3433
|
/* module identifier */
|
|
3423
|
-
const __vue_module_identifier__$
|
|
3434
|
+
const __vue_module_identifier__$g = undefined;
|
|
3424
3435
|
/* functional template */
|
|
3425
|
-
const __vue_is_functional_template__$
|
|
3436
|
+
const __vue_is_functional_template__$g = false;
|
|
3426
3437
|
/* style inject SSR */
|
|
3427
3438
|
|
|
3428
3439
|
/* style inject shadow dom */
|
|
3429
3440
|
|
|
3430
3441
|
|
|
3431
3442
|
|
|
3432
|
-
const __vue_component__$
|
|
3433
|
-
{ render: __vue_render__$
|
|
3434
|
-
__vue_inject_styles__$
|
|
3435
|
-
__vue_script__$
|
|
3436
|
-
__vue_scope_id__$
|
|
3437
|
-
__vue_is_functional_template__$
|
|
3438
|
-
__vue_module_identifier__$
|
|
3443
|
+
const __vue_component__$g = /*#__PURE__*/normalizeComponent(
|
|
3444
|
+
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
|
|
3445
|
+
__vue_inject_styles__$g,
|
|
3446
|
+
__vue_script__$g,
|
|
3447
|
+
__vue_scope_id__$g,
|
|
3448
|
+
__vue_is_functional_template__$g,
|
|
3449
|
+
__vue_module_identifier__$g,
|
|
3439
3450
|
false,
|
|
3440
3451
|
createInjector,
|
|
3441
3452
|
undefined,
|
|
@@ -3449,7 +3460,7 @@ __vue_render__$e._withStripped = true;
|
|
|
3449
3460
|
//
|
|
3450
3461
|
//
|
|
3451
3462
|
|
|
3452
|
-
var script$
|
|
3463
|
+
var script$f = {
|
|
3453
3464
|
name: 'ele-input-number',
|
|
3454
3465
|
props: {
|
|
3455
3466
|
precision: {
|
|
@@ -3467,10 +3478,10 @@ var script$d = {
|
|
|
3467
3478
|
};
|
|
3468
3479
|
|
|
3469
3480
|
/* script */
|
|
3470
|
-
const __vue_script__$
|
|
3481
|
+
const __vue_script__$f = script$f;
|
|
3471
3482
|
|
|
3472
3483
|
/* template */
|
|
3473
|
-
var __vue_render__$
|
|
3484
|
+
var __vue_render__$f = function () {
|
|
3474
3485
|
var _vm = this;
|
|
3475
3486
|
var _h = _vm.$createElement;
|
|
3476
3487
|
var _c = _vm._self._c || _h;
|
|
@@ -3494,17 +3505,17 @@ var __vue_render__$d = function () {
|
|
|
3494
3505
|
1
|
|
3495
3506
|
)
|
|
3496
3507
|
};
|
|
3497
|
-
var __vue_staticRenderFns__$
|
|
3498
|
-
__vue_render__$
|
|
3508
|
+
var __vue_staticRenderFns__$f = [];
|
|
3509
|
+
__vue_render__$f._withStripped = true;
|
|
3499
3510
|
|
|
3500
3511
|
/* style */
|
|
3501
|
-
const __vue_inject_styles__$
|
|
3512
|
+
const __vue_inject_styles__$f = undefined;
|
|
3502
3513
|
/* scoped */
|
|
3503
|
-
const __vue_scope_id__$
|
|
3514
|
+
const __vue_scope_id__$f = undefined;
|
|
3504
3515
|
/* module identifier */
|
|
3505
|
-
const __vue_module_identifier__$
|
|
3516
|
+
const __vue_module_identifier__$f = undefined;
|
|
3506
3517
|
/* functional template */
|
|
3507
|
-
const __vue_is_functional_template__$
|
|
3518
|
+
const __vue_is_functional_template__$f = false;
|
|
3508
3519
|
/* style inject */
|
|
3509
3520
|
|
|
3510
3521
|
/* style inject SSR */
|
|
@@ -3513,13 +3524,13 @@ __vue_render__$d._withStripped = true;
|
|
|
3513
3524
|
|
|
3514
3525
|
|
|
3515
3526
|
|
|
3516
|
-
const __vue_component__$
|
|
3517
|
-
{ render: __vue_render__$
|
|
3518
|
-
__vue_inject_styles__$
|
|
3519
|
-
__vue_script__$
|
|
3520
|
-
__vue_scope_id__$
|
|
3521
|
-
__vue_is_functional_template__$
|
|
3522
|
-
__vue_module_identifier__$
|
|
3527
|
+
const __vue_component__$f = /*#__PURE__*/normalizeComponent(
|
|
3528
|
+
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
|
|
3529
|
+
__vue_inject_styles__$f,
|
|
3530
|
+
__vue_script__$f,
|
|
3531
|
+
__vue_scope_id__$f,
|
|
3532
|
+
__vue_is_functional_template__$f,
|
|
3533
|
+
__vue_module_identifier__$f,
|
|
3523
3534
|
false,
|
|
3524
3535
|
undefined,
|
|
3525
3536
|
undefined,
|
|
@@ -3531,7 +3542,7 @@ __vue_render__$d._withStripped = true;
|
|
|
3531
3542
|
//
|
|
3532
3543
|
//
|
|
3533
3544
|
|
|
3534
|
-
var script$
|
|
3545
|
+
var script$e = {
|
|
3535
3546
|
name: 'ele-checkbox',
|
|
3536
3547
|
props: {
|
|
3537
3548
|
value: {
|
|
@@ -3555,10 +3566,10 @@ var script$c = {
|
|
|
3555
3566
|
};
|
|
3556
3567
|
|
|
3557
3568
|
/* script */
|
|
3558
|
-
const __vue_script__$
|
|
3569
|
+
const __vue_script__$e = script$e;
|
|
3559
3570
|
|
|
3560
3571
|
/* template */
|
|
3561
|
-
var __vue_render__$
|
|
3572
|
+
var __vue_render__$e = function () {
|
|
3562
3573
|
var _vm = this;
|
|
3563
3574
|
var _h = _vm.$createElement;
|
|
3564
3575
|
var _c = _vm._self._c || _h;
|
|
@@ -3571,34 +3582,34 @@ var __vue_render__$c = function () {
|
|
|
3571
3582
|
on: { change: _vm.onChange },
|
|
3572
3583
|
})
|
|
3573
3584
|
};
|
|
3574
|
-
var __vue_staticRenderFns__$
|
|
3575
|
-
__vue_render__$
|
|
3585
|
+
var __vue_staticRenderFns__$e = [];
|
|
3586
|
+
__vue_render__$e._withStripped = true;
|
|
3576
3587
|
|
|
3577
3588
|
/* style */
|
|
3578
|
-
const __vue_inject_styles__$
|
|
3589
|
+
const __vue_inject_styles__$e = function (inject) {
|
|
3579
3590
|
if (!inject) return
|
|
3580
3591
|
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 });
|
|
3581
3592
|
|
|
3582
3593
|
};
|
|
3583
3594
|
/* scoped */
|
|
3584
|
-
const __vue_scope_id__$
|
|
3595
|
+
const __vue_scope_id__$e = "data-v-63b1b120";
|
|
3585
3596
|
/* module identifier */
|
|
3586
|
-
const __vue_module_identifier__$
|
|
3597
|
+
const __vue_module_identifier__$e = undefined;
|
|
3587
3598
|
/* functional template */
|
|
3588
|
-
const __vue_is_functional_template__$
|
|
3599
|
+
const __vue_is_functional_template__$e = false;
|
|
3589
3600
|
/* style inject SSR */
|
|
3590
3601
|
|
|
3591
3602
|
/* style inject shadow dom */
|
|
3592
3603
|
|
|
3593
3604
|
|
|
3594
3605
|
|
|
3595
|
-
const __vue_component__$
|
|
3596
|
-
{ render: __vue_render__$
|
|
3597
|
-
__vue_inject_styles__$
|
|
3598
|
-
__vue_script__$
|
|
3599
|
-
__vue_scope_id__$
|
|
3600
|
-
__vue_is_functional_template__$
|
|
3601
|
-
__vue_module_identifier__$
|
|
3606
|
+
const __vue_component__$e = /*#__PURE__*/normalizeComponent(
|
|
3607
|
+
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
|
|
3608
|
+
__vue_inject_styles__$e,
|
|
3609
|
+
__vue_script__$e,
|
|
3610
|
+
__vue_scope_id__$e,
|
|
3611
|
+
__vue_is_functional_template__$e,
|
|
3612
|
+
__vue_module_identifier__$e,
|
|
3602
3613
|
false,
|
|
3603
3614
|
createInjector,
|
|
3604
3615
|
undefined,
|
|
@@ -3614,7 +3625,7 @@ __vue_render__$c._withStripped = true;
|
|
|
3614
3625
|
//
|
|
3615
3626
|
//
|
|
3616
3627
|
|
|
3617
|
-
var script$
|
|
3628
|
+
var script$d = {
|
|
3618
3629
|
name: 'ele-radio',
|
|
3619
3630
|
model: {
|
|
3620
3631
|
prop: 'value',
|
|
@@ -3642,10 +3653,10 @@ var script$b = {
|
|
|
3642
3653
|
};
|
|
3643
3654
|
|
|
3644
3655
|
/* script */
|
|
3645
|
-
const __vue_script__$
|
|
3656
|
+
const __vue_script__$d = script$d;
|
|
3646
3657
|
|
|
3647
3658
|
/* template */
|
|
3648
|
-
var __vue_render__$
|
|
3659
|
+
var __vue_render__$d = function () {
|
|
3649
3660
|
var _vm = this;
|
|
3650
3661
|
var _h = _vm.$createElement;
|
|
3651
3662
|
var _c = _vm._self._c || _h;
|
|
@@ -3663,34 +3674,34 @@ var __vue_render__$b = function () {
|
|
|
3663
3674
|
1
|
|
3664
3675
|
)
|
|
3665
3676
|
};
|
|
3666
|
-
var __vue_staticRenderFns__$
|
|
3667
|
-
__vue_render__$
|
|
3677
|
+
var __vue_staticRenderFns__$d = [];
|
|
3678
|
+
__vue_render__$d._withStripped = true;
|
|
3668
3679
|
|
|
3669
3680
|
/* style */
|
|
3670
|
-
const __vue_inject_styles__$
|
|
3681
|
+
const __vue_inject_styles__$d = function (inject) {
|
|
3671
3682
|
if (!inject) return
|
|
3672
3683
|
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 });
|
|
3673
3684
|
|
|
3674
3685
|
};
|
|
3675
3686
|
/* scoped */
|
|
3676
|
-
const __vue_scope_id__$
|
|
3687
|
+
const __vue_scope_id__$d = "data-v-14b69fc8";
|
|
3677
3688
|
/* module identifier */
|
|
3678
|
-
const __vue_module_identifier__$
|
|
3689
|
+
const __vue_module_identifier__$d = undefined;
|
|
3679
3690
|
/* functional template */
|
|
3680
|
-
const __vue_is_functional_template__$
|
|
3691
|
+
const __vue_is_functional_template__$d = false;
|
|
3681
3692
|
/* style inject SSR */
|
|
3682
3693
|
|
|
3683
3694
|
/* style inject shadow dom */
|
|
3684
3695
|
|
|
3685
3696
|
|
|
3686
3697
|
|
|
3687
|
-
const __vue_component__$
|
|
3688
|
-
{ render: __vue_render__$
|
|
3689
|
-
__vue_inject_styles__$
|
|
3690
|
-
__vue_script__$
|
|
3691
|
-
__vue_scope_id__$
|
|
3692
|
-
__vue_is_functional_template__$
|
|
3693
|
-
__vue_module_identifier__$
|
|
3698
|
+
const __vue_component__$d = /*#__PURE__*/normalizeComponent(
|
|
3699
|
+
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
|
|
3700
|
+
__vue_inject_styles__$d,
|
|
3701
|
+
__vue_script__$d,
|
|
3702
|
+
__vue_scope_id__$d,
|
|
3703
|
+
__vue_is_functional_template__$d,
|
|
3704
|
+
__vue_module_identifier__$d,
|
|
3694
3705
|
false,
|
|
3695
3706
|
createInjector,
|
|
3696
3707
|
undefined,
|
|
@@ -3698,19 +3709,23 @@ __vue_render__$b._withStripped = true;
|
|
|
3698
3709
|
);
|
|
3699
3710
|
|
|
3700
3711
|
//
|
|
3701
|
-
var script$
|
|
3712
|
+
var script$c = {
|
|
3702
3713
|
name: 'ele-form',
|
|
3703
3714
|
components: {
|
|
3704
|
-
EleSelect: __vue_component__$
|
|
3705
|
-
EleInput: __vue_component__$
|
|
3706
|
-
EleTextarea: __vue_component__$
|
|
3707
|
-
EleUpload: __vue_component__$
|
|
3708
|
-
EleSelectEntity: __vue_component__$
|
|
3709
|
-
EleInputNumber: __vue_component__$
|
|
3710
|
-
EleCheckbox: __vue_component__$
|
|
3711
|
-
EleRadio: __vue_component__$
|
|
3715
|
+
EleSelect: __vue_component__$r,
|
|
3716
|
+
EleInput: __vue_component__$s,
|
|
3717
|
+
EleTextarea: __vue_component__$j,
|
|
3718
|
+
EleUpload: __vue_component__$h,
|
|
3719
|
+
EleSelectEntity: __vue_component__$g,
|
|
3720
|
+
EleInputNumber: __vue_component__$f,
|
|
3721
|
+
EleCheckbox: __vue_component__$e,
|
|
3722
|
+
EleRadio: __vue_component__$d
|
|
3712
3723
|
},
|
|
3713
3724
|
props: {
|
|
3725
|
+
disabled: {
|
|
3726
|
+
type: [Boolean, String],
|
|
3727
|
+
default: '_routeMeta.disabled'
|
|
3728
|
+
},
|
|
3714
3729
|
formName: {
|
|
3715
3730
|
type: [Number, String],
|
|
3716
3731
|
default: 'coordinated'
|
|
@@ -3724,6 +3739,9 @@ var script$a = {
|
|
|
3724
3739
|
return {};
|
|
3725
3740
|
},
|
|
3726
3741
|
computed: {
|
|
3742
|
+
globalDisabled() {
|
|
3743
|
+
return this.executeExpression(this.disabled);
|
|
3744
|
+
},
|
|
3727
3745
|
form() {
|
|
3728
3746
|
return this.$form.createForm(this, {
|
|
3729
3747
|
name: this.formName
|
|
@@ -3739,6 +3757,7 @@ var script$a = {
|
|
|
3739
3757
|
methods: {
|
|
3740
3758
|
evalDisabledExpression() {
|
|
3741
3759
|
this.elements.forEach(ele => {
|
|
3760
|
+
if (this.globalDisabled) return this.$set(ele, '_disabled', true);
|
|
3742
3761
|
const {
|
|
3743
3762
|
disabled
|
|
3744
3763
|
} = ele;
|
|
@@ -3750,7 +3769,9 @@ var script$a = {
|
|
|
3750
3769
|
if (type.isBool(expression)) return expression;
|
|
3751
3770
|
if (type.isEmpty(expression)) return false;
|
|
3752
3771
|
return parse(expression, {
|
|
3753
|
-
...this.getFieldsValue()
|
|
3772
|
+
...this.getFieldsValue(),
|
|
3773
|
+
_route: this.$route.query,
|
|
3774
|
+
_routeMeta: this.$route.meta
|
|
3754
3775
|
});
|
|
3755
3776
|
},
|
|
3756
3777
|
onChange(value, props) {
|
|
@@ -3807,10 +3828,10 @@ var script$a = {
|
|
|
3807
3828
|
};
|
|
3808
3829
|
|
|
3809
3830
|
/* script */
|
|
3810
|
-
const __vue_script__$
|
|
3831
|
+
const __vue_script__$c = script$c;
|
|
3811
3832
|
|
|
3812
3833
|
/* template */
|
|
3813
|
-
var __vue_render__$
|
|
3834
|
+
var __vue_render__$c = function () {
|
|
3814
3835
|
var _vm = this;
|
|
3815
3836
|
var _h = _vm.$createElement;
|
|
3816
3837
|
var _c = _vm._self._c || _h;
|
|
@@ -4109,34 +4130,34 @@ var __vue_render__$a = function () {
|
|
|
4109
4130
|
1
|
|
4110
4131
|
)
|
|
4111
4132
|
};
|
|
4112
|
-
var __vue_staticRenderFns__$
|
|
4113
|
-
__vue_render__$
|
|
4133
|
+
var __vue_staticRenderFns__$c = [];
|
|
4134
|
+
__vue_render__$c._withStripped = true;
|
|
4114
4135
|
|
|
4115
4136
|
/* style */
|
|
4116
|
-
const __vue_inject_styles__$
|
|
4137
|
+
const __vue_inject_styles__$c = function (inject) {
|
|
4117
4138
|
if (!inject) return
|
|
4118
|
-
inject("data-v-
|
|
4139
|
+
inject("data-v-7dcee012_0", { source: ".ele__form--wrapper[data-v-7dcee012] {\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":"AAuNA;EACA,gBAAA;ACtNA;;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 disabled: {\r\n type: [Boolean, String],\r\n default: '_routeMeta.disabled'\r\n },\r\n formName: {\r\n type: [Number, String],\r\n default: 'coordinated'\r\n },\r\n elements: {\r\n type: Array,\r\n default: () => []\r\n }\r\n },\r\n data () {\r\n return {}\r\n },\r\n computed: {\r\n globalDisabled () {\r\n return this.executeExpression(this.disabled)\r\n },\r\n form () {\r\n return this.$form.createForm(this, { name: this.formName })\r\n },\r\n exposedMethods () {\r\n return {\r\n setFieldsValue: this.setFieldsValue,\r\n getFieldsValue: this.getFieldsValue\r\n }\r\n }\r\n },\r\n methods: {\r\n evalDisabledExpression () {\r\n this.elements.forEach(ele => {\r\n if (this.globalDisabled) return this.$set(ele, '_disabled', true)\r\n const { disabled } = ele\r\n const ret = this.executeExpression(disabled)\r\n this.$set(ele, '_disabled', ret)\r\n })\r\n },\r\n executeExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.getFieldsValue(), _route: this.$route.query, _routeMeta: this.$route.meta })\r\n },\r\n onChange (value, props) {\r\n const { name } = props\r\n this.setFieldsValue({ [name]: value })\r\n this.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 });
|
|
4119
4140
|
|
|
4120
4141
|
};
|
|
4121
4142
|
/* scoped */
|
|
4122
|
-
const __vue_scope_id__$
|
|
4143
|
+
const __vue_scope_id__$c = "data-v-7dcee012";
|
|
4123
4144
|
/* module identifier */
|
|
4124
|
-
const __vue_module_identifier__$
|
|
4145
|
+
const __vue_module_identifier__$c = undefined;
|
|
4125
4146
|
/* functional template */
|
|
4126
|
-
const __vue_is_functional_template__$
|
|
4147
|
+
const __vue_is_functional_template__$c = false;
|
|
4127
4148
|
/* style inject SSR */
|
|
4128
4149
|
|
|
4129
4150
|
/* style inject shadow dom */
|
|
4130
4151
|
|
|
4131
4152
|
|
|
4132
4153
|
|
|
4133
|
-
const __vue_component__$
|
|
4134
|
-
{ render: __vue_render__$
|
|
4135
|
-
__vue_inject_styles__$
|
|
4136
|
-
__vue_script__$
|
|
4137
|
-
__vue_scope_id__$
|
|
4138
|
-
__vue_is_functional_template__$
|
|
4139
|
-
__vue_module_identifier__$
|
|
4154
|
+
const __vue_component__$c = /*#__PURE__*/normalizeComponent(
|
|
4155
|
+
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
|
|
4156
|
+
__vue_inject_styles__$c,
|
|
4157
|
+
__vue_script__$c,
|
|
4158
|
+
__vue_scope_id__$c,
|
|
4159
|
+
__vue_is_functional_template__$c,
|
|
4160
|
+
__vue_module_identifier__$c,
|
|
4140
4161
|
false,
|
|
4141
4162
|
createInjector,
|
|
4142
4163
|
undefined,
|
|
@@ -4164,11 +4185,11 @@ const parseFieldMap = (fieldMap = {}, dataSource = {}) => {
|
|
|
4164
4185
|
};
|
|
4165
4186
|
|
|
4166
4187
|
//
|
|
4167
|
-
var script$
|
|
4188
|
+
var script$b = {
|
|
4168
4189
|
name: 'ele-form-group-model',
|
|
4169
4190
|
components: {
|
|
4170
|
-
[__vue_component__$
|
|
4171
|
-
[__vue_component__$
|
|
4191
|
+
[__vue_component__$c.name]: __vue_component__$c,
|
|
4192
|
+
[__vue_component__$l.name]: __vue_component__$l
|
|
4172
4193
|
},
|
|
4173
4194
|
props: {
|
|
4174
4195
|
mode: {
|
|
@@ -4358,7 +4379,9 @@ var script$9 = {
|
|
|
4358
4379
|
this.innerGroupMeta.push(form);
|
|
4359
4380
|
});
|
|
4360
4381
|
const formGroupValues = data[this.fieldName];
|
|
4361
|
-
this
|
|
4382
|
+
this.$nextTick(() => {
|
|
4383
|
+
this.setFieldsValue(formGroupValues);
|
|
4384
|
+
});
|
|
4362
4385
|
},
|
|
4363
4386
|
async submitRequestTrigger(props = {}) {
|
|
4364
4387
|
const {
|
|
@@ -4442,10 +4465,10 @@ var script$9 = {
|
|
|
4442
4465
|
};
|
|
4443
4466
|
|
|
4444
4467
|
/* script */
|
|
4445
|
-
const __vue_script__$
|
|
4468
|
+
const __vue_script__$b = script$b;
|
|
4446
4469
|
|
|
4447
4470
|
/* template */
|
|
4448
|
-
var __vue_render__$
|
|
4471
|
+
var __vue_render__$b = function () {
|
|
4449
4472
|
var _vm = this;
|
|
4450
4473
|
var _h = _vm.$createElement;
|
|
4451
4474
|
var _c = _vm._self._c || _h;
|
|
@@ -4547,34 +4570,34 @@ var __vue_render__$9 = function () {
|
|
|
4547
4570
|
2
|
|
4548
4571
|
)
|
|
4549
4572
|
};
|
|
4550
|
-
var __vue_staticRenderFns__$
|
|
4551
|
-
__vue_render__$
|
|
4573
|
+
var __vue_staticRenderFns__$b = [];
|
|
4574
|
+
__vue_render__$b._withStripped = true;
|
|
4552
4575
|
|
|
4553
4576
|
/* style */
|
|
4554
|
-
const __vue_inject_styles__$
|
|
4577
|
+
const __vue_inject_styles__$b = function (inject) {
|
|
4555
4578
|
if (!inject) return
|
|
4556
|
-
inject("data-v-8651e654_0", { source: ".ele.form-group-model__wrapper[data-v-8651e654] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-8651e654] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-8651e654]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-8651e654] {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--content[data-v-8651e654] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-8651e654] {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\form-group-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AA4OA;EACA,iBAAA;EACA,oBAAA;AC3OA;AD4OA;EACA,gBAAA;EACA,gBAAA;AC1OA;AD2OA;EACA,iBAAA;ACzOA;AD2OA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,wBAAA;EACA,mDAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;ACzOA;AD2OA;EACA,aAAA;ACzOA;AD4OA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC1OA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele form-group-model__wrapper\">\r\n <template v-for=\"(group, idx) in innerGroupMeta\">\r\n <div \r\n class=\"form-group-model__from\"\r\n v-if=\"!group.isGenTpl\"\r\n :key=\"group.key || idx\">\r\n <div class=\"form-group-model__form--title\">\r\n <div>{{ group.title }}</div>\r\n <div class=\"form-group-model__form--buttons\">\r\n <ele-button-group v-if=\"group.buttonGroupMeta\" v-on=\"assignAttrForEvents\" @delete=\"handleClickDelete($event, group, idx)\" :data-source=\"group.buttonGroupMeta.elements.call(this)\"></ele-button-group>\r\n </div>\r\n </div>\r\n <div class=\"form-group-model__form--content\">\r\n <ele-form @change=\"onChangeFormStatus($event, group.key || idx)\" :form-name=\"group.key || idx\" :ref=\"group.key || `${formRefBase}__${idx}`\" :elements=\"group.elements\"></ele-form>\r\n </div>\r\n </div>\r\n </template>\r\n <div v-if=\"showFooterMeta\" class=\"form-group-model__form--footer\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Form from '../../form/src/index.vue'\r\nimport { BUILT_IN_EVENT_NAMES, RESERVE_EVENT_NAMES, parseFieldMap } from '../../utils'\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport { type, net } from '@idooel/shared'\r\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\r\nexport default {\r\n name: 'ele-form-group-model',\r\n components: {\r\n [Form.name]: Form,\r\n [EleButtonGroup.name]: EleButtonGroup\r\n },\r\n props: {\r\n mode: {\r\n type: String\r\n },\r\n fieldName: {\r\n type: String,\r\n default: 'formGroup'\r\n },\r\n groupMeta: {\r\n type: Function,\r\n default: () => []\r\n },\r\n footerMeta: {\r\n type: Object,\r\n default: () => {}\r\n },\r\n preRequest: {\r\n type: Object,\r\n default: () => {}\r\n },\r\n infoRequest: {\r\n type: Object,\r\n default: () => {}\r\n },\r\n submitRequest: {\r\n type: Object,\r\n default: () => {}\r\n }\r\n },\r\n data () {\r\n return {\r\n increaseCount: 1,\r\n innerGroupMeta: []\r\n }\r\n },\r\n watch: {\r\n readOnlyGroupMeta: {\r\n handler (meta) {\r\n this.innerGroupMeta = meta\r\n },\r\n immediate: true\r\n }\r\n },\r\n computed: {\r\n readOnlyGroupMeta () {\r\n return this.groupMeta.call(this)\r\n },\r\n showFooterMeta () {\r\n return !type.isEmpty(this.footerMeta)\r\n },\r\n formRefBase () {\r\n return uuidv4()\r\n },\r\n footerElements () {\r\n const { elements } = this.footerMeta\r\n return elements.call(this)\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\r\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL],\r\n [BUILT_IN_EVENT_NAMES.INCREASE]: this[BUILT_IN_EVENT_NAMES.INCREASE]\r\n }\r\n },\r\n getFormRefs () {\r\n return this.innerGroupMeta.map((group, idx) => {\r\n if (!group.isGenTpl) {\r\n return this.$refs[group.key || `${this.formRefBase}__${idx}`]\r\n }\r\n return void 0\r\n }).filter(item => !!item).flat()\r\n },\r\n formModels () {\r\n if (this.mode === 'increase') {\r\n //TODO increase mode to return formModels\r\n return this.getFormRefs.map(form => {\r\n return form.getFieldsValue()\r\n })\r\n } else {\r\n return this.getFormRefs.map(form => {\r\n const { $vnode: { data: { ref } } } = form\r\n return {\r\n key: ref,\r\n value: form.getFieldsValue()\r\n }\r\n }).reduce((ret, props) => {\r\n ret[props.key] = props.value\r\n return ret\r\n }, {})\r\n }\r\n }\r\n },\r\n methods: {\r\n execFieldMap (fieldMap = {}, dataSource = {}) {\r\n const ret = parseFieldMap(fieldMap, { _route: this.$route.query, ...dataSource})\r\n return ret\r\n },\r\n onChangeFormStatus (props, key) {\r\n this.$emit(RESERVE_EVENT_NAMES.WATCH_FORM_STATUS, { key, ...props })\r\n },\r\n async infoRequestTrigger () {\r\n if (!this.infoRequest) return\r\n const { url, requestType, params = {}, fieldMap = {}, headers = {} } = this.infoRequest\r\n if (!url) return\r\n net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap) }, { ...headers }).then(resp => {\r\n const { data = {} } = resp\r\n if (this.mode === 'increase') {\r\n this.renderIncreaseForm(data)\r\n }\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n })\r\n },\r\n async preRequestTrigger () {\r\n if (!this.preRequest) return\r\n const { url, requestType = 'GET', params = {}, fieldMap = {}, headers = {} } = this.preRequest\r\n if (!url) return\r\n net[requestType.toLowerCase()](url, { ...params, ...fieldMap }, { ...headers }).then(resp => {\r\n const { data = {} } = resp\r\n if (this.mode === 'increase') {\r\n this.renderIncreaseForm(data)\r\n }\r\n this.$emit(RESERVE_EVENT_NAMES.INIT_FORM, { ...data })\r\n })\r\n },\r\n renderIncreaseForm (data = {}) {\r\n const formGroupValuesLength = data[this.fieldName].length\r\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\r\n const notGenTplPoolLength = this.readOnlyGroupMeta.filter(item => !item.isGenTpl).length\r\n const genNum = formGroupValuesLength - notGenTplPoolLength\r\n new Array(genNum).fill().forEach(() => {\r\n const form = this.genForm(genTplTarget)\r\n this.innerGroupMeta.push(form)\r\n })\r\n const formGroupValues = data[this.fieldName]\r\n this.setFieldsValue(formGroupValues)\r\n },\r\n async submitRequestTrigger (props = {}) {\r\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\r\n if (!url) return\r\n const ret = await net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels }), [this.fieldName]: this.formModels }, { headers }).then(resp => {\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\r\n return resp.data\r\n })\r\n return ret\r\n },\r\n setFieldsValue (data = []) {\r\n this.getFormRefs.forEach((form, idx) => {\r\n form.setFieldsValue(data[idx])\r\n })\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props = {}) {\r\n const status = this.getFormRefs.map(form => {\r\n const status = form.validateFields()\r\n return status\r\n }).every(item => item)\r\n if (status) {\r\n return this.submitRequestTrigger(props)\r\n } else {\r\n return false\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\r\n },\r\n genForm (base) {\r\n const { elements, title, buttonGroupMeta } = base\r\n return {\r\n elements: JSON.parse(JSON.stringify(elements)),\r\n buttonGroupMeta,\r\n title: `${title}${this.increaseCount++}`,\r\n _gen: true\r\n }\r\n },\r\n handleClickDelete (props = {}, attr = {}, idx) {\r\n this.innerGroupMeta.splice(idx, 1)\r\n this.$emit(BUILT_IN_EVENT_NAMES.DELETE, { ...props })\r\n },\r\n [BUILT_IN_EVENT_NAMES.INCREASE] (props) {\r\n const genTplTarget = this.readOnlyGroupMeta.find(item => item.isGenTpl)\r\n const form = this.genForm(genTplTarget)\r\n this.innerGroupMeta.push(form)\r\n }\r\n },\r\n async mounted() {\r\n await this.preRequestTrigger()\r\n await this.infoRequestTrigger()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele {\r\n &.form-group-model__wrapper {\r\n background: unset;\r\n padding-bottom: 80px;\r\n .form-group-model__from {\r\n background: #fff;\r\n margin-top: 16px;\r\n &:first-child {\r\n margin-top: unset;\r\n }\r\n .form-group-model__form--title {\r\n width: 100%;\r\n height: 56px;\r\n padding: 0 16px;\r\n border-bottom: 1px solid;\r\n border-color: var(--idooel-form-title-border-color);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: space-between;\r\n }\r\n .form-group-model__form--content {\r\n padding: 16px;\r\n }\r\n }\r\n .form-group-model__form--footer {\r\n width: 100%;\r\n height: 64px;\r\n background: #fff;\r\n position: fixed;\r\n bottom: 0;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n }\r\n}\r\n</style>",".ele.form-group-model__wrapper {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title {\n width: 100%;\n height: 56px;\n padding: 0 16px;\n border-bottom: 1px solid;\n border-color: var(--idooel-form-title-border-color);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--content {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer {\n width: 100%;\n height: 64px;\n background: #fff;\n position: fixed;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4579
|
+
inject("data-v-1489daf3_0", { source: ".ele.form-group-model__wrapper[data-v-1489daf3] {\n background: unset;\n padding-bottom: 80px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-1489daf3] {\n background: #fff;\n margin-top: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__from[data-v-1489daf3]:first-child {\n margin-top: unset;\n}\n.ele.form-group-model__wrapper .form-group-model__from .form-group-model__form--title[data-v-1489daf3] {\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-1489daf3] {\n padding: 16px;\n}\n.ele.form-group-model__wrapper .form-group-model__form--footer[data-v-1489daf3] {\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":"AA8OA;EACA,iBAAA;EACA,oBAAA;AC7OA;AD8OA;EACA,gBAAA;EACA,gBAAA;AC5OA;AD6OA;EACA,iBAAA;AC3OA;AD6OA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,wBAAA;EACA,mDAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8BAAA;AC3OA;AD6OA;EACA,aAAA;AC3OA;AD8OA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC5OA;;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.$nextTick(() => {\r\n this.setFieldsValue(formGroupValues)\r\n })\r\n },\r\n async submitRequestTrigger (props = {}) {\r\n const { url, requestType, headers = {}, params = {}, fieldMap = {} } = this.submitRequest\r\n if (!url) return\r\n const ret = await net[requestType.toLowerCase()](url, { ...params, ...this.execFieldMap(fieldMap, { ...this.formModels }), [this.fieldName]: this.formModels }, { headers }).then(resp => {\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, formModel: { ...this.formModels, ...resp.data || {} } })\r\n return resp.data\r\n })\r\n return ret\r\n },\r\n setFieldsValue (data = []) {\r\n this.getFormRefs.forEach((form, idx) => {\r\n form.setFieldsValue(data[idx])\r\n })\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 });
|
|
4557
4580
|
|
|
4558
4581
|
};
|
|
4559
4582
|
/* scoped */
|
|
4560
|
-
const __vue_scope_id__$
|
|
4583
|
+
const __vue_scope_id__$b = "data-v-1489daf3";
|
|
4561
4584
|
/* module identifier */
|
|
4562
|
-
const __vue_module_identifier__$
|
|
4585
|
+
const __vue_module_identifier__$b = undefined;
|
|
4563
4586
|
/* functional template */
|
|
4564
|
-
const __vue_is_functional_template__$
|
|
4587
|
+
const __vue_is_functional_template__$b = false;
|
|
4565
4588
|
/* style inject SSR */
|
|
4566
4589
|
|
|
4567
4590
|
/* style inject shadow dom */
|
|
4568
4591
|
|
|
4569
4592
|
|
|
4570
4593
|
|
|
4571
|
-
const __vue_component__$
|
|
4572
|
-
{ render: __vue_render__$
|
|
4573
|
-
__vue_inject_styles__$
|
|
4574
|
-
__vue_script__$
|
|
4575
|
-
__vue_scope_id__$
|
|
4576
|
-
__vue_is_functional_template__$
|
|
4577
|
-
__vue_module_identifier__$
|
|
4594
|
+
const __vue_component__$b = /*#__PURE__*/normalizeComponent(
|
|
4595
|
+
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
|
|
4596
|
+
__vue_inject_styles__$b,
|
|
4597
|
+
__vue_script__$b,
|
|
4598
|
+
__vue_scope_id__$b,
|
|
4599
|
+
__vue_is_functional_template__$b,
|
|
4600
|
+
__vue_module_identifier__$b,
|
|
4578
4601
|
false,
|
|
4579
4602
|
createInjector,
|
|
4580
4603
|
undefined,
|
|
@@ -4582,12 +4605,16 @@ __vue_render__$9._withStripped = true;
|
|
|
4582
4605
|
);
|
|
4583
4606
|
|
|
4584
4607
|
//
|
|
4585
|
-
var script$
|
|
4608
|
+
var script$a = {
|
|
4586
4609
|
name: 'ele-form-model',
|
|
4587
4610
|
components: {
|
|
4588
|
-
EleButtonGroup: __vue_component__$
|
|
4611
|
+
EleButtonGroup: __vue_component__$l
|
|
4589
4612
|
},
|
|
4590
4613
|
props: {
|
|
4614
|
+
disabled: {
|
|
4615
|
+
type: [Boolean, String],
|
|
4616
|
+
default: '_routeMeta.disabled'
|
|
4617
|
+
},
|
|
4591
4618
|
title: {
|
|
4592
4619
|
type: String
|
|
4593
4620
|
},
|
|
@@ -4602,6 +4629,9 @@ var script$8 = {
|
|
|
4602
4629
|
return {};
|
|
4603
4630
|
},
|
|
4604
4631
|
computed: {
|
|
4632
|
+
globalDisabled() {
|
|
4633
|
+
return this.executeExpression(this.disabled);
|
|
4634
|
+
},
|
|
4605
4635
|
formRef() {
|
|
4606
4636
|
return v4();
|
|
4607
4637
|
},
|
|
@@ -4610,7 +4640,7 @@ var script$8 = {
|
|
|
4610
4640
|
ret[ele.eventName] = e => {
|
|
4611
4641
|
this.$emit(ele.eventName || 'click', {
|
|
4612
4642
|
...e,
|
|
4613
|
-
formModel: this.formModels
|
|
4643
|
+
formModel: this.formModels()
|
|
4614
4644
|
});
|
|
4615
4645
|
};
|
|
4616
4646
|
return ret;
|
|
@@ -4652,11 +4682,26 @@ var script$8 = {
|
|
|
4652
4682
|
} = this.footerMeta;
|
|
4653
4683
|
return elements.call(this);
|
|
4654
4684
|
},
|
|
4655
|
-
|
|
4656
|
-
return
|
|
4685
|
+
expressionData() {
|
|
4686
|
+
return {
|
|
4687
|
+
_route: this.$route.query,
|
|
4688
|
+
_routeMeta: this.$route.meta
|
|
4689
|
+
};
|
|
4657
4690
|
}
|
|
4658
4691
|
},
|
|
4659
4692
|
methods: {
|
|
4693
|
+
formModels() {
|
|
4694
|
+
return this.$refs[this.formRef] ? this.$refs[this.formRef].getFieldsValue() : {};
|
|
4695
|
+
},
|
|
4696
|
+
executeExpression(expression, dataSource = {}) {
|
|
4697
|
+
if (type.isBool(expression)) return expression;
|
|
4698
|
+
if (type.isEmpty(expression)) return false;
|
|
4699
|
+
return parse(expression, {
|
|
4700
|
+
...this.expressionData,
|
|
4701
|
+
...this.formModels(),
|
|
4702
|
+
...dataSource
|
|
4703
|
+
});
|
|
4704
|
+
},
|
|
4660
4705
|
execFieldMap(fieldMap = {}, dataSource = {}) {
|
|
4661
4706
|
const ret = parseFieldMap(fieldMap, {
|
|
4662
4707
|
_route: this.$route.query,
|
|
@@ -4676,9 +4721,9 @@ var script$8 = {
|
|
|
4676
4721
|
const ret = await net[requestType.toLowerCase()](url, {
|
|
4677
4722
|
...params,
|
|
4678
4723
|
...this.execFieldMap(fieldMap, {
|
|
4679
|
-
...this.formModels
|
|
4724
|
+
...this.formModels()
|
|
4680
4725
|
}),
|
|
4681
|
-
...this.formModels
|
|
4726
|
+
...this.formModels()
|
|
4682
4727
|
}, {
|
|
4683
4728
|
headers
|
|
4684
4729
|
}).then(resp => {
|
|
@@ -4686,7 +4731,7 @@ var script$8 = {
|
|
|
4686
4731
|
this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, {
|
|
4687
4732
|
...props,
|
|
4688
4733
|
formModel: {
|
|
4689
|
-
...this.formModels,
|
|
4734
|
+
...this.formModels(),
|
|
4690
4735
|
...(resp.data || {})
|
|
4691
4736
|
}
|
|
4692
4737
|
});
|
|
@@ -4746,6 +4791,7 @@ var script$8 = {
|
|
|
4746
4791
|
return this.$refs[this.formRef].validateFields();
|
|
4747
4792
|
},
|
|
4748
4793
|
[BUILT_IN_EVENT_NAMES.SUBMIT](props = {}) {
|
|
4794
|
+
if (this.globalDisabled) return;
|
|
4749
4795
|
const status = this.$refs[this.formRef].validateFields();
|
|
4750
4796
|
if (status) {
|
|
4751
4797
|
//TODO fieldMap
|
|
@@ -4767,10 +4813,10 @@ var script$8 = {
|
|
|
4767
4813
|
};
|
|
4768
4814
|
|
|
4769
4815
|
/* script */
|
|
4770
|
-
const __vue_script__$
|
|
4816
|
+
const __vue_script__$a = script$a;
|
|
4771
4817
|
|
|
4772
4818
|
/* template */
|
|
4773
|
-
var __vue_render__$
|
|
4819
|
+
var __vue_render__$a = function () {
|
|
4774
4820
|
var _vm = this;
|
|
4775
4821
|
var _h = _vm.$createElement;
|
|
4776
4822
|
var _c = _vm._self._c || _h;
|
|
@@ -4784,7 +4830,12 @@ var __vue_render__$8 = function () {
|
|
|
4784
4830
|
_c(
|
|
4785
4831
|
"div",
|
|
4786
4832
|
{ staticClass: "form-model__content" },
|
|
4787
|
-
[
|
|
4833
|
+
[
|
|
4834
|
+
_c("ele-form", {
|
|
4835
|
+
ref: _vm.formRef,
|
|
4836
|
+
attrs: { elements: _vm.elements, disabled: _vm.globalDisabled },
|
|
4837
|
+
}),
|
|
4838
|
+
],
|
|
4788
4839
|
1
|
|
4789
4840
|
),
|
|
4790
4841
|
_vm._v(" "),
|
|
@@ -4806,34 +4857,34 @@ var __vue_render__$8 = function () {
|
|
|
4806
4857
|
: _vm._e(),
|
|
4807
4858
|
])
|
|
4808
4859
|
};
|
|
4809
|
-
var __vue_staticRenderFns__$
|
|
4810
|
-
__vue_render__$
|
|
4860
|
+
var __vue_staticRenderFns__$a = [];
|
|
4861
|
+
__vue_render__$a._withStripped = true;
|
|
4811
4862
|
|
|
4812
4863
|
/* style */
|
|
4813
|
-
const __vue_inject_styles__$
|
|
4864
|
+
const __vue_inject_styles__$a = function (inject) {
|
|
4814
4865
|
if (!inject) return
|
|
4815
|
-
inject("data-v-
|
|
4866
|
+
inject("data-v-d0737210_0", { source: ".form__model--wrapper[data-v-d0737210] {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title[data-v-d0737210] {\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-d0737210] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-d0737210] {\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":"AA6JA;EACA,WAAA;EACA,YAAA;EACA,cAAA;EACA,gBAAA;AC5JA;AD6JA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8DAAA;AC3JA;AD6JA;EACA,aAAA;AC3JA;AD6JA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,YAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC3JA;;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\" :disabled=\"globalDisabled\"></ele-form>\r\n </div>\r\n <div class=\"form-model__footer\" v-if=\"footerMeta\">\r\n <ele-button-group v-on=\"assignAttrForEvents\" :data-source=\"footerElements\"></ele-button-group>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport 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, type } from '@idooel/shared'\r\nimport { parse } from '@idooel/expression'\r\nexport default {\r\n name: 'ele-form-model',\r\n components: {\r\n EleButtonGroup\r\n },\r\n props: {\r\n disabled: {\r\n type: [Boolean, String],\r\n default: '_routeMeta.disabled'\r\n },\r\n title: {\r\n type: String\r\n },\r\n formMeta: {\r\n type: Object\r\n },\r\n footerMeta: {\r\n type: Object\r\n }\r\n },\r\n data() {\r\n return {}\r\n },\r\n computed: {\r\n globalDisabled () {\r\n return this.executeExpression(this.disabled)\r\n },\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 expressionData () {\r\n return {\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta\r\n }\r\n }\r\n },\r\n methods: {\r\n formModels () {\r\n return this.$refs[this.formRef] ? this.$refs[this.formRef].getFieldsValue() : {}\r\n },\r\n executeExpression (expression, dataSource = {}) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.expressionData, ...this.formModels(), ...dataSource })\r\n },\r\n execFieldMap (fieldMap = {}, dataSource = {}) {\r\n const ret = parseFieldMap(fieldMap, { _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 if (this.globalDisabled) return\r\n const status = this.$refs[this.formRef].validateFields()\r\n if (status) {\r\n //TODO fieldMap\r\n return this.submitRequestTrigger(props)\r\n } else {\r\n return false\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.CANCEL] (props = {}) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.CANCEL, { ...props })\r\n }\r\n },\r\n async mounted() {\r\n await this.preRequestTrigger()\r\n await this.infoRequestTrigger()\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.form__model--wrapper {\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n background: #fff;\r\n .form-model__title {\r\n height: 56px;\r\n padding: 0 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n border-bottom: 1px solid var(--idooel-form-title-border-color);\r\n }\r\n .form-model__content {\r\n padding: 16px;\r\n }\r\n .form-model__footer {\r\n /* width: 100%; */\r\n height: 64px;\r\n position: fixed;\r\n bottom: 0;\r\n display: flex;\r\n float: right;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n}\r\n</style>",".form__model--wrapper {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: #fff;\n}\n.form__model--wrapper .form-model__title {\n height: 56px;\n padding: 0 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n border-bottom: 1px solid var(--idooel-form-title-border-color);\n}\n.form__model--wrapper .form-model__content {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer {\n /* width: 100%; */\n height: 64px;\n position: fixed;\n bottom: 0;\n display: flex;\n float: right;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4816
4867
|
|
|
4817
4868
|
};
|
|
4818
4869
|
/* scoped */
|
|
4819
|
-
const __vue_scope_id__$
|
|
4870
|
+
const __vue_scope_id__$a = "data-v-d0737210";
|
|
4820
4871
|
/* module identifier */
|
|
4821
|
-
const __vue_module_identifier__$
|
|
4872
|
+
const __vue_module_identifier__$a = undefined;
|
|
4822
4873
|
/* functional template */
|
|
4823
|
-
const __vue_is_functional_template__$
|
|
4874
|
+
const __vue_is_functional_template__$a = false;
|
|
4824
4875
|
/* style inject SSR */
|
|
4825
4876
|
|
|
4826
4877
|
/* style inject shadow dom */
|
|
4827
4878
|
|
|
4828
4879
|
|
|
4829
4880
|
|
|
4830
|
-
const __vue_component__$
|
|
4831
|
-
{ render: __vue_render__$
|
|
4832
|
-
__vue_inject_styles__$
|
|
4833
|
-
__vue_script__$
|
|
4834
|
-
__vue_scope_id__$
|
|
4835
|
-
__vue_is_functional_template__$
|
|
4836
|
-
__vue_module_identifier__$
|
|
4881
|
+
const __vue_component__$a = /*#__PURE__*/normalizeComponent(
|
|
4882
|
+
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
|
|
4883
|
+
__vue_inject_styles__$a,
|
|
4884
|
+
__vue_script__$a,
|
|
4885
|
+
__vue_scope_id__$a,
|
|
4886
|
+
__vue_is_functional_template__$a,
|
|
4887
|
+
__vue_module_identifier__$a,
|
|
4837
4888
|
false,
|
|
4838
4889
|
createInjector,
|
|
4839
4890
|
undefined,
|
|
@@ -4841,10 +4892,10 @@ __vue_render__$8._withStripped = true;
|
|
|
4841
4892
|
);
|
|
4842
4893
|
|
|
4843
4894
|
//
|
|
4844
|
-
var script$
|
|
4895
|
+
var script$9 = {
|
|
4845
4896
|
name: 'ele-step-model',
|
|
4846
4897
|
components: {
|
|
4847
|
-
EleButtonGroup: __vue_component__$
|
|
4898
|
+
EleButtonGroup: __vue_component__$l
|
|
4848
4899
|
},
|
|
4849
4900
|
props: {
|
|
4850
4901
|
stepMeta: {
|
|
@@ -4859,22 +4910,31 @@ var script$7 = {
|
|
|
4859
4910
|
data() {
|
|
4860
4911
|
return {
|
|
4861
4912
|
current: 0,
|
|
4862
|
-
currentSlotComponentRef: null
|
|
4913
|
+
currentSlotComponentRef: null,
|
|
4914
|
+
innerFooterElements: []
|
|
4863
4915
|
};
|
|
4864
4916
|
},
|
|
4865
4917
|
computed: {
|
|
4918
|
+
routeMetaDisabled() {
|
|
4919
|
+
return this.executeMetaDisabledExpression(this.$route.meta.disabled);
|
|
4920
|
+
},
|
|
4921
|
+
expressionData() {
|
|
4922
|
+
return {
|
|
4923
|
+
current: this.current,
|
|
4924
|
+
_route: this.$route.query,
|
|
4925
|
+
_routeMeta: this.$route.meta
|
|
4926
|
+
};
|
|
4927
|
+
},
|
|
4866
4928
|
currentSlotName() {
|
|
4867
4929
|
return this.scopedSlotsNames[this.current];
|
|
4868
4930
|
},
|
|
4869
4931
|
footerElements() {
|
|
4870
|
-
|
|
4871
|
-
elements
|
|
4872
|
-
} = this.footerMeta;
|
|
4873
|
-
return elements.call(this);
|
|
4932
|
+
return this.innerFooterElements;
|
|
4874
4933
|
},
|
|
4875
4934
|
assignAttrForEvents() {
|
|
4876
4935
|
const events = this.footerElements.reduce((ret, ele) => {
|
|
4877
4936
|
ret[ele.eventName] = e => {
|
|
4937
|
+
this.evalShowExpressionForFooterElements();
|
|
4878
4938
|
this.$emit(ele.eventName || 'click', {
|
|
4879
4939
|
...e,
|
|
4880
4940
|
exposed: this.exposedMethods
|
|
@@ -4886,7 +4946,8 @@ var script$7 = {
|
|
|
4886
4946
|
...this.$listeners,
|
|
4887
4947
|
...events,
|
|
4888
4948
|
[BUILT_IN_EVENT_NAMES.NEXT]: this[BUILT_IN_EVENT_NAMES.NEXT],
|
|
4889
|
-
[BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS]
|
|
4949
|
+
[BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS],
|
|
4950
|
+
[BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT]
|
|
4890
4951
|
};
|
|
4891
4952
|
},
|
|
4892
4953
|
activeIndex() {
|
|
@@ -4931,7 +4992,37 @@ var script$7 = {
|
|
|
4931
4992
|
immediate: true
|
|
4932
4993
|
}
|
|
4933
4994
|
},
|
|
4995
|
+
created() {
|
|
4996
|
+
const {
|
|
4997
|
+
elements
|
|
4998
|
+
} = this.footerMeta;
|
|
4999
|
+
this.innerFooterElements = elements.call(this);
|
|
5000
|
+
this.evalShowExpressionForFooterElements();
|
|
5001
|
+
},
|
|
4934
5002
|
methods: {
|
|
5003
|
+
executeMetaDisabledExpression(expression) {
|
|
5004
|
+
if (type.isBool(expression)) return expression;
|
|
5005
|
+
if (type.isEmpty(expression)) return false;
|
|
5006
|
+
return parse(expression, {
|
|
5007
|
+
...this.expressionData
|
|
5008
|
+
});
|
|
5009
|
+
},
|
|
5010
|
+
evalShowExpressionForFooterElements() {
|
|
5011
|
+
this.innerFooterElements = this.innerFooterElements.map(element => {
|
|
5012
|
+
const {
|
|
5013
|
+
show,
|
|
5014
|
+
key,
|
|
5015
|
+
eventName
|
|
5016
|
+
} = element;
|
|
5017
|
+
if (key == BUILT_IN_EVENT_NAMES.SUBMIT || eventName == BUILT_IN_EVENT_NAMES.SUBMIT) {
|
|
5018
|
+
// built in submit button should according to the route meta disabled
|
|
5019
|
+
this.$set(element, '_show', !this.routeMetaDisabled);
|
|
5020
|
+
return element;
|
|
5021
|
+
}
|
|
5022
|
+
show && this.$set(element, '_show', parse(show, this.expressionData));
|
|
5023
|
+
return element;
|
|
5024
|
+
});
|
|
5025
|
+
},
|
|
4935
5026
|
getCurrentSlotComponentRef() {
|
|
4936
5027
|
const includeMetaCmp = this.$children.find(child => child.meta);
|
|
4937
5028
|
if (!includeMetaCmp) return null;
|
|
@@ -4943,14 +5034,17 @@ var script$7 = {
|
|
|
4943
5034
|
},
|
|
4944
5035
|
setCurrentStep(index) {
|
|
4945
5036
|
this.current = index;
|
|
5037
|
+
this.evalShowExpressionForFooterElements();
|
|
4946
5038
|
},
|
|
4947
5039
|
nextStep() {
|
|
4948
5040
|
if (this.current >= this.elements.length - 1) return;
|
|
4949
5041
|
this.current++;
|
|
5042
|
+
this.evalShowExpressionForFooterElements();
|
|
4950
5043
|
},
|
|
4951
5044
|
prevStep() {
|
|
4952
5045
|
if (this.current <= 0) return;
|
|
4953
5046
|
this.current--;
|
|
5047
|
+
this.evalShowExpressionForFooterElements();
|
|
4954
5048
|
},
|
|
4955
5049
|
[BUILT_IN_EVENT_NAMES.NEXT](props) {
|
|
4956
5050
|
this.$emit(BUILT_IN_EVENT_NAMES.NEXT, {
|
|
@@ -4967,15 +5061,26 @@ var script$7 = {
|
|
|
4967
5061
|
...this.exposedMethods
|
|
4968
5062
|
}
|
|
4969
5063
|
});
|
|
5064
|
+
},
|
|
5065
|
+
[BUILT_IN_EVENT_NAMES.SUBMIT](props) {
|
|
5066
|
+
const currentComponent = this.getCurrentSlotComponentRef() || {};
|
|
5067
|
+
const hasSubmitMethod = currentComponent.hasOwnProperty(BUILT_IN_EVENT_NAMES.SUBMIT);
|
|
5068
|
+
hasSubmitMethod && currentComponent[BUILT_IN_EVENT_NAMES.SUBMIT]();
|
|
5069
|
+
this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, {
|
|
5070
|
+
...props,
|
|
5071
|
+
exposed: {
|
|
5072
|
+
...this.exposedMethods
|
|
5073
|
+
}
|
|
5074
|
+
});
|
|
4970
5075
|
}
|
|
4971
5076
|
}
|
|
4972
5077
|
};
|
|
4973
5078
|
|
|
4974
5079
|
/* script */
|
|
4975
|
-
const __vue_script__$
|
|
5080
|
+
const __vue_script__$9 = script$9;
|
|
4976
5081
|
|
|
4977
5082
|
/* template */
|
|
4978
|
-
var __vue_render__$
|
|
5083
|
+
var __vue_render__$9 = function () {
|
|
4979
5084
|
var _vm = this;
|
|
4980
5085
|
var _h = _vm.$createElement;
|
|
4981
5086
|
var _c = _vm._self._c || _h;
|
|
@@ -5041,34 +5146,34 @@ var __vue_render__$7 = function () {
|
|
|
5041
5146
|
),
|
|
5042
5147
|
])
|
|
5043
5148
|
};
|
|
5044
|
-
var __vue_staticRenderFns__$
|
|
5045
|
-
__vue_render__$
|
|
5149
|
+
var __vue_staticRenderFns__$9 = [];
|
|
5150
|
+
__vue_render__$9._withStripped = true;
|
|
5046
5151
|
|
|
5047
5152
|
/* style */
|
|
5048
|
-
const __vue_inject_styles__$
|
|
5153
|
+
const __vue_inject_styles__$9 = function (inject) {
|
|
5049
5154
|
if (!inject) return
|
|
5050
|
-
inject("data-v-
|
|
5155
|
+
inject("data-v-417941c8_0", { source: ".ele-step-model__wrapper[data-v-417941c8] {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper[data-v-417941c8] {\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-417941c8] {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper[data-v-417941c8] {\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-417941c8] {\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":"AAmLA;EACA,WAAA;EACA,aAAA;EACA,kBAAA;AClLA;ADmLA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,gBAAA;ACjLA;ADmLA;EACA,gBAAA;ACjLA;ADqLA;EACA,WAAA;EACA,WAAA;EACA,gBAAA;EACA,mBAAA;EACA,+CAAA;EACA,cAAA;ACnLA;ADqLA;EACA,WAAA;EACA,YAAA;EACA,gBAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;ACnLA;;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\nimport { parse } from '@idooel/expression'\r\nimport { type } from '@idooel/shared'\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 innerFooterElements: []\r\n }\r\n },\r\n computed: {\r\n routeMetaDisabled () {\r\n return this.executeMetaDisabledExpression(this.$route.meta.disabled)\r\n },\r\n expressionData () {\r\n return {\r\n current: this.current,\r\n _route: this.$route.query,\r\n _routeMeta: this.$route.meta\r\n }\r\n },\r\n currentSlotName () {\r\n return this.scopedSlotsNames[this.current]\r\n },\r\n footerElements () {\r\n return this.innerFooterElements\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.evalShowExpressionForFooterElements()\r\n this.$emit(ele.eventName || 'click', { ...e, exposed: this.exposedMethods })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.NEXT]: this[BUILT_IN_EVENT_NAMES.NEXT],\r\n [BUILT_IN_EVENT_NAMES.PREVIOUS]: this[BUILT_IN_EVENT_NAMES.PREVIOUS],\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT]\r\n }\r\n },\r\n activeIndex () {\r\n const { activeIndex } = this.stepMeta\r\n return activeIndex\r\n },\r\n elements () {\r\n const { elements } = this.stepMeta\r\n return elements\r\n },\r\n scopedSlotsNames () {\r\n const slotNames = this.elements.map(item => item.key)\r\n return slotNames\r\n },\r\n exposedMethods () {\r\n return {\r\n slotRef: this.currentSlotComponentRef,\r\n setCurrentStep: this.setCurrentStep,\r\n next: this.nextStep,\r\n prev: this.prevStep,\r\n current: this.current\r\n }\r\n }\r\n },\r\n watch: {\r\n activeIndex: {\r\n handler (idx) {\r\n this.current = idx\r\n },\r\n immediate: true\r\n },\r\n current: {\r\n handler () {\r\n this.$nextTick(() => {\r\n this.currentSlotComponentRef = this.getCurrentSlotComponentRef()\r\n })\r\n },\r\n immediate: true\r\n }\r\n },\r\n created () {\r\n const { elements } = this.footerMeta\r\n this.innerFooterElements = elements.call(this)\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n methods: {\r\n executeMetaDisabledExpression (expression) {\r\n if (type.isBool(expression)) return expression\r\n if (type.isEmpty(expression)) return false\r\n return parse(expression, { ...this.expressionData })\r\n },\r\n evalShowExpressionForFooterElements () {\r\n this.innerFooterElements = this.innerFooterElements.map(element => {\r\n const { show, key, eventName } = element\r\n if(key == BUILT_IN_EVENT_NAMES.SUBMIT || eventName == BUILT_IN_EVENT_NAMES.SUBMIT) {\r\n // built in submit button should according to the route meta disabled\r\n this.$set(element, '_show', !this.routeMetaDisabled)\r\n return element\r\n }\r\n show && this.$set(element, '_show', parse(show, this.expressionData))\r\n return element\r\n })\r\n },\r\n getCurrentSlotComponentRef () {\r\n const includeMetaCmp = this.$children.find(child => child.meta)\r\n if (!includeMetaCmp) return null\r\n const { $children: components } = includeMetaCmp\r\n const target = components.find(cmp => cmp.$options._componentTag === 'ele-tpl')\r\n return target.getModel ? target.getModel() : null\r\n },\r\n setCurrentStep (index) {\r\n this.current = index\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n nextStep () {\r\n if (this.current >= this.elements.length - 1) return\r\n this.current ++\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n prevStep () {\r\n if (this.current <= 0) return\r\n this.current --\r\n this.evalShowExpressionForFooterElements()\r\n },\r\n [BUILT_IN_EVENT_NAMES.NEXT] (props) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.NEXT, { ...props, exposed: { ...this.exposedMethods } })\r\n },\r\n [BUILT_IN_EVENT_NAMES.PREVIOUS] (props) {\r\n this.$emit(BUILT_IN_EVENT_NAMES.PREVIOUS, { ...props, exposed: { ...this.exposedMethods } })\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props) {\r\n const currentComponent = this.getCurrentSlotComponentRef() || {}\r\n const hasSubmitMethod = currentComponent.hasOwnProperty(BUILT_IN_EVENT_NAMES.SUBMIT)\r\n hasSubmitMethod && currentComponent[BUILT_IN_EVENT_NAMES.SUBMIT]()\r\n this.$emit(BUILT_IN_EVENT_NAMES.SUBMIT, { ...props, exposed: { ...this.exposedMethods } })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-step-model__wrapper {\r\n width: 100%;\r\n height: 100vh;\r\n position: relative;\r\n .ele-step-model__step--wrapper {\r\n width: 100%;\r\n height: 64px;\r\n padding: 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n background: #fff;\r\n .ele-steps {\r\n .ant-steps-item {\r\n text-align: left;\r\n }\r\n }\r\n }\r\n .ele-step-model__content--wrapper {\r\n width: 100%;\r\n width: 100%;\r\n margin-top: 16px;\r\n margin-bottom: 16px;\r\n height: calc(100vh - 64px - 64px - 16px - 16px);\r\n overflow: auto;\r\n }\r\n .ele-step-model__footer--wrapper {\r\n width: 100%;\r\n height: 64px;\r\n background: #fff;\r\n position: absolute;\r\n bottom: 0;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n justify-content: end;\r\n }\r\n}\r\n</style>import meta from '@/views/tree-table-page/meta'import meta from '@/views/tree-table-page/meta'\r\n\r\n",".ele-step-model__wrapper {\n width: 100%;\n height: 100vh;\n position: relative;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper {\n width: 100%;\n height: 64px;\n padding: 16px;\n display: flex;\n flex-direction: row;\n align-items: center;\n background: #fff;\n}\n.ele-step-model__wrapper .ele-step-model__step--wrapper .ele-steps .ant-steps-item {\n text-align: left;\n}\n.ele-step-model__wrapper .ele-step-model__content--wrapper {\n width: 100%;\n width: 100%;\n margin-top: 16px;\n margin-bottom: 16px;\n height: calc(100vh - 64px - 64px - 16px - 16px);\n overflow: auto;\n}\n.ele-step-model__wrapper .ele-step-model__footer--wrapper {\n width: 100%;\n height: 64px;\n background: #fff;\n position: absolute;\n bottom: 0;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5051
5156
|
|
|
5052
5157
|
};
|
|
5053
5158
|
/* scoped */
|
|
5054
|
-
const __vue_scope_id__$
|
|
5159
|
+
const __vue_scope_id__$9 = "data-v-417941c8";
|
|
5055
5160
|
/* module identifier */
|
|
5056
|
-
const __vue_module_identifier__$
|
|
5161
|
+
const __vue_module_identifier__$9 = undefined;
|
|
5057
5162
|
/* functional template */
|
|
5058
|
-
const __vue_is_functional_template__$
|
|
5163
|
+
const __vue_is_functional_template__$9 = false;
|
|
5059
5164
|
/* style inject SSR */
|
|
5060
5165
|
|
|
5061
5166
|
/* style inject shadow dom */
|
|
5062
5167
|
|
|
5063
5168
|
|
|
5064
5169
|
|
|
5065
|
-
const __vue_component__$
|
|
5066
|
-
{ render: __vue_render__$
|
|
5067
|
-
__vue_inject_styles__$
|
|
5068
|
-
__vue_script__$
|
|
5069
|
-
__vue_scope_id__$
|
|
5070
|
-
__vue_is_functional_template__$
|
|
5071
|
-
__vue_module_identifier__$
|
|
5170
|
+
const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
|
|
5171
|
+
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
|
|
5172
|
+
__vue_inject_styles__$9,
|
|
5173
|
+
__vue_script__$9,
|
|
5174
|
+
__vue_scope_id__$9,
|
|
5175
|
+
__vue_is_functional_template__$9,
|
|
5176
|
+
__vue_module_identifier__$9,
|
|
5072
5177
|
false,
|
|
5073
5178
|
createInjector,
|
|
5074
5179
|
undefined,
|
|
@@ -5076,7 +5181,7 @@ __vue_render__$7._withStripped = true;
|
|
|
5076
5181
|
);
|
|
5077
5182
|
|
|
5078
5183
|
//
|
|
5079
|
-
var script$
|
|
5184
|
+
var script$8 = {
|
|
5080
5185
|
name: 'ele-tpl',
|
|
5081
5186
|
props: {
|
|
5082
5187
|
modelName: {
|
|
@@ -5084,10 +5189,10 @@ var script$6 = {
|
|
|
5084
5189
|
}
|
|
5085
5190
|
},
|
|
5086
5191
|
components: {
|
|
5087
|
-
[__vue_component__$
|
|
5192
|
+
[__vue_component__$k.name]: __vue_component__$k,
|
|
5193
|
+
[__vue_component__$b.name]: __vue_component__$b,
|
|
5088
5194
|
[__vue_component__$9.name]: __vue_component__$9,
|
|
5089
|
-
[__vue_component__$
|
|
5090
|
-
[__vue_component__$8.name]: __vue_component__$8
|
|
5195
|
+
[__vue_component__$a.name]: __vue_component__$a
|
|
5091
5196
|
},
|
|
5092
5197
|
computed: {
|
|
5093
5198
|
modelNameValidator() {
|
|
@@ -5109,10 +5214,10 @@ var script$6 = {
|
|
|
5109
5214
|
};
|
|
5110
5215
|
|
|
5111
5216
|
/* script */
|
|
5112
|
-
const __vue_script__$
|
|
5217
|
+
const __vue_script__$8 = script$8;
|
|
5113
5218
|
|
|
5114
5219
|
/* template */
|
|
5115
|
-
var __vue_render__$
|
|
5220
|
+
var __vue_render__$8 = function () {
|
|
5116
5221
|
var _vm = this;
|
|
5117
5222
|
var _h = _vm.$createElement;
|
|
5118
5223
|
var _c = _vm._self._c || _h;
|
|
@@ -5150,43 +5255,43 @@ var __vue_render__$6 = function () {
|
|
|
5150
5255
|
domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
|
|
5151
5256
|
})
|
|
5152
5257
|
};
|
|
5153
|
-
var __vue_staticRenderFns__$
|
|
5154
|
-
__vue_render__$
|
|
5258
|
+
var __vue_staticRenderFns__$8 = [];
|
|
5259
|
+
__vue_render__$8._withStripped = true;
|
|
5155
5260
|
|
|
5156
5261
|
/* style */
|
|
5157
|
-
const __vue_inject_styles__$
|
|
5262
|
+
const __vue_inject_styles__$8 = function (inject) {
|
|
5158
5263
|
if (!inject) return
|
|
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;
|
|
5264
|
+
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.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5160
5265
|
|
|
5161
5266
|
};
|
|
5162
5267
|
/* scoped */
|
|
5163
|
-
const __vue_scope_id__$
|
|
5268
|
+
const __vue_scope_id__$8 = undefined;
|
|
5164
5269
|
/* module identifier */
|
|
5165
|
-
const __vue_module_identifier__$
|
|
5270
|
+
const __vue_module_identifier__$8 = undefined;
|
|
5166
5271
|
/* functional template */
|
|
5167
|
-
const __vue_is_functional_template__$
|
|
5272
|
+
const __vue_is_functional_template__$8 = false;
|
|
5168
5273
|
/* style inject SSR */
|
|
5169
5274
|
|
|
5170
5275
|
/* style inject shadow dom */
|
|
5171
5276
|
|
|
5172
5277
|
|
|
5173
5278
|
|
|
5174
|
-
const __vue_component__$
|
|
5175
|
-
{ render: __vue_render__$
|
|
5176
|
-
__vue_inject_styles__$
|
|
5177
|
-
__vue_script__$
|
|
5178
|
-
__vue_scope_id__$
|
|
5179
|
-
__vue_is_functional_template__$
|
|
5180
|
-
__vue_module_identifier__$
|
|
5279
|
+
const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
|
|
5280
|
+
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
|
|
5281
|
+
__vue_inject_styles__$8,
|
|
5282
|
+
__vue_script__$8,
|
|
5283
|
+
__vue_scope_id__$8,
|
|
5284
|
+
__vue_is_functional_template__$8,
|
|
5285
|
+
__vue_module_identifier__$8,
|
|
5181
5286
|
false,
|
|
5182
5287
|
createInjector,
|
|
5183
5288
|
undefined,
|
|
5184
5289
|
undefined
|
|
5185
5290
|
);
|
|
5186
5291
|
|
|
5187
|
-
__vue_component__$
|
|
5292
|
+
__vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
|
|
5188
5293
|
|
|
5189
|
-
__vue_component__$
|
|
5294
|
+
__vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
|
|
5190
5295
|
|
|
5191
5296
|
//
|
|
5192
5297
|
//
|
|
@@ -5200,7 +5305,7 @@ __vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __v
|
|
|
5200
5305
|
//
|
|
5201
5306
|
//
|
|
5202
5307
|
|
|
5203
|
-
var script$
|
|
5308
|
+
var script$7 = {
|
|
5204
5309
|
name: 'ele-alert',
|
|
5205
5310
|
props: {
|
|
5206
5311
|
type: {
|
|
@@ -5229,10 +5334,10 @@ var script$5 = {
|
|
|
5229
5334
|
};
|
|
5230
5335
|
|
|
5231
5336
|
/* script */
|
|
5232
|
-
const __vue_script__$
|
|
5337
|
+
const __vue_script__$7 = script$7;
|
|
5233
5338
|
|
|
5234
5339
|
/* template */
|
|
5235
|
-
var __vue_render__$
|
|
5340
|
+
var __vue_render__$7 = function () {
|
|
5236
5341
|
var _vm = this;
|
|
5237
5342
|
var _h = _vm.$createElement;
|
|
5238
5343
|
var _c = _vm._self._c || _h;
|
|
@@ -5248,49 +5353,49 @@ var __vue_render__$5 = function () {
|
|
|
5248
5353
|
},
|
|
5249
5354
|
})
|
|
5250
5355
|
};
|
|
5251
|
-
var __vue_staticRenderFns__$
|
|
5252
|
-
__vue_render__$
|
|
5356
|
+
var __vue_staticRenderFns__$7 = [];
|
|
5357
|
+
__vue_render__$7._withStripped = true;
|
|
5253
5358
|
|
|
5254
5359
|
/* style */
|
|
5255
|
-
const __vue_inject_styles__$
|
|
5360
|
+
const __vue_inject_styles__$7 = function (inject) {
|
|
5256
5361
|
if (!inject) return
|
|
5257
5362
|
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 });
|
|
5258
5363
|
|
|
5259
5364
|
};
|
|
5260
5365
|
/* scoped */
|
|
5261
|
-
const __vue_scope_id__$
|
|
5366
|
+
const __vue_scope_id__$7 = "data-v-5f94c62c";
|
|
5262
5367
|
/* module identifier */
|
|
5263
|
-
const __vue_module_identifier__$
|
|
5368
|
+
const __vue_module_identifier__$7 = undefined;
|
|
5264
5369
|
/* functional template */
|
|
5265
|
-
const __vue_is_functional_template__$
|
|
5370
|
+
const __vue_is_functional_template__$7 = false;
|
|
5266
5371
|
/* style inject SSR */
|
|
5267
5372
|
|
|
5268
5373
|
/* style inject shadow dom */
|
|
5269
5374
|
|
|
5270
5375
|
|
|
5271
5376
|
|
|
5272
|
-
const __vue_component__$
|
|
5273
|
-
{ render: __vue_render__$
|
|
5274
|
-
__vue_inject_styles__$
|
|
5275
|
-
__vue_script__$
|
|
5276
|
-
__vue_scope_id__$
|
|
5277
|
-
__vue_is_functional_template__$
|
|
5278
|
-
__vue_module_identifier__$
|
|
5279
|
-
false,
|
|
5280
|
-
createInjector,
|
|
5281
|
-
undefined,
|
|
5282
|
-
undefined
|
|
5377
|
+
const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
|
|
5378
|
+
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
|
|
5379
|
+
__vue_inject_styles__$7,
|
|
5380
|
+
__vue_script__$7,
|
|
5381
|
+
__vue_scope_id__$7,
|
|
5382
|
+
__vue_is_functional_template__$7,
|
|
5383
|
+
__vue_module_identifier__$7,
|
|
5384
|
+
false,
|
|
5385
|
+
createInjector,
|
|
5386
|
+
undefined,
|
|
5387
|
+
undefined
|
|
5283
5388
|
);
|
|
5284
5389
|
|
|
5285
|
-
__vue_component__$
|
|
5286
|
-
|
|
5287
|
-
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
5390
|
+
__vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
|
|
5288
5391
|
|
|
5289
|
-
__vue_component__$
|
|
5392
|
+
__vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
|
|
5290
5393
|
|
|
5291
5394
|
__vue_component__$g.install = Vue => Vue.component(__vue_component__$g.name, __vue_component__$g);
|
|
5292
5395
|
|
|
5293
|
-
__vue_component__$
|
|
5396
|
+
__vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
|
|
5397
|
+
|
|
5398
|
+
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
5294
5399
|
|
|
5295
5400
|
//
|
|
5296
5401
|
//
|
|
@@ -5324,7 +5429,7 @@ __vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __v
|
|
|
5324
5429
|
//
|
|
5325
5430
|
//
|
|
5326
5431
|
|
|
5327
|
-
var script$
|
|
5432
|
+
var script$6 = {
|
|
5328
5433
|
name: 'ele-modal',
|
|
5329
5434
|
props: {
|
|
5330
5435
|
value: {
|
|
@@ -5376,6 +5481,11 @@ var script$4 = {
|
|
|
5376
5481
|
buttonGroupMeta: {
|
|
5377
5482
|
type: Object,
|
|
5378
5483
|
default: () => ({})
|
|
5484
|
+
},
|
|
5485
|
+
// 是否展示组件默认底部按钮
|
|
5486
|
+
showDefaultFooter: {
|
|
5487
|
+
type: Boolean,
|
|
5488
|
+
default: false
|
|
5379
5489
|
}
|
|
5380
5490
|
},
|
|
5381
5491
|
watch: {
|
|
@@ -5435,10 +5545,10 @@ var script$4 = {
|
|
|
5435
5545
|
};
|
|
5436
5546
|
|
|
5437
5547
|
/* script */
|
|
5438
|
-
const __vue_script__$
|
|
5548
|
+
const __vue_script__$6 = script$6;
|
|
5439
5549
|
|
|
5440
5550
|
/* template */
|
|
5441
|
-
var __vue_render__$
|
|
5551
|
+
var __vue_render__$6 = function () {
|
|
5442
5552
|
var _vm = this;
|
|
5443
5553
|
var _h = _vm.$createElement;
|
|
5444
5554
|
var _c = _vm._self._c || _h;
|
|
@@ -5469,41 +5579,43 @@ var __vue_render__$4 = function () {
|
|
|
5469
5579
|
[
|
|
5470
5580
|
_vm._t("default"),
|
|
5471
5581
|
_vm._v(" "),
|
|
5472
|
-
|
|
5473
|
-
_c(
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5582
|
+
!_vm.showDefaultFooter
|
|
5583
|
+
? _c("template", { slot: "footer" }, [
|
|
5584
|
+
_c(
|
|
5585
|
+
"div",
|
|
5586
|
+
{ staticClass: "ele-modal__footer" },
|
|
5587
|
+
_vm._l(_vm.buttonGroupMeta.elements, function (btn) {
|
|
5588
|
+
return _c(
|
|
5589
|
+
"ele-button",
|
|
5590
|
+
_vm._g(
|
|
5591
|
+
{
|
|
5592
|
+
key: btn.key,
|
|
5593
|
+
attrs: { type: btn.type, "event-name": btn.eventName },
|
|
5594
|
+
},
|
|
5595
|
+
_vm.$listeners
|
|
5596
|
+
),
|
|
5597
|
+
[_vm._v("\n " + _vm._s(btn.label) + "\n ")]
|
|
5598
|
+
)
|
|
5599
|
+
}),
|
|
5600
|
+
1
|
|
5601
|
+
),
|
|
5602
|
+
])
|
|
5603
|
+
: _vm._e(),
|
|
5492
5604
|
],
|
|
5493
5605
|
2
|
|
5494
5606
|
)
|
|
5495
5607
|
};
|
|
5496
|
-
var __vue_staticRenderFns__$
|
|
5497
|
-
__vue_render__$
|
|
5608
|
+
var __vue_staticRenderFns__$6 = [];
|
|
5609
|
+
__vue_render__$6._withStripped = true;
|
|
5498
5610
|
|
|
5499
5611
|
/* style */
|
|
5500
|
-
const __vue_inject_styles__$
|
|
5612
|
+
const __vue_inject_styles__$6 = undefined;
|
|
5501
5613
|
/* scoped */
|
|
5502
|
-
const __vue_scope_id__$
|
|
5614
|
+
const __vue_scope_id__$6 = undefined;
|
|
5503
5615
|
/* module identifier */
|
|
5504
|
-
const __vue_module_identifier__$
|
|
5616
|
+
const __vue_module_identifier__$6 = undefined;
|
|
5505
5617
|
/* functional template */
|
|
5506
|
-
const __vue_is_functional_template__$
|
|
5618
|
+
const __vue_is_functional_template__$6 = false;
|
|
5507
5619
|
/* style inject */
|
|
5508
5620
|
|
|
5509
5621
|
/* style inject SSR */
|
|
@@ -5512,30 +5624,30 @@ __vue_render__$4._withStripped = true;
|
|
|
5512
5624
|
|
|
5513
5625
|
|
|
5514
5626
|
|
|
5515
|
-
const __vue_component__$
|
|
5516
|
-
{ render: __vue_render__$
|
|
5517
|
-
__vue_inject_styles__$
|
|
5518
|
-
__vue_script__$
|
|
5519
|
-
__vue_scope_id__$
|
|
5520
|
-
__vue_is_functional_template__$
|
|
5521
|
-
__vue_module_identifier__$
|
|
5627
|
+
const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
|
|
5628
|
+
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
|
|
5629
|
+
__vue_inject_styles__$6,
|
|
5630
|
+
__vue_script__$6,
|
|
5631
|
+
__vue_scope_id__$6,
|
|
5632
|
+
__vue_is_functional_template__$6,
|
|
5633
|
+
__vue_module_identifier__$6,
|
|
5522
5634
|
false,
|
|
5523
5635
|
undefined,
|
|
5524
5636
|
undefined,
|
|
5525
5637
|
undefined
|
|
5526
5638
|
);
|
|
5527
5639
|
|
|
5528
|
-
__vue_component__$
|
|
5640
|
+
__vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
|
|
5529
5641
|
|
|
5530
|
-
__vue_component__$
|
|
5642
|
+
__vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
|
|
5531
5643
|
|
|
5532
|
-
__vue_component__$
|
|
5644
|
+
__vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
|
|
5533
5645
|
|
|
5534
5646
|
//
|
|
5535
|
-
var script$
|
|
5647
|
+
var script$5 = {
|
|
5536
5648
|
name: 'ele-batch-export',
|
|
5537
5649
|
components: {
|
|
5538
|
-
EleIcon: __vue_component__$
|
|
5650
|
+
EleIcon: __vue_component__$i
|
|
5539
5651
|
},
|
|
5540
5652
|
props: {
|
|
5541
5653
|
value: {
|
|
@@ -5579,10 +5691,10 @@ var script$3 = {
|
|
|
5579
5691
|
};
|
|
5580
5692
|
|
|
5581
5693
|
/* script */
|
|
5582
|
-
const __vue_script__$
|
|
5694
|
+
const __vue_script__$5 = script$5;
|
|
5583
5695
|
|
|
5584
5696
|
/* template */
|
|
5585
|
-
var __vue_render__$
|
|
5697
|
+
var __vue_render__$5 = function () {
|
|
5586
5698
|
var _vm = this;
|
|
5587
5699
|
var _h = _vm.$createElement;
|
|
5588
5700
|
var _c = _vm._self._c || _h;
|
|
@@ -5641,41 +5753,42 @@ var __vue_render__$3 = function () {
|
|
|
5641
5753
|
]
|
|
5642
5754
|
)
|
|
5643
5755
|
};
|
|
5644
|
-
var __vue_staticRenderFns__$
|
|
5645
|
-
__vue_render__$
|
|
5756
|
+
var __vue_staticRenderFns__$5 = [];
|
|
5757
|
+
__vue_render__$5._withStripped = true;
|
|
5646
5758
|
|
|
5647
5759
|
/* style */
|
|
5648
|
-
const __vue_inject_styles__$
|
|
5760
|
+
const __vue_inject_styles__$5 = function (inject) {
|
|
5649
5761
|
if (!inject) return
|
|
5650
|
-
inject("data-v-
|
|
5762
|
+
inject("data-v-00d0f6b2_0", { source: ".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n.margin-t-8 {\n margin-top: 8px;\n}\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":"AAAA;EACE,qBAAqB;AACvB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AACA;EACE,cAAc;AAChB;AAEA;EACE,eAAe;AACjB;AAEA;EACE,+BAA+B;EAC/B,sCAAsC;EACtC,sCAAsC;EACtC,sCAAsC;EACtC,uCAAuC;EACvC,wBAAwB;EACxB,8BAA8B;EAC9B,+BAA+B;EAC/B,qCAAqC;EACrC,qDAAqD;EACrD,kDAAkD;EAClD,gDAAgD;EAChD,gCAAgC;EAChC,uCAAuC;EACvC,yBAAyB;EACzB,yBAAyB;EACzB,oCAAoC;AACtC;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .ele-upload__inner {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .ele-upload__inner .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n.margin-t-8 {\n margin-top: 8px;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n --idooel-link-06: #1890FF;\n --idooel-link-03: #91D5FF;\n --idooel-img-crop-err-color: #FFA39E;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined })
|
|
5763
|
+
,inject("data-v-00d0f6b2_1", { source: ".ele-batch-export__content[data-v-00d0f6b2] {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container[data-v-00d0f6b2] {\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-00d0f6b2] {\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-00d0f6b2] {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn[data-v-00d0f6b2] {\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-00d0f6b2] {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message[data-v-00d0f6b2] {\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":"AA2EA;EACA,aAAA;AC1EA;AD2EA;EACA,iBAAA;EACA,oBAAA;EACA,YAAA;EACA,mCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,eAAA;ACzEA;AD0EA;EACA,eAAA;EACA,4BAAA;ACxEA;AD0EA;EACA,iBAAA;ACxEA;ADyEA;EACA,4BAAA;EACA,eAAA;EACA,eAAA;ACvEA;ADyEA;EACA,4BAAA;EACA,eAAA;ACvEA;AD2EA;EACA,4BAAA;EACA,eAAA;ACzEA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\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<style lang=\"scss\">\r\n@import '../../theme/index.scss';\r\n</style>\r\n<style lang=\"scss\" scoped>\r\n.ele-batch-export__content {\r\n height: 106px;\r\n .ele-batch-export__container {\r\n border-width: 1px;\r\n border-style: dashed;\r\n height: 80px;\r\n border-color: var(--idooel-link-06);\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: 0 16px;\r\n .ele-batch-export__icon {\r\n font-size: 48px;\r\n color: var(--idooel-link-06);\r\n }\r\n .ele-batch-export__handle {\r\n margin-left: 16px;\r\n .ele-batch-export__btn {\r\n color: var(--idooel-link-06);\r\n font-size: 16px;\r\n cursor: pointer;\r\n }\r\n .ele-batch-export__btn--hint {\r\n color: var(--idooel-link-03);\r\n font-size: 14px;\r\n }\r\n }\r\n }\r\n .ele-batch-export__message {\r\n color: var(--idooel-link-06);\r\n font-size: 14px;\r\n }\r\n}\r\n</style>",".ele-batch-export__content {\n height: 106px;\n}\n.ele-batch-export__content .ele-batch-export__container {\n border-width: 1px;\n border-style: dashed;\n height: 80px;\n border-color: var(--idooel-link-06);\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: 0 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle {\n margin-left: 16px;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn {\n color: var(--idooel-link-06);\n font-size: 16px;\n cursor: pointer;\n}\n.ele-batch-export__content .ele-batch-export__container .ele-batch-export__handle .ele-batch-export__btn--hint {\n color: var(--idooel-link-03);\n font-size: 14px;\n}\n.ele-batch-export__content .ele-batch-export__message {\n color: var(--idooel-link-06);\n font-size: 14px;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5651
5764
|
|
|
5652
5765
|
};
|
|
5653
5766
|
/* scoped */
|
|
5654
|
-
const __vue_scope_id__$
|
|
5767
|
+
const __vue_scope_id__$5 = "data-v-00d0f6b2";
|
|
5655
5768
|
/* module identifier */
|
|
5656
|
-
const __vue_module_identifier__$
|
|
5769
|
+
const __vue_module_identifier__$5 = undefined;
|
|
5657
5770
|
/* functional template */
|
|
5658
|
-
const __vue_is_functional_template__$
|
|
5771
|
+
const __vue_is_functional_template__$5 = false;
|
|
5659
5772
|
/* style inject SSR */
|
|
5660
5773
|
|
|
5661
5774
|
/* style inject shadow dom */
|
|
5662
5775
|
|
|
5663
5776
|
|
|
5664
5777
|
|
|
5665
|
-
const __vue_component__$
|
|
5666
|
-
{ render: __vue_render__$
|
|
5667
|
-
__vue_inject_styles__$
|
|
5668
|
-
__vue_script__$
|
|
5669
|
-
__vue_scope_id__$
|
|
5670
|
-
__vue_is_functional_template__$
|
|
5671
|
-
__vue_module_identifier__$
|
|
5778
|
+
const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
|
|
5779
|
+
{ render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
|
|
5780
|
+
__vue_inject_styles__$5,
|
|
5781
|
+
__vue_script__$5,
|
|
5782
|
+
__vue_scope_id__$5,
|
|
5783
|
+
__vue_is_functional_template__$5,
|
|
5784
|
+
__vue_module_identifier__$5,
|
|
5672
5785
|
false,
|
|
5673
5786
|
createInjector,
|
|
5674
5787
|
undefined,
|
|
5675
5788
|
undefined
|
|
5676
5789
|
);
|
|
5677
5790
|
|
|
5678
|
-
__vue_component__$
|
|
5791
|
+
__vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
|
|
5679
5792
|
|
|
5680
5793
|
//
|
|
5681
5794
|
//
|
|
@@ -5689,7 +5802,7 @@ __vue_component__$3.install = Vue => Vue.component(__vue_component__$3.name, __v
|
|
|
5689
5802
|
//
|
|
5690
5803
|
//
|
|
5691
5804
|
|
|
5692
|
-
var script$
|
|
5805
|
+
var script$4 = {
|
|
5693
5806
|
name: 'ele-date-range',
|
|
5694
5807
|
model: {
|
|
5695
5808
|
prop: 'value',
|
|
@@ -5720,10 +5833,10 @@ var script$2 = {
|
|
|
5720
5833
|
};
|
|
5721
5834
|
|
|
5722
5835
|
/* script */
|
|
5723
|
-
const __vue_script__$
|
|
5836
|
+
const __vue_script__$4 = script$4;
|
|
5724
5837
|
|
|
5725
5838
|
/* template */
|
|
5726
|
-
var __vue_render__$
|
|
5839
|
+
var __vue_render__$4 = function () {
|
|
5727
5840
|
var _vm = this;
|
|
5728
5841
|
var _h = _vm.$createElement;
|
|
5729
5842
|
var _c = _vm._self._c || _h;
|
|
@@ -5738,52 +5851,52 @@ var __vue_render__$2 = function () {
|
|
|
5738
5851
|
on: { change: _vm.onChange },
|
|
5739
5852
|
})
|
|
5740
5853
|
};
|
|
5741
|
-
var __vue_staticRenderFns__$
|
|
5742
|
-
__vue_render__$
|
|
5854
|
+
var __vue_staticRenderFns__$4 = [];
|
|
5855
|
+
__vue_render__$4._withStripped = true;
|
|
5743
5856
|
|
|
5744
5857
|
/* style */
|
|
5745
|
-
const __vue_inject_styles__$
|
|
5858
|
+
const __vue_inject_styles__$4 = function (inject) {
|
|
5746
5859
|
if (!inject) return
|
|
5747
5860
|
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 });
|
|
5748
5861
|
|
|
5749
5862
|
};
|
|
5750
5863
|
/* scoped */
|
|
5751
|
-
const __vue_scope_id__$
|
|
5864
|
+
const __vue_scope_id__$4 = "data-v-547e029c";
|
|
5752
5865
|
/* module identifier */
|
|
5753
|
-
const __vue_module_identifier__$
|
|
5866
|
+
const __vue_module_identifier__$4 = undefined;
|
|
5754
5867
|
/* functional template */
|
|
5755
|
-
const __vue_is_functional_template__$
|
|
5868
|
+
const __vue_is_functional_template__$4 = false;
|
|
5756
5869
|
/* style inject SSR */
|
|
5757
5870
|
|
|
5758
5871
|
/* style inject shadow dom */
|
|
5759
5872
|
|
|
5760
5873
|
|
|
5761
5874
|
|
|
5762
|
-
const __vue_component__$
|
|
5763
|
-
{ render: __vue_render__$
|
|
5764
|
-
__vue_inject_styles__$
|
|
5765
|
-
__vue_script__$
|
|
5766
|
-
__vue_scope_id__$
|
|
5767
|
-
__vue_is_functional_template__$
|
|
5768
|
-
__vue_module_identifier__$
|
|
5875
|
+
const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
|
|
5876
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
5877
|
+
__vue_inject_styles__$4,
|
|
5878
|
+
__vue_script__$4,
|
|
5879
|
+
__vue_scope_id__$4,
|
|
5880
|
+
__vue_is_functional_template__$4,
|
|
5881
|
+
__vue_module_identifier__$4,
|
|
5769
5882
|
false,
|
|
5770
5883
|
createInjector,
|
|
5771
5884
|
undefined,
|
|
5772
5885
|
undefined
|
|
5773
5886
|
);
|
|
5774
5887
|
|
|
5775
|
-
__vue_component__$
|
|
5888
|
+
__vue_component__$4.install = Vue => Vue.component(__vue_component__$4.name, __vue_component__$4);
|
|
5776
5889
|
|
|
5777
|
-
__vue_component__$
|
|
5890
|
+
__vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
|
|
5778
5891
|
|
|
5779
|
-
__vue_component__$
|
|
5892
|
+
__vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
|
|
5780
5893
|
|
|
5781
5894
|
//
|
|
5782
5895
|
//
|
|
5783
5896
|
//
|
|
5784
5897
|
//
|
|
5785
5898
|
|
|
5786
|
-
var script$
|
|
5899
|
+
var script$3 = {
|
|
5787
5900
|
name: 'ele-modal-import',
|
|
5788
5901
|
model: {
|
|
5789
5902
|
prop: 'value',
|
|
@@ -5803,10 +5916,10 @@ var script$1 = {
|
|
|
5803
5916
|
};
|
|
5804
5917
|
|
|
5805
5918
|
/* script */
|
|
5806
|
-
const __vue_script__$
|
|
5919
|
+
const __vue_script__$3 = script$3;
|
|
5807
5920
|
|
|
5808
5921
|
/* template */
|
|
5809
|
-
var __vue_render__$
|
|
5922
|
+
var __vue_render__$3 = function () {
|
|
5810
5923
|
var _vm = this;
|
|
5811
5924
|
var _h = _vm.$createElement;
|
|
5812
5925
|
var _c = _vm._self._c || _h;
|
|
@@ -5820,49 +5933,49 @@ var __vue_render__$1 = function () {
|
|
|
5820
5933
|
},
|
|
5821
5934
|
})
|
|
5822
5935
|
};
|
|
5823
|
-
var __vue_staticRenderFns__$
|
|
5824
|
-
__vue_render__$
|
|
5936
|
+
var __vue_staticRenderFns__$3 = [];
|
|
5937
|
+
__vue_render__$3._withStripped = true;
|
|
5825
5938
|
|
|
5826
5939
|
/* style */
|
|
5827
|
-
const __vue_inject_styles__$
|
|
5940
|
+
const __vue_inject_styles__$3 = function (inject) {
|
|
5828
5941
|
if (!inject) return
|
|
5829
5942
|
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
5943
|
|
|
5831
5944
|
};
|
|
5832
5945
|
/* scoped */
|
|
5833
|
-
const __vue_scope_id__$
|
|
5946
|
+
const __vue_scope_id__$3 = "data-v-68861ff4";
|
|
5834
5947
|
/* module identifier */
|
|
5835
|
-
const __vue_module_identifier__$
|
|
5948
|
+
const __vue_module_identifier__$3 = undefined;
|
|
5836
5949
|
/* functional template */
|
|
5837
|
-
const __vue_is_functional_template__$
|
|
5950
|
+
const __vue_is_functional_template__$3 = false;
|
|
5838
5951
|
/* style inject SSR */
|
|
5839
5952
|
|
|
5840
5953
|
/* style inject shadow dom */
|
|
5841
5954
|
|
|
5842
5955
|
|
|
5843
5956
|
|
|
5844
|
-
const __vue_component__$
|
|
5845
|
-
{ render: __vue_render__$
|
|
5846
|
-
__vue_inject_styles__$
|
|
5847
|
-
__vue_script__$
|
|
5848
|
-
__vue_scope_id__$
|
|
5849
|
-
__vue_is_functional_template__$
|
|
5850
|
-
__vue_module_identifier__$
|
|
5957
|
+
const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
|
|
5958
|
+
{ render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
|
|
5959
|
+
__vue_inject_styles__$3,
|
|
5960
|
+
__vue_script__$3,
|
|
5961
|
+
__vue_scope_id__$3,
|
|
5962
|
+
__vue_is_functional_template__$3,
|
|
5963
|
+
__vue_module_identifier__$3,
|
|
5851
5964
|
false,
|
|
5852
5965
|
createInjector,
|
|
5853
5966
|
undefined,
|
|
5854
5967
|
undefined
|
|
5855
5968
|
);
|
|
5856
5969
|
|
|
5857
|
-
__vue_component__$
|
|
5970
|
+
__vue_component__$3.install = Vue => Vue.component(__vue_component__$3.name, __vue_component__$3);
|
|
5858
5971
|
|
|
5859
|
-
__vue_component__$
|
|
5972
|
+
__vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
|
|
5860
5973
|
|
|
5861
|
-
__vue_component__$
|
|
5974
|
+
__vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __vue_component__$a);
|
|
5862
5975
|
|
|
5863
|
-
__vue_component__$
|
|
5976
|
+
__vue_component__$b.install = Vue => Vue.component(__vue_component__$b.name, __vue_component__$b);
|
|
5864
5977
|
|
|
5865
|
-
__vue_component__$
|
|
5978
|
+
__vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __vue_component__$9);
|
|
5866
5979
|
|
|
5867
5980
|
//
|
|
5868
5981
|
//
|
|
@@ -5879,9 +5992,13 @@ __vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __v
|
|
|
5879
5992
|
//
|
|
5880
5993
|
//
|
|
5881
5994
|
|
|
5882
|
-
var script = {
|
|
5995
|
+
var script$2 = {
|
|
5883
5996
|
name: 'ele-tabs',
|
|
5884
5997
|
components: {},
|
|
5998
|
+
model: {
|
|
5999
|
+
prop: 'value',
|
|
6000
|
+
event: 'change'
|
|
6001
|
+
},
|
|
5885
6002
|
props: {
|
|
5886
6003
|
activeKey: {
|
|
5887
6004
|
type: Number,
|
|
@@ -5911,10 +6028,10 @@ var script = {
|
|
|
5911
6028
|
};
|
|
5912
6029
|
|
|
5913
6030
|
/* script */
|
|
5914
|
-
const __vue_script__ = script;
|
|
6031
|
+
const __vue_script__$2 = script$2;
|
|
5915
6032
|
|
|
5916
6033
|
/* template */
|
|
5917
|
-
var __vue_render__ = function () {
|
|
6034
|
+
var __vue_render__$2 = function () {
|
|
5918
6035
|
var _vm = this;
|
|
5919
6036
|
var _h = _vm.$createElement;
|
|
5920
6037
|
var _c = _vm._self._c || _h;
|
|
@@ -5924,7 +6041,6 @@ var __vue_render__ = function () {
|
|
|
5924
6041
|
_c(
|
|
5925
6042
|
"a-tabs",
|
|
5926
6043
|
{
|
|
5927
|
-
staticClass: "tabclass",
|
|
5928
6044
|
attrs: {
|
|
5929
6045
|
"default-active-key": _vm.activeKey,
|
|
5930
6046
|
tabBarGutter: _vm.tabBarGutter,
|
|
@@ -5966,17 +6082,341 @@ var __vue_render__ = function () {
|
|
|
5966
6082
|
1
|
|
5967
6083
|
)
|
|
5968
6084
|
};
|
|
6085
|
+
var __vue_staticRenderFns__$2 = [];
|
|
6086
|
+
__vue_render__$2._withStripped = true;
|
|
6087
|
+
|
|
6088
|
+
/* style */
|
|
6089
|
+
const __vue_inject_styles__$2 = function (inject) {
|
|
6090
|
+
if (!inject) return
|
|
6091
|
+
inject("data-v-20aeece4_0", { source: "[data-v-20aeece4] .ant-tabs-nav-scroll {\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":"AAoDA;EACA,sBAAA;ACnDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div>\r\n <a-tabs :default-active-key=\"activeKey\" :tabBarGutter=\"tabBarGutter\" :tabBarStyle=\"tabBarStyle\" @change=\"changeHandle\">\r\n <a-tab-pane v-for=\"(item, index) in tabsList\" :key=\"index\" :tab=\"item.tabName\" :disabled=\"item.disabled\">\r\n <template #tab>\r\n <component v-if=\"item.renderHeader\" :is=\"item.renderHeader\" ></component>\r\n <span v-else>{{ item.tabName }}</span>\r\n </template>\r\n <component :is=\"item.content\"></component>\r\n </a-tab-pane>\r\n </a-tabs>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'ele-tabs',\r\n components: {},\r\n model: {\r\n prop: 'value',\r\n event: 'change'\r\n },\r\n props: {\r\n activeKey: {\r\n type: Number,\r\n default: 0\r\n },\r\n tabsList: {\r\n type: Array,\r\n default () {\r\n return []\r\n }\r\n },\r\n tabBarStyle: {\r\n type: Object,\r\n default () {\r\n return {}\r\n }\r\n },\r\n tabBarGutter: {\r\n type: Number\r\n }\r\n },\r\n methods: {\r\n changeHandle (key) {\r\n this.$emit('changeActiveKey', key)\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .ant-tabs-nav-scroll {\r\n float: left !important;\r\n}\r\n</style>","::v-deep .ant-tabs-nav-scroll {\n float: left !important;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6092
|
+
|
|
6093
|
+
};
|
|
6094
|
+
/* scoped */
|
|
6095
|
+
const __vue_scope_id__$2 = "data-v-20aeece4";
|
|
6096
|
+
/* module identifier */
|
|
6097
|
+
const __vue_module_identifier__$2 = undefined;
|
|
6098
|
+
/* functional template */
|
|
6099
|
+
const __vue_is_functional_template__$2 = false;
|
|
6100
|
+
/* style inject SSR */
|
|
6101
|
+
|
|
6102
|
+
/* style inject shadow dom */
|
|
6103
|
+
|
|
6104
|
+
|
|
6105
|
+
|
|
6106
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
6107
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
6108
|
+
__vue_inject_styles__$2,
|
|
6109
|
+
__vue_script__$2,
|
|
6110
|
+
__vue_scope_id__$2,
|
|
6111
|
+
__vue_is_functional_template__$2,
|
|
6112
|
+
__vue_module_identifier__$2,
|
|
6113
|
+
false,
|
|
6114
|
+
createInjector,
|
|
6115
|
+
undefined,
|
|
6116
|
+
undefined
|
|
6117
|
+
);
|
|
6118
|
+
|
|
6119
|
+
__vue_component__$2.install = Vue => Vue.component(__vue_component__$2.name, __vue_component__$2);
|
|
6120
|
+
|
|
6121
|
+
//
|
|
6122
|
+
var script$1 = {
|
|
6123
|
+
name: 'ele-img-crop',
|
|
6124
|
+
components: {
|
|
6125
|
+
EleModal: __vue_component__$6,
|
|
6126
|
+
EleIcon: __vue_component__$i
|
|
6127
|
+
},
|
|
6128
|
+
model: {
|
|
6129
|
+
prop: 'value'
|
|
6130
|
+
},
|
|
6131
|
+
props: {
|
|
6132
|
+
maskClosable: {
|
|
6133
|
+
type: Boolean,
|
|
6134
|
+
default() {
|
|
6135
|
+
return false;
|
|
6136
|
+
}
|
|
6137
|
+
},
|
|
6138
|
+
size: {
|
|
6139
|
+
type: String,
|
|
6140
|
+
default() {
|
|
6141
|
+
return 'big';
|
|
6142
|
+
}
|
|
6143
|
+
},
|
|
6144
|
+
showTestModal: {
|
|
6145
|
+
type: Boolean,
|
|
6146
|
+
default() {
|
|
6147
|
+
return false;
|
|
6148
|
+
}
|
|
6149
|
+
}
|
|
6150
|
+
},
|
|
6151
|
+
data() {
|
|
6152
|
+
return {
|
|
6153
|
+
haveImg: false,
|
|
6154
|
+
imgtips: '照片名称',
|
|
6155
|
+
isFail: false,
|
|
6156
|
+
title: '图像裁剪',
|
|
6157
|
+
cancelText: '取消'
|
|
6158
|
+
};
|
|
6159
|
+
},
|
|
6160
|
+
methods: {
|
|
6161
|
+
openModal() {
|
|
6162
|
+
this.$refs[this.getEleModal].openModal();
|
|
6163
|
+
},
|
|
6164
|
+
handleChange(e) {
|
|
6165
|
+
let file = e.target.files ? e.target.files[0] : e.target;
|
|
6166
|
+
const allowedExtensions = ['png', 'jpeg', 'jpg'];
|
|
6167
|
+
// 获取文件后缀名
|
|
6168
|
+
const fileExtension = file.name.split('.').pop().toLowerCase();
|
|
6169
|
+
if (!allowedExtensions.includes(fileExtension)) {
|
|
6170
|
+
this.$Message.error('不支持该文件类型');
|
|
6171
|
+
return;
|
|
6172
|
+
}
|
|
6173
|
+
console.log((file.size / 1048576).toFixed(2));
|
|
6174
|
+
if ((file.size / 1048576).toFixed(2) > 1) {
|
|
6175
|
+
//大于1M,超大
|
|
6176
|
+
this.imgtips = '上传失败(网络传输等问题/文件格式不符/文件大小超出限制)';
|
|
6177
|
+
this.isFail = true;
|
|
6178
|
+
} else {
|
|
6179
|
+
this.imgtips = file.name;
|
|
6180
|
+
this.isFail = false;
|
|
6181
|
+
}
|
|
6182
|
+
this.haveImg = true;
|
|
6183
|
+
}
|
|
6184
|
+
},
|
|
6185
|
+
computed: {
|
|
6186
|
+
getEleModal() {
|
|
6187
|
+
return v4();
|
|
6188
|
+
}
|
|
6189
|
+
}
|
|
6190
|
+
};
|
|
6191
|
+
|
|
6192
|
+
/* script */
|
|
6193
|
+
const __vue_script__$1 = script$1;
|
|
6194
|
+
|
|
6195
|
+
/* template */
|
|
6196
|
+
var __vue_render__$1 = function () {
|
|
6197
|
+
var _vm = this;
|
|
6198
|
+
var _h = _vm.$createElement;
|
|
6199
|
+
var _c = _vm._self._c || _h;
|
|
6200
|
+
return _c(
|
|
6201
|
+
"div",
|
|
6202
|
+
[
|
|
6203
|
+
_c(
|
|
6204
|
+
"EleModal",
|
|
6205
|
+
{
|
|
6206
|
+
ref: _vm.getEleModal,
|
|
6207
|
+
attrs: {
|
|
6208
|
+
title: _vm.title,
|
|
6209
|
+
cancelText: _vm.cancelText,
|
|
6210
|
+
maskClosable: _vm.maskClosable,
|
|
6211
|
+
size: _vm.size,
|
|
6212
|
+
showDefaultFooter: true,
|
|
6213
|
+
},
|
|
6214
|
+
model: {
|
|
6215
|
+
value: _vm.showTestModal,
|
|
6216
|
+
callback: function ($$v) {
|
|
6217
|
+
_vm.showTestModal = $$v;
|
|
6218
|
+
},
|
|
6219
|
+
expression: "showTestModal",
|
|
6220
|
+
},
|
|
6221
|
+
},
|
|
6222
|
+
[
|
|
6223
|
+
_c("div", { staticClass: "ele-imgCrop__wrapper" }, [
|
|
6224
|
+
_c("div", { staticClass: "ele-imgCrop__left ele-imgCrop__item" }, [
|
|
6225
|
+
_c(
|
|
6226
|
+
"div",
|
|
6227
|
+
{ staticClass: "ele-imgCrop__noImg" },
|
|
6228
|
+
[
|
|
6229
|
+
_c("input", {
|
|
6230
|
+
ref: "input",
|
|
6231
|
+
staticClass: "ele-imgCrop__update",
|
|
6232
|
+
attrs: {
|
|
6233
|
+
type: "file",
|
|
6234
|
+
accept: "image/png, image/jpeg, image/jpg",
|
|
6235
|
+
id: "fileinput1",
|
|
6236
|
+
},
|
|
6237
|
+
on: { change: _vm.handleChange },
|
|
6238
|
+
}),
|
|
6239
|
+
_vm._v(" "),
|
|
6240
|
+
_c("ele-icon", {
|
|
6241
|
+
staticClass: "ele-imgCrop__icon",
|
|
6242
|
+
attrs: { type: "icon-InBox" },
|
|
6243
|
+
}),
|
|
6244
|
+
_vm._v(" "),
|
|
6245
|
+
_c(
|
|
6246
|
+
"span",
|
|
6247
|
+
{
|
|
6248
|
+
staticClass: "ele-imgCrop__font1",
|
|
6249
|
+
class: _vm.isFail ? "ele-imgCrop__error" : "",
|
|
6250
|
+
},
|
|
6251
|
+
[_vm._v("单击或拖动文件到该区域以上传")]
|
|
6252
|
+
),
|
|
6253
|
+
_vm._v(" "),
|
|
6254
|
+
_c(
|
|
6255
|
+
"span",
|
|
6256
|
+
{
|
|
6257
|
+
staticClass: "ele-imgCrop__font2",
|
|
6258
|
+
class: _vm.isFail ? "ele-imgCrop__error2" : "",
|
|
6259
|
+
},
|
|
6260
|
+
[_vm._v("文件小于100M")]
|
|
6261
|
+
),
|
|
6262
|
+
],
|
|
6263
|
+
1
|
|
6264
|
+
),
|
|
6265
|
+
_vm._v(" "),
|
|
6266
|
+
_c(
|
|
6267
|
+
"div",
|
|
6268
|
+
{ staticClass: "margin-t-8" },
|
|
6269
|
+
[
|
|
6270
|
+
_c(
|
|
6271
|
+
"span",
|
|
6272
|
+
{
|
|
6273
|
+
staticClass: "ele-imgCrop__font1 ele-imgCrop__tips",
|
|
6274
|
+
class: _vm.isFail ? "ele-imgCrop__error" : "",
|
|
6275
|
+
},
|
|
6276
|
+
[_vm._v(_vm._s(_vm.imgtips))]
|
|
6277
|
+
),
|
|
6278
|
+
_vm._v(" "),
|
|
6279
|
+
_c("a-icon", {
|
|
6280
|
+
staticStyle: { float: "right", "line-height": "24px" },
|
|
6281
|
+
attrs: { type: "close" },
|
|
6282
|
+
}),
|
|
6283
|
+
],
|
|
6284
|
+
1
|
|
6285
|
+
),
|
|
6286
|
+
]),
|
|
6287
|
+
_vm._v(" "),
|
|
6288
|
+
_c("div", { staticClass: "ele-imgCrop__right ele-imgCrop__item" }, [
|
|
6289
|
+
_c("span", { staticClass: "ele-imgCrop__font2" }, [
|
|
6290
|
+
_vm._v("左侧上传图片后可预览"),
|
|
6291
|
+
]),
|
|
6292
|
+
]),
|
|
6293
|
+
]),
|
|
6294
|
+
]
|
|
6295
|
+
),
|
|
6296
|
+
],
|
|
6297
|
+
1
|
|
6298
|
+
)
|
|
6299
|
+
};
|
|
6300
|
+
var __vue_staticRenderFns__$1 = [];
|
|
6301
|
+
__vue_render__$1._withStripped = true;
|
|
6302
|
+
|
|
6303
|
+
/* style */
|
|
6304
|
+
const __vue_inject_styles__$1 = function (inject) {
|
|
6305
|
+
if (!inject) return
|
|
6306
|
+
inject("data-v-12d28c57_0", { source: "[data-v-12d28c57] .ant-modal-body {\n padding: 16px;\n}\n[data-v-12d28c57] .ant-modal-header {\n padding: 16px;\n}\n.ele-imgCrop__wrapper[data-v-12d28c57] {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg[data-v-12d28c57] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1[data-v-12d28c57] {\n color: var(--idoole-black-008);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2[data-v-12d28c57] {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update[data-v-12d28c57] {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right[data-v-12d28c57] {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span[data-v-12d28c57] {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item[data-v-12d28c57] {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n.ele-imgCrop__tips[data-v-12d28c57] {\n float: left;\n width: 80%;\n}\n.ele-imgCrop__error[data-v-12d28c57] {\n color: var(--idooel-form-border-err-color) !important;\n}\n.ele-imgCrop__error2[data-v-12d28c57] {\n color: var(--idooel-img-crop-err-color) !important;\n}\n.ele-imgCrop__icon[data-v-12d28c57] {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\img-crop\\src\\index.vue","index.vue"],"names":[],"mappings":"AA4GA;EACA,aAAA;AC3GA;AD6GA;EACA,aAAA;AC1GA;AD4GA;EACA,aAAA;EACA,SAAA;EACA,uBAAA;EACA,mBAAA;ACzGA;AD2GA;EACA,aAAA;EACA,sBAAA;EACA,uBAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;ACzGA;AD0GA;EACA,8BAAA;EACA,eAAA;EACA,4BAAA;ACxGA;AD0GA;EACA,6BAAA;EACA,eAAA;EACA,iBAAA;ACxGA;AD2GA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,WAAA;EACA,YAAA;EACA,UAAA;EACA,eAAA;ACzGA;AD4GA;EACA,kBAAA;AC1GA;AD2GA;EACA,kBAAA;EACA,QAAA;EACA,SAAA;EACA,gCAAA;ACzGA;AD4GA;EACA,YAAA;EACA,aAAA;EACA,kBAAA;EACA,wDAAA;EACA,8CAAA;AC1GA;AD6GA;EACA,WAAA;EACA,UAAA;AC1GA;AD4GA;EACA,qDAAA;ACzGA;AD2GA;EACA,kDAAA;ACxGA;AD0GA;EACA,eAAA;EACA,4BAAA;ACvGA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div>\r\n <EleModal\r\n :ref=\"getEleModal\"\r\n :title=\"title\"\r\n :cancelText=\"cancelText\"\r\n :maskClosable=\"maskClosable\"\r\n :size=\"size\"\r\n v-model=\"showTestModal\"\r\n :showDefaultFooter=\"true\"\r\n >\r\n <div class=\"ele-imgCrop__wrapper\">\r\n <div class=\"ele-imgCrop__left ele-imgCrop__item\">\r\n <div class=\"ele-imgCrop__noImg\">\r\n <input @change=\"handleChange\" ref=\"input\" type=\"file\" accept=\"image/png, image/jpeg, image/jpg\" id=\"fileinput1\" class=\"ele-imgCrop__update\"/>\r\n <ele-icon type=\"icon-InBox\" class=\"ele-imgCrop__icon\"></ele-icon>\r\n <span class=\"ele-imgCrop__font1\" :class=\"isFail ? 'ele-imgCrop__error' : ''\">单击或拖动文件到该区域以上传</span>\r\n <span class=\"ele-imgCrop__font2\" :class=\"isFail ? 'ele-imgCrop__error2' : ''\">文件小于100M</span>\r\n </div>\r\n <div class=\"margin-t-8\">\r\n <span class=\"ele-imgCrop__font1 ele-imgCrop__tips\" :class=\"isFail? 'ele-imgCrop__error' : ''\">{{ imgtips }}</span>\r\n <a-icon type=\"close\" style=\"float: right; line-height: 24px;\"/>\r\n </div>\r\n </div>\r\n <div class=\"ele-imgCrop__right ele-imgCrop__item\">\r\n <span class=\"ele-imgCrop__font2\">左侧上传图片后可预览</span>\r\n </div>\r\n </div>\r\n </EleModal>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v4 as uuidv4 } from 'uuid'\r\nimport EleModal from '../../modal/src/index.vue'\r\nimport EleIcon from '../../icon/src/index.vue'\r\nexport default {\r\n name: 'ele-img-crop',\r\n components: {\r\n EleModal,\r\n EleIcon\r\n },\r\n model: {\r\n prop: 'value'\r\n },\r\n props: {\r\n maskClosable: {\r\n type: Boolean,\r\n default () {\r\n return false\r\n }\r\n },\r\n size: {\r\n type: String,\r\n default () {\r\n return 'big'\r\n }\r\n },\r\n showTestModal: {\r\n type: Boolean,\r\n default () {\r\n return false\r\n }\r\n }\r\n },\r\n data () {\r\n return {\r\n haveImg: false,\r\n imgtips: '照片名称',\r\n isFail: false,\r\n title: '图像裁剪',\r\n cancelText: '取消'\r\n }\r\n },\r\n methods: {\r\n openModal () {\r\n this.$refs[this.getEleModal].openModal()\r\n },\r\n handleChange (e) {\r\n let file = e.target.files ? e.target.files[0] : e.target\r\n const allowedExtensions = ['png', 'jpeg', 'jpg']\r\n // 获取文件后缀名\r\n const fileExtension = file.name.split('.').pop().toLowerCase()\r\n if (!allowedExtensions.includes(fileExtension)) {\r\n this.$Message.error('不支持该文件类型')\r\n return\r\n }\r\n console.log((file.size / 1048576).toFixed(2))\r\n if ((file.size / 1048576).toFixed(2) > 1) {\r\n //大于1M,超大\r\n this.imgtips = '上传失败(网络传输等问题/文件格式不符/文件大小超出限制)'\r\n this.isFail = true\r\n } else {\r\n this.imgtips = file.name\r\n this.isFail = false\r\n }\r\n this.haveImg = true\r\n }\r\n },\r\n computed: {\r\n getEleModal () {\r\n return uuidv4()\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n::v-deep .ant-modal-body {\r\n padding: 16px;\r\n}\r\n::v-deep .ant-modal-header {\r\n padding: 16px;\r\n}\r\n.ele-imgCrop__wrapper {\r\n display: flex;\r\n gap: 16px;\r\n justify-content: center;\r\n margin-bottom: 30px;\r\n .ele-imgCrop__left {\r\n .ele-imgCrop__noImg {\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n position: relative;\r\n .ele-imgCrop__font1 {\r\n color: var(--idoole-black-008);\r\n font-size: 16px;\r\n line-height: 24px !important;\r\n }\r\n .ele-imgCrop__font2 {\r\n color: var(--idoole-black-06);\r\n font-size: 14px;\r\n line-height: 22px; \r\n }\r\n }\r\n .ele-imgCrop__update {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n width: 100%;\r\n height: 100%;\r\n opacity: 0;\r\n cursor: pointer;\r\n }\r\n }\r\n .ele-imgCrop__right {\r\n position: relative;\r\n span {\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n }\r\n }\r\n .ele-imgCrop__item {\r\n width: 480px;\r\n height: 300px;\r\n border-radius: 2px;\r\n border: 1px dashed var(--idooel-form-title-border-color);\r\n background: var(--idooel-form-upload-bg-color);\r\n }\r\n}\r\n.ele-imgCrop__tips {\r\n float: left;\r\n width: 80%;\r\n}\r\n.ele-imgCrop__error {\r\n color: var(--idooel-form-border-err-color) !important;\r\n}\r\n.ele-imgCrop__error2 {\r\n color: var(--idooel-img-crop-err-color) !important;\r\n}\r\n.ele-imgCrop__icon {\r\n font-size: 48px;\r\n color: var(--idooel-link-06);\r\n}\r\n</style>","::v-deep .ant-modal-body {\n padding: 16px;\n}\n\n::v-deep .ant-modal-header {\n padding: 16px;\n}\n\n.ele-imgCrop__wrapper {\n display: flex;\n gap: 16px;\n justify-content: center;\n margin-bottom: 30px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font1 {\n color: var(--idoole-black-008);\n font-size: 16px;\n line-height: 24px !important;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__noImg .ele-imgCrop__font2 {\n color: var(--idoole-black-06);\n font-size: 14px;\n line-height: 22px;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__left .ele-imgCrop__update {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right {\n position: relative;\n}\n.ele-imgCrop__wrapper .ele-imgCrop__right span {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ele-imgCrop__wrapper .ele-imgCrop__item {\n width: 480px;\n height: 300px;\n border-radius: 2px;\n border: 1px dashed var(--idooel-form-title-border-color);\n background: var(--idooel-form-upload-bg-color);\n}\n\n.ele-imgCrop__tips {\n float: left;\n width: 80%;\n}\n\n.ele-imgCrop__error {\n color: var(--idooel-form-border-err-color) !important;\n}\n\n.ele-imgCrop__error2 {\n color: var(--idooel-img-crop-err-color) !important;\n}\n\n.ele-imgCrop__icon {\n font-size: 48px;\n color: var(--idooel-link-06);\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
6307
|
+
|
|
6308
|
+
};
|
|
6309
|
+
/* scoped */
|
|
6310
|
+
const __vue_scope_id__$1 = "data-v-12d28c57";
|
|
6311
|
+
/* module identifier */
|
|
6312
|
+
const __vue_module_identifier__$1 = undefined;
|
|
6313
|
+
/* functional template */
|
|
6314
|
+
const __vue_is_functional_template__$1 = false;
|
|
6315
|
+
/* style inject SSR */
|
|
6316
|
+
|
|
6317
|
+
/* style inject shadow dom */
|
|
6318
|
+
|
|
6319
|
+
|
|
6320
|
+
|
|
6321
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
6322
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
6323
|
+
__vue_inject_styles__$1,
|
|
6324
|
+
__vue_script__$1,
|
|
6325
|
+
__vue_scope_id__$1,
|
|
6326
|
+
__vue_is_functional_template__$1,
|
|
6327
|
+
__vue_module_identifier__$1,
|
|
6328
|
+
false,
|
|
6329
|
+
createInjector,
|
|
6330
|
+
undefined,
|
|
6331
|
+
undefined
|
|
6332
|
+
);
|
|
6333
|
+
|
|
6334
|
+
__vue_component__$1.install = Vue => Vue.component(__vue_component__$1.name, __vue_component__$1);
|
|
6335
|
+
|
|
6336
|
+
//
|
|
6337
|
+
var script = {
|
|
6338
|
+
name: 'ele-text-editor',
|
|
6339
|
+
props: {
|
|
6340
|
+
editorWidth: {
|
|
6341
|
+
type: String
|
|
6342
|
+
},
|
|
6343
|
+
editorHeight: {
|
|
6344
|
+
type: String
|
|
6345
|
+
},
|
|
6346
|
+
maxLength: {
|
|
6347
|
+
type: Number,
|
|
6348
|
+
default() {
|
|
6349
|
+
return 10;
|
|
6350
|
+
}
|
|
6351
|
+
}
|
|
6352
|
+
},
|
|
6353
|
+
data() {
|
|
6354
|
+
return {
|
|
6355
|
+
editorConfig: {},
|
|
6356
|
+
textEditorRef: null
|
|
6357
|
+
};
|
|
6358
|
+
},
|
|
6359
|
+
computed: {
|
|
6360
|
+
innerContent() {
|
|
6361
|
+
let content = this.textEditorRef ? this.textEditorRef.getContent() : '';
|
|
6362
|
+
if (this.textEditorRef && content.length > this.maxLength) {
|
|
6363
|
+
content = content.substring(0, this.maxLength);
|
|
6364
|
+
this.$nextTick(() => {
|
|
6365
|
+
this.textEditorRef.setContent(content);
|
|
6366
|
+
});
|
|
6367
|
+
}
|
|
6368
|
+
this.$emit('input', content);
|
|
6369
|
+
return content;
|
|
6370
|
+
},
|
|
6371
|
+
getVueditor() {
|
|
6372
|
+
return v4();
|
|
6373
|
+
}
|
|
6374
|
+
},
|
|
6375
|
+
watch: {},
|
|
6376
|
+
methods: {},
|
|
6377
|
+
mounted() {
|
|
6378
|
+
this.textEditorRef = this.$refs[this.getVueditor];
|
|
6379
|
+
}
|
|
6380
|
+
};
|
|
6381
|
+
|
|
6382
|
+
/* script */
|
|
6383
|
+
const __vue_script__ = script;
|
|
6384
|
+
|
|
6385
|
+
/* template */
|
|
6386
|
+
var __vue_render__ = function () {
|
|
6387
|
+
var _vm = this;
|
|
6388
|
+
var _h = _vm.$createElement;
|
|
6389
|
+
var _c = _vm._self._c || _h;
|
|
6390
|
+
return _c(
|
|
6391
|
+
"div",
|
|
6392
|
+
{
|
|
6393
|
+
staticClass: "ele-editor__wrapper",
|
|
6394
|
+
style: { width: _vm.editorWidth, height: _vm.editorHeight },
|
|
6395
|
+
},
|
|
6396
|
+
[
|
|
6397
|
+
_c("Vueditor", {
|
|
6398
|
+
ref: _vm.getVueditor,
|
|
6399
|
+
style: { width: _vm.editorWidth, height: _vm.editorHeight },
|
|
6400
|
+
}),
|
|
6401
|
+
_vm._v(" "),
|
|
6402
|
+
_c("div", { staticClass: "ele-editor__bottom" }, [
|
|
6403
|
+
_c("span", [_vm._v(_vm._s(_vm.innerContent.length) + "字")]),
|
|
6404
|
+
]),
|
|
6405
|
+
],
|
|
6406
|
+
1
|
|
6407
|
+
)
|
|
6408
|
+
};
|
|
5969
6409
|
var __vue_staticRenderFns__ = [];
|
|
5970
6410
|
__vue_render__._withStripped = true;
|
|
5971
6411
|
|
|
5972
6412
|
/* style */
|
|
5973
6413
|
const __vue_inject_styles__ = function (inject) {
|
|
5974
6414
|
if (!inject) return
|
|
5975
|
-
inject("data-v-
|
|
6415
|
+
inject("data-v-38da74e1_0", { source: ".ele-editor__bottom[data-v-38da74e1] {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n}\n.ele-editor__bottom span[data-v-38da74e1] {\n color: var(--idoole-black-008);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\text-editor\\src\\index.vue","index.vue"],"names":[],"mappings":"AA0DA;EACA,YAAA;EACA,yBAAA;EACA,uDAAA;EACA,eAAA;ACzDA;AD0DA;EACA,8BAAA;EACA,iBAAA;EACA,eAAA;EACA,iBAAA;EACA,WAAA;EACA,qBAAA;ACxDA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"ele-editor__wrapper\" :style=\"{width: editorWidth, height: editorHeight}\">\r\n <Vueditor :ref=\"getVueditor\" :style=\"{width: editorWidth, height: editorHeight}\"></Vueditor>\r\n <div class=\"ele-editor__bottom\">\r\n <span>{{ innerContent.length }}字</span>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { v4 as uuidv4 } from 'uuid'\r\nexport default {\r\n name: 'ele-text-editor',\r\n props: {\r\n editorWidth: {\r\n type: String\r\n },\r\n editorHeight: {\r\n type: String\r\n },\r\n maxLength: {\r\n type: Number,\r\n default () {\r\n return 10\r\n }\r\n }\r\n },\r\n data() {\r\n return {\r\n editorConfig: {},\r\n textEditorRef: null\r\n }\r\n },\r\n computed: {\r\n innerContent () {\r\n let content = this.textEditorRef ? this.textEditorRef.getContent() : ''\r\n if (this.textEditorRef && content.length > this.maxLength) {\r\n content = content.substring(0, this.maxLength)\r\n this.$nextTick(() => {\r\n this.textEditorRef.setContent(content)\r\n })\r\n }\r\n this.$emit('input', content)\r\n return content\r\n },\r\n getVueditor () {\r\n return uuidv4()\r\n }\r\n },\r\n watch: {},\r\n methods: {},\r\n mounted () {\r\n this.textEditorRef = this.$refs[this.getVueditor]\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.ele-editor__bottom {\r\n height: 40px;\r\n padding: 8px 20px 8px 8px;\r\n border: 1px solid var(--idooel-form-title-border-color);\r\n border-top: 0px;\r\n span {\r\n color: var(--idoole-black-008);\r\n text-align: right;\r\n font-size: 12px;\r\n line-height: 20px;\r\n width: 100%;\r\n display: inline-block;\r\n }\r\n}\r\n</style>",".ele-editor__bottom {\n height: 40px;\n padding: 8px 20px 8px 8px;\n border: 1px solid var(--idooel-form-title-border-color);\n border-top: 0px;\n}\n.ele-editor__bottom span {\n color: var(--idoole-black-008);\n text-align: right;\n font-size: 12px;\n line-height: 20px;\n width: 100%;\n display: inline-block;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
5976
6416
|
|
|
5977
6417
|
};
|
|
5978
6418
|
/* scoped */
|
|
5979
|
-
const __vue_scope_id__ =
|
|
6419
|
+
const __vue_scope_id__ = "data-v-38da74e1";
|
|
5980
6420
|
/* module identifier */
|
|
5981
6421
|
const __vue_module_identifier__ = undefined;
|
|
5982
6422
|
/* functional template */
|
|
@@ -6002,9 +6442,9 @@ __vue_render__._withStripped = true;
|
|
|
6002
6442
|
|
|
6003
6443
|
__vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
|
|
6004
6444
|
|
|
6005
|
-
const compositeComponents = [__vue_component__$
|
|
6006
|
-
const models = [__vue_component__$
|
|
6007
|
-
const components = [__vue_component__$
|
|
6445
|
+
const compositeComponents = [__vue_component__$l, __vue_component__$m, __vue_component__$3];
|
|
6446
|
+
const models = [__vue_component__$k, __vue_component__$a, __vue_component__$b, __vue_component__$9];
|
|
6447
|
+
const components = [__vue_component__$u, __vue_component__$t, __vue_component__$s, __vue_component__$r, __vue_component__$p, __vue_component__$o, __vue_component__$8, __vue_component__$c, __vue_component__$7, __vue_component__$h, __vue_component__$g, __vue_component__$i, __vue_component__$f, __vue_component__$6, __vue_component__$e, __vue_component__$d, __vue_component__$5, __vue_component__$4, ...compositeComponents, ...models, __vue_component__$2, __vue_component__$1, __vue_component__];
|
|
6008
6448
|
const install = Vue => {
|
|
6009
6449
|
if (install.installed) return;
|
|
6010
6450
|
install.installed = true;
|
|
@@ -6013,4 +6453,4 @@ const install = Vue => {
|
|
|
6013
6453
|
});
|
|
6014
6454
|
};
|
|
6015
6455
|
|
|
6016
|
-
export { __vue_component__$
|
|
6456
|
+
export { __vue_component__$u as EleButton, __vue_component__$t as EleDate, __vue_component__$1 as EleImgCrop, __vue_component__$s as EleInput, __vue_component__$6 as EleModal, __vue_component__$r as EleSelect, __vue_component__$p as EleTable, __vue_component__$2 as EleTabs, __vue_component__ as EleTextEditor, __vue_component__$8 as EleTpl, __vue_component__$o as EleTree, install as default, models };
|