@idooel/components 0.0.0 → 0.0.1-beta.2
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 +4551 -0
- package/dist/@idooel/components.umd.js +3305 -547
- package/package.json +45 -41
- package/packages/attachment/index.js +0 -0
- package/packages/attachment/src/index.vue +15 -0
- package/packages/batch-export/index.js +5 -0
- package/packages/batch-export/src/index.vue +15 -0
- package/packages/button/index.js +4 -4
- package/packages/button/src/index.vue +54 -24
- package/packages/checkbox/index.js +5 -0
- package/packages/checkbox/src/index.vue +44 -0
- package/packages/composite-components/button-group/index.js +4 -4
- package/packages/composite-components/button-group/src/index.vue +45 -46
- package/packages/composite-components/search-area/index.js +4 -4
- package/packages/composite-components/search-area/src/index.vue +206 -128
- package/packages/composite-components/search-area/src/label.vue +35 -35
- package/packages/date/index.js +4 -4
- package/packages/date/src/index.vue +39 -39
- package/packages/form/index.js +5 -0
- package/packages/form/src/index.vue +119 -0
- package/packages/form-model/index.js +5 -0
- package/packages/form-model/src/index.vue +139 -0
- package/packages/icon/index.js +5 -0
- package/packages/icon/src/index.vue +32 -0
- package/packages/index.js +73 -49
- package/packages/input/index.js +4 -4
- package/packages/input/src/index.vue +27 -23
- package/packages/input-number/index.js +5 -0
- package/packages/input-number/src/index.vue +24 -0
- package/packages/modal/index.js +5 -0
- package/packages/modal/src/index.vue +129 -0
- package/packages/radio/index.js +5 -0
- package/packages/radio/src/index.vue +48 -0
- package/packages/select/index.js +4 -4
- package/packages/select/src/index.vue +34 -34
- package/packages/select-entity/index.js +5 -0
- package/packages/select-entity/src/index.vue +114 -0
- package/packages/table/index.js +4 -4
- package/packages/table/src/action.vue +131 -44
- package/packages/table/src/index.vue +157 -88
- package/packages/text/index.js +5 -0
- package/packages/text/src/index.vue +15 -0
- package/packages/textarea/index.js +5 -0
- package/packages/textarea/src/index.vue +49 -0
- package/packages/theme/form.scss +24 -0
- package/packages/theme/index.scss +24 -0
- package/packages/theme/variables.scss +56 -0
- package/packages/tpl/index.js +4 -4
- package/packages/tpl/src/index.vue +50 -39
- package/packages/tree/index.js +4 -4
- package/packages/tree/src/TreeNode.vue +29 -29
- package/packages/tree/src/index.vue +101 -96
- package/packages/tree-table-model/index.js +4 -4
- package/packages/tree-table-model/src/index.vue +314 -289
- package/packages/upload/index.js +5 -0
- package/packages/upload/src/index.vue +351 -0
- package/packages/utils/index.js +4 -0
- package/scripts/rollup.config.js +35 -41
- package/scripts/rollup.esm.config.js +12 -0
- package/scripts/rollup.umd.config.js +14 -14
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('moment'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'moment', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.
|
|
5
|
-
})(this, (function (exports, moment,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@idooel/shared'), require('moment'), require('vue-upload-component')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@idooel/shared', 'moment', 'vue-upload-component'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.__ele__umd__components__ = {}, global.shared, global.moment, global.FileUpload));
|
|
5
|
+
})(this, (function (exports, shared, moment, FileUpload) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
9
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
10
|
+
var FileUpload__default = /*#__PURE__*/_interopDefaultLegacy(FileUpload);
|
|
10
11
|
|
|
12
|
+
//
|
|
13
|
+
//
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
//
|
|
21
|
+
//
|
|
22
|
+
//
|
|
11
23
|
//
|
|
12
24
|
//
|
|
13
25
|
//
|
|
@@ -15,9 +27,22 @@
|
|
|
15
27
|
//
|
|
16
28
|
//
|
|
17
29
|
|
|
18
|
-
var script$
|
|
30
|
+
var script$n = {
|
|
19
31
|
name: 'ele-button',
|
|
20
32
|
props: {
|
|
33
|
+
record: {
|
|
34
|
+
type: Object
|
|
35
|
+
},
|
|
36
|
+
eventName: {
|
|
37
|
+
type: String
|
|
38
|
+
},
|
|
39
|
+
mode: {
|
|
40
|
+
type: String
|
|
41
|
+
},
|
|
42
|
+
dataSource: {
|
|
43
|
+
type: Array,
|
|
44
|
+
default: () => []
|
|
45
|
+
},
|
|
21
46
|
type: {
|
|
22
47
|
type: String,
|
|
23
48
|
default: 'default'
|
|
@@ -27,8 +52,22 @@
|
|
|
27
52
|
}
|
|
28
53
|
},
|
|
29
54
|
methods: {
|
|
55
|
+
handleMenuClick(props) {
|
|
56
|
+
const {
|
|
57
|
+
key
|
|
58
|
+
} = props;
|
|
59
|
+
const currentClickTarget = this.dataSource.find(item => item.value === key);
|
|
60
|
+
const {
|
|
61
|
+
eventName
|
|
62
|
+
} = currentClickTarget;
|
|
63
|
+
eventName && this.$emit(eventName, {
|
|
64
|
+
...currentClickTarget
|
|
65
|
+
});
|
|
66
|
+
},
|
|
30
67
|
handleClick() {
|
|
31
|
-
this.$emit('click'
|
|
68
|
+
this.$emit(this.eventName || 'click', {
|
|
69
|
+
...this.record
|
|
70
|
+
});
|
|
32
71
|
}
|
|
33
72
|
}
|
|
34
73
|
};
|
|
@@ -106,34 +145,66 @@
|
|
|
106
145
|
}
|
|
107
146
|
|
|
108
147
|
/* script */
|
|
109
|
-
const __vue_script__$
|
|
148
|
+
const __vue_script__$n = script$n;
|
|
110
149
|
|
|
111
150
|
/* template */
|
|
112
|
-
var __vue_render__$
|
|
151
|
+
var __vue_render__$n = function () {
|
|
113
152
|
var _vm = this;
|
|
114
153
|
var _h = _vm.$createElement;
|
|
115
154
|
var _c = _vm._self._c || _h;
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
155
|
+
return _vm.mode == "dropdown"
|
|
156
|
+
? _c(
|
|
157
|
+
"a-dropdown",
|
|
158
|
+
[
|
|
159
|
+
_c(
|
|
160
|
+
"a-menu",
|
|
161
|
+
{
|
|
162
|
+
attrs: { slot: "overlay" },
|
|
163
|
+
on: { click: _vm.handleMenuClick },
|
|
164
|
+
slot: "overlay",
|
|
165
|
+
},
|
|
166
|
+
_vm._l(_vm.dataSource, function (opt) {
|
|
167
|
+
return _c("a-menu-item", { key: opt.value }, [
|
|
168
|
+
_vm._v("\n " + _vm._s(opt.label) + "\n "),
|
|
169
|
+
])
|
|
170
|
+
}),
|
|
171
|
+
1
|
|
172
|
+
),
|
|
173
|
+
_vm._v(" "),
|
|
174
|
+
_c(
|
|
175
|
+
"a-button",
|
|
176
|
+
{ attrs: { type: _vm.type } },
|
|
177
|
+
[
|
|
178
|
+
_vm._t("default"),
|
|
179
|
+
_vm._v(" "),
|
|
180
|
+
_c("a-icon", { attrs: { type: _vm.icon } }),
|
|
181
|
+
],
|
|
182
|
+
2
|
|
183
|
+
),
|
|
184
|
+
],
|
|
185
|
+
1
|
|
186
|
+
)
|
|
187
|
+
: _c(
|
|
188
|
+
"a-button",
|
|
189
|
+
{
|
|
190
|
+
attrs: { type: _vm.type, icon: _vm.icon },
|
|
191
|
+
on: { click: _vm.handleClick },
|
|
192
|
+
},
|
|
193
|
+
[_vm._t("default")],
|
|
194
|
+
2
|
|
195
|
+
)
|
|
125
196
|
};
|
|
126
|
-
var __vue_staticRenderFns__$
|
|
127
|
-
__vue_render__$
|
|
197
|
+
var __vue_staticRenderFns__$n = [];
|
|
198
|
+
__vue_render__$n._withStripped = true;
|
|
128
199
|
|
|
129
200
|
/* style */
|
|
130
|
-
const __vue_inject_styles__$
|
|
201
|
+
const __vue_inject_styles__$n = undefined;
|
|
131
202
|
/* scoped */
|
|
132
|
-
const __vue_scope_id__$
|
|
203
|
+
const __vue_scope_id__$n = undefined;
|
|
133
204
|
/* module identifier */
|
|
134
|
-
const __vue_module_identifier__$
|
|
205
|
+
const __vue_module_identifier__$n = undefined;
|
|
135
206
|
/* functional template */
|
|
136
|
-
const __vue_is_functional_template__$
|
|
207
|
+
const __vue_is_functional_template__$n = false;
|
|
137
208
|
/* style inject */
|
|
138
209
|
|
|
139
210
|
/* style inject SSR */
|
|
@@ -142,20 +213,20 @@
|
|
|
142
213
|
|
|
143
214
|
|
|
144
215
|
|
|
145
|
-
const __vue_component__$
|
|
146
|
-
{ render: __vue_render__$
|
|
147
|
-
__vue_inject_styles__$
|
|
148
|
-
__vue_script__$
|
|
149
|
-
__vue_scope_id__$
|
|
150
|
-
__vue_is_functional_template__$
|
|
151
|
-
__vue_module_identifier__$
|
|
216
|
+
const __vue_component__$n = /*#__PURE__*/normalizeComponent(
|
|
217
|
+
{ render: __vue_render__$n, staticRenderFns: __vue_staticRenderFns__$n },
|
|
218
|
+
__vue_inject_styles__$n,
|
|
219
|
+
__vue_script__$n,
|
|
220
|
+
__vue_scope_id__$n,
|
|
221
|
+
__vue_is_functional_template__$n,
|
|
222
|
+
__vue_module_identifier__$n,
|
|
152
223
|
false,
|
|
153
224
|
undefined,
|
|
154
225
|
undefined,
|
|
155
226
|
undefined
|
|
156
227
|
);
|
|
157
228
|
|
|
158
|
-
__vue_component__$
|
|
229
|
+
__vue_component__$n.install = Vue => Vue.component(__vue_component__$n.name, __vue_component__$n);
|
|
159
230
|
|
|
160
231
|
//
|
|
161
232
|
//
|
|
@@ -170,7 +241,7 @@
|
|
|
170
241
|
//
|
|
171
242
|
//
|
|
172
243
|
|
|
173
|
-
var script$
|
|
244
|
+
var script$m = {
|
|
174
245
|
name: 'ele-date',
|
|
175
246
|
props: {
|
|
176
247
|
value: {
|
|
@@ -198,10 +269,10 @@
|
|
|
198
269
|
};
|
|
199
270
|
|
|
200
271
|
/* script */
|
|
201
|
-
const __vue_script__$
|
|
272
|
+
const __vue_script__$m = script$m;
|
|
202
273
|
|
|
203
274
|
/* template */
|
|
204
|
-
var __vue_render__$
|
|
275
|
+
var __vue_render__$m = function () {
|
|
205
276
|
var _vm = this;
|
|
206
277
|
var _h = _vm.$createElement;
|
|
207
278
|
var _c = _vm._self._c || _h;
|
|
@@ -216,17 +287,17 @@
|
|
|
216
287
|
on: { focus: _vm.onFocus, panelChange: _vm.onPanelChange },
|
|
217
288
|
})
|
|
218
289
|
};
|
|
219
|
-
var __vue_staticRenderFns__$
|
|
220
|
-
__vue_render__$
|
|
290
|
+
var __vue_staticRenderFns__$m = [];
|
|
291
|
+
__vue_render__$m._withStripped = true;
|
|
221
292
|
|
|
222
293
|
/* style */
|
|
223
|
-
const __vue_inject_styles__$
|
|
294
|
+
const __vue_inject_styles__$m = undefined;
|
|
224
295
|
/* scoped */
|
|
225
|
-
const __vue_scope_id__$
|
|
296
|
+
const __vue_scope_id__$m = undefined;
|
|
226
297
|
/* module identifier */
|
|
227
|
-
const __vue_module_identifier__$
|
|
298
|
+
const __vue_module_identifier__$m = undefined;
|
|
228
299
|
/* functional template */
|
|
229
|
-
const __vue_is_functional_template__$
|
|
300
|
+
const __vue_is_functional_template__$m = false;
|
|
230
301
|
/* style inject */
|
|
231
302
|
|
|
232
303
|
/* style inject SSR */
|
|
@@ -235,29 +306,33 @@
|
|
|
235
306
|
|
|
236
307
|
|
|
237
308
|
|
|
238
|
-
const __vue_component__$
|
|
239
|
-
{ render: __vue_render__$
|
|
240
|
-
__vue_inject_styles__$
|
|
241
|
-
__vue_script__$
|
|
242
|
-
__vue_scope_id__$
|
|
243
|
-
__vue_is_functional_template__$
|
|
244
|
-
__vue_module_identifier__$
|
|
309
|
+
const __vue_component__$m = /*#__PURE__*/normalizeComponent(
|
|
310
|
+
{ render: __vue_render__$m, staticRenderFns: __vue_staticRenderFns__$m },
|
|
311
|
+
__vue_inject_styles__$m,
|
|
312
|
+
__vue_script__$m,
|
|
313
|
+
__vue_scope_id__$m,
|
|
314
|
+
__vue_is_functional_template__$m,
|
|
315
|
+
__vue_module_identifier__$m,
|
|
245
316
|
false,
|
|
246
317
|
undefined,
|
|
247
318
|
undefined,
|
|
248
319
|
undefined
|
|
249
320
|
);
|
|
250
321
|
|
|
251
|
-
__vue_component__$
|
|
322
|
+
__vue_component__$m.install = Vue => Vue.component(__vue_component__$m.name, __vue_component__$m);
|
|
252
323
|
|
|
253
324
|
//
|
|
254
325
|
//
|
|
255
326
|
//
|
|
256
327
|
//
|
|
257
328
|
|
|
258
|
-
var script$
|
|
329
|
+
var script$l = {
|
|
259
330
|
name: 'ele-input',
|
|
260
331
|
props: {
|
|
332
|
+
maxLength: {
|
|
333
|
+
type: Number,
|
|
334
|
+
default: 125
|
|
335
|
+
},
|
|
261
336
|
value: {
|
|
262
337
|
type: String
|
|
263
338
|
}
|
|
@@ -315,53 +390,53 @@
|
|
|
315
390
|
}
|
|
316
391
|
|
|
317
392
|
/* script */
|
|
318
|
-
const __vue_script__$
|
|
393
|
+
const __vue_script__$l = script$l;
|
|
319
394
|
|
|
320
395
|
/* template */
|
|
321
|
-
var __vue_render__$
|
|
396
|
+
var __vue_render__$l = function () {
|
|
322
397
|
var _vm = this;
|
|
323
398
|
var _h = _vm.$createElement;
|
|
324
399
|
var _c = _vm._self._c || _h;
|
|
325
400
|
return _c("a-input", {
|
|
326
|
-
attrs: { value: _vm.value },
|
|
401
|
+
attrs: { value: _vm.value, "max-length": _vm.maxLength },
|
|
327
402
|
on: { change: _vm.onChange },
|
|
328
403
|
})
|
|
329
404
|
};
|
|
330
|
-
var __vue_staticRenderFns__$
|
|
331
|
-
__vue_render__$
|
|
405
|
+
var __vue_staticRenderFns__$l = [];
|
|
406
|
+
__vue_render__$l._withStripped = true;
|
|
332
407
|
|
|
333
408
|
/* style */
|
|
334
|
-
const __vue_inject_styles__$
|
|
409
|
+
const __vue_inject_styles__$l = function (inject) {
|
|
335
410
|
if (!inject) return
|
|
336
|
-
inject("data-v-
|
|
411
|
+
inject("data-v-468d0810_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 });
|
|
337
412
|
|
|
338
413
|
};
|
|
339
414
|
/* scoped */
|
|
340
|
-
const __vue_scope_id__$
|
|
415
|
+
const __vue_scope_id__$l = "data-v-468d0810";
|
|
341
416
|
/* module identifier */
|
|
342
|
-
const __vue_module_identifier__$
|
|
417
|
+
const __vue_module_identifier__$l = undefined;
|
|
343
418
|
/* functional template */
|
|
344
|
-
const __vue_is_functional_template__$
|
|
419
|
+
const __vue_is_functional_template__$l = false;
|
|
345
420
|
/* style inject SSR */
|
|
346
421
|
|
|
347
422
|
/* style inject shadow dom */
|
|
348
423
|
|
|
349
424
|
|
|
350
425
|
|
|
351
|
-
const __vue_component__$
|
|
352
|
-
{ render: __vue_render__$
|
|
353
|
-
__vue_inject_styles__$
|
|
354
|
-
__vue_script__$
|
|
355
|
-
__vue_scope_id__$
|
|
356
|
-
__vue_is_functional_template__$
|
|
357
|
-
__vue_module_identifier__$
|
|
426
|
+
const __vue_component__$l = /*#__PURE__*/normalizeComponent(
|
|
427
|
+
{ render: __vue_render__$l, staticRenderFns: __vue_staticRenderFns__$l },
|
|
428
|
+
__vue_inject_styles__$l,
|
|
429
|
+
__vue_script__$l,
|
|
430
|
+
__vue_scope_id__$l,
|
|
431
|
+
__vue_is_functional_template__$l,
|
|
432
|
+
__vue_module_identifier__$l,
|
|
358
433
|
false,
|
|
359
434
|
createInjector,
|
|
360
435
|
undefined,
|
|
361
436
|
undefined
|
|
362
437
|
);
|
|
363
438
|
|
|
364
|
-
__vue_component__$
|
|
439
|
+
__vue_component__$l.install = Vue => Vue.component(__vue_component__$l.name, __vue_component__$l);
|
|
365
440
|
|
|
366
441
|
//
|
|
367
442
|
//
|
|
@@ -372,7 +447,7 @@
|
|
|
372
447
|
//
|
|
373
448
|
//
|
|
374
449
|
|
|
375
|
-
var script$
|
|
450
|
+
var script$k = {
|
|
376
451
|
name: 'ele-select',
|
|
377
452
|
props: {
|
|
378
453
|
value: {
|
|
@@ -395,10 +470,10 @@
|
|
|
395
470
|
};
|
|
396
471
|
|
|
397
472
|
/* script */
|
|
398
|
-
const __vue_script__$
|
|
473
|
+
const __vue_script__$k = script$k;
|
|
399
474
|
|
|
400
475
|
/* template */
|
|
401
|
-
var __vue_render__$
|
|
476
|
+
var __vue_render__$k = function () {
|
|
402
477
|
var _vm = this;
|
|
403
478
|
var _h = _vm.$createElement;
|
|
404
479
|
var _c = _vm._self._c || _h;
|
|
@@ -419,143 +494,903 @@
|
|
|
419
494
|
1
|
|
420
495
|
)
|
|
421
496
|
};
|
|
422
|
-
var __vue_staticRenderFns__$
|
|
423
|
-
__vue_render__$
|
|
497
|
+
var __vue_staticRenderFns__$k = [];
|
|
498
|
+
__vue_render__$k._withStripped = true;
|
|
424
499
|
|
|
425
500
|
/* style */
|
|
426
|
-
const __vue_inject_styles__$
|
|
501
|
+
const __vue_inject_styles__$k = function (inject) {
|
|
427
502
|
if (!inject) return
|
|
428
|
-
inject("data-v-
|
|
503
|
+
inject("data-v-499435e8_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
429
504
|
|
|
430
505
|
};
|
|
431
506
|
/* scoped */
|
|
432
|
-
const __vue_scope_id__$
|
|
507
|
+
const __vue_scope_id__$k = "data-v-499435e8";
|
|
433
508
|
/* module identifier */
|
|
434
|
-
const __vue_module_identifier__$
|
|
509
|
+
const __vue_module_identifier__$k = undefined;
|
|
435
510
|
/* functional template */
|
|
436
|
-
const __vue_is_functional_template__$
|
|
511
|
+
const __vue_is_functional_template__$k = false;
|
|
437
512
|
/* style inject SSR */
|
|
438
513
|
|
|
439
514
|
/* style inject shadow dom */
|
|
440
515
|
|
|
441
516
|
|
|
442
517
|
|
|
443
|
-
const __vue_component__$
|
|
444
|
-
{ render: __vue_render__$
|
|
445
|
-
__vue_inject_styles__$
|
|
446
|
-
__vue_script__$
|
|
447
|
-
__vue_scope_id__$
|
|
448
|
-
__vue_is_functional_template__$
|
|
449
|
-
__vue_module_identifier__$
|
|
518
|
+
const __vue_component__$k = /*#__PURE__*/normalizeComponent(
|
|
519
|
+
{ render: __vue_render__$k, staticRenderFns: __vue_staticRenderFns__$k },
|
|
520
|
+
__vue_inject_styles__$k,
|
|
521
|
+
__vue_script__$k,
|
|
522
|
+
__vue_scope_id__$k,
|
|
523
|
+
__vue_is_functional_template__$k,
|
|
524
|
+
__vue_module_identifier__$k,
|
|
450
525
|
false,
|
|
451
526
|
createInjector,
|
|
452
527
|
undefined,
|
|
453
528
|
undefined
|
|
454
529
|
);
|
|
455
530
|
|
|
456
|
-
__vue_component__$
|
|
531
|
+
__vue_component__$k.install = Vue => Vue.component(__vue_component__$k.name, __vue_component__$k);
|
|
457
532
|
|
|
458
|
-
//
|
|
459
|
-
//
|
|
460
|
-
//
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
533
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
534
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
535
|
+
// generators (like Math.random()).
|
|
536
|
+
let getRandomValues;
|
|
537
|
+
const rnds8 = new Uint8Array(16);
|
|
538
|
+
function rng() {
|
|
539
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
540
|
+
if (!getRandomValues) {
|
|
541
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
542
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
543
|
+
if (!getRandomValues) {
|
|
544
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return getRandomValues(rnds8);
|
|
548
|
+
}
|
|
468
549
|
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
550
|
+
var REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
551
|
+
|
|
552
|
+
function validate(uuid) {
|
|
553
|
+
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
558
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
559
|
+
*/
|
|
560
|
+
|
|
561
|
+
const byteToHex = [];
|
|
562
|
+
for (let i = 0; i < 256; ++i) {
|
|
563
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
564
|
+
}
|
|
565
|
+
function unsafeStringify(arr, offset = 0) {
|
|
566
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
567
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
568
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
function parse$1(uuid) {
|
|
572
|
+
if (!validate(uuid)) {
|
|
573
|
+
throw TypeError('Invalid UUID');
|
|
574
|
+
}
|
|
575
|
+
let v;
|
|
576
|
+
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
|
577
|
+
|
|
578
|
+
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
579
|
+
arr[1] = v >>> 16 & 0xff;
|
|
580
|
+
arr[2] = v >>> 8 & 0xff;
|
|
581
|
+
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
|
582
|
+
|
|
583
|
+
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
584
|
+
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
|
585
|
+
|
|
586
|
+
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
587
|
+
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
|
588
|
+
|
|
589
|
+
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
590
|
+
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
|
591
|
+
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
592
|
+
|
|
593
|
+
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
594
|
+
arr[11] = v / 0x100000000 & 0xff;
|
|
595
|
+
arr[12] = v >>> 24 & 0xff;
|
|
596
|
+
arr[13] = v >>> 16 & 0xff;
|
|
597
|
+
arr[14] = v >>> 8 & 0xff;
|
|
598
|
+
arr[15] = v & 0xff;
|
|
599
|
+
return arr;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
function stringToBytes(str) {
|
|
603
|
+
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
604
|
+
|
|
605
|
+
const bytes = [];
|
|
606
|
+
for (let i = 0; i < str.length; ++i) {
|
|
607
|
+
bytes.push(str.charCodeAt(i));
|
|
608
|
+
}
|
|
609
|
+
return bytes;
|
|
610
|
+
}
|
|
611
|
+
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
612
|
+
const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
613
|
+
function v35(name, version, hashfunc) {
|
|
614
|
+
function generateUUID(value, namespace, buf, offset) {
|
|
615
|
+
var _namespace;
|
|
616
|
+
if (typeof value === 'string') {
|
|
617
|
+
value = stringToBytes(value);
|
|
477
618
|
}
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
handleClickText(props) {
|
|
481
|
-
const {
|
|
482
|
-
eventName,
|
|
483
|
-
key
|
|
484
|
-
} = props;
|
|
485
|
-
this.$emit(eventName, {
|
|
486
|
-
key,
|
|
487
|
-
record: this.record
|
|
488
|
-
});
|
|
619
|
+
if (typeof namespace === 'string') {
|
|
620
|
+
namespace = parse$1(namespace);
|
|
489
621
|
}
|
|
490
|
-
|
|
491
|
-
|
|
622
|
+
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
|
|
623
|
+
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
624
|
+
} // Compute hash of namespace and value, Per 4.3
|
|
625
|
+
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
626
|
+
// hashfunc([...namespace, ... value])`
|
|
492
627
|
|
|
493
|
-
|
|
494
|
-
|
|
628
|
+
let bytes = new Uint8Array(16 + value.length);
|
|
629
|
+
bytes.set(namespace);
|
|
630
|
+
bytes.set(value, namespace.length);
|
|
631
|
+
bytes = hashfunc(bytes);
|
|
632
|
+
bytes[6] = bytes[6] & 0x0f | version;
|
|
633
|
+
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
634
|
+
if (buf) {
|
|
635
|
+
offset = offset || 0;
|
|
636
|
+
for (let i = 0; i < 16; ++i) {
|
|
637
|
+
buf[offset + i] = bytes[i];
|
|
638
|
+
}
|
|
639
|
+
return buf;
|
|
640
|
+
}
|
|
641
|
+
return unsafeStringify(bytes);
|
|
642
|
+
} // Function#name is not settable on some platforms (#270)
|
|
495
643
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
[
|
|
509
|
-
item.type == "text"
|
|
510
|
-
? [
|
|
511
|
-
_c(
|
|
512
|
-
"span",
|
|
513
|
-
{
|
|
514
|
-
on: {
|
|
515
|
-
click: function ($event) {
|
|
516
|
-
return _vm.handleClickText(item)
|
|
517
|
-
},
|
|
518
|
-
},
|
|
519
|
-
},
|
|
520
|
-
[_vm._v(_vm._s(item.label))]
|
|
521
|
-
),
|
|
522
|
-
]
|
|
523
|
-
: _vm._e(),
|
|
524
|
-
],
|
|
525
|
-
2
|
|
526
|
-
)
|
|
527
|
-
}),
|
|
528
|
-
0
|
|
529
|
-
)
|
|
644
|
+
try {
|
|
645
|
+
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
646
|
+
} catch (err) {} // For CommonJS default export support
|
|
647
|
+
|
|
648
|
+
generateUUID.DNS = DNS;
|
|
649
|
+
generateUUID.URL = URL;
|
|
650
|
+
return generateUUID;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
654
|
+
var native = {
|
|
655
|
+
randomUUID
|
|
530
656
|
};
|
|
531
|
-
var __vue_staticRenderFns__$7 = [];
|
|
532
|
-
__vue_render__$7._withStripped = true;
|
|
533
657
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
658
|
+
function v4(options, buf, offset) {
|
|
659
|
+
if (native.randomUUID && !buf && !options) {
|
|
660
|
+
return native.randomUUID();
|
|
661
|
+
}
|
|
662
|
+
options = options || {};
|
|
663
|
+
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
538
664
|
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
const __vue_scope_id__$7 = "data-v-bea55e74";
|
|
542
|
-
/* module identifier */
|
|
543
|
-
const __vue_module_identifier__$7 = undefined;
|
|
544
|
-
/* functional template */
|
|
545
|
-
const __vue_is_functional_template__$7 = false;
|
|
546
|
-
/* style inject SSR */
|
|
547
|
-
|
|
548
|
-
/* style inject shadow dom */
|
|
549
|
-
|
|
665
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
666
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
550
667
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
668
|
+
if (buf) {
|
|
669
|
+
offset = offset || 0;
|
|
670
|
+
for (let i = 0; i < 16; ++i) {
|
|
671
|
+
buf[offset + i] = rnds[i];
|
|
672
|
+
}
|
|
673
|
+
return buf;
|
|
674
|
+
}
|
|
675
|
+
return unsafeStringify(rnds);
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// Adapted from Chris Veness' SHA1 code at
|
|
679
|
+
// http://www.movable-type.co.uk/scripts/sha1.html
|
|
680
|
+
function f(s, x, y, z) {
|
|
681
|
+
switch (s) {
|
|
682
|
+
case 0:
|
|
683
|
+
return x & y ^ ~x & z;
|
|
684
|
+
case 1:
|
|
685
|
+
return x ^ y ^ z;
|
|
686
|
+
case 2:
|
|
687
|
+
return x & y ^ x & z ^ y & z;
|
|
688
|
+
case 3:
|
|
689
|
+
return x ^ y ^ z;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
function ROTL(x, n) {
|
|
693
|
+
return x << n | x >>> 32 - n;
|
|
694
|
+
}
|
|
695
|
+
function sha1(bytes) {
|
|
696
|
+
const K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
|
|
697
|
+
const H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
|
|
698
|
+
if (typeof bytes === 'string') {
|
|
699
|
+
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
700
|
+
|
|
701
|
+
bytes = [];
|
|
702
|
+
for (let i = 0; i < msg.length; ++i) {
|
|
703
|
+
bytes.push(msg.charCodeAt(i));
|
|
704
|
+
}
|
|
705
|
+
} else if (!Array.isArray(bytes)) {
|
|
706
|
+
// Convert Array-like to Array
|
|
707
|
+
bytes = Array.prototype.slice.call(bytes);
|
|
708
|
+
}
|
|
709
|
+
bytes.push(0x80);
|
|
710
|
+
const l = bytes.length / 4 + 2;
|
|
711
|
+
const N = Math.ceil(l / 16);
|
|
712
|
+
const M = new Array(N);
|
|
713
|
+
for (let i = 0; i < N; ++i) {
|
|
714
|
+
const arr = new Uint32Array(16);
|
|
715
|
+
for (let j = 0; j < 16; ++j) {
|
|
716
|
+
arr[j] = bytes[i * 64 + j * 4] << 24 | bytes[i * 64 + j * 4 + 1] << 16 | bytes[i * 64 + j * 4 + 2] << 8 | bytes[i * 64 + j * 4 + 3];
|
|
717
|
+
}
|
|
718
|
+
M[i] = arr;
|
|
719
|
+
}
|
|
720
|
+
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
|
|
721
|
+
M[N - 1][14] = Math.floor(M[N - 1][14]);
|
|
722
|
+
M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
|
|
723
|
+
for (let i = 0; i < N; ++i) {
|
|
724
|
+
const W = new Uint32Array(80);
|
|
725
|
+
for (let t = 0; t < 16; ++t) {
|
|
726
|
+
W[t] = M[i][t];
|
|
727
|
+
}
|
|
728
|
+
for (let t = 16; t < 80; ++t) {
|
|
729
|
+
W[t] = ROTL(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1);
|
|
730
|
+
}
|
|
731
|
+
let a = H[0];
|
|
732
|
+
let b = H[1];
|
|
733
|
+
let c = H[2];
|
|
734
|
+
let d = H[3];
|
|
735
|
+
let e = H[4];
|
|
736
|
+
for (let t = 0; t < 80; ++t) {
|
|
737
|
+
const s = Math.floor(t / 20);
|
|
738
|
+
const T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[t] >>> 0;
|
|
739
|
+
e = d;
|
|
740
|
+
d = c;
|
|
741
|
+
c = ROTL(b, 30) >>> 0;
|
|
742
|
+
b = a;
|
|
743
|
+
a = T;
|
|
744
|
+
}
|
|
745
|
+
H[0] = H[0] + a >>> 0;
|
|
746
|
+
H[1] = H[1] + b >>> 0;
|
|
747
|
+
H[2] = H[2] + c >>> 0;
|
|
748
|
+
H[3] = H[3] + d >>> 0;
|
|
749
|
+
H[4] = H[4] + e >>> 0;
|
|
750
|
+
}
|
|
751
|
+
return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
const v5 = v35('v5', 0x50, sha1);
|
|
755
|
+
var uuidv5 = v5;
|
|
756
|
+
|
|
757
|
+
const ESCAPE = {
|
|
758
|
+
"n": "\n",
|
|
759
|
+
"f": "\f",
|
|
760
|
+
"r": "\r",
|
|
761
|
+
"t": " ",
|
|
762
|
+
"v": "\v"
|
|
763
|
+
};
|
|
764
|
+
const CONSTANTS = {
|
|
765
|
+
"null": data => null,
|
|
766
|
+
"true": data => true,
|
|
767
|
+
"false": data => false,
|
|
768
|
+
"undefined": data => void 0
|
|
769
|
+
};
|
|
770
|
+
const OPERATORS = {
|
|
771
|
+
"+": (data, a, b) => a(data) + b(data),
|
|
772
|
+
"-": (data, a, b) => a(data) - b(data),
|
|
773
|
+
"*": (data, a, b) => a(data) * b(data),
|
|
774
|
+
"/": (data, a, b) => a(data) / b(data),
|
|
775
|
+
"%": (data, a, b) => a(data) % b(data),
|
|
776
|
+
"===": (data, a, b) => a(data) === b(data),
|
|
777
|
+
"!==": (data, a, b) => a(data) !== b(data),
|
|
778
|
+
"==": (data, a, b) => a(data) == b(data),
|
|
779
|
+
"!=": (data, a, b) => a(data) != b(data),
|
|
780
|
+
"<": (data, a, b) => a(data) < b(data),
|
|
781
|
+
">": (data, a, b) => a(data) > b(data),
|
|
782
|
+
"<=": (data, a, b) => a(data) <= b(data),
|
|
783
|
+
">=": (data, a, b) => a(data) >= b(data),
|
|
784
|
+
"&&": (data, a, b) => a(data) && b(data),
|
|
785
|
+
"||": (data, a, b) => a(data) || b(data),
|
|
786
|
+
"!": (data, a) => !a(data)
|
|
787
|
+
};
|
|
788
|
+
function isNumber(char) {
|
|
789
|
+
return char >= "0" && char <= "9" && typeof char === "string";
|
|
790
|
+
}
|
|
791
|
+
function isExpOperator(char) {
|
|
792
|
+
return char === "-" || char === "+" || isNumber(char);
|
|
793
|
+
}
|
|
794
|
+
function isIdent(char) {
|
|
795
|
+
return char >= "a" && char <= "z" || char >= "A" && char <= "Z" || char === "_" || char === "$";
|
|
796
|
+
}
|
|
797
|
+
class Expression {
|
|
798
|
+
constructor(content) {
|
|
799
|
+
if (!content) throw new Error("invalid expression");
|
|
800
|
+
this.content = content;
|
|
801
|
+
}
|
|
802
|
+
lex() {
|
|
803
|
+
let content = this.content;
|
|
804
|
+
let length = content.length;
|
|
805
|
+
let index = 0;
|
|
806
|
+
let tokens = [];
|
|
807
|
+
while (index < length) {
|
|
808
|
+
let char = content.charAt(index);
|
|
809
|
+
if (char === '"' || char === "'") {
|
|
810
|
+
let start = ++index;
|
|
811
|
+
let escape = false;
|
|
812
|
+
let value = "";
|
|
813
|
+
let token;
|
|
814
|
+
while (index < length) {
|
|
815
|
+
let c = content.charAt(index);
|
|
816
|
+
if (escape) {
|
|
817
|
+
if (c === "u") {
|
|
818
|
+
let hex = content.substring(index + 1, index + 5);
|
|
819
|
+
if (!hex.match(/[\da-f]{4}/i)) {
|
|
820
|
+
throw new Error(`invalid expression: ${content}, invalid unicode escape [\\u${hex}]`);
|
|
821
|
+
}
|
|
822
|
+
index += 4;
|
|
823
|
+
value += String.fromCharCode(parseInt(hex, 16));
|
|
824
|
+
} else {
|
|
825
|
+
let rep = ESCAPE[c];
|
|
826
|
+
value = value + (rep || c);
|
|
827
|
+
}
|
|
828
|
+
escape = false;
|
|
829
|
+
} else if (c === "\\") {
|
|
830
|
+
escape = true;
|
|
831
|
+
} else if (c === char) {
|
|
832
|
+
index++;
|
|
833
|
+
token = {
|
|
834
|
+
index: start,
|
|
835
|
+
constant: true,
|
|
836
|
+
text: char + value + char,
|
|
837
|
+
value
|
|
838
|
+
};
|
|
839
|
+
break;
|
|
840
|
+
} else {
|
|
841
|
+
value += c;
|
|
842
|
+
}
|
|
843
|
+
index++;
|
|
844
|
+
}
|
|
845
|
+
if (!token) {
|
|
846
|
+
throw new Error(`invalid expression: ${content}`);
|
|
847
|
+
} else {
|
|
848
|
+
tokens.push(token);
|
|
849
|
+
}
|
|
850
|
+
} else if (isNumber(char) || char === "." && isNumber(content.charAt(index + 1))) {
|
|
851
|
+
let start = index;
|
|
852
|
+
let value = "";
|
|
853
|
+
while (index < length) {
|
|
854
|
+
let c = content.charAt(index).toLowerCase();
|
|
855
|
+
if (c === "." || isNumber(c)) {
|
|
856
|
+
value += c;
|
|
857
|
+
} else {
|
|
858
|
+
let c2 = content.charAt(index + 1);
|
|
859
|
+
if (c === "e" && isExpOperator(c2)) {
|
|
860
|
+
value += c;
|
|
861
|
+
} else if (isExpOperator(c) && c2 && isNumber(c2) && value.charAt(value.length - 1) === "e") {
|
|
862
|
+
value += c;
|
|
863
|
+
} else if (isExpOperator(c) && (!c2 || !isNumber(c2)) && value.charAt(value.length - 1) == "e") {
|
|
864
|
+
throw new Error(`invalid expression: ${content}`);
|
|
865
|
+
} else {
|
|
866
|
+
break;
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
index++;
|
|
870
|
+
}
|
|
871
|
+
tokens.push({
|
|
872
|
+
index: start,
|
|
873
|
+
constant: true,
|
|
874
|
+
text: value,
|
|
875
|
+
value: Number(value)
|
|
876
|
+
});
|
|
877
|
+
} else if (isIdent(char)) {
|
|
878
|
+
let start = index;
|
|
879
|
+
while (index < length) {
|
|
880
|
+
let c = content.charAt(index);
|
|
881
|
+
if (!(isIdent(c) || isNumber(c))) {
|
|
882
|
+
break;
|
|
883
|
+
}
|
|
884
|
+
index++;
|
|
885
|
+
}
|
|
886
|
+
tokens.push({
|
|
887
|
+
index: start,
|
|
888
|
+
text: content.slice(start, index),
|
|
889
|
+
identifier: true
|
|
890
|
+
});
|
|
891
|
+
} else if ("(){}[].,:?".indexOf(char) >= 0) {
|
|
892
|
+
tokens.push({
|
|
893
|
+
index,
|
|
894
|
+
text: char
|
|
895
|
+
});
|
|
896
|
+
index++;
|
|
897
|
+
} else if (char === " " || char === "\r" || char === " " || char === "\n" || char === "\v" || char === "\xA0") {
|
|
898
|
+
index++;
|
|
899
|
+
} else {
|
|
900
|
+
let char2 = char + content.charAt(index + 1);
|
|
901
|
+
let char3 = char2 + content.charAt(index + 2);
|
|
902
|
+
let op1 = OPERATORS[char];
|
|
903
|
+
let op2 = OPERATORS[char2];
|
|
904
|
+
let op3 = OPERATORS[char3];
|
|
905
|
+
if (op1 || op2 || op3) {
|
|
906
|
+
let text = op3 ? char3 : op2 ? char2 : char;
|
|
907
|
+
tokens.push({
|
|
908
|
+
index,
|
|
909
|
+
text,
|
|
910
|
+
operator: true
|
|
911
|
+
});
|
|
912
|
+
index += text.length;
|
|
913
|
+
} else {
|
|
914
|
+
throw new Error(`invalid expression: ${content}`);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
this.tokens = tokens;
|
|
919
|
+
return tokens;
|
|
920
|
+
}
|
|
921
|
+
parse() {
|
|
922
|
+
let tokens = this.lex();
|
|
923
|
+
let func;
|
|
924
|
+
let token = tokens[0];
|
|
925
|
+
let text = token.text;
|
|
926
|
+
if (tokens.length > 0 && text !== "}" && text !== ")" && text !== "]") {
|
|
927
|
+
func = this.expression();
|
|
928
|
+
}
|
|
929
|
+
return data => func && func(data);
|
|
930
|
+
}
|
|
931
|
+
expect(text) {
|
|
932
|
+
let tokens = this.tokens;
|
|
933
|
+
let token = tokens[0];
|
|
934
|
+
if (!text || text === (token && token.text)) {
|
|
935
|
+
return tokens.shift();
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
consume(text) {
|
|
939
|
+
if (!this.tokens.length) throw new Error(`parse expression error: ${this.content}`);
|
|
940
|
+
let token = this.expect(text);
|
|
941
|
+
if (!token) throw new Error(`parse expression error: ${this.content}`);
|
|
942
|
+
return token;
|
|
943
|
+
}
|
|
944
|
+
expression() {
|
|
945
|
+
return this.ternary();
|
|
946
|
+
}
|
|
947
|
+
ternary() {
|
|
948
|
+
let left = this.logicalOR();
|
|
949
|
+
if (this.expect("?")) {
|
|
950
|
+
let middle = this.expression();
|
|
951
|
+
this.consume(":");
|
|
952
|
+
let right = this.expression();
|
|
953
|
+
return data => left(data) ? middle(data) : right(data);
|
|
954
|
+
}
|
|
955
|
+
return left;
|
|
956
|
+
}
|
|
957
|
+
binary(left, op, right) {
|
|
958
|
+
let fn = OPERATORS[op];
|
|
959
|
+
return data => fn(data, left, right);
|
|
960
|
+
}
|
|
961
|
+
unary() {
|
|
962
|
+
let token;
|
|
963
|
+
if (this.expect("+")) {
|
|
964
|
+
return this.primary();
|
|
965
|
+
} else if (token = this.expect("-")) {
|
|
966
|
+
return this.binary(data => 0, token.text, this.unary());
|
|
967
|
+
} else if (token = this.expect("!")) {
|
|
968
|
+
let fn = OPERATORS[token.text];
|
|
969
|
+
let right = this.unary();
|
|
970
|
+
return data => fn(data, right);
|
|
971
|
+
} else {
|
|
972
|
+
return this.primary();
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
logicalOR() {
|
|
976
|
+
let left = this.logicalAND();
|
|
977
|
+
let token;
|
|
978
|
+
while (token = this.expect("||")) {
|
|
979
|
+
left = this.binary(left, token.text, this.logicalAND());
|
|
980
|
+
}
|
|
981
|
+
return left;
|
|
982
|
+
}
|
|
983
|
+
logicalAND() {
|
|
984
|
+
let left = this.equality();
|
|
985
|
+
let token;
|
|
986
|
+
while (token = this.expect("&&")) {
|
|
987
|
+
left = this.binary(left, token.text, this.equality());
|
|
988
|
+
}
|
|
989
|
+
return left;
|
|
990
|
+
}
|
|
991
|
+
equality() {
|
|
992
|
+
let left = this.relational();
|
|
993
|
+
let token;
|
|
994
|
+
while (token = this.expect("==") || this.expect("!=") || this.expect("===") || this.expect("!==")) {
|
|
995
|
+
left = this.binary(left, token.text, this.relational());
|
|
996
|
+
}
|
|
997
|
+
return left;
|
|
998
|
+
}
|
|
999
|
+
relational() {
|
|
1000
|
+
let left = this.additive();
|
|
1001
|
+
let token;
|
|
1002
|
+
while (token = this.expect("<") || this.expect(">") || this.expect("<=") || this.expect(">=")) {
|
|
1003
|
+
left = this.binary(left, token.text, this.additive());
|
|
1004
|
+
}
|
|
1005
|
+
return left;
|
|
1006
|
+
}
|
|
1007
|
+
additive() {
|
|
1008
|
+
let left = this.multiplicative();
|
|
1009
|
+
let token;
|
|
1010
|
+
while (token = this.expect("+") || this.expect("-")) {
|
|
1011
|
+
left = this.binary(left, token.text, this.multiplicative());
|
|
1012
|
+
}
|
|
1013
|
+
return left;
|
|
1014
|
+
}
|
|
1015
|
+
multiplicative() {
|
|
1016
|
+
let left = this.unary();
|
|
1017
|
+
let token;
|
|
1018
|
+
while (token = this.expect("*") || this.expect("/") || this.expect("%")) {
|
|
1019
|
+
left = this.binary(left, token.text, this.unary());
|
|
1020
|
+
}
|
|
1021
|
+
return left;
|
|
1022
|
+
}
|
|
1023
|
+
primary() {
|
|
1024
|
+
let token = this.tokens[0];
|
|
1025
|
+
let primary;
|
|
1026
|
+
if (this.expect("(")) {
|
|
1027
|
+
primary = this.expression();
|
|
1028
|
+
this.consume(")");
|
|
1029
|
+
} else if (this.expect("[")) {
|
|
1030
|
+
primary = this.array();
|
|
1031
|
+
} else if (this.expect("{")) {
|
|
1032
|
+
primary = this.object();
|
|
1033
|
+
} else if (token.identifier && token.text in CONSTANTS) {
|
|
1034
|
+
primary = CONSTANTS[this.consume().text];
|
|
1035
|
+
} else if (token.identifier) {
|
|
1036
|
+
primary = this.identifier();
|
|
1037
|
+
} else if (token.constant) {
|
|
1038
|
+
primary = this.constant();
|
|
1039
|
+
} else {
|
|
1040
|
+
throw new Error(`parse expression error: ${this.content}`);
|
|
1041
|
+
}
|
|
1042
|
+
let next;
|
|
1043
|
+
let context;
|
|
1044
|
+
while (next = this.expect("(") || this.expect("[") || this.expect(".")) {
|
|
1045
|
+
if (next.text === "(") {
|
|
1046
|
+
primary = this.functionCall(primary, context);
|
|
1047
|
+
context = null;
|
|
1048
|
+
} else if (next.text === "[") {
|
|
1049
|
+
context = primary;
|
|
1050
|
+
primary = this.objectIndex(primary);
|
|
1051
|
+
} else {
|
|
1052
|
+
context = primary;
|
|
1053
|
+
primary = this.fieldAccess(primary);
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
return primary;
|
|
1057
|
+
}
|
|
1058
|
+
fieldAccess(object) {
|
|
1059
|
+
let getter = this.identifier();
|
|
1060
|
+
return data => {
|
|
1061
|
+
let o = object(data);
|
|
1062
|
+
return o && getter(o);
|
|
1063
|
+
};
|
|
1064
|
+
}
|
|
1065
|
+
objectIndex(object) {
|
|
1066
|
+
let indexFn = this.expression();
|
|
1067
|
+
this.consume("]");
|
|
1068
|
+
return data => {
|
|
1069
|
+
let o = object(data);
|
|
1070
|
+
let key = indexFn(data) + "";
|
|
1071
|
+
return o && o[key];
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
functionCall(func, context) {
|
|
1075
|
+
let args = [];
|
|
1076
|
+
if (this.tokens[0].text !== ")") {
|
|
1077
|
+
do {
|
|
1078
|
+
args.push(this.expression());
|
|
1079
|
+
} while (this.expect(","));
|
|
1080
|
+
}
|
|
1081
|
+
this.consume(")");
|
|
1082
|
+
return data => {
|
|
1083
|
+
let callContext = context && context(data);
|
|
1084
|
+
let fn = func(data, callContext);
|
|
1085
|
+
return fn && fn.apply(callContext, args.length ? args.map(arg => arg(data)) : null);
|
|
1086
|
+
};
|
|
1087
|
+
}
|
|
1088
|
+
array() {
|
|
1089
|
+
let elements = [];
|
|
1090
|
+
let token = this.tokens[0];
|
|
1091
|
+
if (token.text !== "]") {
|
|
1092
|
+
do {
|
|
1093
|
+
if (this.tokens[0].text === "]") break;
|
|
1094
|
+
elements.push(this.expression());
|
|
1095
|
+
} while (this.expect(","));
|
|
1096
|
+
}
|
|
1097
|
+
this.consume("]");
|
|
1098
|
+
return data => elements.map(element => element(data));
|
|
1099
|
+
}
|
|
1100
|
+
object() {
|
|
1101
|
+
let keys = [];
|
|
1102
|
+
let values = [];
|
|
1103
|
+
let token = this.tokens[0];
|
|
1104
|
+
if (token.text !== "}") {
|
|
1105
|
+
do {
|
|
1106
|
+
token = this.tokens[0];
|
|
1107
|
+
if (token.text === "}") break;
|
|
1108
|
+
token = this.consume();
|
|
1109
|
+
if (token.constant) {
|
|
1110
|
+
keys.push(token.value);
|
|
1111
|
+
} else if (token.identifier) {
|
|
1112
|
+
keys.push(token.text);
|
|
1113
|
+
} else {
|
|
1114
|
+
throw new Error(`parse expression error: ${this.content}`);
|
|
1115
|
+
}
|
|
1116
|
+
this.consume(":");
|
|
1117
|
+
values.push(this.expression());
|
|
1118
|
+
} while (this.expect(","));
|
|
1119
|
+
}
|
|
1120
|
+
this.consume("}");
|
|
1121
|
+
return data => {
|
|
1122
|
+
let object = {};
|
|
1123
|
+
for (let i = 0, length = values.length; i < length; i++) {
|
|
1124
|
+
object[keys[i]] = values[i](data);
|
|
1125
|
+
}
|
|
1126
|
+
return object;
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
identifier() {
|
|
1130
|
+
let id = this.consume().text;
|
|
1131
|
+
let token = this.tokens[0];
|
|
1132
|
+
let token2 = this.tokens[1];
|
|
1133
|
+
let token3 = this.tokens[2];
|
|
1134
|
+
while (token && token.text === "." && token2 && token2.identifier && token3 && token3.text !== "(") {
|
|
1135
|
+
id += this.consume().text + this.consume().text;
|
|
1136
|
+
token = this.tokens[0];
|
|
1137
|
+
token2 = this.tokens[1];
|
|
1138
|
+
token3 = this.tokens[2];
|
|
1139
|
+
}
|
|
1140
|
+
return data => {
|
|
1141
|
+
let elements = id.split(".");
|
|
1142
|
+
let key;
|
|
1143
|
+
for (let i = 0; elements.length > 1; i++) {
|
|
1144
|
+
key = elements.shift();
|
|
1145
|
+
data = data[key];
|
|
1146
|
+
if (!data) break;
|
|
1147
|
+
}
|
|
1148
|
+
key = elements.shift();
|
|
1149
|
+
return data && data[key];
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
constant() {
|
|
1153
|
+
let value = this.consume().value;
|
|
1154
|
+
return data => value;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
const parse = (expression, props = {}) => {
|
|
1158
|
+
if (!expression) throw new Error("expression is required");
|
|
1159
|
+
const execParse = new Expression(expression).parse();
|
|
1160
|
+
return execParse(props);
|
|
1161
|
+
};
|
|
1162
|
+
|
|
1163
|
+
//
|
|
1164
|
+
const MENU_KEY_NAMESPACE = 'f7b3b8b0-1b7b-11ec-9621-0242ac130002';
|
|
1165
|
+
var script$j = {
|
|
1166
|
+
props: {
|
|
1167
|
+
record: {
|
|
1168
|
+
type: Object
|
|
1169
|
+
},
|
|
1170
|
+
dataSource: {
|
|
1171
|
+
type: Array,
|
|
1172
|
+
default: () => []
|
|
1173
|
+
}
|
|
1174
|
+
},
|
|
1175
|
+
inject: {
|
|
1176
|
+
requestTreeData: {
|
|
1177
|
+
default: void 0
|
|
1178
|
+
},
|
|
1179
|
+
requestTableData: {
|
|
1180
|
+
default: void 0
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
computed: {
|
|
1184
|
+
menuKeyDelimiter() {
|
|
1185
|
+
return uuidv5('_', MENU_KEY_NAMESPACE);
|
|
1186
|
+
},
|
|
1187
|
+
builtInMethods() {
|
|
1188
|
+
return {
|
|
1189
|
+
requestTreeData: this.requestTreeData,
|
|
1190
|
+
requestTableData: this.requestTableData
|
|
1191
|
+
};
|
|
1192
|
+
}
|
|
1193
|
+
},
|
|
1194
|
+
methods: {
|
|
1195
|
+
execOperationExpression(dataSource = []) {
|
|
1196
|
+
const ret = dataSource.map(item => {
|
|
1197
|
+
const {
|
|
1198
|
+
show
|
|
1199
|
+
} = item;
|
|
1200
|
+
if (shared.type.isUndefined(show)) {
|
|
1201
|
+
return item;
|
|
1202
|
+
} else if (shared.type.isBool(show)) {
|
|
1203
|
+
if (show) return item;
|
|
1204
|
+
} else if (shared.type.isStr(show)) {
|
|
1205
|
+
const parseRet = parse(show, {
|
|
1206
|
+
...this.record,
|
|
1207
|
+
_route: shared.route.searchToQueryParams(window.location.search)
|
|
1208
|
+
});
|
|
1209
|
+
if (parseRet) return item;
|
|
1210
|
+
}
|
|
1211
|
+
}).filter(item => item);
|
|
1212
|
+
return ret;
|
|
1213
|
+
},
|
|
1214
|
+
handleClickConfirm(props) {
|
|
1215
|
+
//TODO generate event by special rule
|
|
1216
|
+
const {
|
|
1217
|
+
eventName,
|
|
1218
|
+
value
|
|
1219
|
+
} = props;
|
|
1220
|
+
this.$emit(eventName, {
|
|
1221
|
+
key: value,
|
|
1222
|
+
record: this.record,
|
|
1223
|
+
builtInMethods: this.builtInMethods
|
|
1224
|
+
});
|
|
1225
|
+
},
|
|
1226
|
+
handleDropdownClick(props) {
|
|
1227
|
+
const {
|
|
1228
|
+
key
|
|
1229
|
+
} = props;
|
|
1230
|
+
const [parent, child] = key.split(this.menuKeyDelimiter);
|
|
1231
|
+
if (!parent || !child) {
|
|
1232
|
+
throw new Error('key is required');
|
|
1233
|
+
}
|
|
1234
|
+
const currentDropdown = this.dataSource.find(item => item.key === parent);
|
|
1235
|
+
const currentClickTarget = currentDropdown.optionList.find(item => item.value === child);
|
|
1236
|
+
const {
|
|
1237
|
+
eventName,
|
|
1238
|
+
type
|
|
1239
|
+
} = currentClickTarget;
|
|
1240
|
+
//TODO generate event by special rule
|
|
1241
|
+
if (type === 'confirm') return;
|
|
1242
|
+
this.$emit(eventName, {
|
|
1243
|
+
key: child,
|
|
1244
|
+
record: this.record,
|
|
1245
|
+
builtInMethods: this.builtInMethods
|
|
1246
|
+
});
|
|
1247
|
+
},
|
|
1248
|
+
handleClickText(props) {
|
|
1249
|
+
const {
|
|
1250
|
+
eventName,
|
|
1251
|
+
key
|
|
1252
|
+
} = props;
|
|
1253
|
+
this.$emit(eventName, {
|
|
1254
|
+
key,
|
|
1255
|
+
record: this.record,
|
|
1256
|
+
builtInMethods: this.builtInMethods
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
|
|
1262
|
+
/* script */
|
|
1263
|
+
const __vue_script__$j = script$j;
|
|
1264
|
+
|
|
1265
|
+
/* template */
|
|
1266
|
+
var __vue_render__$j = function () {
|
|
1267
|
+
var _vm = this;
|
|
1268
|
+
var _h = _vm.$createElement;
|
|
1269
|
+
var _c = _vm._self._c || _h;
|
|
1270
|
+
return _c(
|
|
1271
|
+
"div",
|
|
1272
|
+
{ staticClass: "g-table__action" },
|
|
1273
|
+
_vm._l(_vm.execOperationExpression(_vm.dataSource), function (item, idx) {
|
|
1274
|
+
return _c(
|
|
1275
|
+
"div",
|
|
1276
|
+
{ key: idx, staticClass: "table-action__item" },
|
|
1277
|
+
[
|
|
1278
|
+
item.type == "text"
|
|
1279
|
+
? [
|
|
1280
|
+
_c(
|
|
1281
|
+
"span",
|
|
1282
|
+
{
|
|
1283
|
+
on: {
|
|
1284
|
+
click: function ($event) {
|
|
1285
|
+
return _vm.handleClickText(item)
|
|
1286
|
+
},
|
|
1287
|
+
},
|
|
1288
|
+
},
|
|
1289
|
+
[_vm._v(_vm._s(item.label))]
|
|
1290
|
+
),
|
|
1291
|
+
]
|
|
1292
|
+
: item.type == "dropdown"
|
|
1293
|
+
? [
|
|
1294
|
+
_c(
|
|
1295
|
+
"a-dropdown",
|
|
1296
|
+
[
|
|
1297
|
+
_c(
|
|
1298
|
+
"a-menu",
|
|
1299
|
+
{
|
|
1300
|
+
attrs: { slot: "overlay" },
|
|
1301
|
+
on: { click: _vm.handleDropdownClick },
|
|
1302
|
+
slot: "overlay",
|
|
1303
|
+
},
|
|
1304
|
+
_vm._l(
|
|
1305
|
+
_vm.execOperationExpression(item.optionList),
|
|
1306
|
+
function (opt) {
|
|
1307
|
+
return _c(
|
|
1308
|
+
"a-menu-item",
|
|
1309
|
+
{
|
|
1310
|
+
key:
|
|
1311
|
+
"" +
|
|
1312
|
+
(item.key || "") +
|
|
1313
|
+
_vm.menuKeyDelimiter +
|
|
1314
|
+
(opt.value || ""),
|
|
1315
|
+
},
|
|
1316
|
+
[
|
|
1317
|
+
opt.type == "confirm"
|
|
1318
|
+
? [
|
|
1319
|
+
_c(
|
|
1320
|
+
"a-popconfirm",
|
|
1321
|
+
{
|
|
1322
|
+
attrs: { title: opt.message },
|
|
1323
|
+
on: {
|
|
1324
|
+
confirm: function ($event) {
|
|
1325
|
+
return _vm.handleClickConfirm(opt)
|
|
1326
|
+
},
|
|
1327
|
+
},
|
|
1328
|
+
},
|
|
1329
|
+
[
|
|
1330
|
+
_vm._v(
|
|
1331
|
+
"\n " +
|
|
1332
|
+
_vm._s(opt.label) +
|
|
1333
|
+
"\n "
|
|
1334
|
+
),
|
|
1335
|
+
]
|
|
1336
|
+
),
|
|
1337
|
+
]
|
|
1338
|
+
: [
|
|
1339
|
+
_vm._v(
|
|
1340
|
+
"\n " +
|
|
1341
|
+
_vm._s(opt.label) +
|
|
1342
|
+
"\n "
|
|
1343
|
+
),
|
|
1344
|
+
],
|
|
1345
|
+
],
|
|
1346
|
+
2
|
|
1347
|
+
)
|
|
1348
|
+
}
|
|
1349
|
+
),
|
|
1350
|
+
1
|
|
1351
|
+
),
|
|
1352
|
+
_vm._v(" "),
|
|
1353
|
+
_c("span", [_vm._v(_vm._s(item.label))]),
|
|
1354
|
+
],
|
|
1355
|
+
1
|
|
1356
|
+
),
|
|
1357
|
+
]
|
|
1358
|
+
: _vm._e(),
|
|
1359
|
+
],
|
|
1360
|
+
2
|
|
1361
|
+
)
|
|
1362
|
+
}),
|
|
1363
|
+
0
|
|
1364
|
+
)
|
|
1365
|
+
};
|
|
1366
|
+
var __vue_staticRenderFns__$j = [];
|
|
1367
|
+
__vue_render__$j._withStripped = true;
|
|
1368
|
+
|
|
1369
|
+
/* style */
|
|
1370
|
+
const __vue_inject_styles__$j = function (inject) {
|
|
1371
|
+
if (!inject) return
|
|
1372
|
+
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 });
|
|
1373
|
+
|
|
1374
|
+
};
|
|
1375
|
+
/* scoped */
|
|
1376
|
+
const __vue_scope_id__$j = "data-v-572820bc";
|
|
1377
|
+
/* module identifier */
|
|
1378
|
+
const __vue_module_identifier__$j = undefined;
|
|
1379
|
+
/* functional template */
|
|
1380
|
+
const __vue_is_functional_template__$j = false;
|
|
1381
|
+
/* style inject SSR */
|
|
1382
|
+
|
|
1383
|
+
/* style inject shadow dom */
|
|
1384
|
+
|
|
1385
|
+
|
|
1386
|
+
|
|
1387
|
+
const __vue_component__$j = /*#__PURE__*/normalizeComponent(
|
|
1388
|
+
{ render: __vue_render__$j, staticRenderFns: __vue_staticRenderFns__$j },
|
|
1389
|
+
__vue_inject_styles__$j,
|
|
1390
|
+
__vue_script__$j,
|
|
1391
|
+
__vue_scope_id__$j,
|
|
1392
|
+
__vue_is_functional_template__$j,
|
|
1393
|
+
__vue_module_identifier__$j,
|
|
559
1394
|
false,
|
|
560
1395
|
createInjector,
|
|
561
1396
|
undefined,
|
|
@@ -563,10 +1398,10 @@
|
|
|
563
1398
|
);
|
|
564
1399
|
|
|
565
1400
|
//
|
|
566
|
-
var script$
|
|
1401
|
+
var script$i = {
|
|
567
1402
|
name: 'ele-table',
|
|
568
1403
|
components: {
|
|
569
|
-
Actions: __vue_component__$
|
|
1404
|
+
Actions: __vue_component__$j
|
|
570
1405
|
},
|
|
571
1406
|
props: {
|
|
572
1407
|
actions: {
|
|
@@ -609,10 +1444,10 @@
|
|
|
609
1444
|
};
|
|
610
1445
|
|
|
611
1446
|
/* script */
|
|
612
|
-
const __vue_script__$
|
|
1447
|
+
const __vue_script__$i = script$i;
|
|
613
1448
|
|
|
614
1449
|
/* template */
|
|
615
|
-
var __vue_render__$
|
|
1450
|
+
var __vue_render__$i = function () {
|
|
616
1451
|
var _vm = this;
|
|
617
1452
|
var _h = _vm.$createElement;
|
|
618
1453
|
var _c = _vm._self._c || _h;
|
|
@@ -671,41 +1506,41 @@
|
|
|
671
1506
|
1
|
|
672
1507
|
)
|
|
673
1508
|
};
|
|
674
|
-
var __vue_staticRenderFns__$
|
|
675
|
-
__vue_render__$
|
|
1509
|
+
var __vue_staticRenderFns__$i = [];
|
|
1510
|
+
__vue_render__$i._withStripped = true;
|
|
676
1511
|
|
|
677
1512
|
/* style */
|
|
678
|
-
const __vue_inject_styles__$
|
|
1513
|
+
const __vue_inject_styles__$i = function (inject) {
|
|
679
1514
|
if (!inject) return
|
|
680
|
-
inject("data-v-baf82bc6_0", { source: ".g-table__wrapper[data-v-baf82bc6] {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper .g-table__pagination[data-v-baf82bc6] {\n margin-top: 8px;\n display: flex;\n flex-direction: row;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/table/src/index.vue","index.vue"],"names":[],"mappings":"AA4EA;EACA,aAAA;EACA,kBAAA;AC3EA;AD8EA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,oBAAA;AC5EA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <div class=\"g-table__wrapper\">\n <a-table\n :pagination=\"false\"\n :loading=\"loading\"\n :columns=\"columns\"\n :row-class-name=\"setRowClassName\"\n :data-source=\"dataSource\"\n :scroll=\"{ x: 1500, y: 500 }\">\n <template slot=\"action\" slot-scope=\"record\">\n <Actions v-on=\"$listeners\" :data-source=\"actions\" :record=\"record\"></Actions>\n </template>\n </a-table>\n <div class=\"g-table__pagination\">\n <a-pagination\n :show-total=\"total => `共 ${total} 条数据`\"\n show-size-changer \n show-quick-jumper\n :pageSize=\"pageSize\"\n :pageSizeOptions=\"pageSizeOptions\"\n @change=\"onChangePagination\" \n :total=\"total\">\n </a-pagination>\n </div>\n </div>\n</template>\n\n<script>\nimport Actions from './action.vue'\nexport default {\n name: 'ele-table',\n components: {\n Actions\n },\n props: {\n actions: {\n type: Array,\n default: () => []\n },\n total: {\n type: Number,\n default: 0\n },\n loading: {\n type: Boolean,\n default: false\n },\n columns: {\n type: Array,\n default: () => []\n },\n dataSource: {\n type: Array,\n default: () => []\n },\n pageSize: {\n type: Number,\n default: 10\n },\n pageSizeOptions: {\n type: Array,\n default: () => ['10', '20', '30', '40']\n }\n },\n methods: {\n setRowClassName (record, idx) {\n return idx % 2 === 0 ? 'g-table__row--even' : 'g-table__row--odd'\n },\n onChangePagination (page, pagrSize) {\n this.$emit('change-page', page, pagrSize)\n }\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.g-table__wrapper {\n padding: 16px;\n padding-top: unset;\n .g-table__row--even {}\n .g-table__row--odd {}\n .g-table__pagination {\n margin-top: 8px;\n display: flex;\n flex-direction: row;\n justify-content: end;\n }\n}\n</style>",".g-table__wrapper {\n padding: 16px;\n padding-top: unset;\n}\n.g-table__wrapper .g-table__pagination {\n margin-top: 8px;\n display: flex;\n flex-direction: row;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1515
|
+
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 });
|
|
681
1516
|
|
|
682
1517
|
};
|
|
683
1518
|
/* scoped */
|
|
684
|
-
const __vue_scope_id__$
|
|
1519
|
+
const __vue_scope_id__$i = "data-v-6f3faf52";
|
|
685
1520
|
/* module identifier */
|
|
686
|
-
const __vue_module_identifier__$
|
|
1521
|
+
const __vue_module_identifier__$i = undefined;
|
|
687
1522
|
/* functional template */
|
|
688
|
-
const __vue_is_functional_template__$
|
|
1523
|
+
const __vue_is_functional_template__$i = false;
|
|
689
1524
|
/* style inject SSR */
|
|
690
1525
|
|
|
691
1526
|
/* style inject shadow dom */
|
|
692
1527
|
|
|
693
1528
|
|
|
694
1529
|
|
|
695
|
-
const __vue_component__$
|
|
696
|
-
{ render: __vue_render__$
|
|
697
|
-
__vue_inject_styles__$
|
|
698
|
-
__vue_script__$
|
|
699
|
-
__vue_scope_id__$
|
|
700
|
-
__vue_is_functional_template__$
|
|
701
|
-
__vue_module_identifier__$
|
|
1530
|
+
const __vue_component__$i = /*#__PURE__*/normalizeComponent(
|
|
1531
|
+
{ render: __vue_render__$i, staticRenderFns: __vue_staticRenderFns__$i },
|
|
1532
|
+
__vue_inject_styles__$i,
|
|
1533
|
+
__vue_script__$i,
|
|
1534
|
+
__vue_scope_id__$i,
|
|
1535
|
+
__vue_is_functional_template__$i,
|
|
1536
|
+
__vue_module_identifier__$i,
|
|
702
1537
|
false,
|
|
703
1538
|
createInjector,
|
|
704
1539
|
undefined,
|
|
705
1540
|
undefined
|
|
706
1541
|
);
|
|
707
1542
|
|
|
708
|
-
__vue_component__$
|
|
1543
|
+
__vue_component__$i.install = Vue => Vue.component(__vue_component__$i.name, __vue_component__$i);
|
|
709
1544
|
|
|
710
1545
|
//
|
|
711
1546
|
//
|
|
@@ -731,7 +1566,7 @@
|
|
|
731
1566
|
//
|
|
732
1567
|
//
|
|
733
1568
|
|
|
734
|
-
var script$
|
|
1569
|
+
var script$h = {
|
|
735
1570
|
name: 'ele-tree',
|
|
736
1571
|
props: {
|
|
737
1572
|
treeData: {
|
|
@@ -794,10 +1629,10 @@
|
|
|
794
1629
|
};
|
|
795
1630
|
|
|
796
1631
|
/* script */
|
|
797
|
-
const __vue_script__$
|
|
1632
|
+
const __vue_script__$h = script$h;
|
|
798
1633
|
|
|
799
1634
|
/* template */
|
|
800
|
-
var __vue_render__$
|
|
1635
|
+
var __vue_render__$h = function () {
|
|
801
1636
|
var _vm = this;
|
|
802
1637
|
var _h = _vm.$createElement;
|
|
803
1638
|
var _c = _vm._self._c || _h;
|
|
@@ -854,41 +1689,41 @@
|
|
|
854
1689
|
1
|
|
855
1690
|
)
|
|
856
1691
|
};
|
|
857
|
-
var __vue_staticRenderFns__$
|
|
858
|
-
__vue_render__$
|
|
1692
|
+
var __vue_staticRenderFns__$h = [];
|
|
1693
|
+
__vue_render__$h._withStripped = true;
|
|
859
1694
|
|
|
860
1695
|
/* style */
|
|
861
|
-
const __vue_inject_styles__$
|
|
1696
|
+
const __vue_inject_styles__$h = function (inject) {
|
|
862
1697
|
if (!inject) return
|
|
863
|
-
inject("data-v-
|
|
1698
|
+
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 });
|
|
864
1699
|
|
|
865
1700
|
};
|
|
866
1701
|
/* scoped */
|
|
867
|
-
const __vue_scope_id__$
|
|
1702
|
+
const __vue_scope_id__$h = "data-v-cc99bbf0";
|
|
868
1703
|
/* module identifier */
|
|
869
|
-
const __vue_module_identifier__$
|
|
1704
|
+
const __vue_module_identifier__$h = undefined;
|
|
870
1705
|
/* functional template */
|
|
871
|
-
const __vue_is_functional_template__$
|
|
1706
|
+
const __vue_is_functional_template__$h = false;
|
|
872
1707
|
/* style inject SSR */
|
|
873
1708
|
|
|
874
1709
|
/* style inject shadow dom */
|
|
875
1710
|
|
|
876
1711
|
|
|
877
1712
|
|
|
878
|
-
const __vue_component__$
|
|
879
|
-
{ render: __vue_render__$
|
|
880
|
-
__vue_inject_styles__$
|
|
881
|
-
__vue_script__$
|
|
882
|
-
__vue_scope_id__$
|
|
883
|
-
__vue_is_functional_template__$
|
|
884
|
-
__vue_module_identifier__$
|
|
1713
|
+
const __vue_component__$h = /*#__PURE__*/normalizeComponent(
|
|
1714
|
+
{ render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },
|
|
1715
|
+
__vue_inject_styles__$h,
|
|
1716
|
+
__vue_script__$h,
|
|
1717
|
+
__vue_scope_id__$h,
|
|
1718
|
+
__vue_is_functional_template__$h,
|
|
1719
|
+
__vue_module_identifier__$h,
|
|
885
1720
|
false,
|
|
886
1721
|
createInjector,
|
|
887
1722
|
undefined,
|
|
888
1723
|
undefined
|
|
889
1724
|
);
|
|
890
1725
|
|
|
891
|
-
__vue_component__$
|
|
1726
|
+
__vue_component__$h.install = Vue => Vue.component(__vue_component__$h.name, __vue_component__$h);
|
|
892
1727
|
|
|
893
1728
|
//
|
|
894
1729
|
//
|
|
@@ -898,7 +1733,7 @@
|
|
|
898
1733
|
//
|
|
899
1734
|
//
|
|
900
1735
|
|
|
901
|
-
var script$
|
|
1736
|
+
var script$g = {
|
|
902
1737
|
props: {
|
|
903
1738
|
label: {
|
|
904
1739
|
type: String
|
|
@@ -907,10 +1742,10 @@
|
|
|
907
1742
|
};
|
|
908
1743
|
|
|
909
1744
|
/* script */
|
|
910
|
-
const __vue_script__$
|
|
1745
|
+
const __vue_script__$g = script$g;
|
|
911
1746
|
|
|
912
1747
|
/* template */
|
|
913
|
-
var __vue_render__$
|
|
1748
|
+
var __vue_render__$g = function () {
|
|
914
1749
|
var _vm = this;
|
|
915
1750
|
var _h = _vm.$createElement;
|
|
916
1751
|
var _c = _vm._self._c || _h;
|
|
@@ -920,34 +1755,34 @@
|
|
|
920
1755
|
_c("span", { staticClass: "label__suffix" }, [_vm._v(":")]),
|
|
921
1756
|
])
|
|
922
1757
|
};
|
|
923
|
-
var __vue_staticRenderFns__$
|
|
924
|
-
__vue_render__$
|
|
1758
|
+
var __vue_staticRenderFns__$g = [];
|
|
1759
|
+
__vue_render__$g._withStripped = true;
|
|
925
1760
|
|
|
926
1761
|
/* style */
|
|
927
|
-
const __vue_inject_styles__$
|
|
1762
|
+
const __vue_inject_styles__$g = function (inject) {
|
|
928
1763
|
if (!inject) return
|
|
929
|
-
inject("data-v-
|
|
1764
|
+
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 });
|
|
930
1765
|
|
|
931
1766
|
};
|
|
932
1767
|
/* scoped */
|
|
933
|
-
const __vue_scope_id__$
|
|
1768
|
+
const __vue_scope_id__$g = "data-v-40e71716";
|
|
934
1769
|
/* module identifier */
|
|
935
|
-
const __vue_module_identifier__$
|
|
1770
|
+
const __vue_module_identifier__$g = undefined;
|
|
936
1771
|
/* functional template */
|
|
937
|
-
const __vue_is_functional_template__$
|
|
1772
|
+
const __vue_is_functional_template__$g = false;
|
|
938
1773
|
/* style inject SSR */
|
|
939
1774
|
|
|
940
1775
|
/* style inject shadow dom */
|
|
941
1776
|
|
|
942
1777
|
|
|
943
1778
|
|
|
944
|
-
const __vue_component__$
|
|
945
|
-
{ render: __vue_render__$
|
|
946
|
-
__vue_inject_styles__$
|
|
947
|
-
__vue_script__$
|
|
948
|
-
__vue_scope_id__$
|
|
949
|
-
__vue_is_functional_template__$
|
|
950
|
-
__vue_module_identifier__$
|
|
1779
|
+
const __vue_component__$g = /*#__PURE__*/normalizeComponent(
|
|
1780
|
+
{ render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },
|
|
1781
|
+
__vue_inject_styles__$g,
|
|
1782
|
+
__vue_script__$g,
|
|
1783
|
+
__vue_scope_id__$g,
|
|
1784
|
+
__vue_is_functional_template__$g,
|
|
1785
|
+
__vue_module_identifier__$g,
|
|
951
1786
|
false,
|
|
952
1787
|
createInjector,
|
|
953
1788
|
undefined,
|
|
@@ -955,14 +1790,14 @@
|
|
|
955
1790
|
);
|
|
956
1791
|
|
|
957
1792
|
//
|
|
958
|
-
var script$
|
|
1793
|
+
var script$f = {
|
|
959
1794
|
name: 'ele-search-area',
|
|
960
1795
|
components: {
|
|
961
|
-
EleInput: __vue_component__$
|
|
962
|
-
EleSelect: __vue_component__$
|
|
963
|
-
ELeButton: __vue_component__$
|
|
964
|
-
Label: __vue_component__$
|
|
965
|
-
EleDate: __vue_component__$
|
|
1796
|
+
EleInput: __vue_component__$l,
|
|
1797
|
+
EleSelect: __vue_component__$k,
|
|
1798
|
+
ELeButton: __vue_component__$n,
|
|
1799
|
+
Label: __vue_component__$g,
|
|
1800
|
+
EleDate: __vue_component__$m
|
|
966
1801
|
},
|
|
967
1802
|
props: {
|
|
968
1803
|
gutter: {
|
|
@@ -978,17 +1813,61 @@
|
|
|
978
1813
|
required: true
|
|
979
1814
|
}
|
|
980
1815
|
},
|
|
1816
|
+
data() {
|
|
1817
|
+
return {
|
|
1818
|
+
isExpand: false
|
|
1819
|
+
};
|
|
1820
|
+
},
|
|
981
1821
|
computed: {
|
|
982
|
-
|
|
983
|
-
return
|
|
1822
|
+
cuttingFormula() {
|
|
1823
|
+
return 24 / this.span - 1;
|
|
1824
|
+
},
|
|
1825
|
+
buildDataSource() {
|
|
1826
|
+
return this.controlDisplayByFormula(this.mapDefaultValueToValue());
|
|
984
1827
|
},
|
|
985
1828
|
innerDataSource() {
|
|
986
|
-
return [...this.
|
|
987
|
-
type: '_action'
|
|
1829
|
+
return [...this.buildDataSource, {
|
|
1830
|
+
type: '_action',
|
|
1831
|
+
_show: true
|
|
988
1832
|
}];
|
|
989
1833
|
}
|
|
990
1834
|
},
|
|
1835
|
+
created() {},
|
|
991
1836
|
methods: {
|
|
1837
|
+
controlDisplayByFormula(dataSource = []) {
|
|
1838
|
+
if (this.isExpand) {
|
|
1839
|
+
dataSource.forEach(item => {
|
|
1840
|
+
this.$set(item, '_show', true);
|
|
1841
|
+
});
|
|
1842
|
+
} else {
|
|
1843
|
+
dataSource.forEach((item, idx) => {
|
|
1844
|
+
if (idx < this.cuttingFormula) {
|
|
1845
|
+
this.$set(item, '_show', true);
|
|
1846
|
+
} else {
|
|
1847
|
+
this.$set(item, '_show', false);
|
|
1848
|
+
}
|
|
1849
|
+
});
|
|
1850
|
+
}
|
|
1851
|
+
return dataSource;
|
|
1852
|
+
},
|
|
1853
|
+
buildDefaultValue(arg) {
|
|
1854
|
+
if (!arg || arg.charAt(0) !== '_') return arg;
|
|
1855
|
+
return parse(arg, {
|
|
1856
|
+
_route: this.$route.query
|
|
1857
|
+
});
|
|
1858
|
+
},
|
|
1859
|
+
mapDefaultValueToValue() {
|
|
1860
|
+
this.dataSource.forEach(props => {
|
|
1861
|
+
this.$set(props, '_show', this.isExpand);
|
|
1862
|
+
if (props.defaultValue) {
|
|
1863
|
+
this.$set(props, '_value', this.buildDefaultValue(props.defaultValue));
|
|
1864
|
+
}
|
|
1865
|
+
});
|
|
1866
|
+
return this.dataSource;
|
|
1867
|
+
},
|
|
1868
|
+
handleClickExpandCollapse() {
|
|
1869
|
+
this.isExpand = !this.isExpand;
|
|
1870
|
+
},
|
|
992
1871
|
handleClickSearch() {
|
|
993
1872
|
const querys = this.extractValues();
|
|
994
1873
|
this.$emit('search', querys);
|
|
@@ -998,7 +1877,7 @@
|
|
|
998
1877
|
this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {
|
|
999
1878
|
switch (item.type) {
|
|
1000
1879
|
case 'DatePicker':
|
|
1001
|
-
ret[item.name] =
|
|
1880
|
+
ret[item.name] = typeof item._value == 'undefined' ? undefined : moment__default["default"](item._value).format(item.format);
|
|
1002
1881
|
break;
|
|
1003
1882
|
default:
|
|
1004
1883
|
ret[item.name] = item._value;
|
|
@@ -1009,15 +1888,21 @@
|
|
|
1009
1888
|
},
|
|
1010
1889
|
handleClickReset() {
|
|
1011
1890
|
this.innerDataSource.filter(item => item.type !== '_action').forEach(item => {
|
|
1891
|
+
const {
|
|
1892
|
+
defaultValue
|
|
1893
|
+
} = item;
|
|
1012
1894
|
switch (item.type) {
|
|
1013
1895
|
case 'Select':
|
|
1014
|
-
this.$set(item, '_value',
|
|
1896
|
+
defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue));
|
|
1897
|
+
!defaultValue && this.$set(item, '_value', null);
|
|
1015
1898
|
break;
|
|
1016
1899
|
case 'DatePicker':
|
|
1017
|
-
this.$set(item, '_value',
|
|
1900
|
+
defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue));
|
|
1901
|
+
!defaultValue && this.$set(item, '_value', undefined);
|
|
1018
1902
|
break;
|
|
1019
1903
|
default:
|
|
1020
|
-
this.$set(item, '_value',
|
|
1904
|
+
defaultValue && this.$set(item, '_value', this.buildDefaultValue(defaultValue));
|
|
1905
|
+
!defaultValue && this.$set(item, '_value', null);
|
|
1021
1906
|
break;
|
|
1022
1907
|
}
|
|
1023
1908
|
});
|
|
@@ -1032,10 +1917,10 @@
|
|
|
1032
1917
|
};
|
|
1033
1918
|
|
|
1034
1919
|
/* script */
|
|
1035
|
-
const __vue_script__$
|
|
1920
|
+
const __vue_script__$f = script$f;
|
|
1036
1921
|
|
|
1037
1922
|
/* template */
|
|
1038
|
-
var __vue_render__$
|
|
1923
|
+
var __vue_render__$f = function () {
|
|
1039
1924
|
var _vm = this;
|
|
1040
1925
|
var _h = _vm.$createElement;
|
|
1041
1926
|
var _c = _vm._self._c || _h;
|
|
@@ -1046,126 +1931,175 @@
|
|
|
1046
1931
|
_c(
|
|
1047
1932
|
"a-row",
|
|
1048
1933
|
{ attrs: { gutter: _vm.gutter } },
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
[
|
|
1054
|
-
item.type == "_action"
|
|
1934
|
+
[
|
|
1935
|
+
_vm._l(_vm.innerDataSource, function (item, idx) {
|
|
1936
|
+
return [
|
|
1937
|
+
item._show
|
|
1055
1938
|
? _c(
|
|
1056
|
-
"
|
|
1057
|
-
{
|
|
1939
|
+
"a-col",
|
|
1940
|
+
{ key: idx, attrs: { span: item.span || _vm.span } },
|
|
1058
1941
|
[
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
attrs: { icon: "reload" },
|
|
1073
|
-
on: { click: _vm.handleClickReset },
|
|
1074
|
-
},
|
|
1075
|
-
[_vm._v("重置")]
|
|
1076
|
-
),
|
|
1077
|
-
],
|
|
1078
|
-
1
|
|
1079
|
-
)
|
|
1080
|
-
: _c(
|
|
1081
|
-
"div",
|
|
1082
|
-
{ staticClass: "search-area__item" },
|
|
1083
|
-
[
|
|
1084
|
-
item.type == "Input"
|
|
1085
|
-
? [
|
|
1086
|
-
_c("Label", { attrs: { label: item.label } }),
|
|
1087
|
-
_vm._v(" "),
|
|
1088
|
-
_c("ele-input", {
|
|
1089
|
-
model: {
|
|
1090
|
-
value: item._value,
|
|
1091
|
-
callback: function ($$v) {
|
|
1092
|
-
_vm.$set(item, "_value", $$v);
|
|
1942
|
+
item.type == "_action"
|
|
1943
|
+
? _c(
|
|
1944
|
+
"div",
|
|
1945
|
+
{
|
|
1946
|
+
staticClass:
|
|
1947
|
+
"search-area__item search-area--action",
|
|
1948
|
+
},
|
|
1949
|
+
[
|
|
1950
|
+
_c(
|
|
1951
|
+
"ele-button",
|
|
1952
|
+
{
|
|
1953
|
+
attrs: { icon: "search", type: "primary" },
|
|
1954
|
+
on: { click: _vm.handleClickSearch },
|
|
1093
1955
|
},
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
attrs: { "data-source": item.optionList },
|
|
1104
|
-
model: {
|
|
1105
|
-
value: item._value,
|
|
1106
|
-
callback: function ($$v) {
|
|
1107
|
-
_vm.$set(item, "_value", $$v);
|
|
1956
|
+
[_vm._v("查询")]
|
|
1957
|
+
),
|
|
1958
|
+
_vm._v(" "),
|
|
1959
|
+
_c(
|
|
1960
|
+
"ele-button",
|
|
1961
|
+
{
|
|
1962
|
+
staticStyle: { "margin-left": "8px" },
|
|
1963
|
+
attrs: { icon: "reload" },
|
|
1964
|
+
on: { click: _vm.handleClickReset },
|
|
1108
1965
|
},
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
_c("ele-date", {
|
|
1118
|
-
attrs: { format: item.format },
|
|
1119
|
-
model: {
|
|
1120
|
-
value: item._value,
|
|
1121
|
-
callback: function ($$v) {
|
|
1122
|
-
_vm.$set(item, "_value", $$v);
|
|
1966
|
+
[_vm._v("重置")]
|
|
1967
|
+
),
|
|
1968
|
+
_vm._v(" "),
|
|
1969
|
+
_c(
|
|
1970
|
+
"div",
|
|
1971
|
+
{
|
|
1972
|
+
staticClass: "expand-collapse",
|
|
1973
|
+
on: { click: _vm.handleClickExpandCollapse },
|
|
1123
1974
|
},
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1975
|
+
[
|
|
1976
|
+
_c(
|
|
1977
|
+
"span",
|
|
1978
|
+
{ staticClass: "expand-collapse__text" },
|
|
1979
|
+
[
|
|
1980
|
+
_vm._v(
|
|
1981
|
+
_vm._s(_vm.isExpand ? "收起" : "展开")
|
|
1982
|
+
),
|
|
1983
|
+
]
|
|
1984
|
+
),
|
|
1985
|
+
_vm._v(" "),
|
|
1986
|
+
_c(
|
|
1987
|
+
"span",
|
|
1988
|
+
{ staticClass: "expand-collapse__icon" },
|
|
1989
|
+
[
|
|
1990
|
+
_vm.isExpand
|
|
1991
|
+
? _c("a-icon", {
|
|
1992
|
+
attrs: { type: "up" },
|
|
1993
|
+
})
|
|
1994
|
+
: _c("a-icon", {
|
|
1995
|
+
attrs: { type: "down" },
|
|
1996
|
+
}),
|
|
1997
|
+
],
|
|
1998
|
+
1
|
|
1999
|
+
),
|
|
2000
|
+
]
|
|
2001
|
+
),
|
|
2002
|
+
],
|
|
2003
|
+
1
|
|
2004
|
+
)
|
|
2005
|
+
: _c(
|
|
2006
|
+
"div",
|
|
2007
|
+
{ staticClass: "search-area__item" },
|
|
2008
|
+
[
|
|
2009
|
+
item.type == "Input"
|
|
2010
|
+
? [
|
|
2011
|
+
_c("Label", {
|
|
2012
|
+
attrs: { label: item.label },
|
|
2013
|
+
}),
|
|
2014
|
+
_vm._v(" "),
|
|
2015
|
+
_c("ele-input", {
|
|
2016
|
+
model: {
|
|
2017
|
+
value: item._value,
|
|
2018
|
+
callback: function ($$v) {
|
|
2019
|
+
_vm.$set(item, "_value", $$v);
|
|
2020
|
+
},
|
|
2021
|
+
expression: "item._value",
|
|
2022
|
+
},
|
|
2023
|
+
}),
|
|
2024
|
+
]
|
|
2025
|
+
: item.type == "Select"
|
|
2026
|
+
? [
|
|
2027
|
+
_c("Label", {
|
|
2028
|
+
attrs: { label: item.label },
|
|
2029
|
+
}),
|
|
2030
|
+
_vm._v(" "),
|
|
2031
|
+
_c("ele-select", {
|
|
2032
|
+
attrs: { "data-source": item.optionList },
|
|
2033
|
+
model: {
|
|
2034
|
+
value: item._value,
|
|
2035
|
+
callback: function ($$v) {
|
|
2036
|
+
_vm.$set(item, "_value", $$v);
|
|
2037
|
+
},
|
|
2038
|
+
expression: "item._value",
|
|
2039
|
+
},
|
|
2040
|
+
}),
|
|
2041
|
+
]
|
|
2042
|
+
: item.type == "DatePicker"
|
|
2043
|
+
? [
|
|
2044
|
+
_c("Label", {
|
|
2045
|
+
attrs: { label: item.label },
|
|
2046
|
+
}),
|
|
2047
|
+
_vm._v(" "),
|
|
2048
|
+
_c("ele-date", {
|
|
2049
|
+
attrs: { format: item.format },
|
|
2050
|
+
model: {
|
|
2051
|
+
value: item._value,
|
|
2052
|
+
callback: function ($$v) {
|
|
2053
|
+
_vm.$set(item, "_value", $$v);
|
|
2054
|
+
},
|
|
2055
|
+
expression: "item._value",
|
|
2056
|
+
},
|
|
2057
|
+
}),
|
|
2058
|
+
]
|
|
2059
|
+
: _vm._e(),
|
|
2060
|
+
],
|
|
2061
|
+
2
|
|
2062
|
+
),
|
|
2063
|
+
]
|
|
2064
|
+
)
|
|
2065
|
+
: _vm._e(),
|
|
1132
2066
|
]
|
|
1133
|
-
)
|
|
1134
|
-
|
|
1135
|
-
|
|
2067
|
+
}),
|
|
2068
|
+
],
|
|
2069
|
+
2
|
|
1136
2070
|
),
|
|
1137
2071
|
],
|
|
1138
2072
|
1
|
|
1139
2073
|
)
|
|
1140
2074
|
};
|
|
1141
|
-
var __vue_staticRenderFns__$
|
|
1142
|
-
__vue_render__$
|
|
2075
|
+
var __vue_staticRenderFns__$f = [];
|
|
2076
|
+
__vue_render__$f._withStripped = true;
|
|
1143
2077
|
|
|
1144
2078
|
/* style */
|
|
1145
|
-
const __vue_inject_styles__$
|
|
2079
|
+
const __vue_inject_styles__$f = function (inject) {
|
|
1146
2080
|
if (!inject) return
|
|
1147
|
-
inject("data-v-
|
|
2081
|
+
inject("data-v-5a224358_0", { source: ".search-area__wrapper[data-v-5a224358] {\n padding-top: 16px;\n padding-left: 16px;\n padding-right: 16px;\n}\n.search-area__wrapper[data-v-5a224358] .ant-col:last-child {\n float: right;\n}\n.search-area__wrapper .search-area__item[data-v-5a224358] {\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-5a224358] {\n justify-content: end;\n}\n.search-area__wrapper .search-area__item .expand-collapse[data-v-5a224358] {\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-5a224358] {\n font-size: 14px;\n}\n.search-area__wrapper .search-area__item .expand-collapse .expand-collapse__icon[data-v-5a224358] {\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":"AAyKA;EACA,iBAAA;EACA,kBAAA;EACA,mBAAA;ACxKA;AD0KA;EACA,YAAA;ACxKA;AD2KA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACzKA;AD0KA;EACA,oBAAA;ACxKA;AD0KA;EACA,gBAAA;EACA,YAAA;EACA,iBAAA;EACA,kCAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,uBAAA;EACA,eAAA;ACxKA;ADyKA;EACA,eAAA;ACvKA;ADyKA;EACA,eAAA;EACA,gBAAA;ACvKA;;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 </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 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 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 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 });
|
|
1148
2082
|
|
|
1149
2083
|
};
|
|
1150
2084
|
/* scoped */
|
|
1151
|
-
const __vue_scope_id__$
|
|
2085
|
+
const __vue_scope_id__$f = "data-v-5a224358";
|
|
1152
2086
|
/* module identifier */
|
|
1153
|
-
const __vue_module_identifier__$
|
|
2087
|
+
const __vue_module_identifier__$f = undefined;
|
|
1154
2088
|
/* functional template */
|
|
1155
|
-
const __vue_is_functional_template__$
|
|
2089
|
+
const __vue_is_functional_template__$f = false;
|
|
1156
2090
|
/* style inject SSR */
|
|
1157
2091
|
|
|
1158
2092
|
/* style inject shadow dom */
|
|
1159
2093
|
|
|
1160
2094
|
|
|
1161
2095
|
|
|
1162
|
-
const __vue_component__$
|
|
1163
|
-
{ render: __vue_render__$
|
|
1164
|
-
__vue_inject_styles__$
|
|
1165
|
-
__vue_script__$
|
|
1166
|
-
__vue_scope_id__$
|
|
1167
|
-
__vue_is_functional_template__$
|
|
1168
|
-
__vue_module_identifier__$
|
|
2096
|
+
const __vue_component__$f = /*#__PURE__*/normalizeComponent(
|
|
2097
|
+
{ render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },
|
|
2098
|
+
__vue_inject_styles__$f,
|
|
2099
|
+
__vue_script__$f,
|
|
2100
|
+
__vue_scope_id__$f,
|
|
2101
|
+
__vue_is_functional_template__$f,
|
|
2102
|
+
__vue_module_identifier__$f,
|
|
1169
2103
|
false,
|
|
1170
2104
|
createInjector,
|
|
1171
2105
|
undefined,
|
|
@@ -1173,29 +2107,24 @@
|
|
|
1173
2107
|
);
|
|
1174
2108
|
|
|
1175
2109
|
//
|
|
1176
|
-
var script$
|
|
2110
|
+
var script$e = {
|
|
1177
2111
|
name: 'ele-button-group',
|
|
1178
2112
|
components: {
|
|
1179
|
-
EleButton: __vue_component__$
|
|
2113
|
+
EleButton: __vue_component__$n
|
|
1180
2114
|
},
|
|
1181
2115
|
props: {
|
|
1182
2116
|
dataSource: {
|
|
1183
2117
|
type: Array,
|
|
1184
2118
|
default: () => []
|
|
1185
2119
|
}
|
|
1186
|
-
},
|
|
1187
|
-
methods: {
|
|
1188
|
-
handleClick(props) {
|
|
1189
|
-
this.$emit('click', props);
|
|
1190
|
-
}
|
|
1191
2120
|
}
|
|
1192
2121
|
};
|
|
1193
2122
|
|
|
1194
2123
|
/* script */
|
|
1195
|
-
const __vue_script__$
|
|
2124
|
+
const __vue_script__$e = script$e;
|
|
1196
2125
|
|
|
1197
2126
|
/* template */
|
|
1198
|
-
var __vue_render__$
|
|
2127
|
+
var __vue_render__$e = function () {
|
|
1199
2128
|
var _vm = this;
|
|
1200
2129
|
var _h = _vm.$createElement;
|
|
1201
2130
|
var _c = _vm._self._c || _h;
|
|
@@ -1205,120 +2134,68 @@
|
|
|
1205
2134
|
_vm._l(_vm.dataSource, function (item, idx) {
|
|
1206
2135
|
return _c(
|
|
1207
2136
|
"ele-button",
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
2137
|
+
_vm._g(
|
|
2138
|
+
{
|
|
2139
|
+
key: idx,
|
|
2140
|
+
attrs: {
|
|
2141
|
+
type: item.type,
|
|
2142
|
+
icon: item.icon,
|
|
2143
|
+
mode: item.mode,
|
|
2144
|
+
"data-source": item.optionList,
|
|
2145
|
+
"event-name": item.eventName,
|
|
2146
|
+
record: item,
|
|
1214
2147
|
},
|
|
1215
2148
|
},
|
|
1216
|
-
|
|
2149
|
+
_vm.$listeners
|
|
2150
|
+
),
|
|
1217
2151
|
[_vm._v("\n " + _vm._s(item.label) + "\n ")]
|
|
1218
2152
|
)
|
|
1219
2153
|
}),
|
|
1220
2154
|
1
|
|
1221
2155
|
)
|
|
1222
2156
|
};
|
|
1223
|
-
var __vue_staticRenderFns__$
|
|
1224
|
-
__vue_render__$
|
|
2157
|
+
var __vue_staticRenderFns__$e = [];
|
|
2158
|
+
__vue_render__$e._withStripped = true;
|
|
1225
2159
|
|
|
1226
2160
|
/* style */
|
|
1227
|
-
const __vue_inject_styles__$
|
|
2161
|
+
const __vue_inject_styles__$e = function (inject) {
|
|
1228
2162
|
if (!inject) return
|
|
1229
|
-
inject("data-v-
|
|
2163
|
+
inject("data-v-de67e2d2_0", { source: ".button-group__wrapper[data-v-de67e2d2] {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn[data-v-de67e2d2] {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn[data-v-de67e2d2]:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["E:\\work\\code\\ganjiao\\ganjian-monorepo\\packages\\components\\packages\\composite-components\\button-group\\src\\index.vue","index.vue"],"names":[],"mappings":"AAkCA;EACA,aAAA;EACA,kBAAA;EACA,mBAAA;ACjCA;ADkCA;EACA,gBAAA;AChCA;ADiCA;EACA,cAAA;AC/BA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"button-group__wrapper\">\r\n <ele-button \r\n v-for=\"(item, idx) in dataSource\" \r\n :type=\"item.type\"\r\n :icon=\"item.icon\"\r\n :mode=\"item.mode\"\r\n :data-source=\"item.optionList\"\r\n :event-name=\"item.eventName\"\r\n :record=\"item\"\r\n v-on=\"$listeners\"\r\n :key=\"idx\">\r\n {{ item.label }}\r\n </ele-button>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport EleButton from '../../../button/src/index.vue'\r\nexport default {\r\n name: 'ele-button-group',\r\n components: {\r\n EleButton\r\n },\r\n props: {\r\n dataSource: {\r\n type: Array,\r\n default: () => []\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.button-group__wrapper {\r\n display: flex;\r\n padding-left: 16px;\r\n padding-right: 16px;\r\n .ant-btn {\r\n margin-left: 8px;\r\n &:first-child {\r\n margin-left: 0;\r\n }\r\n }\r\n}\r\n</style>",".button-group__wrapper {\n display: flex;\n padding-left: 16px;\n padding-right: 16px;\n}\n.button-group__wrapper .ant-btn {\n margin-left: 8px;\n}\n.button-group__wrapper .ant-btn:first-child {\n margin-left: 0;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
1230
2164
|
|
|
1231
2165
|
};
|
|
1232
2166
|
/* scoped */
|
|
1233
|
-
const __vue_scope_id__$
|
|
2167
|
+
const __vue_scope_id__$e = "data-v-de67e2d2";
|
|
1234
2168
|
/* module identifier */
|
|
1235
|
-
const __vue_module_identifier__$
|
|
2169
|
+
const __vue_module_identifier__$e = undefined;
|
|
1236
2170
|
/* functional template */
|
|
1237
|
-
const __vue_is_functional_template__$
|
|
2171
|
+
const __vue_is_functional_template__$e = false;
|
|
1238
2172
|
/* style inject SSR */
|
|
1239
2173
|
|
|
1240
2174
|
/* style inject shadow dom */
|
|
1241
2175
|
|
|
1242
2176
|
|
|
1243
2177
|
|
|
1244
|
-
const __vue_component__$
|
|
1245
|
-
{ render: __vue_render__$
|
|
1246
|
-
__vue_inject_styles__$
|
|
1247
|
-
__vue_script__$
|
|
1248
|
-
__vue_scope_id__$
|
|
1249
|
-
__vue_is_functional_template__$
|
|
1250
|
-
__vue_module_identifier__$
|
|
2178
|
+
const __vue_component__$e = /*#__PURE__*/normalizeComponent(
|
|
2179
|
+
{ render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },
|
|
2180
|
+
__vue_inject_styles__$e,
|
|
2181
|
+
__vue_script__$e,
|
|
2182
|
+
__vue_scope_id__$e,
|
|
2183
|
+
__vue_is_functional_template__$e,
|
|
2184
|
+
__vue_module_identifier__$e,
|
|
1251
2185
|
false,
|
|
1252
2186
|
createInjector,
|
|
1253
2187
|
undefined,
|
|
1254
2188
|
undefined
|
|
1255
2189
|
);
|
|
1256
2190
|
|
|
1257
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
1258
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
1259
|
-
// generators (like Math.random()).
|
|
1260
|
-
let getRandomValues;
|
|
1261
|
-
const rnds8 = new Uint8Array(16);
|
|
1262
|
-
function rng() {
|
|
1263
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
1264
|
-
if (!getRandomValues) {
|
|
1265
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
1266
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
1267
|
-
if (!getRandomValues) {
|
|
1268
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
return getRandomValues(rnds8);
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
/**
|
|
1275
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
1276
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
1277
|
-
*/
|
|
1278
|
-
|
|
1279
|
-
const byteToHex = [];
|
|
1280
|
-
for (let i = 0; i < 256; ++i) {
|
|
1281
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
1282
|
-
}
|
|
1283
|
-
function unsafeStringify(arr, offset = 0) {
|
|
1284
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
1285
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
1286
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
1287
|
-
}
|
|
1288
|
-
|
|
1289
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
1290
|
-
var native = {
|
|
1291
|
-
randomUUID
|
|
1292
|
-
};
|
|
1293
|
-
|
|
1294
|
-
function v4(options, buf, offset) {
|
|
1295
|
-
if (native.randomUUID && !buf && !options) {
|
|
1296
|
-
return native.randomUUID();
|
|
1297
|
-
}
|
|
1298
|
-
options = options || {};
|
|
1299
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
1300
|
-
|
|
1301
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
1302
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
1303
|
-
|
|
1304
|
-
if (buf) {
|
|
1305
|
-
offset = offset || 0;
|
|
1306
|
-
for (let i = 0; i < 16; ++i) {
|
|
1307
|
-
buf[offset + i] = rnds[i];
|
|
1308
|
-
}
|
|
1309
|
-
return buf;
|
|
1310
|
-
}
|
|
1311
|
-
return unsafeStringify(rnds);
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
2191
|
//
|
|
1315
|
-
var script$
|
|
2192
|
+
var script$d = {
|
|
1316
2193
|
name: 'ele-tree-table-model',
|
|
1317
2194
|
components: {
|
|
1318
|
-
EleTree: __vue_component__$
|
|
1319
|
-
EleTable: __vue_component__$
|
|
1320
|
-
EleSearchArea: __vue_component__$
|
|
1321
|
-
EleButtonGroup: __vue_component__$
|
|
2195
|
+
EleTree: __vue_component__$h,
|
|
2196
|
+
EleTable: __vue_component__$i,
|
|
2197
|
+
EleSearchArea: __vue_component__$f,
|
|
2198
|
+
EleButtonGroup: __vue_component__$e
|
|
1322
2199
|
},
|
|
1323
2200
|
props: {
|
|
1324
2201
|
treeMeta: {
|
|
@@ -1338,6 +2215,12 @@
|
|
|
1338
2215
|
default: () => ({})
|
|
1339
2216
|
}
|
|
1340
2217
|
},
|
|
2218
|
+
provide() {
|
|
2219
|
+
return {
|
|
2220
|
+
requestTreeData: this.requestTreeData,
|
|
2221
|
+
requestTableData: this.requestTableData
|
|
2222
|
+
};
|
|
2223
|
+
},
|
|
1341
2224
|
data() {
|
|
1342
2225
|
return {
|
|
1343
2226
|
treeData: [],
|
|
@@ -1358,6 +2241,9 @@
|
|
|
1358
2241
|
};
|
|
1359
2242
|
},
|
|
1360
2243
|
computed: {
|
|
2244
|
+
showTree() {
|
|
2245
|
+
return !!Object.keys(this.treeMeta).length;
|
|
2246
|
+
},
|
|
1361
2247
|
buttonGroup() {
|
|
1362
2248
|
return v4();
|
|
1363
2249
|
},
|
|
@@ -1452,15 +2338,17 @@
|
|
|
1452
2338
|
}
|
|
1453
2339
|
},
|
|
1454
2340
|
async created() {
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
2341
|
+
if (this.showTree) {
|
|
2342
|
+
this.treeData = await this.requestTreeData();
|
|
2343
|
+
const [defaultTreeNode = {}] = this.treeData;
|
|
2344
|
+
this.defaultExpandedKeys = [defaultTreeNode[this.replaceFields.key]];
|
|
2345
|
+
this.defaultSelectedKeys = [defaultTreeNode[this.replaceFields.key]];
|
|
2346
|
+
this.currentTreeNodeData = defaultTreeNode;
|
|
2347
|
+
}
|
|
1459
2348
|
const {
|
|
1460
2349
|
fieldMap
|
|
1461
2350
|
} = this.tableMeta;
|
|
1462
|
-
this.
|
|
1463
|
-
this.tableData = await this.requestTableData(this.execTableFieldMap(fieldMap, defaultTreeNode));
|
|
2351
|
+
this.tableData = await this.requestTableData(this.execTableFieldMap(fieldMap, this.currentTreeNodeData));
|
|
1464
2352
|
},
|
|
1465
2353
|
methods: {
|
|
1466
2354
|
handleClickButtonGroup(props) {
|
|
@@ -1586,100 +2474,117 @@
|
|
|
1586
2474
|
};
|
|
1587
2475
|
|
|
1588
2476
|
/* script */
|
|
1589
|
-
const __vue_script__$
|
|
2477
|
+
const __vue_script__$d = script$d;
|
|
1590
2478
|
|
|
1591
2479
|
/* template */
|
|
1592
|
-
var __vue_render__$
|
|
2480
|
+
var __vue_render__$d = function () {
|
|
1593
2481
|
var _vm = this;
|
|
1594
2482
|
var _h = _vm.$createElement;
|
|
1595
2483
|
var _c = _vm._self._c || _h;
|
|
1596
|
-
return _c("section", { staticClass: "model__tree-table" }, [
|
|
1597
|
-
|
|
1598
|
-
"section",
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
2484
|
+
return _c("section", { staticClass: "ele model__tree-table" }, [
|
|
2485
|
+
_vm.showTree
|
|
2486
|
+
? _c("section", { staticClass: "model__tree-table--container" }, [
|
|
2487
|
+
_c("div", { staticClass: "model__tree--title" }),
|
|
2488
|
+
_vm._v(" "),
|
|
2489
|
+
_c(
|
|
2490
|
+
"section",
|
|
2491
|
+
{ ref: _vm.modelTreeWrapper, staticClass: "model__tree--wrapper" },
|
|
2492
|
+
[
|
|
2493
|
+
_c("ele-tree", {
|
|
2494
|
+
attrs: {
|
|
2495
|
+
"tree-data": _vm.treeData,
|
|
2496
|
+
defaultExpandedKeys: _vm.defaultExpandedKeys,
|
|
2497
|
+
defaultSelectedKeys: _vm.defaultSelectedKeys,
|
|
2498
|
+
"replace-fields":
|
|
2499
|
+
_vm.treeMeta.replaceFields || _vm.replaceFields,
|
|
2500
|
+
},
|
|
2501
|
+
on: { select: _vm.selectTreeNode },
|
|
2502
|
+
}),
|
|
2503
|
+
],
|
|
2504
|
+
1
|
|
2505
|
+
),
|
|
2506
|
+
])
|
|
2507
|
+
: _vm._e(),
|
|
1613
2508
|
_vm._v(" "),
|
|
1614
|
-
_c(
|
|
1615
|
-
"
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
staticStyle: { "margin-top": "8px" },
|
|
1636
|
-
attrs: {
|
|
1637
|
-
loading: _vm.loading,
|
|
1638
|
-
columns: _vm.columns,
|
|
1639
|
-
total: _vm.total,
|
|
1640
|
-
actions: _vm.actions,
|
|
1641
|
-
pageSize: _vm.pageSize,
|
|
1642
|
-
pageSizeOptions: _vm.pageSizeOptions,
|
|
1643
|
-
"data-source": _vm.tableData,
|
|
2509
|
+
_c("section", { staticClass: "model__table--container" }, [
|
|
2510
|
+
_c("div", { staticClass: "model__table--title" }),
|
|
2511
|
+
_vm._v(" "),
|
|
2512
|
+
_c(
|
|
2513
|
+
"section",
|
|
2514
|
+
{ ref: _vm.modelTableWrapper, staticClass: "model__table--wrapper" },
|
|
2515
|
+
[
|
|
2516
|
+
_c("ele-search-area", {
|
|
2517
|
+
ref: _vm.searchArea,
|
|
2518
|
+
attrs: { "data-source": _vm.searchMeta.elements },
|
|
2519
|
+
on: { search: _vm.onSearch },
|
|
2520
|
+
}),
|
|
2521
|
+
_vm._v(" "),
|
|
2522
|
+
_c(
|
|
2523
|
+
"ele-button-group",
|
|
2524
|
+
_vm._g(
|
|
2525
|
+
{
|
|
2526
|
+
ref: _vm.buttonGroup,
|
|
2527
|
+
staticStyle: { "margin-top": "16px" },
|
|
2528
|
+
attrs: { "data-source": _vm.getButtonGroupElements },
|
|
2529
|
+
on: { click: _vm.handleClickButtonGroup },
|
|
1644
2530
|
},
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
)
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
2531
|
+
_vm.$listeners
|
|
2532
|
+
)
|
|
2533
|
+
),
|
|
2534
|
+
_vm._v(" "),
|
|
2535
|
+
_c(
|
|
2536
|
+
"ele-table",
|
|
2537
|
+
_vm._g(
|
|
2538
|
+
{
|
|
2539
|
+
staticStyle: { "margin-top": "8px" },
|
|
2540
|
+
attrs: {
|
|
2541
|
+
loading: _vm.loading,
|
|
2542
|
+
columns: _vm.columns,
|
|
2543
|
+
total: _vm.total,
|
|
2544
|
+
actions: _vm.actions,
|
|
2545
|
+
pageSize: _vm.pageSize,
|
|
2546
|
+
pageSizeOptions: _vm.pageSizeOptions,
|
|
2547
|
+
"data-source": _vm.tableData,
|
|
2548
|
+
},
|
|
2549
|
+
on: { "change-page": _vm.onChangePage },
|
|
2550
|
+
},
|
|
2551
|
+
_vm.$listeners
|
|
2552
|
+
)
|
|
2553
|
+
),
|
|
2554
|
+
],
|
|
2555
|
+
1
|
|
2556
|
+
),
|
|
2557
|
+
]),
|
|
1653
2558
|
])
|
|
1654
2559
|
};
|
|
1655
|
-
var __vue_staticRenderFns__$
|
|
1656
|
-
__vue_render__$
|
|
2560
|
+
var __vue_staticRenderFns__$d = [];
|
|
2561
|
+
__vue_render__$d._withStripped = true;
|
|
1657
2562
|
|
|
1658
2563
|
/* style */
|
|
1659
|
-
const __vue_inject_styles__$
|
|
2564
|
+
const __vue_inject_styles__$d = function (inject) {
|
|
1660
2565
|
if (!inject) return
|
|
1661
|
-
inject("data-v-47f01802_0", { source: ".model__tree-table[data-v-47f01802] {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.model__tree-table .model__tree--wrapper[data-v-47f01802] {\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.model__tree-table .model__table--wrapper[data-v-47f01802] {\n min-width: 0;\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["/Users/huangshan/Goldgov/front/ganjiao/base-elearning-frontend-model/packages/components/packages/tree-table-model/src/index.vue","index.vue"],"names":[],"mappings":"AA8QA;EACA,uBAAA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;AC7QA;AD8QA;EACA,YAAA;EACA,gBAAA;EACA,cAAA;EACA,aAAA;EACA,sBAAA;EACA,kBAAA;EACA,gBAAA;AC5QA;AD8QA;EACA,YAAA;EACA,gBAAA;AC5QA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\n <section class=\"model__tree-table\">\n <section :ref=\"modelTreeWrapper\" class=\"model__tree--wrapper\">\n <ele-tree \n :tree-data=\"treeData\"\n :defaultExpandedKeys=\"defaultExpandedKeys\"\n :defaultSelectedKeys=\"defaultSelectedKeys\"\n @select=\"selectTreeNode\"\n :replace-fields=\"treeMeta.replaceFields || replaceFields\">\n </ele-tree>\n </section>\n <section :ref=\"modelTableWrapper\" class=\"model__table--wrapper\">\n <ele-search-area :ref=\"searchArea\" @search=\"onSearch\" :data-source=\"searchMeta.elements\"></ele-search-area>\n <ele-button-group :ref=\"buttonGroup\" @click=\"handleClickButtonGroup\" style=\"margin-top: 16px\" :data-source=\"getButtonGroupElements\"></ele-button-group>\n <ele-table\n v-on=\"$listeners\"\n :loading=\"loading\" \n :columns=\"columns\"\n :total=\"total\"\n :actions=\"actions\"\n :pageSize=\"pageSize\"\n :pageSizeOptions=\"pageSizeOptions\"\n :data-source=\"tableData\"\n @change-page=\"onChangePage\" \n style=\"margin-top: 8px;\"\n ></ele-table>\n </section>\n </section>\n</template>\n\n<script>\nimport EleTree from '../../tree/src/index.vue'\nimport EleTable from '../../table/src/index.vue'\nimport EleSearchArea from '../../composite-components/search-area/src/index.vue'\nimport EleButtonGroup from '../../composite-components/button-group/src/index.vue'\nimport { type, net } from '@idooel/shared'\nimport { v4 as uuidv4 } from 'uuid'\nexport default {\n name: 'ele-tree-table-model',\n components: {\n EleTree,\n EleTable,\n EleSearchArea,\n EleButtonGroup\n },\n props: {\n treeMeta: {\n type: Object,\n default: () => ({})\n },\n searchMeta: {\n type: Object,\n default: () => ({})\n },\n buttonGroupMeta: {\n typeof: Object,\n default: () => ({})\n },\n tableMeta: {\n type: Object,\n default: () => ({})\n }\n },\n data () {\n return {\n treeData: [],\n tableData: [],\n defaultExpandedKeys: [],\n defaultSelectedKeys: [],\n replaceFields: {\n title: 'title',\n children: 'children',\n key: 'id'\n },\n loading: false,\n total: 0,\n tableQuerys: {},\n resizeObserverModelTableWrapper: null,\n modelTableWrapperHeight: 0,\n currentTreeNodeData: {}\n }\n },\n computed: {\n buttonGroup () {\n return uuidv4()\n },\n searchArea () {\n return uuidv4()\n },\n modelTreeWrapper () {\n return uuidv4()\n },\n modelTableWrapper () {\n return uuidv4()\n },\n actions () {\n const { operations } = this.tableMeta\n return operations.elements\n },\n pageSize () {\n const { page = {} } = this.tableMeta\n return page.pageSize || 10\n },\n pageSizeOptions () {\n const { page = {} } = this.tableMeta\n return page.pageSizeOptions || ['10', '20', '30', '40']\n },\n columns () {\n const { columns, operations } = this.tableMeta\n if (type.get(columns) === 'array') {\n const columnsOptions = columns.map(item => {\n if (item.render) {\n return {\n title: item.title,\n dataIndex: item.dataIndex,\n width: item.width,\n align: item.align,\n fixed: item.fixed,\n customRender: (text, record, index) => {\n const { $createElement } = this\n return item.render.call(this, { h: $createElement, ctx: this }, typeof text == 'string' ? text : text[item.dataIndex], record, index)\n }\n }\n }\n return {\n title: item.title,\n dataIndex: item.dataIndex,\n width: item.width,\n align: item.align,\n fixed: item.fixed\n }\n })\n if (operations) {\n return [\n ...columnsOptions,\n {\n title: '操作',\n width: operations.width,\n key: 'action',\n fixed: 'right',\n scopedSlots: { customRender: 'action' }\n }\n ]\n }\n return columnsOptions\n } else {\n console.error('Error: columns is invalid, please check it')\n return []\n }\n },\n getButtonGroupElements () {\n const { elements } = this.buttonGroupMeta\n if (type.get(elements) === 'function') {\n return elements.call(this)\n } else if (type.get(elements) === 'array') {\n return elements\n } else {\n return []\n }\n }\n },\n async created () {\n this.treeData = await this.requestTreeData()\n const [defaultTreeNode = {}] = this.treeData\n this.defaultExpandedKeys = [defaultTreeNode[this.replaceFields.key]]\n this.defaultSelectedKeys = [defaultTreeNode[this.replaceFields.key]]\n const { fieldMap } = this.tableMeta\n this.currentTreeNodeData = defaultTreeNode\n this.tableData = await this.requestTableData(this.execTableFieldMap(fieldMap, defaultTreeNode))\n },\n methods: {\n handleClickButtonGroup (props) {\n const { eventName } = props\n this.$emit(eventName, { currentTreeNode: this.currentTreeNodeData })\n },\n watchViewPort () {\n const modelTableWrapper = this.$refs[this.modelTableWrapper]\n console.log(modelTableWrapper.getBoundingClientRect())\n const { top } = modelTableWrapper.getBoundingClientRect()\n this.$refs[this.modelTreeWrapper].style.height = `calc(100vh - ${top}px)`\n },\n async onSearch (props) {\n this.tableQuerys = Object.assign(this.tableQuerys, props)\n this.tableData = await this.requestTableData()\n },\n execTableFieldMap (fieldMap = {}, props) {\n let ret = {}\n const keys = Object.keys(fieldMap)\n keys.forEach(key => {\n const field = fieldMap[key]\n ret[field] = props[key]\n })\n return ret\n },\n async selectTreeNode (selectedKeys, e) {\n const { fieldMap } = this.tableMeta\n this.currentTreeNodeData = e.node.$vnode.data.props.dataRef\n const execFieldMapRet = this.execTableFieldMap(fieldMap, e.node.$vnode.data.props.dataRef)\n this.tableData = await this.requestTableData(execFieldMapRet)\n },\n async requestTreeData () {\n const { url, requestType } = this.treeMeta\n const ret = await net.get(\n url\n ).then(resp => {\n const { data } = resp || {}\n return data\n })\n return ret\n },\n async onChangePage (page, pageSize) {\n this.tableData = await this.requestTableData({ currentPage: page, pageSize })\n },\n async requestTableData (props = {}) {\n const { url, requestType, page = {} } = this.tableMeta\n const { pageSize = 10 } = page\n this.tableQuerys = Object.assign(this.tableQuerys, { currentPage: 1, pageSize }, props)\n const ret = await net.get(\n url,\n this.tableQuerys\n ).then(resp => {\n const { data = [], count } = resp || {}\n this.total = count\n return data.map(item => {\n return {\n key: uuidv4(),\n ...item\n }\n })\n })\n return ret\n },\n refreshTreeStatus (props = {}) {},\n refreshTableStatus (props = {}) {},\n getModelTableWrapperHeight () {},\n setModelTreeWrapperHeight (height) {\n this.$refs[this.modelTreeWrapper].style.height = height\n },\n setModelTableWrapperHeight () {\n const { top } = this.$refs[this.modelTableWrapper].getBoundingClientRect()\n const height = `calc(100vh - ${top}px)`\n this.$refs[this.modelTableWrapper].style.height = height\n this.setModelTreeWrapperHeight(height)\n },\n getSearchAreaHeight () {\n return this.$refs[this.searchArea].$el.clientHeight\n },\n getButtonGroupHeight () {\n return this.$refs[this.buttonGroup].$el.clientHeight\n }\n },\n mounted () {\n //TODO\n // this.setModelTableWrapperHeight()\n // this.resizeObserverModelTableWrapper = new ResizeObserver(entries => {\n // for (let entry of entries) {\n // this.modelTableWrapperHeight = entry.contentRect.height\n // console.log('this.modelTableWrapperHeight:', this.modelTableWrapperHeight)\n // console.log('getSearchAreaHeight', this.getSearchAreaHeight())\n // console.log('getButtonGroupHeight', this.getButtonGroupHeight())\n // const tableHeight = this.modelTableWrapperHeight - this.getSearchAreaHeight() - this.getButtonGroupHeight()\n // console.log('tableHeight', tableHeight)\n // }\n // })\n // this.resizeObserverModelTableWrapper.observe(this.$refs[this.modelTableWrapper])\n }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.model__tree-table {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n .model__tree--wrapper {\n width: 240px;\n background: #fff;\n flex-shrink: 0;\n padding: 16px;\n box-sizing: border-box;\n margin-right: 16px;\n overflow-y: auto;\n }\n .model__table--wrapper {\n min-width: 0;\n background: #fff;\n }\n}\n</style>",".model__tree-table {\n background: transparent;\n display: flex;\n flex-direction: row;\n width: 100%;\n}\n.model__tree-table .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.model__tree-table .model__table--wrapper {\n min-width: 0;\n background: #fff;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2566
|
+
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 });
|
|
1662
2567
|
|
|
1663
2568
|
};
|
|
1664
2569
|
/* scoped */
|
|
1665
|
-
const __vue_scope_id__$
|
|
2570
|
+
const __vue_scope_id__$d = "data-v-fe2ee33e";
|
|
1666
2571
|
/* module identifier */
|
|
1667
|
-
const __vue_module_identifier__$
|
|
2572
|
+
const __vue_module_identifier__$d = undefined;
|
|
1668
2573
|
/* functional template */
|
|
1669
|
-
const __vue_is_functional_template__$
|
|
2574
|
+
const __vue_is_functional_template__$d = false;
|
|
1670
2575
|
/* style inject SSR */
|
|
1671
2576
|
|
|
1672
2577
|
/* style inject shadow dom */
|
|
1673
2578
|
|
|
1674
2579
|
|
|
1675
2580
|
|
|
1676
|
-
const __vue_component__$
|
|
1677
|
-
{ render: __vue_render__$
|
|
1678
|
-
__vue_inject_styles__$
|
|
1679
|
-
__vue_script__$
|
|
1680
|
-
__vue_scope_id__$
|
|
1681
|
-
__vue_is_functional_template__$
|
|
1682
|
-
__vue_module_identifier__$
|
|
2581
|
+
const __vue_component__$d = /*#__PURE__*/normalizeComponent(
|
|
2582
|
+
{ render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },
|
|
2583
|
+
__vue_inject_styles__$d,
|
|
2584
|
+
__vue_script__$d,
|
|
2585
|
+
__vue_scope_id__$d,
|
|
2586
|
+
__vue_is_functional_template__$d,
|
|
2587
|
+
__vue_module_identifier__$d,
|
|
1683
2588
|
false,
|
|
1684
2589
|
createInjector,
|
|
1685
2590
|
undefined,
|
|
@@ -1687,7 +2592,7 @@
|
|
|
1687
2592
|
);
|
|
1688
2593
|
|
|
1689
2594
|
//
|
|
1690
|
-
var script = {
|
|
2595
|
+
var script$c = {
|
|
1691
2596
|
name: 'ele-tpl',
|
|
1692
2597
|
props: {
|
|
1693
2598
|
modelName: {
|
|
@@ -1695,9 +2600,16 @@
|
|
|
1695
2600
|
}
|
|
1696
2601
|
},
|
|
1697
2602
|
components: {
|
|
1698
|
-
[__vue_component__$
|
|
2603
|
+
[__vue_component__$d.name]: __vue_component__$d
|
|
1699
2604
|
},
|
|
1700
2605
|
computed: {
|
|
2606
|
+
modelNameValidator() {
|
|
2607
|
+
const target = models.find(model => model.name === this.modelName);
|
|
2608
|
+
return {
|
|
2609
|
+
existed: !!target,
|
|
2610
|
+
message: !!target ? '' : `Model <span style="color:red;">${this.modelName}</span> not found`
|
|
2611
|
+
};
|
|
2612
|
+
},
|
|
1701
2613
|
genModelRef() {
|
|
1702
2614
|
return v4();
|
|
1703
2615
|
}
|
|
@@ -1710,14 +2622,14 @@
|
|
|
1710
2622
|
};
|
|
1711
2623
|
|
|
1712
2624
|
/* script */
|
|
1713
|
-
const __vue_script__ = script;
|
|
2625
|
+
const __vue_script__$c = script$c;
|
|
1714
2626
|
|
|
1715
2627
|
/* template */
|
|
1716
|
-
var __vue_render__ = function () {
|
|
2628
|
+
var __vue_render__$c = function () {
|
|
1717
2629
|
var _vm = this;
|
|
1718
2630
|
var _h = _vm.$createElement;
|
|
1719
2631
|
var _c = _vm._self._c || _h;
|
|
1720
|
-
return _vm.
|
|
2632
|
+
return _vm.modelNameValidator.existed
|
|
1721
2633
|
? _c(
|
|
1722
2634
|
_vm.modelName,
|
|
1723
2635
|
_vm._g(
|
|
@@ -1747,51 +2659,1894 @@
|
|
|
1747
2659
|
_vm.$listeners
|
|
1748
2660
|
)
|
|
1749
2661
|
)
|
|
1750
|
-
: _c("div",
|
|
2662
|
+
: _c("div", {
|
|
2663
|
+
domProps: { innerHTML: _vm._s(_vm.modelNameValidator.message) },
|
|
2664
|
+
})
|
|
1751
2665
|
};
|
|
1752
|
-
var __vue_staticRenderFns__ = [];
|
|
1753
|
-
__vue_render__._withStripped = true;
|
|
2666
|
+
var __vue_staticRenderFns__$c = [];
|
|
2667
|
+
__vue_render__$c._withStripped = true;
|
|
1754
2668
|
|
|
1755
2669
|
/* style */
|
|
1756
|
-
const __vue_inject_styles__ =
|
|
2670
|
+
const __vue_inject_styles__$c = function (inject) {
|
|
2671
|
+
if (!inject) return
|
|
2672
|
+
inject("data-v-7b13873a_0", { source: ".has-error .ele-upload__wrapper .file-uploads label {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .file-uploads .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .file-uploads .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .file-uploads .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}\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;AACzC;;AAEA,oCAAoC","file":"index.vue","sourcesContent":[".has-error .ele-upload__wrapper .file-uploads label {\n border-color: #F5222D;\n}\n.has-error .ele-upload__wrapper .file-uploads .ele-upload__area .ele-upload__area--icon .anticon-cloud-upload {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .file-uploads .ele-upload__area .ele-upload__area--text .ele-upload__message {\n color: #F5222D;\n}\n.has-error .ele-upload__wrapper .file-uploads .ele-upload__area .ele-upload__area--text .ele-upload__ext {\n color: #FFA39E;\n}\n\n:root {\n --idooel-primary-color: #1890FF;\n --idoole-black-02: rgba(0, 0, 0, 0.04);\n --idoole-black-06: rgba(0, 0, 0, 0.44);\n --idoole-black-07: rgba(0, 0, 0, 0.64);\n --idoole-black-008: rgba(0, 0, 0, 0.88);\n --idooel-border-width: 2;\n --idooel-border-color: #53a8ff;\n --idooel-column-border-width: 1;\n --idooel-column-border-color: #d9ecff;\n --idooel-form-title-border-color: rgba(0, 0, 0, 0.16);\n --idooel-form-upload-bg-color: rgba(0, 0, 0, 0.02);\n --idooel-form-upload-border-hover-color: #40A9FF;\n --idooel-form-border-radius: 2px;\n --idooel-form-border-err-color: #F5222D;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
2673
|
+
|
|
2674
|
+
};
|
|
1757
2675
|
/* scoped */
|
|
1758
|
-
const __vue_scope_id__ = undefined;
|
|
2676
|
+
const __vue_scope_id__$c = undefined;
|
|
1759
2677
|
/* module identifier */
|
|
1760
|
-
const __vue_module_identifier__ = undefined;
|
|
2678
|
+
const __vue_module_identifier__$c = undefined;
|
|
1761
2679
|
/* functional template */
|
|
1762
|
-
const __vue_is_functional_template__ = false;
|
|
1763
|
-
/* style inject */
|
|
1764
|
-
|
|
2680
|
+
const __vue_is_functional_template__$c = false;
|
|
1765
2681
|
/* style inject SSR */
|
|
1766
2682
|
|
|
1767
2683
|
/* style inject shadow dom */
|
|
1768
2684
|
|
|
1769
2685
|
|
|
1770
2686
|
|
|
1771
|
-
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
1772
|
-
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
1773
|
-
__vue_inject_styles__,
|
|
1774
|
-
__vue_script__,
|
|
1775
|
-
__vue_scope_id__,
|
|
1776
|
-
__vue_is_functional_template__,
|
|
1777
|
-
__vue_module_identifier__,
|
|
2687
|
+
const __vue_component__$c = /*#__PURE__*/normalizeComponent(
|
|
2688
|
+
{ render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },
|
|
2689
|
+
__vue_inject_styles__$c,
|
|
2690
|
+
__vue_script__$c,
|
|
2691
|
+
__vue_scope_id__$c,
|
|
2692
|
+
__vue_is_functional_template__$c,
|
|
2693
|
+
__vue_module_identifier__$c,
|
|
1778
2694
|
false,
|
|
1779
|
-
|
|
2695
|
+
createInjector,
|
|
1780
2696
|
undefined,
|
|
1781
2697
|
undefined
|
|
1782
2698
|
);
|
|
1783
2699
|
|
|
1784
|
-
__vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
|
|
1785
|
-
|
|
1786
|
-
__vue_component__$2.install = Vue => Vue.component(__vue_component__$2.name, __vue_component__$2);
|
|
2700
|
+
__vue_component__$c.install = Vue => Vue.component(__vue_component__$c.name, __vue_component__$c);
|
|
1787
2701
|
|
|
1788
|
-
|
|
2702
|
+
//
|
|
2703
|
+
//
|
|
2704
|
+
//
|
|
2705
|
+
//
|
|
2706
|
+
//
|
|
2707
|
+
//
|
|
2708
|
+
//
|
|
2709
|
+
//
|
|
2710
|
+
//
|
|
2711
|
+
//
|
|
2712
|
+
//
|
|
1789
2713
|
|
|
1790
|
-
|
|
2714
|
+
var script$b = {
|
|
2715
|
+
name: 'ele-textarea',
|
|
2716
|
+
props: {
|
|
2717
|
+
maxLength: {
|
|
2718
|
+
type: Number
|
|
2719
|
+
},
|
|
2720
|
+
placeholder: {
|
|
2721
|
+
type: String
|
|
2722
|
+
},
|
|
2723
|
+
allowClear: {
|
|
2724
|
+
type: Boolean,
|
|
2725
|
+
default: false
|
|
2726
|
+
},
|
|
2727
|
+
autosize: {
|
|
2728
|
+
type: [Boolean, Object],
|
|
2729
|
+
default: () => ({
|
|
2730
|
+
minRows: 4,
|
|
2731
|
+
maxRows: 4
|
|
2732
|
+
})
|
|
2733
|
+
},
|
|
2734
|
+
value: {
|
|
2735
|
+
type: String
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
methods: {
|
|
2739
|
+
onChange(e) {
|
|
2740
|
+
const value = e.target.value;
|
|
2741
|
+
this.$emit('on-change', value);
|
|
2742
|
+
this.$emit('input', value);
|
|
2743
|
+
}
|
|
2744
|
+
}
|
|
2745
|
+
};
|
|
2746
|
+
|
|
2747
|
+
/* script */
|
|
2748
|
+
const __vue_script__$b = script$b;
|
|
2749
|
+
|
|
2750
|
+
/* template */
|
|
2751
|
+
var __vue_render__$b = function () {
|
|
2752
|
+
var _vm = this;
|
|
2753
|
+
var _h = _vm.$createElement;
|
|
2754
|
+
var _c = _vm._self._c || _h;
|
|
2755
|
+
return _c("a-textarea", {
|
|
2756
|
+
attrs: {
|
|
2757
|
+
value: _vm.value,
|
|
2758
|
+
"auto-size": _vm.autosize,
|
|
2759
|
+
"max-length": _vm.maxLength,
|
|
2760
|
+
placeholder: _vm.placeholder,
|
|
2761
|
+
"allow-clear": _vm.allowClear,
|
|
2762
|
+
},
|
|
2763
|
+
on: { change: _vm.onChange },
|
|
2764
|
+
})
|
|
2765
|
+
};
|
|
2766
|
+
var __vue_staticRenderFns__$b = [];
|
|
2767
|
+
__vue_render__$b._withStripped = true;
|
|
2768
|
+
|
|
2769
|
+
/* style */
|
|
2770
|
+
const __vue_inject_styles__$b = function (inject) {
|
|
2771
|
+
if (!inject) return
|
|
2772
|
+
inject("data-v-256502c2_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", map: {"version":3,"sources":[],"names":[],"mappings":"","file":"index.vue"}, media: undefined });
|
|
2773
|
+
|
|
2774
|
+
};
|
|
2775
|
+
/* scoped */
|
|
2776
|
+
const __vue_scope_id__$b = "data-v-256502c2";
|
|
2777
|
+
/* module identifier */
|
|
2778
|
+
const __vue_module_identifier__$b = undefined;
|
|
2779
|
+
/* functional template */
|
|
2780
|
+
const __vue_is_functional_template__$b = false;
|
|
2781
|
+
/* style inject SSR */
|
|
2782
|
+
|
|
2783
|
+
/* style inject shadow dom */
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
|
|
2787
|
+
const __vue_component__$b = /*#__PURE__*/normalizeComponent(
|
|
2788
|
+
{ render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },
|
|
2789
|
+
__vue_inject_styles__$b,
|
|
2790
|
+
__vue_script__$b,
|
|
2791
|
+
__vue_scope_id__$b,
|
|
2792
|
+
__vue_is_functional_template__$b,
|
|
2793
|
+
__vue_module_identifier__$b,
|
|
2794
|
+
false,
|
|
2795
|
+
createInjector,
|
|
2796
|
+
undefined,
|
|
2797
|
+
undefined
|
|
2798
|
+
);
|
|
2799
|
+
|
|
2800
|
+
//
|
|
2801
|
+
//
|
|
2802
|
+
//
|
|
2803
|
+
//
|
|
2804
|
+
//
|
|
2805
|
+
//
|
|
2806
|
+
//
|
|
2807
|
+
//
|
|
2808
|
+
//
|
|
2809
|
+
|
|
2810
|
+
var script$a = {
|
|
2811
|
+
name: 'ele-icon',
|
|
2812
|
+
props: {
|
|
2813
|
+
type: {
|
|
2814
|
+
type: String,
|
|
2815
|
+
default: ''
|
|
2816
|
+
},
|
|
2817
|
+
theme: {
|
|
2818
|
+
type: String
|
|
2819
|
+
}
|
|
2820
|
+
},
|
|
2821
|
+
computed: {
|
|
2822
|
+
isAntIcon() {
|
|
2823
|
+
const prefix = this.type.slice(0, 5);
|
|
2824
|
+
if (prefix === 'icon-') {
|
|
2825
|
+
return false;
|
|
2826
|
+
}
|
|
2827
|
+
return true;
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
};
|
|
2831
|
+
|
|
2832
|
+
/* script */
|
|
2833
|
+
const __vue_script__$a = script$a;
|
|
2834
|
+
|
|
2835
|
+
/* template */
|
|
2836
|
+
var __vue_render__$a = function () {
|
|
2837
|
+
var _vm = this;
|
|
2838
|
+
var _h = _vm.$createElement;
|
|
2839
|
+
var _c = _vm._self._c || _h;
|
|
2840
|
+
return _vm.isAntIcon
|
|
2841
|
+
? _c("a-icon", { attrs: { type: _vm.type, theme: _vm.theme } })
|
|
2842
|
+
: _c("i", { class: ["iconfont", _vm.type] })
|
|
2843
|
+
};
|
|
2844
|
+
var __vue_staticRenderFns__$a = [];
|
|
2845
|
+
__vue_render__$a._withStripped = true;
|
|
2846
|
+
|
|
2847
|
+
/* style */
|
|
2848
|
+
const __vue_inject_styles__$a = undefined;
|
|
2849
|
+
/* scoped */
|
|
2850
|
+
const __vue_scope_id__$a = undefined;
|
|
2851
|
+
/* module identifier */
|
|
2852
|
+
const __vue_module_identifier__$a = undefined;
|
|
2853
|
+
/* functional template */
|
|
2854
|
+
const __vue_is_functional_template__$a = false;
|
|
2855
|
+
/* style inject */
|
|
2856
|
+
|
|
2857
|
+
/* style inject SSR */
|
|
2858
|
+
|
|
2859
|
+
/* style inject shadow dom */
|
|
2860
|
+
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
const __vue_component__$a = /*#__PURE__*/normalizeComponent(
|
|
2864
|
+
{ render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },
|
|
2865
|
+
__vue_inject_styles__$a,
|
|
2866
|
+
__vue_script__$a,
|
|
2867
|
+
__vue_scope_id__$a,
|
|
2868
|
+
__vue_is_functional_template__$a,
|
|
2869
|
+
__vue_module_identifier__$a,
|
|
2870
|
+
false,
|
|
2871
|
+
undefined,
|
|
2872
|
+
undefined,
|
|
2873
|
+
undefined
|
|
2874
|
+
);
|
|
2875
|
+
|
|
2876
|
+
//
|
|
2877
|
+
var script$9 = {
|
|
2878
|
+
name: 'ele-upload',
|
|
2879
|
+
components: {
|
|
2880
|
+
FileUpload: FileUpload__default["default"],
|
|
2881
|
+
EleIcon: __vue_component__$a
|
|
2882
|
+
},
|
|
2883
|
+
model: {
|
|
2884
|
+
prop: 'value',
|
|
2885
|
+
event: 'change'
|
|
2886
|
+
},
|
|
2887
|
+
props: {
|
|
2888
|
+
url: {
|
|
2889
|
+
type: String,
|
|
2890
|
+
default: '/zuul/api-file/workbench/file'
|
|
2891
|
+
},
|
|
2892
|
+
size: {
|
|
2893
|
+
type: Number,
|
|
2894
|
+
default: 100
|
|
2895
|
+
},
|
|
2896
|
+
accept: {
|
|
2897
|
+
type: String
|
|
2898
|
+
},
|
|
2899
|
+
maximum: {
|
|
2900
|
+
type: Number,
|
|
2901
|
+
default: 10
|
|
2902
|
+
},
|
|
2903
|
+
multiple: {
|
|
2904
|
+
type: Boolean,
|
|
2905
|
+
default: false
|
|
2906
|
+
},
|
|
2907
|
+
drop: {
|
|
2908
|
+
type: Boolean,
|
|
2909
|
+
default: true
|
|
2910
|
+
},
|
|
2911
|
+
value: {
|
|
2912
|
+
type: [String, Array]
|
|
2913
|
+
},
|
|
2914
|
+
querys: {
|
|
2915
|
+
type: Object,
|
|
2916
|
+
default: () => ({
|
|
2917
|
+
_csrf: 'c81f993f-f044-45bb-b3af-2977d335042d',
|
|
2918
|
+
_t: new Date().valueOf()
|
|
2919
|
+
})
|
|
2920
|
+
},
|
|
2921
|
+
headers: {
|
|
2922
|
+
type: Object,
|
|
2923
|
+
default: () => ({})
|
|
2924
|
+
},
|
|
2925
|
+
byteConversion: {
|
|
2926
|
+
type: Number,
|
|
2927
|
+
default: 1024 * 1024
|
|
2928
|
+
},
|
|
2929
|
+
chunkEnabled: {
|
|
2930
|
+
type: Boolean,
|
|
2931
|
+
default: true
|
|
2932
|
+
}
|
|
2933
|
+
},
|
|
2934
|
+
data() {
|
|
2935
|
+
return {
|
|
2936
|
+
files: [],
|
|
2937
|
+
saveToServerAsyncPageTimer: null
|
|
2938
|
+
};
|
|
2939
|
+
},
|
|
2940
|
+
computed: {
|
|
2941
|
+
getPayloads() {
|
|
2942
|
+
return {
|
|
2943
|
+
override: false
|
|
2944
|
+
};
|
|
2945
|
+
},
|
|
2946
|
+
chunkConfig() {
|
|
2947
|
+
shared.route.toQueryString(this.querys);
|
|
2948
|
+
return {
|
|
2949
|
+
action: `${window.prefixPath}/zuul/api-file/workbench/file/temp/chunk/vue`,
|
|
2950
|
+
headers: {
|
|
2951
|
+
'X-XSRF-TOKEN': localStorage.getItem('token')
|
|
2952
|
+
},
|
|
2953
|
+
minSize: 3 * this.byteConversion,
|
|
2954
|
+
maxActive: 3,
|
|
2955
|
+
maxRetries: 5,
|
|
2956
|
+
startBody: {
|
|
2957
|
+
override: true,
|
|
2958
|
+
path: '/cw'
|
|
2959
|
+
},
|
|
2960
|
+
uploadBody: {
|
|
2961
|
+
override: true,
|
|
2962
|
+
path: '/cw'
|
|
2963
|
+
},
|
|
2964
|
+
finishBody: {
|
|
2965
|
+
override: true,
|
|
2966
|
+
path: '/cw'
|
|
2967
|
+
}
|
|
2968
|
+
};
|
|
2969
|
+
},
|
|
2970
|
+
isFileUploadSuccessed() {
|
|
2971
|
+
return this.files.every(file => file.success);
|
|
2972
|
+
},
|
|
2973
|
+
isShowUploadContainer() {
|
|
2974
|
+
if (this.multiple) {
|
|
2975
|
+
if (this.isFileUploadSuccessed && this.files.length >= this.maximum) {
|
|
2976
|
+
return false;
|
|
2977
|
+
} else {
|
|
2978
|
+
return true;
|
|
2979
|
+
}
|
|
2980
|
+
} else {
|
|
2981
|
+
if (this.isFileUploadSuccessed && this.files.length >= 1) {
|
|
2982
|
+
return false;
|
|
2983
|
+
} else {
|
|
2984
|
+
return true;
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
getMaximum() {
|
|
2989
|
+
return this.multiple ? this.maximum : 1;
|
|
2990
|
+
},
|
|
2991
|
+
fileSizeLimit() {
|
|
2992
|
+
return this.size * this.byteConversion;
|
|
2993
|
+
},
|
|
2994
|
+
postAction() {
|
|
2995
|
+
const ret = shared.route.toQueryString(this.querys);
|
|
2996
|
+
return `${window.prefixPath}${this.url}?${ret}`;
|
|
2997
|
+
},
|
|
2998
|
+
uploadRef() {
|
|
2999
|
+
return v4();
|
|
3000
|
+
},
|
|
3001
|
+
fileSuffixIcon() {
|
|
3002
|
+
return {
|
|
3003
|
+
'doc': {
|
|
3004
|
+
name: 'icon-doc'
|
|
3005
|
+
}
|
|
3006
|
+
};
|
|
3007
|
+
},
|
|
3008
|
+
fileIds() {
|
|
3009
|
+
const fileIds = this.files.map(file => {
|
|
3010
|
+
return file.response.data.fileID;
|
|
3011
|
+
});
|
|
3012
|
+
return this.multiple ? fileIds : fileIds[0];
|
|
3013
|
+
}
|
|
3014
|
+
},
|
|
3015
|
+
methods: {
|
|
3016
|
+
handleClickDownload(file) {
|
|
3017
|
+
console.log('download file', file);
|
|
3018
|
+
},
|
|
3019
|
+
handleClickDelete(file) {
|
|
3020
|
+
this.$refs[this.uploadRef].remove(file);
|
|
3021
|
+
this.$emit('change', this.fileIds);
|
|
3022
|
+
},
|
|
3023
|
+
onWatchFiles(files) {
|
|
3024
|
+
this.files = files;
|
|
3025
|
+
if (this.isFileUploadSuccessed) {
|
|
3026
|
+
this.$emit('change', this.fileIds);
|
|
3027
|
+
}
|
|
3028
|
+
},
|
|
3029
|
+
async saveToServerAsyncPage(payloads = {}) {
|
|
3030
|
+
shared.net.post('zuul/api-file/workbench/file/temp/saveToServerAsyncPage', payloads, {
|
|
3031
|
+
headers: {
|
|
3032
|
+
'Content-Type': 'multipart/form-data'
|
|
3033
|
+
}
|
|
3034
|
+
}).then(resp => {
|
|
3035
|
+
const {
|
|
3036
|
+
data
|
|
3037
|
+
} = resp;
|
|
3038
|
+
if (data !== 'saveToServerAsyncPage') {
|
|
3039
|
+
clearInterval(this.saveToServerAsyncPageTimer);
|
|
3040
|
+
}
|
|
3041
|
+
});
|
|
3042
|
+
// const ret = await net.post({
|
|
3043
|
+
// url: 'zuul/api-file/workbench/file/temp/saveToServerAsyncPage',
|
|
3044
|
+
// method: 'POST',
|
|
3045
|
+
// data: { ...payloads }
|
|
3046
|
+
// }).then(resp => {
|
|
3047
|
+
// const { data: { data, code, message } } = resp
|
|
3048
|
+
// if (code !== '2000') {
|
|
3049
|
+
// this.$Message.error(message)
|
|
3050
|
+
// return
|
|
3051
|
+
// }
|
|
3052
|
+
// if (data !== 'saveToServerAsyncPage') {
|
|
3053
|
+
// clearInterval(timer)
|
|
3054
|
+
// const { fileID, size } = data
|
|
3055
|
+
// this.$emit('on-success', { ...data, fileId: fileID })
|
|
3056
|
+
// this.$Message.success('同步成功')
|
|
3057
|
+
// return { fileId: fileID, size }
|
|
3058
|
+
// }
|
|
3059
|
+
// })
|
|
3060
|
+
// return ret
|
|
3061
|
+
},
|
|
3062
|
+
onWatchInputFiles(newFile, oldFile) {
|
|
3063
|
+
if (newFile && !oldFile) {
|
|
3064
|
+
// add file
|
|
3065
|
+
console.log('add', newFile);
|
|
3066
|
+
}
|
|
3067
|
+
if (newFile && oldFile) {
|
|
3068
|
+
// update file
|
|
3069
|
+
console.log('update', newFile);
|
|
3070
|
+
const {
|
|
3071
|
+
success,
|
|
3072
|
+
active,
|
|
3073
|
+
chunk,
|
|
3074
|
+
response
|
|
3075
|
+
} = newFile;
|
|
3076
|
+
if (chunk && success && !active) {
|
|
3077
|
+
console.log('chunk end');
|
|
3078
|
+
const {
|
|
3079
|
+
data: {
|
|
3080
|
+
file,
|
|
3081
|
+
type
|
|
3082
|
+
}
|
|
3083
|
+
} = response;
|
|
3084
|
+
const payloads = {
|
|
3085
|
+
filePath: file.match(/\/cw(.*)/)[0],
|
|
3086
|
+
asyncID: v4(),
|
|
3087
|
+
isDeleteOrigin: false,
|
|
3088
|
+
toImage: type === 'pdf' ? true : false,
|
|
3089
|
+
unzip: type === 'zip' ? true : false,
|
|
3090
|
+
_csrf: localStorage.getItem('token')
|
|
3091
|
+
};
|
|
3092
|
+
this.saveToServerAsyncPageTimer = setInterval(() => {
|
|
3093
|
+
this.saveToServerAsyncPage(payloads);
|
|
3094
|
+
}, 2000);
|
|
3095
|
+
}
|
|
3096
|
+
}
|
|
3097
|
+
if (!newFile && oldFile) {
|
|
3098
|
+
// delete file
|
|
3099
|
+
console.log('delete');
|
|
3100
|
+
}
|
|
3101
|
+
if (Boolean(newFile) !== Boolean(oldFile) || oldFile.error !== newFile.error) {
|
|
3102
|
+
if (!this.$refs[this.uploadRef].active) {
|
|
3103
|
+
this.$refs[this.uploadRef].active = true;
|
|
3104
|
+
}
|
|
3105
|
+
}
|
|
3106
|
+
}
|
|
3107
|
+
}
|
|
3108
|
+
};
|
|
3109
|
+
|
|
3110
|
+
/* script */
|
|
3111
|
+
const __vue_script__$9 = script$9;
|
|
3112
|
+
|
|
3113
|
+
/* template */
|
|
3114
|
+
var __vue_render__$9 = function () {
|
|
3115
|
+
var _vm = this;
|
|
3116
|
+
var _h = _vm.$createElement;
|
|
3117
|
+
var _c = _vm._self._c || _h;
|
|
3118
|
+
return _c(
|
|
3119
|
+
"div",
|
|
3120
|
+
{ staticClass: "ele-upload__wrapper" },
|
|
3121
|
+
[
|
|
3122
|
+
_c(
|
|
3123
|
+
"FileUpload",
|
|
3124
|
+
{
|
|
3125
|
+
directives: [
|
|
3126
|
+
{
|
|
3127
|
+
name: "show",
|
|
3128
|
+
rawName: "v-show",
|
|
3129
|
+
value: _vm.isShowUploadContainer,
|
|
3130
|
+
expression: "isShowUploadContainer",
|
|
3131
|
+
},
|
|
3132
|
+
],
|
|
3133
|
+
ref: _vm.uploadRef,
|
|
3134
|
+
staticClass: "ele-upload__inner",
|
|
3135
|
+
staticStyle: { width: "100%" },
|
|
3136
|
+
attrs: {
|
|
3137
|
+
drop: _vm.drop,
|
|
3138
|
+
"chunk-enabled": _vm.chunkEnabled,
|
|
3139
|
+
chunk: _vm.chunkConfig,
|
|
3140
|
+
accept: _vm.accept,
|
|
3141
|
+
size: _vm.fileSizeLimit,
|
|
3142
|
+
"post-action": _vm.postAction,
|
|
3143
|
+
multiple: _vm.multiple,
|
|
3144
|
+
maximum: _vm.getMaximum,
|
|
3145
|
+
},
|
|
3146
|
+
on: { "input-file": _vm.onWatchInputFiles, input: _vm.onWatchFiles },
|
|
3147
|
+
model: {
|
|
3148
|
+
value: _vm.files,
|
|
3149
|
+
callback: function ($$v) {
|
|
3150
|
+
_vm.files = $$v;
|
|
3151
|
+
},
|
|
3152
|
+
expression: "files",
|
|
3153
|
+
},
|
|
3154
|
+
},
|
|
3155
|
+
[
|
|
3156
|
+
_c("section", { staticClass: "ele-upload__area" }, [
|
|
3157
|
+
_c(
|
|
3158
|
+
"div",
|
|
3159
|
+
{ staticClass: "ele-upload__area--icon" },
|
|
3160
|
+
[_c("ele-icon", { attrs: { type: "cloud-upload" } })],
|
|
3161
|
+
1
|
|
3162
|
+
),
|
|
3163
|
+
_vm._v(" "),
|
|
3164
|
+
_c("div", { staticClass: "ele-upload__area--text" }, [
|
|
3165
|
+
_c("div", { staticClass: "ele-upload__message" }, [
|
|
3166
|
+
_vm._v("单击或拖动文件到该区域以上传"),
|
|
3167
|
+
]),
|
|
3168
|
+
_vm._v(" "),
|
|
3169
|
+
_c("div", { staticClass: "ele-upload__ext" }, [
|
|
3170
|
+
_vm._v("文件小于" + _vm._s(_vm.size) + "M"),
|
|
3171
|
+
]),
|
|
3172
|
+
]),
|
|
3173
|
+
]),
|
|
3174
|
+
]
|
|
3175
|
+
),
|
|
3176
|
+
_vm._v(" "),
|
|
3177
|
+
_c(
|
|
3178
|
+
"section",
|
|
3179
|
+
{ staticClass: "ele-files__wrapper" },
|
|
3180
|
+
_vm._l(_vm.files, function (file, idx) {
|
|
3181
|
+
return _c("div", { key: idx, staticClass: "ele-file__item" }, [
|
|
3182
|
+
_c(
|
|
3183
|
+
"div",
|
|
3184
|
+
{ staticClass: "ele-file__suffix--icon" },
|
|
3185
|
+
[_c("ele-icon", { attrs: { type: "icon-doc" } })],
|
|
3186
|
+
1
|
|
3187
|
+
),
|
|
3188
|
+
_vm._v(" "),
|
|
3189
|
+
_c("div", { staticClass: "ele-file__name" }, [
|
|
3190
|
+
_c(
|
|
3191
|
+
"div",
|
|
3192
|
+
{
|
|
3193
|
+
staticClass: "ele-file__inner",
|
|
3194
|
+
on: {
|
|
3195
|
+
click: function ($event) {
|
|
3196
|
+
return _vm.handleClickDownload(file)
|
|
3197
|
+
},
|
|
3198
|
+
},
|
|
3199
|
+
},
|
|
3200
|
+
[_vm._v(_vm._s(file.name))]
|
|
3201
|
+
),
|
|
3202
|
+
_vm._v(" "),
|
|
3203
|
+
!file.success
|
|
3204
|
+
? _c(
|
|
3205
|
+
"div",
|
|
3206
|
+
{ staticClass: "ele-uplpad__progress" },
|
|
3207
|
+
[
|
|
3208
|
+
_c("a-progress", {
|
|
3209
|
+
attrs: {
|
|
3210
|
+
strokeWidth: 2,
|
|
3211
|
+
percent: Number(file.progress),
|
|
3212
|
+
size: "small",
|
|
3213
|
+
},
|
|
3214
|
+
}),
|
|
3215
|
+
],
|
|
3216
|
+
1
|
|
3217
|
+
)
|
|
3218
|
+
: _vm._e(),
|
|
3219
|
+
]),
|
|
3220
|
+
_vm._v(" "),
|
|
3221
|
+
file.success || file.error
|
|
3222
|
+
? _c("div", { staticClass: "ele-file__delete" }, [
|
|
3223
|
+
_c("span", { staticClass: "ele-file__size" }, [
|
|
3224
|
+
_vm._v(
|
|
3225
|
+
_vm._s((file.size / _vm.byteConversion).toFixed(2)) + "M"
|
|
3226
|
+
),
|
|
3227
|
+
]),
|
|
3228
|
+
_vm._v(" "),
|
|
3229
|
+
_c(
|
|
3230
|
+
"span",
|
|
3231
|
+
{
|
|
3232
|
+
staticClass: "ele-file__delete--icon",
|
|
3233
|
+
on: {
|
|
3234
|
+
click: function ($event) {
|
|
3235
|
+
return _vm.handleClickDelete(file)
|
|
3236
|
+
},
|
|
3237
|
+
},
|
|
3238
|
+
},
|
|
3239
|
+
[_c("ele-icon", { attrs: { type: "delete" } })],
|
|
3240
|
+
1
|
|
3241
|
+
),
|
|
3242
|
+
])
|
|
3243
|
+
: _vm._e(),
|
|
3244
|
+
])
|
|
3245
|
+
}),
|
|
3246
|
+
0
|
|
3247
|
+
),
|
|
3248
|
+
],
|
|
3249
|
+
1
|
|
3250
|
+
)
|
|
3251
|
+
};
|
|
3252
|
+
var __vue_staticRenderFns__$9 = [];
|
|
3253
|
+
__vue_render__$9._withStripped = true;
|
|
3254
|
+
|
|
3255
|
+
/* style */
|
|
3256
|
+
const __vue_inject_styles__$9 = function (inject) {
|
|
3257
|
+
if (!inject) return
|
|
3258
|
+
inject("data-v-29bc9f58_0", { source: "[data-v-29bc9f58] .file-uploads label {\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-29bc9f58] .file-uploads label:hover {\n border-color: var(--idooel-form-upload-border-hover-color);\n}\n.ele-upload__wrapper[data-v-29bc9f58] {\n width: 100%;\n}\n.ele-upload__wrapper .ele-upload__area[data-v-29bc9f58] {\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-29bc9f58] {\n font-size: 48px;\n color: var(--idooel-primary-color);\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text[data-v-29bc9f58] {\n margin-left: 16px;\n}\n.ele-upload__wrapper .ele-upload__area .ele-upload__area--text .ele-upload__message[data-v-29bc9f58] {\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-29bc9f58] {\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-29bc9f58] {\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-29bc9f58] {\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-29bc9f58] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete[data-v-29bc9f58] {\n margin-left: 8px;\n}\n.ele-upload__wrapper .ele-files__wrapper .ele-file__item .ele-file__delete .ele-file__delete--icon[data-v-29bc9f58] {\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":"AAqRA;EACA,qBAAA;EACA,eAAA;EACA,wDAAA;EACA,yDAAA;EAIA,+CAAA;ACvRA;ADoRA;EACA,0DAAA;AClRA;ADuRA;EACA,WAAA;ACpRA;ADqRA;EACA,aAAA;EACA,WAAA;EACA,YAAA;EACA,aAAA;EACA,mBAAA;ACnRA;ADqRA;EACA,eAAA;EACA,kCAAA;ACnRA;ADsRA;EACA,iBAAA;ACpRA;ADqRA;EACA,eAAA;EACA,8BAAA;EACA,gBAAA;ACnRA;ADqRA;EACA,gBAAA;EACA,eAAA;EACA,6BAAA;ACnRA;ADwRA;EACA,WAAA;EACA,eAAA;EACA,iBAAA;EACA,+CAAA;EACA,8CAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;ACtRA;ADwRA;EACA,OAAA;EACA,gBAAA;EACA,mBAAA;EACA,gBAAA;EACA,eAAA;EACA,gBAAA;EACA,eAAA;ACtRA;ADuRA;EACA,gBAAA;EACA,uBAAA;ACrRA;ADwRA;EACA,gBAAA;ACtRA;ADuRA;EACA,gBAAA;EACA,eAAA;ACrRA;;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 .file-uploads {\r\n label {\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}\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 .file-uploads label {\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 .file-uploads label: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 });
|
|
3259
|
+
|
|
3260
|
+
};
|
|
3261
|
+
/* scoped */
|
|
3262
|
+
const __vue_scope_id__$9 = "data-v-29bc9f58";
|
|
3263
|
+
/* module identifier */
|
|
3264
|
+
const __vue_module_identifier__$9 = undefined;
|
|
3265
|
+
/* functional template */
|
|
3266
|
+
const __vue_is_functional_template__$9 = false;
|
|
3267
|
+
/* style inject SSR */
|
|
3268
|
+
|
|
3269
|
+
/* style inject shadow dom */
|
|
3270
|
+
|
|
3271
|
+
|
|
3272
|
+
|
|
3273
|
+
const __vue_component__$9 = /*#__PURE__*/normalizeComponent(
|
|
3274
|
+
{ render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },
|
|
3275
|
+
__vue_inject_styles__$9,
|
|
3276
|
+
__vue_script__$9,
|
|
3277
|
+
__vue_scope_id__$9,
|
|
3278
|
+
__vue_is_functional_template__$9,
|
|
3279
|
+
__vue_module_identifier__$9,
|
|
3280
|
+
false,
|
|
3281
|
+
createInjector,
|
|
3282
|
+
undefined,
|
|
3283
|
+
undefined
|
|
3284
|
+
);
|
|
3285
|
+
|
|
3286
|
+
//
|
|
3287
|
+
//
|
|
3288
|
+
//
|
|
3289
|
+
//
|
|
3290
|
+
//
|
|
3291
|
+
//
|
|
3292
|
+
//
|
|
3293
|
+
//
|
|
3294
|
+
//
|
|
3295
|
+
//
|
|
3296
|
+
//
|
|
3297
|
+
//
|
|
3298
|
+
//
|
|
3299
|
+
//
|
|
3300
|
+
//
|
|
3301
|
+
//
|
|
3302
|
+
//
|
|
3303
|
+
//
|
|
3304
|
+
|
|
3305
|
+
var script$8 = {
|
|
3306
|
+
name: 'ele-select-entity',
|
|
3307
|
+
props: {
|
|
3308
|
+
value: {
|
|
3309
|
+
type: [Array, Object]
|
|
3310
|
+
},
|
|
3311
|
+
multiple: {
|
|
3312
|
+
type: Boolean,
|
|
3313
|
+
default: true
|
|
3314
|
+
},
|
|
3315
|
+
maxCount: {
|
|
3316
|
+
type: Number,
|
|
3317
|
+
default: 7
|
|
3318
|
+
},
|
|
3319
|
+
disabled: {
|
|
3320
|
+
type: Boolean,
|
|
3321
|
+
default: false
|
|
3322
|
+
},
|
|
3323
|
+
addonAfter: {
|
|
3324
|
+
type: String,
|
|
3325
|
+
default: '选择'
|
|
3326
|
+
}
|
|
3327
|
+
},
|
|
3328
|
+
methods: {
|
|
3329
|
+
getValueList() {
|
|
3330
|
+
if (this.value) {
|
|
3331
|
+
if (this.multiple) {
|
|
3332
|
+
return this.getIsMaxCount() ? this.value.slice(0, this.maxCount) : this.value;
|
|
3333
|
+
}
|
|
3334
|
+
return [this.value];
|
|
3335
|
+
}
|
|
3336
|
+
return [];
|
|
3337
|
+
},
|
|
3338
|
+
getIsMaxCount() {
|
|
3339
|
+
if (this.value && this.multiple) {
|
|
3340
|
+
return this.value.length >= this.maxCount;
|
|
3341
|
+
}
|
|
3342
|
+
return false;
|
|
3343
|
+
},
|
|
3344
|
+
onChange() {
|
|
3345
|
+
if (this.disabled) return;
|
|
3346
|
+
this.$emit('change', this.value);
|
|
3347
|
+
},
|
|
3348
|
+
onClose(e, inx) {
|
|
3349
|
+
e = window.event || e;
|
|
3350
|
+
e.preventDefault();
|
|
3351
|
+
if (!this.multiple) {
|
|
3352
|
+
this.$emit('change', null);
|
|
3353
|
+
return;
|
|
3354
|
+
}
|
|
3355
|
+
this.value.splice(inx, 1);
|
|
3356
|
+
this.$emit('change', this.value);
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
};
|
|
3360
|
+
|
|
3361
|
+
/* script */
|
|
3362
|
+
const __vue_script__$8 = script$8;
|
|
3363
|
+
|
|
3364
|
+
/* template */
|
|
3365
|
+
var __vue_render__$8 = function () {
|
|
3366
|
+
var _vm = this;
|
|
3367
|
+
var _h = _vm.$createElement;
|
|
3368
|
+
var _c = _vm._self._c || _h;
|
|
3369
|
+
return _c(
|
|
3370
|
+
"div",
|
|
3371
|
+
{
|
|
3372
|
+
staticClass: "g-select-entity__wrapper",
|
|
3373
|
+
class: _vm.disabled ? "g-select-entity__disabled" : "",
|
|
3374
|
+
},
|
|
3375
|
+
[
|
|
3376
|
+
_c(
|
|
3377
|
+
"span",
|
|
3378
|
+
{ staticClass: "select-entity__input" },
|
|
3379
|
+
[
|
|
3380
|
+
_vm._l(_vm.getValueList(), function (item, inx) {
|
|
3381
|
+
return _c(
|
|
3382
|
+
"a-tag",
|
|
3383
|
+
{
|
|
3384
|
+
key: item.value,
|
|
3385
|
+
attrs: { closable: !_vm.disabled && !_vm.getIsMaxCount() },
|
|
3386
|
+
on: {
|
|
3387
|
+
close: function ($event) {
|
|
3388
|
+
var i = arguments.length,
|
|
3389
|
+
argsArray = Array(i);
|
|
3390
|
+
while (i--) argsArray[i] = arguments[i];
|
|
3391
|
+
return _vm.onClose.apply(void 0, argsArray.concat([inx]))
|
|
3392
|
+
},
|
|
3393
|
+
},
|
|
3394
|
+
},
|
|
3395
|
+
[_vm._v("\n " + _vm._s(item.label) + "\n ")]
|
|
3396
|
+
)
|
|
3397
|
+
}),
|
|
3398
|
+
_vm._v(" "),
|
|
3399
|
+
_vm.getIsMaxCount() ? _c("a-tag", [_vm._v("......")]) : _vm._e(),
|
|
3400
|
+
],
|
|
3401
|
+
2
|
|
3402
|
+
),
|
|
3403
|
+
_vm._v(" "),
|
|
3404
|
+
_c(
|
|
3405
|
+
"span",
|
|
3406
|
+
{ staticClass: "select-entity__addon", on: { click: _vm.onChange } },
|
|
3407
|
+
[_vm._v(_vm._s(_vm.addonAfter))]
|
|
3408
|
+
),
|
|
3409
|
+
_vm._v(" "),
|
|
3410
|
+
_vm._t("default"),
|
|
3411
|
+
],
|
|
3412
|
+
2
|
|
3413
|
+
)
|
|
3414
|
+
};
|
|
3415
|
+
var __vue_staticRenderFns__$8 = [];
|
|
3416
|
+
__vue_render__$8._withStripped = true;
|
|
3417
|
+
|
|
3418
|
+
/* style */
|
|
3419
|
+
const __vue_inject_styles__$8 = function (inject) {
|
|
3420
|
+
if (!inject) return
|
|
3421
|
+
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 });
|
|
3422
|
+
|
|
3423
|
+
};
|
|
3424
|
+
/* scoped */
|
|
3425
|
+
const __vue_scope_id__$8 = "data-v-328544bb";
|
|
3426
|
+
/* module identifier */
|
|
3427
|
+
const __vue_module_identifier__$8 = undefined;
|
|
3428
|
+
/* functional template */
|
|
3429
|
+
const __vue_is_functional_template__$8 = false;
|
|
3430
|
+
/* style inject SSR */
|
|
3431
|
+
|
|
3432
|
+
/* style inject shadow dom */
|
|
3433
|
+
|
|
3434
|
+
|
|
3435
|
+
|
|
3436
|
+
const __vue_component__$8 = /*#__PURE__*/normalizeComponent(
|
|
3437
|
+
{ render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },
|
|
3438
|
+
__vue_inject_styles__$8,
|
|
3439
|
+
__vue_script__$8,
|
|
3440
|
+
__vue_scope_id__$8,
|
|
3441
|
+
__vue_is_functional_template__$8,
|
|
3442
|
+
__vue_module_identifier__$8,
|
|
3443
|
+
false,
|
|
3444
|
+
createInjector,
|
|
3445
|
+
undefined,
|
|
3446
|
+
undefined
|
|
3447
|
+
);
|
|
3448
|
+
|
|
3449
|
+
//
|
|
3450
|
+
//
|
|
3451
|
+
//
|
|
3452
|
+
//
|
|
3453
|
+
//
|
|
3454
|
+
//
|
|
3455
|
+
|
|
3456
|
+
var script$7 = {
|
|
3457
|
+
name: 'ele-input-number',
|
|
3458
|
+
props: {
|
|
3459
|
+
precision: {
|
|
3460
|
+
type: Number
|
|
3461
|
+
},
|
|
3462
|
+
value: {
|
|
3463
|
+
type: [Number, String]
|
|
3464
|
+
}
|
|
3465
|
+
},
|
|
3466
|
+
methods: {
|
|
3467
|
+
onChange(value) {
|
|
3468
|
+
this.$emit('change', value);
|
|
3469
|
+
}
|
|
3470
|
+
}
|
|
3471
|
+
};
|
|
3472
|
+
|
|
3473
|
+
/* script */
|
|
3474
|
+
const __vue_script__$7 = script$7;
|
|
3475
|
+
|
|
3476
|
+
/* template */
|
|
3477
|
+
var __vue_render__$7 = function () {
|
|
3478
|
+
var _vm = this;
|
|
3479
|
+
var _h = _vm.$createElement;
|
|
3480
|
+
var _c = _vm._self._c || _h;
|
|
3481
|
+
return _c(
|
|
3482
|
+
"div",
|
|
3483
|
+
[
|
|
3484
|
+
_c(
|
|
3485
|
+
"a-input-number",
|
|
3486
|
+
_vm._b(
|
|
3487
|
+
{
|
|
3488
|
+
staticStyle: { width: "100%" },
|
|
3489
|
+
attrs: { value: _vm.value, precision: _vm.precision },
|
|
3490
|
+
on: { change: _vm.onChange },
|
|
3491
|
+
},
|
|
3492
|
+
"a-input-number",
|
|
3493
|
+
_vm.$attrs,
|
|
3494
|
+
false
|
|
3495
|
+
)
|
|
3496
|
+
),
|
|
3497
|
+
],
|
|
3498
|
+
1
|
|
3499
|
+
)
|
|
3500
|
+
};
|
|
3501
|
+
var __vue_staticRenderFns__$7 = [];
|
|
3502
|
+
__vue_render__$7._withStripped = true;
|
|
3503
|
+
|
|
3504
|
+
/* style */
|
|
3505
|
+
const __vue_inject_styles__$7 = undefined;
|
|
3506
|
+
/* scoped */
|
|
3507
|
+
const __vue_scope_id__$7 = undefined;
|
|
3508
|
+
/* module identifier */
|
|
3509
|
+
const __vue_module_identifier__$7 = undefined;
|
|
3510
|
+
/* functional template */
|
|
3511
|
+
const __vue_is_functional_template__$7 = false;
|
|
3512
|
+
/* style inject */
|
|
3513
|
+
|
|
3514
|
+
/* style inject SSR */
|
|
3515
|
+
|
|
3516
|
+
/* style inject shadow dom */
|
|
3517
|
+
|
|
3518
|
+
|
|
3519
|
+
|
|
3520
|
+
const __vue_component__$7 = /*#__PURE__*/normalizeComponent(
|
|
3521
|
+
{ render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },
|
|
3522
|
+
__vue_inject_styles__$7,
|
|
3523
|
+
__vue_script__$7,
|
|
3524
|
+
__vue_scope_id__$7,
|
|
3525
|
+
__vue_is_functional_template__$7,
|
|
3526
|
+
__vue_module_identifier__$7,
|
|
3527
|
+
false,
|
|
3528
|
+
undefined,
|
|
3529
|
+
undefined,
|
|
3530
|
+
undefined
|
|
3531
|
+
);
|
|
3532
|
+
|
|
3533
|
+
//
|
|
3534
|
+
//
|
|
3535
|
+
//
|
|
3536
|
+
//
|
|
3537
|
+
|
|
3538
|
+
var script$6 = {
|
|
3539
|
+
name: 'ele-checkbox',
|
|
3540
|
+
props: {
|
|
3541
|
+
value: {
|
|
3542
|
+
type: Array
|
|
3543
|
+
},
|
|
3544
|
+
dataSource: {
|
|
3545
|
+
type: Array,
|
|
3546
|
+
default: () => []
|
|
3547
|
+
},
|
|
3548
|
+
disabled: {
|
|
3549
|
+
type: Boolean,
|
|
3550
|
+
default: false
|
|
3551
|
+
}
|
|
3552
|
+
},
|
|
3553
|
+
methods: {
|
|
3554
|
+
onChange(value) {
|
|
3555
|
+
this.$emit('change', value);
|
|
3556
|
+
this.$emit('input', value);
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
};
|
|
3560
|
+
|
|
3561
|
+
/* script */
|
|
3562
|
+
const __vue_script__$6 = script$6;
|
|
3563
|
+
|
|
3564
|
+
/* template */
|
|
3565
|
+
var __vue_render__$6 = function () {
|
|
3566
|
+
var _vm = this;
|
|
3567
|
+
var _h = _vm.$createElement;
|
|
3568
|
+
var _c = _vm._self._c || _h;
|
|
3569
|
+
return _c("a-checkbox-group", {
|
|
3570
|
+
attrs: {
|
|
3571
|
+
options: _vm.dataSource,
|
|
3572
|
+
disabled: _vm.disabled,
|
|
3573
|
+
defaultValue: _vm.value,
|
|
3574
|
+
},
|
|
3575
|
+
on: { change: _vm.onChange },
|
|
3576
|
+
})
|
|
3577
|
+
};
|
|
3578
|
+
var __vue_staticRenderFns__$6 = [];
|
|
3579
|
+
__vue_render__$6._withStripped = true;
|
|
3580
|
+
|
|
3581
|
+
/* style */
|
|
3582
|
+
const __vue_inject_styles__$6 = function (inject) {
|
|
3583
|
+
if (!inject) return
|
|
3584
|
+
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 });
|
|
3585
|
+
|
|
3586
|
+
};
|
|
3587
|
+
/* scoped */
|
|
3588
|
+
const __vue_scope_id__$6 = "data-v-63b1b120";
|
|
3589
|
+
/* module identifier */
|
|
3590
|
+
const __vue_module_identifier__$6 = undefined;
|
|
3591
|
+
/* functional template */
|
|
3592
|
+
const __vue_is_functional_template__$6 = false;
|
|
3593
|
+
/* style inject SSR */
|
|
3594
|
+
|
|
3595
|
+
/* style inject shadow dom */
|
|
3596
|
+
|
|
3597
|
+
|
|
3598
|
+
|
|
3599
|
+
const __vue_component__$6 = /*#__PURE__*/normalizeComponent(
|
|
3600
|
+
{ render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },
|
|
3601
|
+
__vue_inject_styles__$6,
|
|
3602
|
+
__vue_script__$6,
|
|
3603
|
+
__vue_scope_id__$6,
|
|
3604
|
+
__vue_is_functional_template__$6,
|
|
3605
|
+
__vue_module_identifier__$6,
|
|
3606
|
+
false,
|
|
3607
|
+
createInjector,
|
|
3608
|
+
undefined,
|
|
3609
|
+
undefined
|
|
3610
|
+
);
|
|
3611
|
+
|
|
3612
|
+
//
|
|
3613
|
+
//
|
|
3614
|
+
//
|
|
3615
|
+
//
|
|
3616
|
+
//
|
|
3617
|
+
//
|
|
3618
|
+
//
|
|
3619
|
+
//
|
|
3620
|
+
|
|
3621
|
+
var script$5 = {
|
|
3622
|
+
name: 'ele-radio',
|
|
3623
|
+
props: {
|
|
3624
|
+
value: {
|
|
3625
|
+
type: [String, Array, Number]
|
|
3626
|
+
},
|
|
3627
|
+
dataSource: {
|
|
3628
|
+
type: Array,
|
|
3629
|
+
default: () => []
|
|
3630
|
+
},
|
|
3631
|
+
disabled: {
|
|
3632
|
+
type: Boolean,
|
|
3633
|
+
default: false
|
|
3634
|
+
}
|
|
3635
|
+
},
|
|
3636
|
+
methods: {
|
|
3637
|
+
onChange(e) {
|
|
3638
|
+
this.$emit('change', e.target.value);
|
|
3639
|
+
this.$emit('input', e.target.value);
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
};
|
|
3643
|
+
|
|
3644
|
+
/* script */
|
|
3645
|
+
const __vue_script__$5 = script$5;
|
|
3646
|
+
|
|
3647
|
+
/* template */
|
|
3648
|
+
var __vue_render__$5 = function () {
|
|
3649
|
+
var _vm = this;
|
|
3650
|
+
var _h = _vm.$createElement;
|
|
3651
|
+
var _c = _vm._self._c || _h;
|
|
3652
|
+
return _c(
|
|
3653
|
+
"a-radio-group",
|
|
3654
|
+
{
|
|
3655
|
+
attrs: { defaultValue: _vm.value, disabled: _vm.disabled },
|
|
3656
|
+
on: { change: _vm.onChange },
|
|
3657
|
+
},
|
|
3658
|
+
_vm._l(_vm.dataSource, function (item) {
|
|
3659
|
+
return _c("a-radio", { key: item.value, attrs: { value: item.value } }, [
|
|
3660
|
+
_vm._v("\n " + _vm._s(item.label) + "\n "),
|
|
3661
|
+
])
|
|
3662
|
+
}),
|
|
3663
|
+
1
|
|
3664
|
+
)
|
|
3665
|
+
};
|
|
3666
|
+
var __vue_staticRenderFns__$5 = [];
|
|
3667
|
+
__vue_render__$5._withStripped = true;
|
|
3668
|
+
|
|
3669
|
+
/* style */
|
|
3670
|
+
const __vue_inject_styles__$5 = function (inject) {
|
|
3671
|
+
if (!inject) return
|
|
3672
|
+
inject("data-v-66c5cdf2_0", { source: ".ant-radio-group[data-v-66c5cdf2] {\n text-align: left;\n line-height: 32px;\n}\n.has-error .ant-radio-group[data-v-66c5cdf2] .ant-radio-wrapper {\n color: var(--idooel-form-border-err-color);\n}\n.has-error .ant-radio-group[data-v-66c5cdf2] .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":"AAiCA;EACA,gBAAA;EACA,iBAAA;AChCA;ADoCA;EACA,0CAAA;ACjCA;ADmCA;EACA,iDAAA;ACjCA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <a-radio-group :defaultValue=\"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 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
|
+
|
|
3674
|
+
};
|
|
3675
|
+
/* scoped */
|
|
3676
|
+
const __vue_scope_id__$5 = "data-v-66c5cdf2";
|
|
3677
|
+
/* module identifier */
|
|
3678
|
+
const __vue_module_identifier__$5 = undefined;
|
|
3679
|
+
/* functional template */
|
|
3680
|
+
const __vue_is_functional_template__$5 = false;
|
|
3681
|
+
/* style inject SSR */
|
|
3682
|
+
|
|
3683
|
+
/* style inject shadow dom */
|
|
3684
|
+
|
|
3685
|
+
|
|
3686
|
+
|
|
3687
|
+
const __vue_component__$5 = /*#__PURE__*/normalizeComponent(
|
|
3688
|
+
{ render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },
|
|
3689
|
+
__vue_inject_styles__$5,
|
|
3690
|
+
__vue_script__$5,
|
|
3691
|
+
__vue_scope_id__$5,
|
|
3692
|
+
__vue_is_functional_template__$5,
|
|
3693
|
+
__vue_module_identifier__$5,
|
|
3694
|
+
false,
|
|
3695
|
+
createInjector,
|
|
3696
|
+
undefined,
|
|
3697
|
+
undefined
|
|
3698
|
+
);
|
|
3699
|
+
|
|
3700
|
+
//
|
|
3701
|
+
var script$4 = {
|
|
3702
|
+
name: 'ele-form',
|
|
3703
|
+
components: {
|
|
3704
|
+
EleSelect: __vue_component__$k,
|
|
3705
|
+
EleInput: __vue_component__$l,
|
|
3706
|
+
EleTextarea: __vue_component__$b,
|
|
3707
|
+
EleUpload: __vue_component__$9,
|
|
3708
|
+
EleSelectEntity: __vue_component__$8,
|
|
3709
|
+
EleInputNumber: __vue_component__$7,
|
|
3710
|
+
EleCheckbox: __vue_component__$6,
|
|
3711
|
+
EleRadio: __vue_component__$5
|
|
3712
|
+
},
|
|
3713
|
+
props: {
|
|
3714
|
+
elements: {
|
|
3715
|
+
type: Array,
|
|
3716
|
+
default: () => []
|
|
3717
|
+
}
|
|
3718
|
+
},
|
|
3719
|
+
data() {
|
|
3720
|
+
return {
|
|
3721
|
+
some: '1',
|
|
3722
|
+
form: this.$form.createForm(this, {
|
|
3723
|
+
name: 'coordinated'
|
|
3724
|
+
})
|
|
3725
|
+
};
|
|
3726
|
+
},
|
|
3727
|
+
methods: {
|
|
3728
|
+
onChangeTextarea(value, props) {
|
|
3729
|
+
this.setFieldsValue({
|
|
3730
|
+
[props.name]: value
|
|
3731
|
+
});
|
|
3732
|
+
},
|
|
3733
|
+
validateFields() {
|
|
3734
|
+
let ret = false;
|
|
3735
|
+
this.form.validateFields((error, values) => {
|
|
3736
|
+
ret = !error;
|
|
3737
|
+
});
|
|
3738
|
+
return ret;
|
|
3739
|
+
},
|
|
3740
|
+
setFieldsValue(props = {}) {
|
|
3741
|
+
this.form.setFieldsValue(props);
|
|
3742
|
+
},
|
|
3743
|
+
getFieldsValue() {
|
|
3744
|
+
return this.form.getFieldsValue();
|
|
3745
|
+
}
|
|
3746
|
+
}
|
|
3747
|
+
};
|
|
3748
|
+
|
|
3749
|
+
/* script */
|
|
3750
|
+
const __vue_script__$4 = script$4;
|
|
3751
|
+
|
|
3752
|
+
/* template */
|
|
3753
|
+
var __vue_render__$4 = function () {
|
|
3754
|
+
var _vm = this;
|
|
3755
|
+
var _h = _vm.$createElement;
|
|
3756
|
+
var _c = _vm._self._c || _h;
|
|
3757
|
+
return _c(
|
|
3758
|
+
"div",
|
|
3759
|
+
{ staticClass: "ele__form--wrapper" },
|
|
3760
|
+
[
|
|
3761
|
+
_c(
|
|
3762
|
+
"a-form",
|
|
3763
|
+
{
|
|
3764
|
+
staticClass: "ant-advanced-search-form",
|
|
3765
|
+
attrs: { form: _vm.form, layout: "vertical" },
|
|
3766
|
+
},
|
|
3767
|
+
[
|
|
3768
|
+
_c(
|
|
3769
|
+
"a-row",
|
|
3770
|
+
{ attrs: { gutter: 24 } },
|
|
3771
|
+
_vm._l(_vm.elements, function (ele) {
|
|
3772
|
+
return _c(
|
|
3773
|
+
"a-col",
|
|
3774
|
+
{ key: ele.name, attrs: { span: ele.span } },
|
|
3775
|
+
[
|
|
3776
|
+
ele.type == "Input"
|
|
3777
|
+
? [
|
|
3778
|
+
_c(
|
|
3779
|
+
"a-form-item",
|
|
3780
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3781
|
+
[
|
|
3782
|
+
_c("ele-input", {
|
|
3783
|
+
directives: [
|
|
3784
|
+
{
|
|
3785
|
+
name: "decorator",
|
|
3786
|
+
rawName: "v-decorator",
|
|
3787
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3788
|
+
expression:
|
|
3789
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3790
|
+
},
|
|
3791
|
+
],
|
|
3792
|
+
staticStyle: { width: "100%" },
|
|
3793
|
+
attrs: { "max-length": ele.maxLength },
|
|
3794
|
+
}),
|
|
3795
|
+
],
|
|
3796
|
+
1
|
|
3797
|
+
),
|
|
3798
|
+
]
|
|
3799
|
+
: ele.type == "Textarea"
|
|
3800
|
+
? [
|
|
3801
|
+
_c(
|
|
3802
|
+
"a-form-item",
|
|
3803
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3804
|
+
[
|
|
3805
|
+
_c("ele-textarea", {
|
|
3806
|
+
directives: [
|
|
3807
|
+
{
|
|
3808
|
+
name: "decorator",
|
|
3809
|
+
rawName: "v-decorator",
|
|
3810
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3811
|
+
expression:
|
|
3812
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3813
|
+
},
|
|
3814
|
+
],
|
|
3815
|
+
staticStyle: { width: "100%" },
|
|
3816
|
+
attrs: {
|
|
3817
|
+
"max-length": ele.maxLength,
|
|
3818
|
+
autosize: ele.autosize,
|
|
3819
|
+
"allow-clear": ele.allowClear,
|
|
3820
|
+
placeholder: ele.placeholder,
|
|
3821
|
+
},
|
|
3822
|
+
on: {
|
|
3823
|
+
"on-change": function ($event) {
|
|
3824
|
+
return _vm.onChangeTextarea($event, ele)
|
|
3825
|
+
},
|
|
3826
|
+
},
|
|
3827
|
+
}),
|
|
3828
|
+
],
|
|
3829
|
+
1
|
|
3830
|
+
),
|
|
3831
|
+
]
|
|
3832
|
+
: ele.type == "Select"
|
|
3833
|
+
? [
|
|
3834
|
+
_c(
|
|
3835
|
+
"a-form-item",
|
|
3836
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3837
|
+
[
|
|
3838
|
+
_c("ele-select", {
|
|
3839
|
+
directives: [
|
|
3840
|
+
{
|
|
3841
|
+
name: "decorator",
|
|
3842
|
+
rawName: "v-decorator",
|
|
3843
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3844
|
+
expression:
|
|
3845
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3846
|
+
},
|
|
3847
|
+
],
|
|
3848
|
+
staticStyle: { width: "100%" },
|
|
3849
|
+
attrs: { "data-source": ele.optionList },
|
|
3850
|
+
}),
|
|
3851
|
+
],
|
|
3852
|
+
1
|
|
3853
|
+
),
|
|
3854
|
+
]
|
|
3855
|
+
: ele.type == "ele-upload"
|
|
3856
|
+
? [
|
|
3857
|
+
_c(
|
|
3858
|
+
"a-form-item",
|
|
3859
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3860
|
+
[
|
|
3861
|
+
_c("ele-upload", {
|
|
3862
|
+
directives: [
|
|
3863
|
+
{
|
|
3864
|
+
name: "decorator",
|
|
3865
|
+
rawName: "v-decorator",
|
|
3866
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3867
|
+
expression:
|
|
3868
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3869
|
+
},
|
|
3870
|
+
],
|
|
3871
|
+
staticStyle: { width: "100%" },
|
|
3872
|
+
}),
|
|
3873
|
+
],
|
|
3874
|
+
1
|
|
3875
|
+
),
|
|
3876
|
+
]
|
|
3877
|
+
: ele.type == "SelectEntity"
|
|
3878
|
+
? [
|
|
3879
|
+
_c(
|
|
3880
|
+
"a-form-item",
|
|
3881
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3882
|
+
[
|
|
3883
|
+
_c("ele-select-entity", {
|
|
3884
|
+
directives: [
|
|
3885
|
+
{
|
|
3886
|
+
name: "decorator",
|
|
3887
|
+
rawName: "v-decorator",
|
|
3888
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3889
|
+
expression:
|
|
3890
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3891
|
+
},
|
|
3892
|
+
],
|
|
3893
|
+
staticStyle: { width: "100%" },
|
|
3894
|
+
}),
|
|
3895
|
+
],
|
|
3896
|
+
1
|
|
3897
|
+
),
|
|
3898
|
+
]
|
|
3899
|
+
: ele.type == "InputNumber"
|
|
3900
|
+
? [
|
|
3901
|
+
_c(
|
|
3902
|
+
"a-form-item",
|
|
3903
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3904
|
+
[
|
|
3905
|
+
_c(
|
|
3906
|
+
"ele-input-number",
|
|
3907
|
+
_vm._b(
|
|
3908
|
+
{
|
|
3909
|
+
directives: [
|
|
3910
|
+
{
|
|
3911
|
+
name: "decorator",
|
|
3912
|
+
rawName: "v-decorator",
|
|
3913
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3914
|
+
expression:
|
|
3915
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3916
|
+
},
|
|
3917
|
+
],
|
|
3918
|
+
staticStyle: { width: "100%" },
|
|
3919
|
+
attrs: { precision: ele.precision },
|
|
3920
|
+
},
|
|
3921
|
+
"ele-input-number",
|
|
3922
|
+
ele.props,
|
|
3923
|
+
false
|
|
3924
|
+
)
|
|
3925
|
+
),
|
|
3926
|
+
],
|
|
3927
|
+
1
|
|
3928
|
+
),
|
|
3929
|
+
]
|
|
3930
|
+
: ele.type == "Checkbox"
|
|
3931
|
+
? [
|
|
3932
|
+
_c(
|
|
3933
|
+
"a-form-item",
|
|
3934
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3935
|
+
[
|
|
3936
|
+
_c("ele-checkbox", {
|
|
3937
|
+
directives: [
|
|
3938
|
+
{
|
|
3939
|
+
name: "decorator",
|
|
3940
|
+
rawName: "v-decorator",
|
|
3941
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3942
|
+
expression:
|
|
3943
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3944
|
+
},
|
|
3945
|
+
],
|
|
3946
|
+
staticStyle: { width: "100%" },
|
|
3947
|
+
attrs: { "data-source": ele.optionList },
|
|
3948
|
+
}),
|
|
3949
|
+
],
|
|
3950
|
+
1
|
|
3951
|
+
),
|
|
3952
|
+
]
|
|
3953
|
+
: ele.type == "Radio"
|
|
3954
|
+
? [
|
|
3955
|
+
_c(
|
|
3956
|
+
"a-form-item",
|
|
3957
|
+
{ attrs: { label: ele.label + ":" } },
|
|
3958
|
+
[
|
|
3959
|
+
_c("ele-radio", {
|
|
3960
|
+
directives: [
|
|
3961
|
+
{
|
|
3962
|
+
name: "decorator",
|
|
3963
|
+
rawName: "v-decorator",
|
|
3964
|
+
value: [ele.name, { rules: ele.rules }],
|
|
3965
|
+
expression:
|
|
3966
|
+
"[ele.name, { rules: ele.rules }]",
|
|
3967
|
+
},
|
|
3968
|
+
],
|
|
3969
|
+
staticStyle: { width: "100%" },
|
|
3970
|
+
attrs: { "data-source": ele.optionList },
|
|
3971
|
+
}),
|
|
3972
|
+
],
|
|
3973
|
+
1
|
|
3974
|
+
),
|
|
3975
|
+
]
|
|
3976
|
+
: _vm._e(),
|
|
3977
|
+
],
|
|
3978
|
+
2
|
|
3979
|
+
)
|
|
3980
|
+
}),
|
|
3981
|
+
1
|
|
3982
|
+
),
|
|
3983
|
+
],
|
|
3984
|
+
1
|
|
3985
|
+
),
|
|
3986
|
+
],
|
|
3987
|
+
1
|
|
3988
|
+
)
|
|
3989
|
+
};
|
|
3990
|
+
var __vue_staticRenderFns__$4 = [];
|
|
3991
|
+
__vue_render__$4._withStripped = true;
|
|
3992
|
+
|
|
3993
|
+
/* style */
|
|
3994
|
+
const __vue_inject_styles__$4 = function (inject) {
|
|
3995
|
+
if (!inject) return
|
|
3996
|
+
inject("data-v-e06c4e7c_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue","sourcesContent":["\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
3997
|
+
|
|
3998
|
+
};
|
|
3999
|
+
/* scoped */
|
|
4000
|
+
const __vue_scope_id__$4 = "data-v-e06c4e7c";
|
|
4001
|
+
/* module identifier */
|
|
4002
|
+
const __vue_module_identifier__$4 = undefined;
|
|
4003
|
+
/* functional template */
|
|
4004
|
+
const __vue_is_functional_template__$4 = false;
|
|
4005
|
+
/* style inject SSR */
|
|
4006
|
+
|
|
4007
|
+
/* style inject shadow dom */
|
|
4008
|
+
|
|
4009
|
+
|
|
4010
|
+
|
|
4011
|
+
const __vue_component__$4 = /*#__PURE__*/normalizeComponent(
|
|
4012
|
+
{ render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },
|
|
4013
|
+
__vue_inject_styles__$4,
|
|
4014
|
+
__vue_script__$4,
|
|
4015
|
+
__vue_scope_id__$4,
|
|
4016
|
+
__vue_is_functional_template__$4,
|
|
4017
|
+
__vue_module_identifier__$4,
|
|
4018
|
+
false,
|
|
4019
|
+
createInjector,
|
|
4020
|
+
undefined,
|
|
4021
|
+
undefined
|
|
4022
|
+
);
|
|
4023
|
+
|
|
4024
|
+
__vue_component__$4.install = Vue => Vue.component(__vue_component__$4.name, __vue_component__$4);
|
|
4025
|
+
|
|
4026
|
+
//
|
|
4027
|
+
//
|
|
4028
|
+
//
|
|
4029
|
+
//
|
|
4030
|
+
//
|
|
4031
|
+
//
|
|
4032
|
+
|
|
4033
|
+
var script$3 = {
|
|
4034
|
+
name: 'g-text'
|
|
4035
|
+
};
|
|
4036
|
+
|
|
4037
|
+
/* script */
|
|
4038
|
+
const __vue_script__$3 = script$3;
|
|
4039
|
+
|
|
4040
|
+
/* template */
|
|
4041
|
+
var __vue_render__$3 = function () {
|
|
4042
|
+
var _vm = this;
|
|
4043
|
+
var _h = _vm.$createElement;
|
|
4044
|
+
var _c = _vm._self._c || _h;
|
|
4045
|
+
return _c("div", [_vm._v("\n text\n")])
|
|
4046
|
+
};
|
|
4047
|
+
var __vue_staticRenderFns__$3 = [];
|
|
4048
|
+
__vue_render__$3._withStripped = true;
|
|
4049
|
+
|
|
4050
|
+
/* style */
|
|
4051
|
+
const __vue_inject_styles__$3 = function (inject) {
|
|
4052
|
+
if (!inject) return
|
|
4053
|
+
inject("data-v-d41a0ce6_0", { source: "\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 });
|
|
4054
|
+
|
|
4055
|
+
};
|
|
4056
|
+
/* scoped */
|
|
4057
|
+
const __vue_scope_id__$3 = "data-v-d41a0ce6";
|
|
4058
|
+
/* module identifier */
|
|
4059
|
+
const __vue_module_identifier__$3 = undefined;
|
|
4060
|
+
/* functional template */
|
|
4061
|
+
const __vue_is_functional_template__$3 = false;
|
|
4062
|
+
/* style inject SSR */
|
|
4063
|
+
|
|
4064
|
+
/* style inject shadow dom */
|
|
4065
|
+
|
|
4066
|
+
|
|
4067
|
+
|
|
4068
|
+
const __vue_component__$3 = /*#__PURE__*/normalizeComponent(
|
|
4069
|
+
{ render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },
|
|
4070
|
+
__vue_inject_styles__$3,
|
|
4071
|
+
__vue_script__$3,
|
|
4072
|
+
__vue_scope_id__$3,
|
|
4073
|
+
__vue_is_functional_template__$3,
|
|
4074
|
+
__vue_module_identifier__$3,
|
|
4075
|
+
false,
|
|
4076
|
+
createInjector,
|
|
4077
|
+
undefined,
|
|
4078
|
+
undefined
|
|
4079
|
+
);
|
|
4080
|
+
|
|
4081
|
+
__vue_component__$3.install = Vue => Vue.component(__vue_component__$3.name, __vue_component__$3);
|
|
4082
|
+
|
|
4083
|
+
__vue_component__$9.install = Vue => Vue.component(__vue_component__$9.name, __vue_component__$9);
|
|
4084
|
+
|
|
4085
|
+
__vue_component__$8.install = Vue => Vue.component(__vue_component__$8.name, __vue_component__$8);
|
|
4086
|
+
|
|
4087
|
+
__vue_component__$a.install = Vue => Vue.component(__vue_component__$a.name, __vue_component__$a);
|
|
4088
|
+
|
|
4089
|
+
__vue_component__$7.install = Vue => Vue.component(__vue_component__$7.name, __vue_component__$7);
|
|
4090
|
+
|
|
4091
|
+
//
|
|
4092
|
+
//
|
|
4093
|
+
//
|
|
4094
|
+
//
|
|
4095
|
+
//
|
|
4096
|
+
//
|
|
4097
|
+
//
|
|
4098
|
+
//
|
|
4099
|
+
//
|
|
4100
|
+
//
|
|
4101
|
+
//
|
|
4102
|
+
//
|
|
4103
|
+
//
|
|
4104
|
+
//
|
|
4105
|
+
//
|
|
4106
|
+
//
|
|
4107
|
+
//
|
|
4108
|
+
//
|
|
4109
|
+
//
|
|
4110
|
+
//
|
|
4111
|
+
//
|
|
4112
|
+
//
|
|
4113
|
+
|
|
4114
|
+
var script$2 = {
|
|
4115
|
+
name: 'ele-modal',
|
|
4116
|
+
props: {
|
|
4117
|
+
value: {
|
|
4118
|
+
type: Boolean,
|
|
4119
|
+
default: false
|
|
4120
|
+
},
|
|
4121
|
+
title: {
|
|
4122
|
+
type: String,
|
|
4123
|
+
default: '标题'
|
|
4124
|
+
},
|
|
4125
|
+
cancelText: {
|
|
4126
|
+
type: String,
|
|
4127
|
+
default: '关闭'
|
|
4128
|
+
},
|
|
4129
|
+
okText: {
|
|
4130
|
+
type: String,
|
|
4131
|
+
default: '确定'
|
|
4132
|
+
},
|
|
4133
|
+
size: {
|
|
4134
|
+
type: String,
|
|
4135
|
+
default: 'small'
|
|
4136
|
+
},
|
|
4137
|
+
map: {
|
|
4138
|
+
type: Object,
|
|
4139
|
+
default() {
|
|
4140
|
+
return {};
|
|
4141
|
+
}
|
|
4142
|
+
},
|
|
4143
|
+
closable: {
|
|
4144
|
+
type: Boolean,
|
|
4145
|
+
default: true
|
|
4146
|
+
},
|
|
4147
|
+
maskClosable: {
|
|
4148
|
+
type: Boolean,
|
|
4149
|
+
default: false
|
|
4150
|
+
},
|
|
4151
|
+
showFooter: {
|
|
4152
|
+
type: Boolean,
|
|
4153
|
+
default: true
|
|
4154
|
+
},
|
|
4155
|
+
footer: {
|
|
4156
|
+
type: Function,
|
|
4157
|
+
default: null
|
|
4158
|
+
},
|
|
4159
|
+
onlyClose: {
|
|
4160
|
+
type: Boolean,
|
|
4161
|
+
default: false
|
|
4162
|
+
}
|
|
4163
|
+
},
|
|
4164
|
+
watch: {
|
|
4165
|
+
value(newVal) {
|
|
4166
|
+
this.$nextTick(() => {
|
|
4167
|
+
this.showModal = newVal;
|
|
4168
|
+
});
|
|
4169
|
+
}
|
|
4170
|
+
},
|
|
4171
|
+
computed: {
|
|
4172
|
+
width() {
|
|
4173
|
+
return this.map[this.size];
|
|
4174
|
+
},
|
|
4175
|
+
maxheight() {
|
|
4176
|
+
return `calc(100vh - ${this.upDownDistance[this.size] * 2 + (this.title ? 55 : 0) + (this.showFooter ? 53 : 0)}px`;
|
|
4177
|
+
}
|
|
4178
|
+
},
|
|
4179
|
+
data() {
|
|
4180
|
+
return {
|
|
4181
|
+
showModal: false
|
|
4182
|
+
};
|
|
4183
|
+
},
|
|
4184
|
+
created() {
|
|
4185
|
+
let defaultMap = {
|
|
4186
|
+
small: 480,
|
|
4187
|
+
middle: 768,
|
|
4188
|
+
big: 1200
|
|
4189
|
+
};
|
|
4190
|
+
this.upDownDistance = {
|
|
4191
|
+
small: 80,
|
|
4192
|
+
middle: 80,
|
|
4193
|
+
big: 40
|
|
4194
|
+
};
|
|
4195
|
+
this.map = Object.assign(this.map, defaultMap);
|
|
4196
|
+
},
|
|
4197
|
+
methods: {
|
|
4198
|
+
openModal() {
|
|
4199
|
+
this.showModal = true;
|
|
4200
|
+
this.removeHidden();
|
|
4201
|
+
},
|
|
4202
|
+
handleCancel() {
|
|
4203
|
+
this.showModal = false;
|
|
4204
|
+
this.removeHidden();
|
|
4205
|
+
console.log('on-cancel');
|
|
4206
|
+
this.$emit('cancel');
|
|
4207
|
+
this.$emit('input', this.showModal);
|
|
4208
|
+
},
|
|
4209
|
+
handleOk() {
|
|
4210
|
+
console.log('on-ok');
|
|
4211
|
+
this.$emit('ok');
|
|
4212
|
+
},
|
|
4213
|
+
removeHidden() {
|
|
4214
|
+
let ishidden = document.body.style.overflow === 'hidden';
|
|
4215
|
+
ishidden && (document.body.style.overflow = 'initial');
|
|
4216
|
+
}
|
|
4217
|
+
}
|
|
4218
|
+
};
|
|
4219
|
+
|
|
4220
|
+
/* script */
|
|
4221
|
+
const __vue_script__$2 = script$2;
|
|
4222
|
+
|
|
4223
|
+
/* template */
|
|
4224
|
+
var __vue_render__$2 = function () {
|
|
4225
|
+
var _vm = this;
|
|
4226
|
+
var _h = _vm.$createElement;
|
|
4227
|
+
var _c = _vm._self._c || _h;
|
|
4228
|
+
return _c(
|
|
4229
|
+
"a-modal",
|
|
4230
|
+
{
|
|
4231
|
+
attrs: {
|
|
4232
|
+
title: _vm.title,
|
|
4233
|
+
cancelText: _vm.cancelText,
|
|
4234
|
+
okText: _vm.okText,
|
|
4235
|
+
closable: _vm.closable,
|
|
4236
|
+
width: _vm.width,
|
|
4237
|
+
keyboard: false,
|
|
4238
|
+
maskClosable: _vm.maskClosable,
|
|
4239
|
+
dialogStyle: { top: _vm.upDownDistance[_vm.size] + "px" },
|
|
4240
|
+
bodyStyle: { maxHeight: _vm.maxheight, overflowY: "auto" },
|
|
4241
|
+
footer: _vm.showFooter ? undefined : null,
|
|
4242
|
+
},
|
|
4243
|
+
on: { cancel: _vm.handleCancel, ok: _vm.handleOk },
|
|
4244
|
+
model: {
|
|
4245
|
+
value: _vm.showModal,
|
|
4246
|
+
callback: function ($$v) {
|
|
4247
|
+
_vm.showModal = $$v;
|
|
4248
|
+
},
|
|
4249
|
+
expression: "showModal",
|
|
4250
|
+
},
|
|
4251
|
+
},
|
|
4252
|
+
[
|
|
4253
|
+
_vm._t("default"),
|
|
4254
|
+
_vm._v(" "),
|
|
4255
|
+
_c("template", { slot: "footer" }, [_vm._t("footer")], 2),
|
|
4256
|
+
],
|
|
4257
|
+
2
|
|
4258
|
+
)
|
|
4259
|
+
};
|
|
4260
|
+
var __vue_staticRenderFns__$2 = [];
|
|
4261
|
+
__vue_render__$2._withStripped = true;
|
|
4262
|
+
|
|
4263
|
+
/* style */
|
|
4264
|
+
const __vue_inject_styles__$2 = undefined;
|
|
4265
|
+
/* scoped */
|
|
4266
|
+
const __vue_scope_id__$2 = undefined;
|
|
4267
|
+
/* module identifier */
|
|
4268
|
+
const __vue_module_identifier__$2 = undefined;
|
|
4269
|
+
/* functional template */
|
|
4270
|
+
const __vue_is_functional_template__$2 = false;
|
|
4271
|
+
/* style inject */
|
|
4272
|
+
|
|
4273
|
+
/* style inject SSR */
|
|
4274
|
+
|
|
4275
|
+
/* style inject shadow dom */
|
|
4276
|
+
|
|
4277
|
+
|
|
4278
|
+
|
|
4279
|
+
const __vue_component__$2 = /*#__PURE__*/normalizeComponent(
|
|
4280
|
+
{ render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },
|
|
4281
|
+
__vue_inject_styles__$2,
|
|
4282
|
+
__vue_script__$2,
|
|
4283
|
+
__vue_scope_id__$2,
|
|
4284
|
+
__vue_is_functional_template__$2,
|
|
4285
|
+
__vue_module_identifier__$2,
|
|
4286
|
+
false,
|
|
4287
|
+
undefined,
|
|
4288
|
+
undefined,
|
|
4289
|
+
undefined
|
|
4290
|
+
);
|
|
4291
|
+
|
|
4292
|
+
__vue_component__$2.install = Vue => Vue.component(__vue_component__$2.name, __vue_component__$2);
|
|
4293
|
+
|
|
4294
|
+
__vue_component__$6.install = Vue => Vue.component(__vue_component__$6.name, __vue_component__$6);
|
|
4295
|
+
|
|
4296
|
+
__vue_component__$5.install = Vue => Vue.component(__vue_component__$5.name, __vue_component__$5);
|
|
4297
|
+
|
|
4298
|
+
//
|
|
4299
|
+
//
|
|
4300
|
+
//
|
|
4301
|
+
//
|
|
4302
|
+
//
|
|
4303
|
+
//
|
|
4304
|
+
|
|
4305
|
+
var script$1 = {
|
|
4306
|
+
name: 'ele-batch-export'
|
|
4307
|
+
};
|
|
4308
|
+
|
|
4309
|
+
/* script */
|
|
4310
|
+
const __vue_script__$1 = script$1;
|
|
4311
|
+
|
|
4312
|
+
/* template */
|
|
4313
|
+
var __vue_render__$1 = function () {
|
|
4314
|
+
var _vm = this;
|
|
4315
|
+
var _h = _vm.$createElement;
|
|
4316
|
+
var _c = _vm._self._c || _h;
|
|
4317
|
+
return _c("div", [_vm._v("\n export\n")])
|
|
4318
|
+
};
|
|
4319
|
+
var __vue_staticRenderFns__$1 = [];
|
|
4320
|
+
__vue_render__$1._withStripped = true;
|
|
4321
|
+
|
|
4322
|
+
/* style */
|
|
4323
|
+
const __vue_inject_styles__$1 = function (inject) {
|
|
4324
|
+
if (!inject) return
|
|
4325
|
+
inject("data-v-4ed65b1c_0", { source: "\n\n/*# sourceMappingURL=index.vue.map */", map: {"version":3,"sources":["index.vue"],"names":[],"mappings":";;AAEA,oCAAoC","file":"index.vue"}, media: undefined });
|
|
4326
|
+
|
|
4327
|
+
};
|
|
4328
|
+
/* scoped */
|
|
4329
|
+
const __vue_scope_id__$1 = "data-v-4ed65b1c";
|
|
4330
|
+
/* module identifier */
|
|
4331
|
+
const __vue_module_identifier__$1 = undefined;
|
|
4332
|
+
/* functional template */
|
|
4333
|
+
const __vue_is_functional_template__$1 = false;
|
|
4334
|
+
/* style inject SSR */
|
|
4335
|
+
|
|
4336
|
+
/* style inject shadow dom */
|
|
4337
|
+
|
|
4338
|
+
|
|
4339
|
+
|
|
4340
|
+
const __vue_component__$1 = /*#__PURE__*/normalizeComponent(
|
|
4341
|
+
{ render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },
|
|
4342
|
+
__vue_inject_styles__$1,
|
|
4343
|
+
__vue_script__$1,
|
|
4344
|
+
__vue_scope_id__$1,
|
|
4345
|
+
__vue_is_functional_template__$1,
|
|
4346
|
+
__vue_module_identifier__$1,
|
|
4347
|
+
false,
|
|
4348
|
+
createInjector,
|
|
4349
|
+
undefined,
|
|
4350
|
+
undefined
|
|
4351
|
+
);
|
|
4352
|
+
|
|
4353
|
+
__vue_component__$1.install = Vue => Vue.component(__vue_component__$1.name, __vue_component__$1);
|
|
4354
|
+
|
|
4355
|
+
__vue_component__$e.install = Vue => Vue.component(__vue_component__$e.name, __vue_component__$e);
|
|
4356
|
+
|
|
4357
|
+
__vue_component__$f.install = Vue => Vue.component(__vue_component__$f.name, __vue_component__$f);
|
|
4358
|
+
|
|
4359
|
+
__vue_component__$d.install = Vue => Vue.component(__vue_component__$d.name, __vue_component__$d);
|
|
4360
|
+
|
|
4361
|
+
const BUILT_IN_EVENT_NAMES = {
|
|
4362
|
+
SUBMIT: 'submit',
|
|
4363
|
+
CANCEL: 'cancel'
|
|
4364
|
+
};
|
|
4365
|
+
|
|
4366
|
+
//
|
|
4367
|
+
var script = {
|
|
4368
|
+
name: 'ele-form-model',
|
|
4369
|
+
components: {
|
|
4370
|
+
EleButtonGroup: __vue_component__$e
|
|
4371
|
+
},
|
|
4372
|
+
props: {
|
|
4373
|
+
title: {
|
|
4374
|
+
type: String
|
|
4375
|
+
},
|
|
4376
|
+
formMeta: {
|
|
4377
|
+
type: Object
|
|
4378
|
+
},
|
|
4379
|
+
footerMeta: {
|
|
4380
|
+
type: Object
|
|
4381
|
+
}
|
|
4382
|
+
},
|
|
4383
|
+
data() {
|
|
4384
|
+
return {};
|
|
4385
|
+
},
|
|
4386
|
+
computed: {
|
|
4387
|
+
formRef() {
|
|
4388
|
+
return v4();
|
|
4389
|
+
},
|
|
4390
|
+
assignAttrForEvents() {
|
|
4391
|
+
const events = this.footerElements.reduce((ret, ele) => {
|
|
4392
|
+
ret[ele.eventName] = e => {
|
|
4393
|
+
this.$emit(ele.eventName || 'click', {
|
|
4394
|
+
...e,
|
|
4395
|
+
formModel: this.formModels
|
|
4396
|
+
});
|
|
4397
|
+
};
|
|
4398
|
+
return ret;
|
|
4399
|
+
}, {});
|
|
4400
|
+
return {
|
|
4401
|
+
...this.$listeners,
|
|
4402
|
+
...events,
|
|
4403
|
+
[BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],
|
|
4404
|
+
[BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL]
|
|
4405
|
+
};
|
|
4406
|
+
},
|
|
4407
|
+
elements() {
|
|
4408
|
+
const {
|
|
4409
|
+
elements
|
|
4410
|
+
} = this.formMeta;
|
|
4411
|
+
return elements;
|
|
4412
|
+
},
|
|
4413
|
+
preRequest() {
|
|
4414
|
+
const {
|
|
4415
|
+
preRequest
|
|
4416
|
+
} = this.formMeta;
|
|
4417
|
+
return preRequest;
|
|
4418
|
+
},
|
|
4419
|
+
infoRequest() {
|
|
4420
|
+
const {
|
|
4421
|
+
infoRequest
|
|
4422
|
+
} = this.formMeta;
|
|
4423
|
+
return infoRequest;
|
|
4424
|
+
},
|
|
4425
|
+
submitRequest() {
|
|
4426
|
+
const {
|
|
4427
|
+
submitRequest
|
|
4428
|
+
} = this.formMeta;
|
|
4429
|
+
return submitRequest;
|
|
4430
|
+
},
|
|
4431
|
+
footerElements() {
|
|
4432
|
+
const {
|
|
4433
|
+
elements
|
|
4434
|
+
} = this.footerMeta;
|
|
4435
|
+
return elements.call(this);
|
|
4436
|
+
},
|
|
4437
|
+
formModels() {
|
|
4438
|
+
return this.$refs[this.formRef].getFieldsValue();
|
|
4439
|
+
}
|
|
4440
|
+
},
|
|
4441
|
+
methods: {
|
|
4442
|
+
async submitRequestTrigger() {},
|
|
4443
|
+
async infoRequestTrigger() {},
|
|
4444
|
+
async preRequestTrigger() {
|
|
4445
|
+
const {
|
|
4446
|
+
url,
|
|
4447
|
+
requestType = 'GET',
|
|
4448
|
+
fieldMap = {}
|
|
4449
|
+
} = this.preRequest;
|
|
4450
|
+
if (!url) return;
|
|
4451
|
+
await shared.net[requestType.toLowerCase()](url, {});
|
|
4452
|
+
},
|
|
4453
|
+
setValueForField(props) {
|
|
4454
|
+
this.$refs[this.formRef].setFieldsValue(props);
|
|
4455
|
+
},
|
|
4456
|
+
[BUILT_IN_EVENT_NAMES.SUBMIT](props) {
|
|
4457
|
+
const status = this.$refs[this.formRef].validateFields();
|
|
4458
|
+
console.log('status', status);
|
|
4459
|
+
if (status) {
|
|
4460
|
+
console.log('status', this.formModels);
|
|
4461
|
+
} else {
|
|
4462
|
+
console.log('error');
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
[BUILT_IN_EVENT_NAMES.CANCEL](props) {
|
|
4466
|
+
console.log('inner CANCEL', props);
|
|
4467
|
+
}
|
|
4468
|
+
},
|
|
4469
|
+
async mounted() {
|
|
4470
|
+
await this.preRequestTrigger();
|
|
4471
|
+
await this.infoRequestTrigger();
|
|
4472
|
+
}
|
|
4473
|
+
};
|
|
4474
|
+
|
|
4475
|
+
/* script */
|
|
4476
|
+
const __vue_script__ = script;
|
|
4477
|
+
|
|
4478
|
+
/* template */
|
|
4479
|
+
var __vue_render__ = function () {
|
|
4480
|
+
var _vm = this;
|
|
4481
|
+
var _h = _vm.$createElement;
|
|
4482
|
+
var _c = _vm._self._c || _h;
|
|
4483
|
+
return _c("div", { staticClass: "form__model--wrapper" }, [
|
|
4484
|
+
_c("div", { staticClass: "form-model__title" }, [
|
|
4485
|
+
_vm._v("\n " + _vm._s(_vm.title) + "\n "),
|
|
4486
|
+
]),
|
|
4487
|
+
_vm._v(" "),
|
|
4488
|
+
_c(
|
|
4489
|
+
"div",
|
|
4490
|
+
{ staticClass: "form-model__content" },
|
|
4491
|
+
[_c("ele-form", { ref: _vm.formRef, attrs: { elements: _vm.elements } })],
|
|
4492
|
+
1
|
|
4493
|
+
),
|
|
4494
|
+
_vm._v(" "),
|
|
4495
|
+
_c(
|
|
4496
|
+
"div",
|
|
4497
|
+
{ staticClass: "form-model__footer" },
|
|
4498
|
+
[
|
|
4499
|
+
_c(
|
|
4500
|
+
"ele-button-group",
|
|
4501
|
+
_vm._g(
|
|
4502
|
+
{ attrs: { "data-source": _vm.footerElements } },
|
|
4503
|
+
_vm.assignAttrForEvents
|
|
4504
|
+
)
|
|
4505
|
+
),
|
|
4506
|
+
],
|
|
4507
|
+
1
|
|
4508
|
+
),
|
|
4509
|
+
])
|
|
4510
|
+
};
|
|
4511
|
+
var __vue_staticRenderFns__ = [];
|
|
4512
|
+
__vue_render__._withStripped = true;
|
|
4513
|
+
|
|
4514
|
+
/* style */
|
|
4515
|
+
const __vue_inject_styles__ = function (inject) {
|
|
4516
|
+
if (!inject) return
|
|
4517
|
+
inject("data-v-4815b8c0_0", { source: ".form__model--wrapper[data-v-4815b8c0] {\n width: 100%;\n height: 100%;\n overflow: auto;\n}\n.form__model--wrapper .form-model__title[data-v-4815b8c0] {\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-4815b8c0] {\n padding: 16px;\n}\n.form__model--wrapper .form-model__footer[data-v-4815b8c0] {\n width: 100%;\n height: 64px;\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-model\\src\\index.vue","index.vue"],"names":[],"mappings":"AAgHA;EACA,WAAA;EACA,YAAA;EACA,cAAA;AC/GA;ADgHA;EACA,YAAA;EACA,eAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,8DAAA;AC9GA;ADgHA;EACA,aAAA;AC9GA;ADgHA;EACA,WAAA;EACA,YAAA;EACA,eAAA;EACA,SAAA;EACA,aAAA;EACA,mBAAA;EACA,mBAAA;EACA,oBAAA;AC9GA;;AAEA,oCAAoC","file":"index.vue","sourcesContent":["<template>\r\n <div class=\"form__model--wrapper\">\r\n <div class=\"form-model__title\">\r\n {{ title }}\r\n </div>\r\n <div class=\"form-model__content\">\r\n <ele-form :ref=\"formRef\" :elements=\"elements\"></ele-form>\r\n </div>\r\n <div class=\"form-model__footer\">\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 { v4 as uuidv4 } from 'uuid'\r\nimport { net } from '@idooel/shared'\r\nexport default {\r\n name: 'ele-form-model',\r\n components: {\r\n EleButtonGroup\r\n },\r\n props: {\r\n title: {\r\n type: String\r\n },\r\n formMeta: {\r\n type: Object\r\n },\r\n footerMeta: {\r\n type: Object\r\n }\r\n },\r\n data() {\r\n return {}\r\n },\r\n computed: {\r\n formRef () {\r\n return uuidv4()\r\n },\r\n assignAttrForEvents () {\r\n const events = this.footerElements.reduce((ret, ele) => {\r\n ret[ele.eventName] = (e) => {\r\n this.$emit(ele.eventName || 'click', { ...e, formModel: this.formModels })\r\n }\r\n return ret\r\n }, {})\r\n return {\r\n ...this.$listeners,\r\n ...events,\r\n [BUILT_IN_EVENT_NAMES.SUBMIT]: this[BUILT_IN_EVENT_NAMES.SUBMIT],\r\n [BUILT_IN_EVENT_NAMES.CANCEL]: this[BUILT_IN_EVENT_NAMES.CANCEL]\r\n }\r\n },\r\n elements () {\r\n const { elements } = this.formMeta\r\n return elements\r\n },\r\n preRequest () {\r\n const { preRequest } = this.formMeta\r\n return preRequest\r\n },\r\n infoRequest () {\r\n const { infoRequest } = this.formMeta\r\n return infoRequest\r\n },\r\n submitRequest () {\r\n const { submitRequest } = this.formMeta\r\n return submitRequest\r\n },\r\n footerElements () {\r\n const { elements } = this.footerMeta\r\n return elements.call(this)\r\n },\r\n formModels () {\r\n return this.$refs[this.formRef].getFieldsValue()\r\n }\r\n },\r\n methods: {\r\n async submitRequestTrigger () {},\r\n async infoRequestTrigger () {},\r\n async preRequestTrigger () {\r\n const { url, requestType = 'GET', fieldMap = {} } = this.preRequest\r\n if (!url) return\r\n await net[requestType.toLowerCase()](url, {})\r\n },\r\n setValueForField (props) {\r\n this.$refs[this.formRef].setFieldsValue(props)\r\n },\r\n [BUILT_IN_EVENT_NAMES.SUBMIT] (props) {\r\n const status = this.$refs[this.formRef].validateFields()\r\n console.log('status', status)\r\n if (status) {\r\n console.log('status', this.formModels)\r\n } else {\r\n console.log('error')\r\n }\r\n },\r\n [BUILT_IN_EVENT_NAMES.CANCEL] (props) {\r\n console.log('inner 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 .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 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}\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 flex-direction: row;\n align-items: center;\n justify-content: end;\n}\n\n/*# sourceMappingURL=index.vue.map */"]}, media: undefined });
|
|
4518
|
+
|
|
4519
|
+
};
|
|
4520
|
+
/* scoped */
|
|
4521
|
+
const __vue_scope_id__ = "data-v-4815b8c0";
|
|
4522
|
+
/* module identifier */
|
|
4523
|
+
const __vue_module_identifier__ = undefined;
|
|
4524
|
+
/* functional template */
|
|
4525
|
+
const __vue_is_functional_template__ = false;
|
|
4526
|
+
/* style inject SSR */
|
|
4527
|
+
|
|
4528
|
+
/* style inject shadow dom */
|
|
4529
|
+
|
|
4530
|
+
|
|
4531
|
+
|
|
4532
|
+
const __vue_component__ = /*#__PURE__*/normalizeComponent(
|
|
4533
|
+
{ render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
|
|
4534
|
+
__vue_inject_styles__,
|
|
4535
|
+
__vue_script__,
|
|
4536
|
+
__vue_scope_id__,
|
|
4537
|
+
__vue_is_functional_template__,
|
|
4538
|
+
__vue_module_identifier__,
|
|
4539
|
+
false,
|
|
4540
|
+
createInjector,
|
|
4541
|
+
undefined,
|
|
4542
|
+
undefined
|
|
4543
|
+
);
|
|
4544
|
+
|
|
4545
|
+
__vue_component__.install = Vue => Vue.component(__vue_component__.name, __vue_component__);
|
|
1791
4546
|
|
|
1792
|
-
const compositeComponents = [__vue_component__$
|
|
1793
|
-
const models = [__vue_component__$
|
|
1794
|
-
const components = [__vue_component__$
|
|
4547
|
+
const compositeComponents = [__vue_component__$e, __vue_component__$f];
|
|
4548
|
+
const models = [__vue_component__$d, __vue_component__];
|
|
4549
|
+
const components = [__vue_component__$n, __vue_component__$m, __vue_component__$l, __vue_component__$k, __vue_component__$i, __vue_component__$h, __vue_component__$c, __vue_component__$4, __vue_component__$3, __vue_component__$9, __vue_component__$8, __vue_component__$a, __vue_component__$7, __vue_component__$2, __vue_component__$6, __vue_component__$5, __vue_component__$1, ...compositeComponents, ...models];
|
|
1795
4550
|
const install = Vue => {
|
|
1796
4551
|
if (install.installed) return;
|
|
1797
4552
|
install.installed = true;
|
|
@@ -1800,13 +4555,16 @@
|
|
|
1800
4555
|
});
|
|
1801
4556
|
};
|
|
1802
4557
|
|
|
1803
|
-
exports.EleButton = __vue_component__$
|
|
1804
|
-
exports.EleDate = __vue_component__$
|
|
1805
|
-
exports.EleInput = __vue_component__$
|
|
1806
|
-
exports.
|
|
1807
|
-
exports.
|
|
1808
|
-
exports.
|
|
4558
|
+
exports.EleButton = __vue_component__$n;
|
|
4559
|
+
exports.EleDate = __vue_component__$m;
|
|
4560
|
+
exports.EleInput = __vue_component__$l;
|
|
4561
|
+
exports.EleModal = __vue_component__$2;
|
|
4562
|
+
exports.EleSelect = __vue_component__$k;
|
|
4563
|
+
exports.EleTable = __vue_component__$i;
|
|
4564
|
+
exports.EleTpl = __vue_component__$c;
|
|
4565
|
+
exports.EleTree = __vue_component__$h;
|
|
1809
4566
|
exports["default"] = install;
|
|
4567
|
+
exports.models = models;
|
|
1810
4568
|
|
|
1811
4569
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1812
4570
|
|