xrk-components 0.1.0 → 0.3.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.
Files changed (38) hide show
  1. package/.babelrc +2 -11
  2. package/lib/index.css +18560 -0
  3. package/lib/index.esm.js +2958 -0
  4. package/lib/index.umd.js +2997 -0
  5. package/package.json +47 -69
  6. package/rollup.config.js +59 -0
  7. package/tsconfig.json +24 -0
  8. package/typings/shims-vue.d.ts +6 -0
  9. package/.editorconfig +0 -9
  10. package/.eslintrc.js +0 -40
  11. package/.prettierrc.js +0 -16
  12. package/debug.log +0 -1
  13. package/dist/bundler.js +0 -7
  14. package/dist/bundler.js.map +0 -1
  15. package/index.html +0 -19
  16. package/src/App.vue +0 -134
  17. package/src/lib/index.js +0 -27
  18. package/src/main.js +0 -25
  19. package/src/packages/dialog/index.js +0 -32
  20. package/src/packages/dialog/src/main.vue +0 -197
  21. package/src/packages/slide-verify/index.js +0 -12
  22. package/src/packages/slide-verify/src/main.vue +0 -479
  23. package/src/packages/slide-verify/src/static/close.png +0 -0
  24. package/src/packages/slide-verify/src/static/placeholder.png +0 -0
  25. package/src/packages/slide-verify/src/static/range_btn.png +0 -0
  26. package/src/packages/slide-verify/src/static/refresh.png +0 -0
  27. package/src/packages/task-detail/index.js +0 -12
  28. package/src/packages/task-detail/src/components/formDetail.vue +0 -79
  29. package/src/packages/task-detail/src/components/mixin.js +0 -105
  30. package/src/packages/task-detail/src/components/styles/index.scss +0 -162
  31. package/src/packages/task-detail/src/components/surveyDetail.vue +0 -337
  32. package/src/packages/task-detail/src/config/fields.js +0 -655
  33. package/src/packages/task-detail/src/config/index.js +0 -34
  34. package/src/packages/task-detail/src/main.vue +0 -108
  35. package/src/packages/task-detail/src/static/fieldsMap.js +0 -274
  36. package/src/packages/task-detail/src/test/testData.js +0 -743
  37. package/src/packages/task-detail/src/tools/index.js +0 -290
  38. package/webpack.config.js +0 -93
@@ -0,0 +1,2997 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('element-plus'), require('vue'), require('xrk-tools')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'element-plus', 'vue', 'xrk-tools'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Xrk = {}, global.ElementPlus, global.vue, global.xrkTools));
5
+ })(this, (function (exports, ElementPlus, vue, xrkTools) { 'use strict';
6
+
7
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
+
9
+ var ElementPlus__default = /*#__PURE__*/_interopDefaultLegacy(ElementPlus);
10
+
11
+ function getDefaultExportFromCjs (x) {
12
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
13
+ }
14
+
15
+ var zhCn = {};
16
+
17
+ (function (exports) {
18
+
19
+ Object.defineProperty(exports, '__esModule', { value: true });
20
+
21
+ var zhCn = {
22
+ name: "zh-cn",
23
+ el: {
24
+ colorpicker: {
25
+ confirm: "\u786E\u5B9A",
26
+ clear: "\u6E05\u7A7A"
27
+ },
28
+ datepicker: {
29
+ now: "\u6B64\u523B",
30
+ today: "\u4ECA\u5929",
31
+ cancel: "\u53D6\u6D88",
32
+ clear: "\u6E05\u7A7A",
33
+ confirm: "\u786E\u5B9A",
34
+ selectDate: "\u9009\u62E9\u65E5\u671F",
35
+ selectTime: "\u9009\u62E9\u65F6\u95F4",
36
+ startDate: "\u5F00\u59CB\u65E5\u671F",
37
+ startTime: "\u5F00\u59CB\u65F6\u95F4",
38
+ endDate: "\u7ED3\u675F\u65E5\u671F",
39
+ endTime: "\u7ED3\u675F\u65F6\u95F4",
40
+ prevYear: "\u524D\u4E00\u5E74",
41
+ nextYear: "\u540E\u4E00\u5E74",
42
+ prevMonth: "\u4E0A\u4E2A\u6708",
43
+ nextMonth: "\u4E0B\u4E2A\u6708",
44
+ year: "\u5E74",
45
+ month1: "1 \u6708",
46
+ month2: "2 \u6708",
47
+ month3: "3 \u6708",
48
+ month4: "4 \u6708",
49
+ month5: "5 \u6708",
50
+ month6: "6 \u6708",
51
+ month7: "7 \u6708",
52
+ month8: "8 \u6708",
53
+ month9: "9 \u6708",
54
+ month10: "10 \u6708",
55
+ month11: "11 \u6708",
56
+ month12: "12 \u6708",
57
+ weeks: {
58
+ sun: "\u65E5",
59
+ mon: "\u4E00",
60
+ tue: "\u4E8C",
61
+ wed: "\u4E09",
62
+ thu: "\u56DB",
63
+ fri: "\u4E94",
64
+ sat: "\u516D"
65
+ },
66
+ months: {
67
+ jan: "\u4E00\u6708",
68
+ feb: "\u4E8C\u6708",
69
+ mar: "\u4E09\u6708",
70
+ apr: "\u56DB\u6708",
71
+ may: "\u4E94\u6708",
72
+ jun: "\u516D\u6708",
73
+ jul: "\u4E03\u6708",
74
+ aug: "\u516B\u6708",
75
+ sep: "\u4E5D\u6708",
76
+ oct: "\u5341\u6708",
77
+ nov: "\u5341\u4E00\u6708",
78
+ dec: "\u5341\u4E8C\u6708"
79
+ }
80
+ },
81
+ select: {
82
+ loading: "\u52A0\u8F7D\u4E2D",
83
+ noMatch: "\u65E0\u5339\u914D\u6570\u636E",
84
+ noData: "\u65E0\u6570\u636E",
85
+ placeholder: "\u8BF7\u9009\u62E9"
86
+ },
87
+ cascader: {
88
+ noMatch: "\u65E0\u5339\u914D\u6570\u636E",
89
+ loading: "\u52A0\u8F7D\u4E2D",
90
+ placeholder: "\u8BF7\u9009\u62E9",
91
+ noData: "\u6682\u65E0\u6570\u636E"
92
+ },
93
+ pagination: {
94
+ goto: "\u524D\u5F80",
95
+ pagesize: "\u6761/\u9875",
96
+ total: "\u5171 {total} \u6761",
97
+ pageClassifier: "\u9875",
98
+ deprecationWarning: "\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"
99
+ },
100
+ messagebox: {
101
+ title: "\u63D0\u793A",
102
+ confirm: "\u786E\u5B9A",
103
+ cancel: "\u53D6\u6D88",
104
+ error: "\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!"
105
+ },
106
+ upload: {
107
+ deleteTip: "\u6309 delete \u952E\u53EF\u5220\u9664",
108
+ delete: "\u5220\u9664",
109
+ preview: "\u67E5\u770B\u56FE\u7247",
110
+ continue: "\u7EE7\u7EED\u4E0A\u4F20"
111
+ },
112
+ table: {
113
+ emptyText: "\u6682\u65E0\u6570\u636E",
114
+ confirmFilter: "\u7B5B\u9009",
115
+ resetFilter: "\u91CD\u7F6E",
116
+ clearFilter: "\u5168\u90E8",
117
+ sumText: "\u5408\u8BA1"
118
+ },
119
+ tree: {
120
+ emptyText: "\u6682\u65E0\u6570\u636E"
121
+ },
122
+ transfer: {
123
+ noMatch: "\u65E0\u5339\u914D\u6570\u636E",
124
+ noData: "\u65E0\u6570\u636E",
125
+ titles: ["\u5217\u8868 1", "\u5217\u8868 2"],
126
+ filterPlaceholder: "\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",
127
+ noCheckedFormat: "\u5171 {total} \u9879",
128
+ hasCheckedFormat: "\u5DF2\u9009 {checked}/{total} \u9879"
129
+ },
130
+ image: {
131
+ error: "\u52A0\u8F7D\u5931\u8D25"
132
+ },
133
+ pageHeader: {
134
+ title: "\u8FD4\u56DE"
135
+ },
136
+ popconfirm: {
137
+ confirmButtonText: "\u786E\u5B9A",
138
+ cancelButtonText: "\u53D6\u6D88"
139
+ }
140
+ }
141
+ };
142
+
143
+ exports["default"] = zhCn;
144
+
145
+ } (zhCn));
146
+
147
+ var locale = /*@__PURE__*/getDefaultExportFromCjs(zhCn);
148
+
149
+ /******************************************************************************
150
+ Copyright (c) Microsoft Corporation.
151
+
152
+ Permission to use, copy, modify, and/or distribute this software for any
153
+ purpose with or without fee is hereby granted.
154
+
155
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
156
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
157
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
158
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
159
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
160
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
161
+ PERFORMANCE OF THIS SOFTWARE.
162
+ ***************************************************************************** */
163
+
164
+ var __assign = function() {
165
+ __assign = Object.assign || function __assign(t) {
166
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
167
+ s = arguments[i];
168
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
169
+ }
170
+ return t;
171
+ };
172
+ return __assign.apply(this, arguments);
173
+ };
174
+
175
+ function __awaiter(thisArg, _arguments, P, generator) {
176
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
177
+ return new (P || (P = Promise))(function (resolve, reject) {
178
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
179
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
180
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
181
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
182
+ });
183
+ }
184
+
185
+ function __generator(thisArg, body) {
186
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
187
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
188
+ function verb(n) { return function (v) { return step([n, v]); }; }
189
+ function step(op) {
190
+ if (f) throw new TypeError("Generator is already executing.");
191
+ while (_) try {
192
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
193
+ if (y = 0, t) op = [op[0] & 2, t.value];
194
+ switch (op[0]) {
195
+ case 0: case 1: t = op; break;
196
+ case 4: _.label++; return { value: op[1], done: false };
197
+ case 5: _.label++; y = op[1]; op = [0]; continue;
198
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
199
+ default:
200
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
201
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
202
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
203
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
204
+ if (t[2]) _.ops.pop();
205
+ _.trys.pop(); continue;
206
+ }
207
+ op = body.call(thisArg, _);
208
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
209
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
210
+ }
211
+ }
212
+
213
+ function __spreadArray(to, from, pack) {
214
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
215
+ if (ar || !(i in from)) {
216
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
217
+ ar[i] = from[i];
218
+ }
219
+ }
220
+ return to.concat(ar || Array.prototype.slice.call(from));
221
+ }
222
+
223
+ var __default__$l = {
224
+ name: 'base-button'
225
+ };
226
+ var script$l = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$l), { props: {
227
+ click: { type: null, required: false },
228
+ loading: { type: Boolean, required: false },
229
+ loadingIcon: { type: null, required: false },
230
+ size: { type: String, required: false, default: 'default' },
231
+ type: { type: String, required: false, default: 'primary' },
232
+ plain: { type: Boolean, required: false },
233
+ round: { type: Boolean, required: false },
234
+ circle: { type: Boolean, required: false },
235
+ disabled: { type: Boolean, required: false },
236
+ autofocus: { type: Boolean, required: false },
237
+ autoInsertSpace: { type: Boolean, required: false },
238
+ nativeType: { type: String, required: false },
239
+ icon: { type: null, required: false }
240
+ }, setup: function (__props) {
241
+ var _this = this;
242
+ var _props = __props;
243
+ var props = _props;
244
+ var _a = (function () {
245
+ var _loading = vue.ref(false);
246
+ var isLoading = vue.computed(function () {
247
+ return props.loading || _loading.value;
248
+ });
249
+ return {
250
+ isLoading: isLoading,
251
+ handleClick: (props.click
252
+ ? function () { return __awaiter(_this, void 0, void 0, function () {
253
+ var error_1;
254
+ var _a;
255
+ return __generator(this, function (_b) {
256
+ switch (_b.label) {
257
+ case 0:
258
+ _loading.value = true;
259
+ _b.label = 1;
260
+ case 1:
261
+ _b.trys.push([1, 3, , 4]);
262
+ return [4 /*yield*/, ((_a = props.click) === null || _a === void 0 ? void 0 : _a.call(props))];
263
+ case 2:
264
+ _b.sent();
265
+ _loading.value = false;
266
+ return [3 /*break*/, 4];
267
+ case 3:
268
+ error_1 = _b.sent();
269
+ console.warn(error_1);
270
+ _loading.value = false;
271
+ return [3 /*break*/, 4];
272
+ case 4: return [2 /*return*/];
273
+ }
274
+ });
275
+ }); }
276
+ : undefined)
277
+ };
278
+ })(), handleClick = _a.handleClick, isLoading = _a.isLoading;
279
+ return function (_ctx, _cache) {
280
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElButton), {
281
+ onClick: vue.unref(handleClick),
282
+ loading: vue.unref(isLoading),
283
+ size: __props.size,
284
+ type: __props.type,
285
+ plain: __props.plain,
286
+ round: __props.round,
287
+ circle: __props.circle,
288
+ disabled: __props.disabled,
289
+ autofocus: __props.autofocus,
290
+ autoInsertSpace: __props.autoInsertSpace,
291
+ nativeType: __props.nativeType,
292
+ loadingIcon: __props.loadingIcon,
293
+ icon: __props.icon
294
+ }, {
295
+ default: vue.withCtx(function () { return [
296
+ vue.renderSlot(_ctx.$slots, "default")
297
+ ]; }),
298
+ _: 3 /* FORWARDED */
299
+ }, 8 /* PROPS */, ["onClick", "loading", "size", "type", "plain", "round", "circle", "disabled", "autofocus", "autoInsertSpace", "nativeType", "loadingIcon", "icon"]));
300
+ };
301
+ } }));
302
+
303
+ script$l.__file = "packages/base/button/button.vue";
304
+
305
+ var BaseButton = script$l;
306
+
307
+ var __default__$k = {
308
+ name: 'base-radio-button'
309
+ };
310
+ var script$k = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$k), { props: {
311
+ modelValue: { type: null, required: false },
312
+ size: { type: String, required: false },
313
+ name: { type: String, required: false },
314
+ label: { type: [String, Number, Boolean], required: false },
315
+ disabled: { type: Boolean, required: false }
316
+ }, emits: ["change", "update:modelValue"], setup: function (__props, _a) {
317
+ var emits = _a.emit;
318
+ var handleChange = function (activeValue) {
319
+ emits('update:modelValue', activeValue);
320
+ emits('change', activeValue);
321
+ };
322
+ return function (_ctx, _cache) {
323
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElRadioButton), {
324
+ "model-value": __props.modelValue,
325
+ disabled: __props.disabled,
326
+ name: __props.name,
327
+ label: __props.label,
328
+ size: __props.size,
329
+ onChange: handleChange
330
+ }, {
331
+ default: vue.withCtx(function () { return [
332
+ vue.renderSlot(_ctx.$slots, "default")
333
+ ]; }),
334
+ _: 3 /* FORWARDED */
335
+ }, 8 /* PROPS */, ["model-value", "disabled", "name", "label", "size"]));
336
+ };
337
+ } }));
338
+
339
+ script$k.__file = "packages/base/radio/radio-button.vue";
340
+
341
+ /*
342
+ * @Description:
343
+ * @Date: 2022-07-01 11:46:30
344
+ */
345
+ function isFunction(val) {
346
+ return xrkTools.check.isFunction(val) || xrkTools.check.isAsyncFunction(val);
347
+ }
348
+
349
+ var _hoisted_1$6 = { style: { "display": "inline-block" } };
350
+ var __default__$j = {
351
+ name: 'base-radio-group'
352
+ };
353
+ var script$j = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$j), { props: {
354
+ modelValue: { type: null, required: false },
355
+ size: { type: String, required: false },
356
+ textColor: { type: String, required: false },
357
+ fill: { type: String, required: false },
358
+ disabled: { type: Boolean, required: false },
359
+ checkBefore: { type: Function, required: false }
360
+ }, emits: ["change", "update:modelValue"], setup: function (__props, _a) {
361
+ var _this = this;
362
+ var emits = _a.emit;
363
+ var props = __props;
364
+ var vLoading = ElementPlus.vLoading;
365
+ var _loading = vue.ref(false);
366
+ var handleChange = function (activeValue) { return __awaiter(_this, void 0, void 0, function () {
367
+ var _a;
368
+ return __generator(this, function (_b) {
369
+ switch (_b.label) {
370
+ case 0:
371
+ if (_loading.value)
372
+ return [2 /*return*/];
373
+ _loading.value = true;
374
+ _b.label = 1;
375
+ case 1:
376
+ _b.trys.push([1, 5, , 6]);
377
+ if (!((((_a = props.modelValue) === null || _a === void 0 ? void 0 : _a.length) || 0) < (activeValue === null || activeValue === void 0 ? void 0 : activeValue.length) &&
378
+ isFunction(props.checkBefore))) return [3 /*break*/, 3];
379
+ return [4 /*yield*/, props.checkBefore(activeValue, function () {
380
+ emits('update:modelValue', activeValue);
381
+ emits('change', activeValue);
382
+ })];
383
+ case 2:
384
+ _b.sent();
385
+ return [3 /*break*/, 4];
386
+ case 3:
387
+ emits('update:modelValue', activeValue);
388
+ emits('change', activeValue);
389
+ _b.label = 4;
390
+ case 4: return [3 /*break*/, 6];
391
+ case 5:
392
+ _b.sent();
393
+ return [3 /*break*/, 6];
394
+ case 6:
395
+ _loading.value = false;
396
+ return [2 /*return*/];
397
+ }
398
+ });
399
+ }); };
400
+ return function (_ctx, _cache) {
401
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElRadioGroup), {
402
+ class: "base-radio-group",
403
+ "model-value": __props.modelValue,
404
+ size: __props.size,
405
+ disabled: __props.disabled,
406
+ "text-color": __props.textColor,
407
+ fill: __props.fill,
408
+ onChange: handleChange
409
+ }, {
410
+ default: vue.withCtx(function () { return [
411
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$6, [
412
+ vue.renderSlot(_ctx.$slots, "default")
413
+ ])), [
414
+ [vue.unref(vLoading), _loading.value]
415
+ ])
416
+ ]; }),
417
+ _: 3 /* FORWARDED */
418
+ }, 8 /* PROPS */, ["model-value", "size", "disabled", "text-color", "fill"]));
419
+ };
420
+ } }));
421
+
422
+ script$j.__scopeId = "data-v-9d4003c2";
423
+ script$j.__file = "packages/base/radio/radio-group.vue";
424
+
425
+ var __default__$i = {
426
+ name: 'base-radio'
427
+ };
428
+ var script$i = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$i), { props: {
429
+ modelValue: { type: null, required: false },
430
+ size: { type: String, required: false },
431
+ name: { type: String, required: false },
432
+ label: { type: [String, Number, Boolean], required: false },
433
+ disabled: { type: Boolean, required: false },
434
+ border: { type: Boolean, required: false },
435
+ checkBefore: { type: Function, required: false }
436
+ }, emits: ["change", "update:modelValue"], setup: function (__props, _a) {
437
+ var _this = this;
438
+ var emits = _a.emit;
439
+ var props = __props;
440
+ var _loading = vue.ref(false);
441
+ var handleChange = function (activeValue) { return __awaiter(_this, void 0, void 0, function () {
442
+ return __generator(this, function (_a) {
443
+ switch (_a.label) {
444
+ case 0:
445
+ if (_loading.value)
446
+ return [2 /*return*/];
447
+ _loading.value = true;
448
+ _a.label = 1;
449
+ case 1:
450
+ _a.trys.push([1, 5, , 6]);
451
+ if (!(activeValue && isFunction(props.checkBefore))) return [3 /*break*/, 3];
452
+ return [4 /*yield*/, props.checkBefore(activeValue, function () {
453
+ emits('update:modelValue', activeValue);
454
+ emits('change', activeValue);
455
+ })];
456
+ case 2:
457
+ _a.sent();
458
+ return [3 /*break*/, 4];
459
+ case 3:
460
+ emits('update:modelValue', activeValue);
461
+ emits('change', activeValue);
462
+ _a.label = 4;
463
+ case 4: return [3 /*break*/, 6];
464
+ case 5:
465
+ _a.sent();
466
+ return [3 /*break*/, 6];
467
+ case 6:
468
+ _loading.value = false;
469
+ return [2 /*return*/];
470
+ }
471
+ });
472
+ }); };
473
+ return function (_ctx, _cache) {
474
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElRadio), {
475
+ class: "base-radio",
476
+ "model-value": __props.modelValue,
477
+ size: __props.size,
478
+ name: __props.name,
479
+ label: __props.label,
480
+ disabled: __props.disabled,
481
+ border: __props.border,
482
+ onChange: handleChange
483
+ }, {
484
+ default: vue.withCtx(function () { return [
485
+ vue.renderSlot(_ctx.$slots, "default")
486
+ ]; }),
487
+ _: 3 /* FORWARDED */
488
+ }, 8 /* PROPS */, ["model-value", "size", "name", "label", "disabled", "border"]));
489
+ };
490
+ } }));
491
+
492
+ script$i.__scopeId = "data-v-56d41f26";
493
+ script$i.__file = "packages/base/radio/radio.vue";
494
+
495
+ var BaseRadioButton = script$k;
496
+ var BaseRadioGroup = script$j;
497
+ var BaseRadio = script$i;
498
+
499
+ var __default__$h = {
500
+ name: 'base-checkbox-button'
501
+ };
502
+ var script$h = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$h), { props: {
503
+ modelValue: { type: [String, Number, Boolean], required: false },
504
+ size: { type: String, required: false },
505
+ name: { type: String, required: false },
506
+ label: { type: [String, Number, Boolean], required: false },
507
+ disabled: { type: Boolean, required: false },
508
+ border: { type: Boolean, required: false },
509
+ trueLabel: { type: [String, Number], required: false },
510
+ falseLabel: { type: [String, Number], required: false },
511
+ checked: { type: Boolean, required: false }
512
+ }, emits: ["change", "update:modelValue"], setup: function (__props, _a) {
513
+ var emits = _a.emit;
514
+ var handleChange = function (activeValue) {
515
+ emits('update:modelValue', activeValue);
516
+ emits('change', activeValue);
517
+ };
518
+ return function (_ctx, _cache) {
519
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElCheckboxButton), {
520
+ "model-value": __props.modelValue,
521
+ size: __props.size,
522
+ name: __props.name,
523
+ label: __props.label,
524
+ disabled: __props.disabled,
525
+ border: __props.border,
526
+ "true-label": __props.trueLabel,
527
+ "false-label": __props.falseLabel,
528
+ checked: __props.checked,
529
+ onChange: handleChange
530
+ }, {
531
+ default: vue.withCtx(function () { return [
532
+ vue.renderSlot(_ctx.$slots, "default")
533
+ ]; }),
534
+ _: 3 /* FORWARDED */
535
+ }, 8 /* PROPS */, ["model-value", "size", "name", "label", "disabled", "border", "true-label", "false-label", "checked"]));
536
+ };
537
+ } }));
538
+
539
+ script$h.__file = "packages/base/checkbox/checkbox-button.vue";
540
+
541
+ var _hoisted_1$5 = { style: { "display": "inline-block" } };
542
+ var __default__$g = {
543
+ name: 'base-checkbox-group'
544
+ };
545
+ var script$g = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$g), { props: {
546
+ modelValue: { type: Array, required: false },
547
+ size: { type: String, required: false },
548
+ disabled: { type: Boolean, required: false },
549
+ textColor: { type: String, required: false },
550
+ fill: { type: String, required: false },
551
+ label: { type: String, required: false },
552
+ min: { type: Number, required: false },
553
+ max: { type: Number, required: false },
554
+ checkBefore: { type: Function, required: false }
555
+ }, emits: ["change", "update:modelValue"], setup: function (__props, _a) {
556
+ var _this = this;
557
+ var emits = _a.emit;
558
+ var props = __props;
559
+ var vLoading = ElementPlus.vLoading;
560
+ var _loading = vue.ref(false);
561
+ var handleChange = function (activeValue) { return __awaiter(_this, void 0, void 0, function () {
562
+ var _a;
563
+ return __generator(this, function (_b) {
564
+ switch (_b.label) {
565
+ case 0:
566
+ if (_loading.value)
567
+ return [2 /*return*/];
568
+ _loading.value = true;
569
+ _b.label = 1;
570
+ case 1:
571
+ _b.trys.push([1, 5, , 6]);
572
+ if (!((((_a = props.modelValue) === null || _a === void 0 ? void 0 : _a.length) || 0) < (activeValue === null || activeValue === void 0 ? void 0 : activeValue.length) &&
573
+ isFunction(props.checkBefore))) return [3 /*break*/, 3];
574
+ return [4 /*yield*/, props.checkBefore(activeValue, function () {
575
+ emits('update:modelValue', activeValue);
576
+ emits('change', activeValue);
577
+ })];
578
+ case 2:
579
+ _b.sent();
580
+ return [3 /*break*/, 4];
581
+ case 3:
582
+ emits('update:modelValue', activeValue);
583
+ emits('change', activeValue);
584
+ _b.label = 4;
585
+ case 4: return [3 /*break*/, 6];
586
+ case 5:
587
+ _b.sent();
588
+ return [3 /*break*/, 6];
589
+ case 6:
590
+ _loading.value = false;
591
+ return [2 /*return*/];
592
+ }
593
+ });
594
+ }); };
595
+ return function (_ctx, _cache) {
596
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElCheckboxGroup), {
597
+ class: "base-checkbox-group",
598
+ "model-value": __props.modelValue,
599
+ size: __props.size,
600
+ disabled: __props.disabled,
601
+ "text-color": __props.textColor,
602
+ fill: __props.fill,
603
+ label: __props.label,
604
+ min: __props.min,
605
+ max: __props.max,
606
+ onChange: handleChange
607
+ }, {
608
+ default: vue.withCtx(function () { return [
609
+ vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
610
+ vue.renderSlot(_ctx.$slots, "default")
611
+ ])), [
612
+ [vue.unref(vLoading), _loading.value]
613
+ ])
614
+ ]; }),
615
+ _: 3 /* FORWARDED */
616
+ }, 8 /* PROPS */, ["model-value", "size", "disabled", "text-color", "fill", "label", "min", "max"]));
617
+ };
618
+ } }));
619
+
620
+ script$g.__scopeId = "data-v-1e1f0947";
621
+ script$g.__file = "packages/base/checkbox/checkbox-group.vue";
622
+
623
+ var __default__$f = {
624
+ name: 'base-checkbox'
625
+ };
626
+ var script$f = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$f), { props: {
627
+ modelValue: { type: [String, Number, Boolean], required: false },
628
+ size: { type: String, required: false },
629
+ name: { type: String, required: false },
630
+ label: { type: [String, Number, Boolean], required: false },
631
+ disabled: { type: Boolean, required: false },
632
+ border: { type: Boolean, required: false },
633
+ trueLabel: { type: [String, Number], required: false },
634
+ falseLabel: { type: [String, Number], required: false },
635
+ checked: { type: Boolean, required: false },
636
+ indeterminate: { type: Boolean, required: false },
637
+ checkBefore: { type: Function, required: false }
638
+ }, emits: ["change", "update:modelValue"], setup: function (__props, _a) {
639
+ var _this = this;
640
+ var emits = _a.emit;
641
+ var props = __props;
642
+ var vLoading = ElementPlus.vLoading;
643
+ var _loading = vue.ref(false);
644
+ var handleChange = function (activeValue) { return __awaiter(_this, void 0, void 0, function () {
645
+ return __generator(this, function (_a) {
646
+ switch (_a.label) {
647
+ case 0:
648
+ if (_loading.value)
649
+ return [2 /*return*/];
650
+ _loading.value = true;
651
+ _a.label = 1;
652
+ case 1:
653
+ _a.trys.push([1, 5, , 6]);
654
+ if (!(activeValue && isFunction(props.checkBefore))) return [3 /*break*/, 3];
655
+ return [4 /*yield*/, props.checkBefore(activeValue, function () {
656
+ emits('update:modelValue', activeValue);
657
+ emits('change', activeValue);
658
+ })];
659
+ case 2:
660
+ _a.sent();
661
+ return [3 /*break*/, 4];
662
+ case 3:
663
+ emits('update:modelValue', activeValue);
664
+ emits('change', activeValue);
665
+ _a.label = 4;
666
+ case 4: return [3 /*break*/, 6];
667
+ case 5:
668
+ _a.sent();
669
+ return [3 /*break*/, 6];
670
+ case 6:
671
+ _loading.value = false;
672
+ return [2 /*return*/];
673
+ }
674
+ });
675
+ }); };
676
+ return function (_ctx, _cache) {
677
+ return vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElCheckbox), {
678
+ class: "base-checkbox",
679
+ "model-value": __props.modelValue,
680
+ size: __props.size,
681
+ name: __props.name,
682
+ label: __props.label,
683
+ disabled: __props.disabled,
684
+ border: __props.border,
685
+ "true-label": __props.trueLabel,
686
+ "false-label": __props.falseLabel,
687
+ checked: __props.checked,
688
+ indeterminate: __props.indeterminate,
689
+ onChange: handleChange
690
+ }, {
691
+ default: vue.withCtx(function () { return [
692
+ vue.renderSlot(_ctx.$slots, "default")
693
+ ]; }),
694
+ _: 3 /* FORWARDED */
695
+ }, 8 /* PROPS */, ["model-value", "size", "name", "label", "disabled", "border", "true-label", "false-label", "checked", "indeterminate"])), [
696
+ [vue.unref(vLoading), _loading.value]
697
+ ]);
698
+ };
699
+ } }));
700
+
701
+ script$f.__scopeId = "data-v-53a67995";
702
+ script$f.__file = "packages/base/checkbox/checkbox.vue";
703
+
704
+ var BaseCheckboxButton = script$h;
705
+ var BaseCheckboxGroup = script$g;
706
+ var BaseCheckbox = script$f;
707
+
708
+ var __default__$e = {
709
+ name: 'base-date-picker'
710
+ };
711
+ var script$e = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$e), { props: {
712
+ modelValue: { type: null, required: false },
713
+ readonly: { type: Boolean, required: false },
714
+ disabled: { type: Boolean, required: false },
715
+ size: { type: String, required: false },
716
+ editable: { type: Boolean, required: false },
717
+ clearable: { type: Boolean, required: false, default: true },
718
+ placeholder: { type: String, required: false, default: '请选择日期' },
719
+ startPlaceholder: { type: String, required: false, default: '请选择开始日期' },
720
+ endPlaceholder: { type: String, required: false, default: '请选择结束日期' },
721
+ type: { type: String, required: false, default: 'date' },
722
+ format: { type: String, required: false },
723
+ popperClass: { type: String, required: false },
724
+ rangeSeparator: { type: String, required: false },
725
+ defaultValue: { type: null, required: false },
726
+ defaultTime: { type: null, required: false },
727
+ valueFormat: { type: String, required: false },
728
+ unlinkPanels: { type: Boolean, required: false },
729
+ prefixIcon: { type: null, required: false },
730
+ clearIcon: { type: null, required: false },
731
+ validateEvent: { type: Boolean, required: false },
732
+ disabledDate: { type: Function, required: false },
733
+ shortcuts: { type: null, required: false },
734
+ cellClassName: { type: Function, required: false },
735
+ teleported: { type: Boolean, required: false, default: true }
736
+ }, emits: ["change", "visibleChange", "calendarChange", "update:modelValue"], setup: function (__props, _a) {
737
+ var emits = _a.emit;
738
+ var _props = __props;
739
+ var props = _props;
740
+ // 越过类型不匹配导致的ts报错
741
+ var defaultTime = vue.computed(function () { return props.defaultTime; });
742
+ var valueFormat = vue.computed(function () {
743
+ return props.valueFormat ||
744
+ (props.type &&
745
+ (['datetime', 'datetimerange'].includes(props.type)
746
+ ? 'YYYY-MM-DD HH:mm:ss'
747
+ : 'YYYY-MM-DD'));
748
+ });
749
+ var startDt = vue.ref(null);
750
+ var dateValue = vue.ref(props.modelValue);
751
+ // 父组件值发生改变时,同步dateValue
752
+ vue.watch(function () { return props.modelValue; }, function (newV) {
753
+ dateValue.value = newV;
754
+ });
755
+ var _disabledDate = function (date) {
756
+ var _a;
757
+ if (isFunction(props === null || props === void 0 ? void 0 : props.disabledDate)) {
758
+ return (_a = props === null || props === void 0 ? void 0 : props.disabledDate) === null || _a === void 0 ? void 0 : _a.call(props, date, startDt.value);
759
+ }
760
+ };
761
+ var handleChange = function (val) {
762
+ emits('update:modelValue', val);
763
+ emits('change', val);
764
+ };
765
+ var handleVisibleChange = function (visibility) {
766
+ emits('visibleChange', visibility);
767
+ };
768
+ var handleCalendarChange = function (val) {
769
+ startDt.value = val[0];
770
+ emits('calendarChange', val);
771
+ };
772
+ return function (_ctx, _cache) {
773
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElDatePicker), {
774
+ modelValue: dateValue.value,
775
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return ((dateValue).value = $event); }),
776
+ readonly: __props.readonly,
777
+ disabled: __props.disabled,
778
+ size: __props.size,
779
+ editable: __props.editable,
780
+ clearable: __props.clearable,
781
+ placeholder: __props.placeholder,
782
+ "start-placeholder": __props.startPlaceholder,
783
+ "end-placeholder": __props.endPlaceholder,
784
+ type: __props.type,
785
+ format: __props.format,
786
+ "popper-class": __props.popperClass,
787
+ "range-separator": __props.rangeSeparator,
788
+ "default-value": __props.defaultValue,
789
+ "default-time": vue.unref(defaultTime),
790
+ "value-format": vue.unref(valueFormat),
791
+ "unlink-panels": __props.unlinkPanels,
792
+ "prefix-icon": __props.prefixIcon,
793
+ "clear-icon": __props.clearIcon,
794
+ "validate-event": __props.validateEvent,
795
+ "disabled-date": _disabledDate,
796
+ shortcuts: __props.shortcuts,
797
+ "cell-class-name": __props.cellClassName,
798
+ teleported: __props.teleported,
799
+ onChange: handleChange,
800
+ onVisibleChange: handleVisibleChange,
801
+ onCalendarChange: handleCalendarChange
802
+ }, null, 8 /* PROPS */, ["modelValue", "readonly", "disabled", "size", "editable", "clearable", "placeholder", "start-placeholder", "end-placeholder", "type", "format", "popper-class", "range-separator", "default-value", "default-time", "value-format", "unlink-panels", "prefix-icon", "clear-icon", "validate-event", "shortcuts", "cell-class-name", "teleported"]));
803
+ };
804
+ } }));
805
+
806
+ script$e.__file = "packages/base/date-picker/date-picker.vue";
807
+
808
+ var BaseDatePicker = script$e;
809
+
810
+ var __default__$d = {
811
+ name: 'base-input'
812
+ };
813
+ var script$d = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$d), { props: {
814
+ modelValue: { type: [String, Number], required: false },
815
+ type: { type: String, required: false, default: 'text' },
816
+ maxlength: { type: [String, Number], required: false },
817
+ minlength: { type: [String, Number], required: false },
818
+ showWordLimit: { type: Boolean, required: false },
819
+ placeholder: { type: String, required: false, default: '请输入' },
820
+ clearable: { type: Boolean, required: false },
821
+ formatter: { type: Function, required: false },
822
+ parser: { type: Function, required: false },
823
+ showPassword: { type: Boolean, required: false },
824
+ disabled: { type: Boolean, required: false },
825
+ size: { type: String, required: false },
826
+ prefixIcon: { type: null, required: false },
827
+ suffixIcon: { type: null, required: false },
828
+ rows: { type: Number, required: false, default: 2 },
829
+ autosize: { type: null, required: false },
830
+ autocomplete: { type: String, required: false, default: 'off' },
831
+ name: { type: String, required: false },
832
+ readonly: { type: Boolean, required: false },
833
+ max: { type: Number, required: false },
834
+ min: { type: Number, required: false },
835
+ step: { type: Number, required: false },
836
+ resize: { type: String, required: false },
837
+ autofocus: { type: Boolean, required: false },
838
+ form: { type: String, required: false },
839
+ label: { type: String, required: false },
840
+ tabindex: { type: [String, Number], required: false },
841
+ validateEvent: { type: Boolean, required: false, default: true },
842
+ inputStyle: { type: null, required: false },
843
+ inputRewrite: { type: null, required: false },
844
+ changeRewrite: { type: null, required: false }
845
+ }, emits: ["update:modelValue", "blur", "focus", "keyup", "change", "input", "clear"], setup: function (__props, _a) {
846
+ var _this = this;
847
+ var expose = _a.expose, emits = _a.emit;
848
+ var _props = __props;
849
+ var props = _props;
850
+ var updateValue = function (value) {
851
+ emits('update:modelValue', value); // 更新父级v-model绑定变量的值;
852
+ };
853
+ var handleBlur = function (event) {
854
+ emits('blur', event);
855
+ };
856
+ var handleFocus = function (event) {
857
+ emits('focus', event);
858
+ };
859
+ var handleChange = function (value) { return __awaiter(_this, void 0, void 0, function () {
860
+ var _value, _a;
861
+ var _b;
862
+ return __generator(this, function (_c) {
863
+ switch (_c.label) {
864
+ case 0:
865
+ if (!isFunction(props.changeRewrite)) return [3 /*break*/, 2];
866
+ return [4 /*yield*/, ((_b = props.changeRewrite) === null || _b === void 0 ? void 0 : _b.call(props, value))];
867
+ case 1:
868
+ _a = _c.sent();
869
+ return [3 /*break*/, 3];
870
+ case 2:
871
+ _a = value;
872
+ _c.label = 3;
873
+ case 3:
874
+ _value = (_a);
875
+ updateValue(_value);
876
+ emits('change', _value);
877
+ return [2 /*return*/];
878
+ }
879
+ });
880
+ }); };
881
+ var handleInput = function (value) { return __awaiter(_this, void 0, void 0, function () {
882
+ var _value, _a;
883
+ var _b;
884
+ return __generator(this, function (_c) {
885
+ switch (_c.label) {
886
+ case 0:
887
+ if (!isFunction(props.inputRewrite)) return [3 /*break*/, 2];
888
+ return [4 /*yield*/, ((_b = props.inputRewrite) === null || _b === void 0 ? void 0 : _b.call(props, value))];
889
+ case 1:
890
+ _a = _c.sent();
891
+ return [3 /*break*/, 3];
892
+ case 2:
893
+ _a = value;
894
+ _c.label = 3;
895
+ case 3:
896
+ _value = (_a);
897
+ updateValue(_value);
898
+ emits('input', _value);
899
+ return [2 /*return*/];
900
+ }
901
+ });
902
+ }); };
903
+ var handleClear = function () {
904
+ emits('clear');
905
+ };
906
+ var handleKeyupEnter = function (event) {
907
+ emits('keyup', event);
908
+ };
909
+ var BaseInputRef = vue.ref(null);
910
+ expose({
911
+ focus: function () {
912
+ var _a, _b;
913
+ (_b = (_a = BaseInputRef.value) === null || _a === void 0 ? void 0 : _a.focus) === null || _b === void 0 ? void 0 : _b.call(_a);
914
+ },
915
+ blur: function () {
916
+ var _a, _b;
917
+ (_b = (_a = BaseInputRef.value) === null || _a === void 0 ? void 0 : _a.blur) === null || _b === void 0 ? void 0 : _b.call(_a);
918
+ },
919
+ select: function () {
920
+ var _a, _b;
921
+ (_b = (_a = BaseInputRef.value) === null || _a === void 0 ? void 0 : _a.select) === null || _b === void 0 ? void 0 : _b.call(_a);
922
+ }
923
+ });
924
+ return function (_ctx, _cache) {
925
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElInput), {
926
+ class: "base-input",
927
+ type: __props.type,
928
+ "model-value": __props.modelValue,
929
+ minlength: __props.minlength,
930
+ maxlength: __props.maxlength,
931
+ "show-word-limit": __props.showWordLimit,
932
+ placeholder: __props.placeholder,
933
+ clearable: __props.clearable,
934
+ formatter: __props.formatter,
935
+ parser: __props.parser,
936
+ "show-password": __props.showPassword,
937
+ disabled: __props.disabled,
938
+ size: __props.size,
939
+ "prefix-icon": __props.prefixIcon,
940
+ "suffix-icon": __props.suffixIcon,
941
+ rows: __props.rows,
942
+ autosize: __props.autosize,
943
+ autocomplete: __props.autocomplete,
944
+ name: __props.name,
945
+ readonly: __props.readonly,
946
+ max: __props.max,
947
+ min: __props.min,
948
+ step: __props.step,
949
+ resize: __props.resize,
950
+ autofocus: __props.autofocus,
951
+ form: __props.form,
952
+ label: __props.label,
953
+ tabindex: __props.tabindex,
954
+ "validate-event": __props.validateEvent,
955
+ "input-style": __props.inputStyle,
956
+ ref_key: "BaseInputRef",
957
+ ref: BaseInputRef,
958
+ onBlur: handleBlur,
959
+ onFocus: handleFocus,
960
+ onInput: handleInput,
961
+ onChange: handleChange,
962
+ onClear: handleClear,
963
+ onKeyup: vue.withKeys(handleKeyupEnter, ["enter"])
964
+ }, null, 8 /* PROPS */, ["type", "model-value", "minlength", "maxlength", "show-word-limit", "placeholder", "clearable", "formatter", "parser", "show-password", "disabled", "size", "prefix-icon", "suffix-icon", "rows", "autosize", "autocomplete", "name", "readonly", "max", "min", "step", "resize", "autofocus", "form", "label", "tabindex", "validate-event", "input-style", "onKeyup"]));
965
+ };
966
+ } }));
967
+
968
+ script$d.__scopeId = "data-v-36a4c1cb";
969
+ script$d.__file = "packages/base/input/input.vue";
970
+
971
+ var BaseInput = script$d;
972
+
973
+ var __default__$c = {
974
+ name: 'base-tool-tip'
975
+ };
976
+ var script$c = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$c), { props: {
977
+ popperClass: { type: String, required: false, default: 'base-tool-tip' },
978
+ trigger: { type: String, required: false },
979
+ transition: { type: String, required: false, default: 'el-fade-in-linear' },
980
+ disabled: { type: Boolean, required: false },
981
+ enterable: { type: Boolean, required: false, default: true },
982
+ hideAfter: { type: Number, required: false, default: 100 },
983
+ placement: { type: String, required: false, default: 'top' },
984
+ content: { type: [String, Number], required: false },
985
+ style: { type: null, required: false },
986
+ overShow: { type: Boolean, required: false, default: false }
987
+ }, setup: function (__props) {
988
+ var props = __props;
989
+ var _overShow = vue.ref(props.overShow);
990
+ var toolTipDefault = vue.ref(null);
991
+ var toolTipDefaultContent = vue.ref(null);
992
+ var _content = vue.computed(function () { return props.content; });
993
+ var handleMouseMove = function () {
994
+ var _a, _b;
995
+ if (((_a = toolTipDefault.value) === null || _a === void 0 ? void 0 : _a.tagName) && ((_b = toolTipDefaultContent.value) === null || _b === void 0 ? void 0 : _b.tagName)) {
996
+ var _c = toolTipDefault.value, offsetWidth = _c.offsetWidth, offsetHeight = _c.offsetHeight;
997
+ var _d = toolTipDefaultContent.value, childOffsetWidth = _d.offsetWidth, childOffsetHeight = _d.offsetHeight;
998
+ _overShow.value = !(offsetWidth < childOffsetWidth || offsetHeight < childOffsetHeight);
999
+ }
1000
+ };
1001
+ return function (_ctx, _cache) {
1002
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElTooltip), {
1003
+ key: _overShow.value ? '1' : '0',
1004
+ "popper-class": __props.popperClass,
1005
+ trigger: __props.trigger,
1006
+ transition: __props.transition,
1007
+ disabled: _overShow.value || __props.disabled,
1008
+ placement: __props.placement,
1009
+ hideAfter: __props.hideAfter,
1010
+ enterable: __props.enterable,
1011
+ content: vue.unref(_content)
1012
+ }, {
1013
+ content: vue.withCtx(function () { return [
1014
+ vue.renderSlot(_ctx.$slots, "content")
1015
+ ]; }),
1016
+ default: vue.withCtx(function () { return [
1017
+ (__props.overShow)
1018
+ ? (vue.openBlock(), vue.createElementBlock("div", {
1019
+ key: 0,
1020
+ style: vue.normalizeStyle([{ "width": "100%" }, __props.style]),
1021
+ onMousemove: handleMouseMove,
1022
+ ref_key: "toolTipDefault",
1023
+ ref: toolTipDefault
1024
+ }, [
1025
+ vue.createElementVNode("span", {
1026
+ ref_key: "toolTipDefaultContent",
1027
+ ref: toolTipDefaultContent
1028
+ }, [
1029
+ vue.renderSlot(_ctx.$slots, "default")
1030
+ ], 512 /* NEED_PATCH */)
1031
+ ], 36 /* STYLE, HYDRATE_EVENTS */))
1032
+ : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
1033
+ ]; }),
1034
+ _: 3 /* FORWARDED */
1035
+ }, 8 /* PROPS */, ["popper-class", "trigger", "transition", "disabled", "placement", "hideAfter", "enterable", "content"]));
1036
+ };
1037
+ } }));
1038
+
1039
+ script$c.__file = "packages/base/tool-tip/tool-tip.vue";
1040
+
1041
+ var BaseToolTip = script$c;
1042
+
1043
+ var __default__$b = {
1044
+ name: 'base-select'
1045
+ };
1046
+ var script$b = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$b), { props: {
1047
+ init: { type: Boolean, required: false, default: false },
1048
+ filterUseRemote: { type: Boolean, required: false, default: false },
1049
+ options: { type: null, required: false },
1050
+ group: { type: Boolean, required: false },
1051
+ labelKey: { type: String, required: false, default: 'label' },
1052
+ valueKey: { type: String, required: false, default: 'value' },
1053
+ optionsKey: { type: String, required: false, default: 'options' },
1054
+ modelValue: { type: null, required: false },
1055
+ multiple: { type: Boolean, required: false },
1056
+ disabled: { type: Boolean, required: false },
1057
+ size: { type: String, required: false },
1058
+ clearable: { type: Boolean, required: false },
1059
+ collapseTags: { type: Boolean, required: false },
1060
+ collapseTagsTooltip: { type: Boolean, required: false },
1061
+ multipleLimit: { type: Number, required: false },
1062
+ placeholder: { type: String, required: false },
1063
+ filterable: { type: Boolean, required: false },
1064
+ allowCreate: { type: Boolean, required: false },
1065
+ fitInputWidth: { type: Boolean, required: false, default: true },
1066
+ filterMethod: { type: Function, required: false },
1067
+ remoteMethod: { type: Function, required: false },
1068
+ loadingText: { type: String, required: false, default: '加载中' },
1069
+ noMatchText: { type: String, required: false, default: '暂无数据' },
1070
+ noDataText: { type: String, required: false, default: '暂无数据' }
1071
+ }, emits: ["update:modelValue", "change", "remove-tag", "visible-change", "clear"], setup: function (__props, _a) {
1072
+ var _this = this;
1073
+ var emits = _a.emit;
1074
+ var _props = __props;
1075
+ var _Reflect = Reflect;
1076
+ var props = _props;
1077
+ var setOptionsData = function (val) { return __awaiter(_this, void 0, void 0, function () {
1078
+ var res, data, error_1;
1079
+ var _a;
1080
+ return __generator(this, function (_b) {
1081
+ switch (_b.label) {
1082
+ case 0:
1083
+ if (!isFunction(props.remoteMethod)) return [3 /*break*/, 4];
1084
+ _b.label = 1;
1085
+ case 1:
1086
+ _b.trys.push([1, 3, , 4]);
1087
+ loading.value = true;
1088
+ return [4 /*yield*/, ((_a = props.remoteMethod) === null || _a === void 0 ? void 0 : _a.call(props, val))];
1089
+ case 2:
1090
+ res = _b.sent();
1091
+ data = xrkTools.check.isObject(res.data)
1092
+ ? Array.isArray(res.data.list)
1093
+ ? res.data.list
1094
+ : []
1095
+ : Array.isArray(res.data)
1096
+ ? res.data
1097
+ : [];
1098
+ loading.value = false;
1099
+ // 避免多次请求接口 接口响应先后顺序不一致导致数据错乱
1100
+ _options.value = Array.isArray(data)
1101
+ ? data.filter(function (i) { return !val || "".concat(i[props.valueKey]).indexOf(val) > -1; })
1102
+ : [];
1103
+ return [3 /*break*/, 4];
1104
+ case 3:
1105
+ error_1 = _b.sent();
1106
+ loading.value = false;
1107
+ console.error(error_1);
1108
+ return [3 /*break*/, 4];
1109
+ case 4: return [2 /*return*/];
1110
+ }
1111
+ });
1112
+ }); };
1113
+ var _filterable = vue.computed(function () { return props.filterable || isFunction(props.remoteMethod); });
1114
+ var debounceSetOptionsData = xrkTools.base.debounce(setOptionsData, 600);
1115
+ var _filterMethod = (props.filterUseRemote
1116
+ ? function (val) {
1117
+ loading.value = true;
1118
+ debounceSetOptionsData(val);
1119
+ }
1120
+ : props.filterMethod);
1121
+ var toolTipDisabled = vue.ref(true);
1122
+ var loading = vue.ref(false);
1123
+ var _options = vue.ref(props.options);
1124
+ var selectValue = vue.ref(props.multiple && props.modelValue && !Array.isArray(props.modelValue)
1125
+ ? [props.modelValue]
1126
+ : props.modelValue);
1127
+ // 父组件值发生改变时,同步selectValue
1128
+ vue.watch(function () { return props.modelValue; }, function (newV) {
1129
+ selectValue.value = newV;
1130
+ });
1131
+ var getSelectOptions = function (options, selectValue) {
1132
+ return options.reduce(function (pre, option) {
1133
+ if (Array.isArray(selectValue)
1134
+ ? selectValue.includes(Reflect.get(option, props.valueKey))
1135
+ : Reflect.get(option, props.valueKey) == selectValue) {
1136
+ pre.push(option);
1137
+ }
1138
+ if (Array.isArray(option.options)) {
1139
+ pre.push.apply(pre, getSelectOptions(option.options, selectValue));
1140
+ }
1141
+ return pre;
1142
+ }, []);
1143
+ };
1144
+ var handleChange = function (value) {
1145
+ emits('update:modelValue', value);
1146
+ emits('change', value, Array.isArray(_options.value) ? getSelectOptions(_options.value, value) : []);
1147
+ };
1148
+ var handleVisibleChange = function (visibleStatus) {
1149
+ toolTipDisabled.value = !visibleStatus;
1150
+ if (visibleStatus) {
1151
+ setOptionsData();
1152
+ }
1153
+ emits('visible-change', visibleStatus);
1154
+ };
1155
+ var handleClear = function () {
1156
+ emits('clear');
1157
+ };
1158
+ var handleRemoveTag = function (value) {
1159
+ emits('remove-tag', value);
1160
+ };
1161
+ if (props.init) {
1162
+ setOptionsData();
1163
+ }
1164
+ return function (_ctx, _cache) {
1165
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElSelect), {
1166
+ modelValue: vue.unref(selectValue),
1167
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return (vue.isRef(selectValue) ? (selectValue).value = $event : null); }),
1168
+ placeholder: __props.placeholder,
1169
+ multiple: __props.multiple,
1170
+ disabled: __props.disabled,
1171
+ size: __props.size,
1172
+ clearable: __props.clearable,
1173
+ collapseTags: __props.collapseTags,
1174
+ collapseTagsTooltip: __props.collapseTagsTooltip,
1175
+ multipleLimit: __props.multipleLimit,
1176
+ filterable: vue.unref(_filterable),
1177
+ allowCreate: __props.allowCreate,
1178
+ filterMethod: vue.unref(_filterMethod),
1179
+ loading: loading.value,
1180
+ remoteMethod: __props.remoteMethod,
1181
+ loadingText: __props.loadingText,
1182
+ noMatchText: __props.noMatchText,
1183
+ noDataText: __props.noDataText,
1184
+ fitInputWidth: __props.fitInputWidth,
1185
+ onChange: handleChange,
1186
+ onVisibleChange: handleVisibleChange,
1187
+ onRemoveTag: handleRemoveTag,
1188
+ onClear: handleClear
1189
+ }, {
1190
+ default: vue.withCtx(function () { return [
1191
+ (__props.group)
1192
+ ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(_options.value, function (group) {
1193
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElOptionGroup), {
1194
+ key: vue.unref(_Reflect).get(group, __props.labelKey),
1195
+ label: vue.unref(_Reflect).get(group, __props.labelKey)
1196
+ }, {
1197
+ default: vue.withCtx(function () { return [
1198
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(_Reflect).get(group, __props.optionsKey) || [], function (item) {
1199
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElOption), {
1200
+ class: "option",
1201
+ key: item[__props.valueKey],
1202
+ label: item[__props.labelKey],
1203
+ value: item[__props.valueKey]
1204
+ }, {
1205
+ default: vue.withCtx(function () { return [
1206
+ vue.createVNode(vue.unref(BaseToolTip), {
1207
+ content: item[__props.labelKey],
1208
+ hideAfter: 0,
1209
+ enterable: false,
1210
+ transition: "none",
1211
+ disabled: toolTipDisabled.value,
1212
+ overShow: true
1213
+ }, {
1214
+ default: vue.withCtx(function () { return [
1215
+ vue.createElementVNode("span", null, vue.toDisplayString(item[__props.labelKey]), 1 /* TEXT */)
1216
+ ]; }),
1217
+ _: 2 /* DYNAMIC */
1218
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content", "disabled"])
1219
+ ]; }),
1220
+ _: 2 /* DYNAMIC */
1221
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label", "value"]));
1222
+ }), 128 /* KEYED_FRAGMENT */))
1223
+ ]; }),
1224
+ _: 2 /* DYNAMIC */
1225
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label"]));
1226
+ }), 128 /* KEYED_FRAGMENT */))
1227
+ : (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_options.value, function (item) {
1228
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElOption), {
1229
+ class: "option",
1230
+ key: vue.unref(_Reflect).get(item, __props.labelKey),
1231
+ label: vue.unref(_Reflect).get(item, __props.labelKey),
1232
+ value: vue.unref(_Reflect).get(item, __props.valueKey)
1233
+ }, {
1234
+ default: vue.withCtx(function () { return [
1235
+ vue.createVNode(vue.unref(BaseToolTip), {
1236
+ content: vue.unref(_Reflect).get(item, __props.labelKey),
1237
+ hideAfter: 0,
1238
+ enterable: false,
1239
+ transition: "none",
1240
+ disabled: toolTipDisabled.value,
1241
+ overShow: true
1242
+ }, {
1243
+ default: vue.withCtx(function () { return [
1244
+ vue.createTextVNode(vue.toDisplayString(vue.unref(_Reflect).get(item, __props.labelKey)), 1 /* TEXT */)
1245
+ ]; }),
1246
+ _: 2 /* DYNAMIC */
1247
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content", "disabled"])
1248
+ ]; }),
1249
+ _: 2 /* DYNAMIC */
1250
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["label", "value"]));
1251
+ }), 128 /* KEYED_FRAGMENT */))
1252
+ ]; }),
1253
+ _: 1 /* STABLE */
1254
+ }, 8 /* PROPS */, ["modelValue", "placeholder", "multiple", "disabled", "size", "clearable", "collapseTags", "collapseTagsTooltip", "multipleLimit", "filterable", "allowCreate", "filterMethod", "loading", "remoteMethod", "loadingText", "noMatchText", "noDataText", "fitInputWidth"]));
1255
+ };
1256
+ } }));
1257
+
1258
+ script$b.__scopeId = "data-v-545bd175";
1259
+ script$b.__file = "packages/base/select/select.vue";
1260
+
1261
+ /*
1262
+ * @Description:
1263
+ * @Date: 2022-06-29 18:18:19
1264
+ */
1265
+ var BaseSelect = script$b;
1266
+
1267
+ var __default__$a = {
1268
+ name: 'base-switch'
1269
+ };
1270
+ var script$a = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$a), { props: {
1271
+ modelValue: { type: [Boolean, String, Number], required: false },
1272
+ disabled: { type: Boolean, required: false },
1273
+ loading: { type: Boolean, required: false },
1274
+ size: { type: String, required: false },
1275
+ width: { type: Number, required: false },
1276
+ activeIcon: { type: null, required: false },
1277
+ activeText: { type: String, required: false },
1278
+ activeValue: { type: [Boolean, String, Number], required: false, default: true },
1279
+ inactiveIcon: { type: null, required: false },
1280
+ inactiveText: { type: String, required: false },
1281
+ inactiveValue: { type: [Boolean, String, Number], required: false, default: false },
1282
+ beforeChange: { type: Function, required: false }
1283
+ }, emits: ["update:modelValue", "change"], setup: function (__props, _a) {
1284
+ var _this = this;
1285
+ var emits = _a.emit;
1286
+ var _props = __props;
1287
+ var props = _props;
1288
+ var _loading = vue.ref(props.loading);
1289
+ var _switchValue = vue.ref(props.modelValue);
1290
+ // 父组件值发生改变时,同步_switchValue
1291
+ vue.watch(function () { return props.modelValue; }, function (newV) {
1292
+ _switchValue.value = newV;
1293
+ });
1294
+ var _beforeChange = (function () { return __awaiter(_this, void 0, void 0, function () {
1295
+ var error_1;
1296
+ var _a;
1297
+ return __generator(this, function (_b) {
1298
+ switch (_b.label) {
1299
+ case 0:
1300
+ _b.trys.push([0, 3, , 4]);
1301
+ _loading.value = true;
1302
+ if (!isFunction(props.beforeChange)) return [3 /*break*/, 2];
1303
+ return [4 /*yield*/, ((_a = props.beforeChange) === null || _a === void 0 ? void 0 : _a.call(props))];
1304
+ case 1:
1305
+ _b.sent();
1306
+ _b.label = 2;
1307
+ case 2:
1308
+ _loading.value = false;
1309
+ return [2 /*return*/, true];
1310
+ case 3:
1311
+ error_1 = _b.sent();
1312
+ console.error('switch change fail', error_1);
1313
+ _loading.value = false;
1314
+ return [2 /*return*/, false];
1315
+ case 4: return [2 /*return*/];
1316
+ }
1317
+ });
1318
+ }); });
1319
+ var handleChange = function (val) {
1320
+ _switchValue.value = val;
1321
+ emits('update:modelValue', val);
1322
+ emits('change', val);
1323
+ };
1324
+ return function (_ctx, _cache) {
1325
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElSwitch), {
1326
+ class: "base-switch",
1327
+ modelValue: _switchValue.value,
1328
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return ((_switchValue).value = $event); }),
1329
+ disabled: __props.disabled,
1330
+ loading: _loading.value,
1331
+ size: __props.size,
1332
+ width: __props.width,
1333
+ activeIcon: __props.activeIcon,
1334
+ activeText: __props.activeText,
1335
+ activeValue: __props.activeValue,
1336
+ inactiveIcon: __props.inactiveIcon,
1337
+ inactiveText: __props.inactiveText,
1338
+ inactiveValue: __props.inactiveValue,
1339
+ beforeChange: vue.unref(_beforeChange),
1340
+ onChange: handleChange
1341
+ }, null, 8 /* PROPS */, ["modelValue", "disabled", "loading", "size", "width", "activeIcon", "activeText", "activeValue", "inactiveIcon", "inactiveText", "inactiveValue", "beforeChange"]));
1342
+ };
1343
+ } }));
1344
+
1345
+ script$a.__scopeId = "data-v-50b6e275";
1346
+ script$a.__file = "packages/base/switch/switch.vue";
1347
+
1348
+ var BaseSwitch = script$a;
1349
+
1350
+ var __default__$9 = {
1351
+ name: 'base-tag'
1352
+ };
1353
+ var script$9 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$9), { props: {
1354
+ type: { type: String, required: false },
1355
+ closable: { type: Boolean, required: false },
1356
+ disableTransitions: { type: Boolean, required: false },
1357
+ hit: { type: Boolean, required: false },
1358
+ color: { type: String, required: false },
1359
+ size: { type: String, required: false, default: 'large' },
1360
+ effect: { type: String, required: false },
1361
+ round: { type: Boolean, required: false }
1362
+ }, emits: ["click", "close"], setup: function (__props, _a) {
1363
+ var emits = _a.emit;
1364
+ return function (_ctx, _cache) {
1365
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElTag), {
1366
+ type: __props.type,
1367
+ closable: __props.closable,
1368
+ disableTransitions: __props.disableTransitions,
1369
+ hit: __props.hit,
1370
+ color: __props.color,
1371
+ size: __props.size,
1372
+ effect: __props.effect,
1373
+ round: __props.round,
1374
+ onClick: _cache[0] || (_cache[0] = function ($event) { return (emits('click')); }),
1375
+ onClose: _cache[1] || (_cache[1] = function ($event) { return (emits('close')); })
1376
+ }, {
1377
+ default: vue.withCtx(function () { return [
1378
+ vue.renderSlot(_ctx.$slots, "default")
1379
+ ]; }),
1380
+ _: 3 /* FORWARDED */
1381
+ }, 8 /* PROPS */, ["type", "closable", "disableTransitions", "hit", "color", "size", "effect", "round"]));
1382
+ };
1383
+ } }));
1384
+
1385
+ script$9.__file = "packages/base/tag/tag.vue";
1386
+
1387
+ var _hoisted_1$4 = { class: "base-tag-group" };
1388
+ var __default__$8 = {
1389
+ name: 'base-tag-group'
1390
+ };
1391
+ var script$8 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$8), { props: {
1392
+ modelValue: { type: Array, required: false },
1393
+ labelKey: { type: String, required: false, default: 'label' },
1394
+ type: { type: String, required: false },
1395
+ disableTransitions: { type: Boolean, required: false },
1396
+ hit: { type: Boolean, required: false },
1397
+ color: { type: String, required: false },
1398
+ size: { type: String, required: false },
1399
+ effect: { type: String, required: false },
1400
+ round: { type: Boolean, required: false },
1401
+ beforeClose: { type: null, required: false },
1402
+ beforeAdd: { type: Function, required: false },
1403
+ showAdd: { type: Boolean, required: false, default: false },
1404
+ addBtnText: { type: String, required: false, default: '新增' },
1405
+ maxlength: { type: Number, required: false, default: 20 }
1406
+ }, emits: ["update:modelValue", "change", "click"], setup: function (__props, _a) {
1407
+ var _this = this;
1408
+ var emits = _a.emit;
1409
+ var _props = __props;
1410
+ var vLoading = ElementPlus.vLoading;
1411
+ var _Reflect = Reflect;
1412
+ var props = _props;
1413
+ var tagsValue = vue.ref(props.modelValue);
1414
+ var closeIndex = vue.ref(-1);
1415
+ var adding = vue.ref(false);
1416
+ var handleTagClose = function (index) { return __awaiter(_this, void 0, void 0, function () {
1417
+ var error_1;
1418
+ var _a, _b, _c;
1419
+ return __generator(this, function (_d) {
1420
+ switch (_d.label) {
1421
+ case 0:
1422
+ if (closeIndex.value > -1)
1423
+ return [2 /*return*/];
1424
+ _d.label = 1;
1425
+ case 1:
1426
+ _d.trys.push([1, 4, , 5]);
1427
+ closeIndex.value = index;
1428
+ if (!isFunction(props.beforeClose)) return [3 /*break*/, 3];
1429
+ return [4 /*yield*/, ((_a = props.beforeClose) === null || _a === void 0 ? void 0 : _a.call(props, (_b = tagsValue.value) === null || _b === void 0 ? void 0 : _b[index]))];
1430
+ case 2:
1431
+ _d.sent();
1432
+ _d.label = 3;
1433
+ case 3:
1434
+ (_c = tagsValue.value) === null || _c === void 0 ? void 0 : _c.splice(index, 1);
1435
+ emits('update:modelValue', tagsValue.value);
1436
+ emits('change', tagsValue.value);
1437
+ closeIndex.value = -1;
1438
+ return [3 /*break*/, 5];
1439
+ case 4:
1440
+ error_1 = _d.sent();
1441
+ console.error(error_1);
1442
+ closeIndex.value = -1;
1443
+ return [3 /*break*/, 5];
1444
+ case 5: return [2 /*return*/];
1445
+ }
1446
+ });
1447
+ }); };
1448
+ var handleTagClick = function (index) {
1449
+ var _a;
1450
+ emits('click', (_a = tagsValue.value) === null || _a === void 0 ? void 0 : _a[index]);
1451
+ };
1452
+ /**
1453
+ * 增加标签逻辑
1454
+ */
1455
+ var InputRef = vue.ref(null);
1456
+ var inputVisible = vue.ref(false);
1457
+ var inputValue = vue.ref('');
1458
+ var showInput = function () {
1459
+ inputVisible.value = true;
1460
+ vue.nextTick(function () {
1461
+ InputRef.value.focus();
1462
+ });
1463
+ };
1464
+ var handleInputConfirm = function () { return __awaiter(_this, void 0, void 0, function () {
1465
+ var _value, _a;
1466
+ var _b, _c;
1467
+ return __generator(this, function (_d) {
1468
+ switch (_d.label) {
1469
+ case 0:
1470
+ if (adding.value) {
1471
+ return [2 /*return*/];
1472
+ }
1473
+ if (xrkTools.check.isFalseValue(inputValue.value)) {
1474
+ inputVisible.value = false;
1475
+ return [2 /*return*/];
1476
+ }
1477
+ _d.label = 1;
1478
+ case 1:
1479
+ _d.trys.push([1, 5, , 6]);
1480
+ adding.value = true;
1481
+ if (!isFunction(props.beforeAdd)) return [3 /*break*/, 3];
1482
+ return [4 /*yield*/, ((_b = props.beforeAdd) === null || _b === void 0 ? void 0 : _b.call(props, inputValue.value))];
1483
+ case 2:
1484
+ _a = _d.sent();
1485
+ return [3 /*break*/, 4];
1486
+ case 3:
1487
+ _a = { label: inputValue.value, value: inputValue.value, closable: true };
1488
+ _d.label = 4;
1489
+ case 4:
1490
+ _value = (_a);
1491
+ (_c = tagsValue.value) === null || _c === void 0 ? void 0 : _c.push(_value);
1492
+ emits('update:modelValue', tagsValue.value);
1493
+ emits('change', tagsValue.value);
1494
+ inputVisible.value = false;
1495
+ adding.value = false;
1496
+ inputValue.value = '';
1497
+ return [3 /*break*/, 6];
1498
+ case 5:
1499
+ _d.sent();
1500
+ adding.value = false;
1501
+ inputVisible.value = false;
1502
+ inputValue.value = '';
1503
+ return [3 /*break*/, 6];
1504
+ case 6: return [2 /*return*/];
1505
+ }
1506
+ });
1507
+ }); };
1508
+ return function (_ctx, _cache) {
1509
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
1510
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.modelValue, function (item, index) {
1511
+ return vue.withDirectives((vue.openBlock(), vue.createBlock(script$9, {
1512
+ class: "base-tag",
1513
+ key: index,
1514
+ type: __props.type,
1515
+ closable: item['closable'],
1516
+ disableTransitions: __props.disableTransitions,
1517
+ hit: __props.hit,
1518
+ color: __props.color,
1519
+ size: __props.size,
1520
+ effect: __props.effect,
1521
+ round: __props.round,
1522
+ onClose: function ($event) { return (handleTagClose(index)); },
1523
+ onClick: function ($event) { return (handleTagClick(index)); }
1524
+ }, {
1525
+ default: vue.withCtx(function () { return [
1526
+ vue.createTextVNode(vue.toDisplayString(vue.unref(_Reflect).get(item, __props.labelKey)), 1 /* TEXT */)
1527
+ ]; }),
1528
+ _: 2 /* DYNAMIC */
1529
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["type", "closable", "disableTransitions", "hit", "color", "size", "effect", "round", "onClose", "onClick"])), [
1530
+ [vue.unref(vLoading), closeIndex.value == index]
1531
+ ]);
1532
+ }), 128 /* KEYED_FRAGMENT */)),
1533
+ (__props.showAdd)
1534
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
1535
+ (inputVisible.value)
1536
+ ? vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(BaseInput), {
1537
+ key: 0,
1538
+ class: "base-input",
1539
+ clearable: "",
1540
+ disabled: adding.value,
1541
+ ref_key: "InputRef",
1542
+ ref: InputRef,
1543
+ modelValue: inputValue.value,
1544
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) { return ((inputValue).value = $event); }),
1545
+ size: __props.size,
1546
+ maxlength: __props.maxlength,
1547
+ onKeyup: vue.withKeys(handleInputConfirm, ["enter"]),
1548
+ onBlur: handleInputConfirm
1549
+ }, null, 8 /* PROPS */, ["disabled", "modelValue", "size", "maxlength", "onKeyup"])), [
1550
+ [vue.unref(vLoading), adding.value]
1551
+ ])
1552
+ : (vue.openBlock(), vue.createBlock(vue.unref(BaseButton), {
1553
+ key: 1,
1554
+ size: __props.size,
1555
+ onClick: showInput,
1556
+ disabled: adding.value
1557
+ }, {
1558
+ default: vue.withCtx(function () { return [
1559
+ vue.createTextVNode(vue.toDisplayString(__props.addBtnText), 1 /* TEXT */)
1560
+ ]; }),
1561
+ _: 1 /* STABLE */
1562
+ }, 8 /* PROPS */, ["size", "disabled"]))
1563
+ ], 64 /* STABLE_FRAGMENT */))
1564
+ : vue.createCommentVNode("v-if", true)
1565
+ ]));
1566
+ };
1567
+ } }));
1568
+
1569
+ script$8.__scopeId = "data-v-eb1feb46";
1570
+ script$8.__file = "packages/base/tag/tag-group.vue";
1571
+
1572
+ var BaseTag = script$9;
1573
+ var BaseTagGroup = script$8;
1574
+
1575
+ var __default__$7 = {
1576
+ name: 'base-pagination'
1577
+ };
1578
+ var script$7 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$7), { props: {
1579
+ small: { type: Boolean, required: false, default: true },
1580
+ currentPage: { type: Number, required: false, default: 1 },
1581
+ pageSize: { type: Number, required: false, default: 15 },
1582
+ total: { type: Number, required: false },
1583
+ pagerCount: { type: Number, required: false, default: 7 },
1584
+ pageSizes: { type: Array, required: false, default: function () { return [15, 60, 100]; } },
1585
+ hideOnSinglePage: { type: Boolean, required: false, default: false },
1586
+ layout: { type: Array, required: false, default: function () { return ['total', 'sizes', 'prev', 'pager', 'next', 'jumper']; } }
1587
+ }, emits: ["size-change", "current-change"], setup: function (__props, _a) {
1588
+ var expose = _a.expose, emits = _a.emit;
1589
+ var props = __props;
1590
+ var _pageSize = vue.ref(props.pageSize);
1591
+ var _currentPage = vue.ref(props.currentPage);
1592
+ var _layout = vue.ref(Array.isArray(props.layout) ? props.layout.join(',') : props.layout);
1593
+ var maxPage = vue.computed(function () { return Math.ceil((props.total || 0) / _pageSize.value); });
1594
+ var setCurrentPage = function (newCurrentPage) {
1595
+ if (!newCurrentPage || newCurrentPage == _currentPage.value)
1596
+ return;
1597
+ if (newCurrentPage > maxPage.value) {
1598
+ // 设置的页码超过最大页码
1599
+ console.warn("currentPage ".concat(newCurrentPage, " \u5927\u4E8E\u6700\u5927\u9875\u7801 ").concat(maxPage.value));
1600
+ }
1601
+ else {
1602
+ _currentPage.value = newCurrentPage;
1603
+ }
1604
+ };
1605
+ var setPageSize = function (newPageSize) {
1606
+ if (!newPageSize || newPageSize == _pageSize.value)
1607
+ return;
1608
+ if (props.pageSizes.includes(newPageSize)) {
1609
+ _pageSize.value = newPageSize;
1610
+ }
1611
+ else {
1612
+ console.warn("pageSize ".concat(newPageSize, " \u4E0D\u5728 pageSizes ").concat(props.pageSizes, " \u4E2D"));
1613
+ }
1614
+ };
1615
+ // watch(
1616
+ // () => [props.currentPage, props.pageSize],
1617
+ // ([newCurrentPage, newPageSize]) => {
1618
+ // if (newCurrentPage > maxPage.value) {
1619
+ // // 设置的页码超过最大页码
1620
+ // emits('update:currentPage', _currentPage.value);
1621
+ // console.warn(
1622
+ // `currentPage ${newCurrentPage} 大于最大页码 ${maxPage.value}`
1623
+ // );
1624
+ // } else {
1625
+ // _currentPage.value = newCurrentPage;
1626
+ // }
1627
+ // if (props.pageSizes.includes(newPageSize)) {
1628
+ // _pageSize.value = newPageSize;
1629
+ // } else {
1630
+ // emits('update:pageSize', _pageSize.value);
1631
+ // console.warn(
1632
+ // `pageSize ${newPageSize} 不在 pageSizes ${props.pageSizes} 中`
1633
+ // );
1634
+ // }
1635
+ // }
1636
+ // );
1637
+ var handleSizeChange = function (pageSize) {
1638
+ _pageSize.value = pageSize;
1639
+ // emits('update:pageSize', pageSize);
1640
+ if (maxPage.value >= _currentPage.value) {
1641
+ // 组件不会再次触发size-change事件,没有这个判断,会导致同事触发size-change 和 size-change
1642
+ emits('size-change', {
1643
+ pageSize: pageSize,
1644
+ currentPage: _currentPage.value
1645
+ });
1646
+ }
1647
+ };
1648
+ var handleCurrenChange = function (currentPage) {
1649
+ _currentPage.value = currentPage;
1650
+ // emits('update:currentPage', currentPage);
1651
+ emits('current-change', {
1652
+ pageSize: _pageSize.value,
1653
+ currentPage: currentPage
1654
+ });
1655
+ };
1656
+ expose({
1657
+ // 父组件调用,修改组件内页面显示,不会触发emits事件。
1658
+ setPageInfo: function (info) {
1659
+ setPageSize(info.pageSize);
1660
+ setCurrentPage(info.currentPage);
1661
+ },
1662
+ getPageInfo: function () { return ({
1663
+ pageSize: _pageSize.value,
1664
+ currentPage: _currentPage.value
1665
+ }); }
1666
+ });
1667
+ return function (_ctx, _cache) {
1668
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElPagination), {
1669
+ class: "base-pagination",
1670
+ small: __props.small,
1671
+ "page-size": _pageSize.value,
1672
+ "current-page": _currentPage.value,
1673
+ layout: _layout.value,
1674
+ total: __props.total,
1675
+ pagerCount: __props.pagerCount,
1676
+ pageSizes: __props.pageSizes,
1677
+ hideOnSinglePage: __props.hideOnSinglePage,
1678
+ onSizeChange: handleSizeChange,
1679
+ onCurrentChange: handleCurrenChange
1680
+ }, null, 8 /* PROPS */, ["small", "page-size", "current-page", "layout", "total", "pagerCount", "pageSizes", "hideOnSinglePage"]));
1681
+ };
1682
+ } }));
1683
+
1684
+ script$7.__scopeId = "data-v-1a7c8335";
1685
+ script$7.__file = "packages/base/pagination/pagination.vue";
1686
+
1687
+ var BasePagination = script$7;
1688
+
1689
+ var __default__$6 = {
1690
+ name: 'base-form'
1691
+ };
1692
+ var script$6 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$6), { props: {
1693
+ model: { type: null, required: true },
1694
+ rules: { type: null, required: false },
1695
+ inline: { type: Boolean, required: false },
1696
+ labelPosition: { type: String, required: false, default: 'left' },
1697
+ labelWidth: { type: [String, Number], required: false, default: 'auto' },
1698
+ labelSuffix: { type: String, required: false },
1699
+ hideRequiredAsterisk: { type: Boolean, required: false },
1700
+ showMessage: { type: Boolean, required: false, default: true },
1701
+ inlineMessage: { type: Boolean, required: false },
1702
+ statusIcon: { type: Boolean, required: false },
1703
+ validateOnRuleChange: { type: Boolean, required: false, default: true },
1704
+ size: { type: String, required: false },
1705
+ disabled: { type: Boolean, required: false }
1706
+ }, setup: function (__props, _a) {
1707
+ var expose = _a.expose;
1708
+ var BaseForm = vue.ref(null);
1709
+ expose({
1710
+ validate: function () {
1711
+ var _a;
1712
+ var args = [];
1713
+ for (var _i = 0; _i < arguments.length; _i++) {
1714
+ args[_i] = arguments[_i];
1715
+ }
1716
+ return (_a = BaseForm.value) === null || _a === void 0 ? void 0 : _a.validate.apply(_a, args);
1717
+ },
1718
+ validateField: function () {
1719
+ var _a;
1720
+ var args = [];
1721
+ for (var _i = 0; _i < arguments.length; _i++) {
1722
+ args[_i] = arguments[_i];
1723
+ }
1724
+ return (_a = BaseForm.value) === null || _a === void 0 ? void 0 : _a.validateField.apply(_a, args);
1725
+ },
1726
+ resetFields: function () {
1727
+ var _a;
1728
+ var args = [];
1729
+ for (var _i = 0; _i < arguments.length; _i++) {
1730
+ args[_i] = arguments[_i];
1731
+ }
1732
+ return (_a = BaseForm.value) === null || _a === void 0 ? void 0 : _a.resetFields.apply(_a, args);
1733
+ },
1734
+ scrollToField: function () {
1735
+ var _a;
1736
+ var args = [];
1737
+ for (var _i = 0; _i < arguments.length; _i++) {
1738
+ args[_i] = arguments[_i];
1739
+ }
1740
+ return (_a = BaseForm.value) === null || _a === void 0 ? void 0 : _a.scrollToField.apply(_a, args);
1741
+ },
1742
+ clearValidate: function () {
1743
+ var _a;
1744
+ var args = [];
1745
+ for (var _i = 0; _i < arguments.length; _i++) {
1746
+ args[_i] = arguments[_i];
1747
+ }
1748
+ return (_a = BaseForm.value) === null || _a === void 0 ? void 0 : _a.clearValidate.apply(_a, args);
1749
+ }
1750
+ });
1751
+ return function (_ctx, _cache) {
1752
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElForm), {
1753
+ ref_key: "BaseForm",
1754
+ ref: BaseForm,
1755
+ model: __props.model,
1756
+ rules: __props.rules,
1757
+ inline: __props.inline,
1758
+ labelPosition: __props.labelPosition,
1759
+ labelWidth: __props.labelWidth,
1760
+ labelSuffix: __props.labelSuffix,
1761
+ hideRequiredAsterisk: __props.hideRequiredAsterisk,
1762
+ showMessage: __props.showMessage,
1763
+ inlineMessage: __props.inlineMessage,
1764
+ statusIcon: __props.statusIcon,
1765
+ validateOnRuleChange: __props.validateOnRuleChange,
1766
+ size: __props.size,
1767
+ disabled: __props.disabled
1768
+ }, {
1769
+ default: vue.withCtx(function () { return [
1770
+ vue.renderSlot(_ctx.$slots, "default")
1771
+ ]; }),
1772
+ _: 3 /* FORWARDED */
1773
+ }, 8 /* PROPS */, ["model", "rules", "inline", "labelPosition", "labelWidth", "labelSuffix", "hideRequiredAsterisk", "showMessage", "inlineMessage", "statusIcon", "validateOnRuleChange", "size", "disabled"]));
1774
+ };
1775
+ } }));
1776
+
1777
+ script$6.__file = "packages/base/form/form.vue";
1778
+
1779
+ var __default__$5 = {
1780
+ name: 'base-form-item'
1781
+ };
1782
+ var script$5 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$5), { props: {
1783
+ prop: { type: null, required: true },
1784
+ label: { type: String, required: false },
1785
+ labelWidth: { type: [String, Number], required: false, default: 'auto' },
1786
+ required: { type: Boolean, required: false },
1787
+ rules: { type: null, required: false },
1788
+ error: { type: String, required: false },
1789
+ showMessage: { type: Boolean, required: false, default: true },
1790
+ inlineMessage: { type: Boolean, required: false },
1791
+ size: { type: String, required: false }
1792
+ }, setup: function (__props, _a) {
1793
+ var _b, _c;
1794
+ var expose = _a.expose;
1795
+ var BaseFormItem = vue.ref(null);
1796
+ expose({
1797
+ resetField: (_b = BaseFormItem.value) === null || _b === void 0 ? void 0 : _b.resetField,
1798
+ clearValidate: (_c = BaseFormItem.value) === null || _c === void 0 ? void 0 : _c.clearValidate
1799
+ });
1800
+ return function (_ctx, _cache) {
1801
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElFormItem), {
1802
+ class: "base-form-item",
1803
+ ref_key: "BaseFormItem",
1804
+ ref: BaseFormItem,
1805
+ prop: __props.prop,
1806
+ label: __props.label,
1807
+ labelWidth: __props.labelWidth,
1808
+ required: __props.required,
1809
+ rules: __props.rules,
1810
+ error: __props.error,
1811
+ showMessage: __props.showMessage,
1812
+ inlineMessage: __props.inlineMessage,
1813
+ size: __props.size
1814
+ }, {
1815
+ default: vue.withCtx(function () { return [
1816
+ vue.renderSlot(_ctx.$slots, "default")
1817
+ ]; }),
1818
+ _: 3 /* FORWARDED */
1819
+ }, 8 /* PROPS */, ["prop", "label", "labelWidth", "required", "rules", "error", "showMessage", "inlineMessage", "size"]));
1820
+ };
1821
+ } }));
1822
+
1823
+ script$5.__scopeId = "data-v-17eda5db";
1824
+ script$5.__file = "packages/base/form/form-item.vue";
1825
+
1826
+ var BaseFormItem = script$5;
1827
+ var BaseForm = script$6;
1828
+
1829
+ var _hoisted_1$3 = { class: "xrk-search" };
1830
+ var __default__$4 = {
1831
+ name: 'xrk-search'
1832
+ };
1833
+ var script$4 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$4), { props: {
1834
+ columns: { type: null, required: true },
1835
+ searchBtn: { type: null, required: false, default: function () { return ({
1836
+ text: '搜索',
1837
+ show: true
1838
+ }); } },
1839
+ resetBtn: { type: null, required: false, default: function () { return ({
1840
+ text: '重置',
1841
+ show: true
1842
+ }); } },
1843
+ otherComponents: { type: null, required: false }
1844
+ }, emits: ["search"], setup: function (__props, _a) {
1845
+ var _this = this;
1846
+ var expose = _a.expose, emits = _a.emit;
1847
+ var _props = __props;
1848
+ var components = vue.ref({
1849
+ input: vue.shallowRef(script$d),
1850
+ select: vue.shallowRef(script$b),
1851
+ datePicker: vue.shallowRef(script$e)
1852
+ });
1853
+ var props = _props;
1854
+ var columnsToSearchValue = function (columns) {
1855
+ return columns.reduce(function (pre, _a) {
1856
+ var prop = _a.prop, defaultValue = _a.defaultValue;
1857
+ pre[prop] = defaultValue || '';
1858
+ return pre;
1859
+ }, {});
1860
+ };
1861
+ // 将 searchValue 传入 每个搜索项的监听事件
1862
+ var proxyColumnListener = function (listener) {
1863
+ return Object.keys(listener).reduce(function (pre, cur) {
1864
+ pre[cur] = function () {
1865
+ var args = [];
1866
+ for (var _i = 0; _i < arguments.length; _i++) {
1867
+ args[_i] = arguments[_i];
1868
+ }
1869
+ listener[cur].apply(listener, __spreadArray(__spreadArray([], args, false), [searchValue], false));
1870
+ };
1871
+ return pre;
1872
+ }, {});
1873
+ };
1874
+ var searchValue = vue.reactive(columnsToSearchValue(props.columns));
1875
+ var BaseSearchRender = vue.defineComponent({
1876
+ name: 'search-render',
1877
+ props: {
1878
+ render: Function
1879
+ },
1880
+ render: function (ctx) {
1881
+ return ctx.render
1882
+ ? ctx.render({ columns: props.columns, searchValue: searchValue })
1883
+ : '';
1884
+ }
1885
+ });
1886
+ var handleSearchClick = function () { return __awaiter(_this, void 0, void 0, function () {
1887
+ var _searchValue;
1888
+ var _a, _b, _c, _d, _e, _f;
1889
+ return __generator(this, function (_g) {
1890
+ switch (_g.label) {
1891
+ case 0:
1892
+ _searchValue = xrkTools.base.deepClone(searchValue);
1893
+ if (!isFunction((_a = props.searchBtn) === null || _a === void 0 ? void 0 : _a.beforeSearch)) return [3 /*break*/, 2];
1894
+ return [4 /*yield*/, ((_c = (_b = props.searchBtn) === null || _b === void 0 ? void 0 : _b.beforeSearch) === null || _c === void 0 ? void 0 : _c.call(_b, _searchValue))];
1895
+ case 1:
1896
+ _searchValue = _g.sent();
1897
+ _g.label = 2;
1898
+ case 2:
1899
+ emits('search', _searchValue);
1900
+ if (!isFunction((_d = props.searchBtn) === null || _d === void 0 ? void 0 : _d.afterSearch)) return [3 /*break*/, 4];
1901
+ return [4 /*yield*/, ((_f = (_e = props.searchBtn) === null || _e === void 0 ? void 0 : _e.afterSearch) === null || _f === void 0 ? void 0 : _f.call(_e, _searchValue))];
1902
+ case 3:
1903
+ _g.sent();
1904
+ _g.label = 4;
1905
+ case 4: return [2 /*return*/];
1906
+ }
1907
+ });
1908
+ }); };
1909
+ var handleResetClick = function () { return __awaiter(_this, void 0, void 0, function () {
1910
+ var _searchValue;
1911
+ var _a, _b, _c, _d, _e, _f;
1912
+ return __generator(this, function (_g) {
1913
+ switch (_g.label) {
1914
+ case 0:
1915
+ Object.keys(searchValue).forEach(function (searchKey) { return (searchValue[searchKey] = null); });
1916
+ _searchValue = xrkTools.base.deepClone(searchValue);
1917
+ if (!isFunction((_a = props.resetBtn) === null || _a === void 0 ? void 0 : _a.beforeReset)) return [3 /*break*/, 2];
1918
+ return [4 /*yield*/, ((_c = (_b = props.resetBtn) === null || _b === void 0 ? void 0 : _b.beforeReset) === null || _c === void 0 ? void 0 : _c.call(_b, _searchValue))];
1919
+ case 1:
1920
+ _searchValue = _g.sent();
1921
+ _g.label = 2;
1922
+ case 2:
1923
+ emits('search', _searchValue);
1924
+ if (!isFunction((_d = props.resetBtn) === null || _d === void 0 ? void 0 : _d.afterReset)) return [3 /*break*/, 4];
1925
+ return [4 /*yield*/, ((_f = (_e = props.resetBtn) === null || _e === void 0 ? void 0 : _e.afterReset) === null || _f === void 0 ? void 0 : _f.call(_e, _searchValue))];
1926
+ case 3:
1927
+ _g.sent();
1928
+ _g.label = 4;
1929
+ case 4: return [2 /*return*/];
1930
+ }
1931
+ });
1932
+ }); };
1933
+ expose({
1934
+ getSearchValue: function () {
1935
+ return xrkTools.base.deepClone(searchValue);
1936
+ },
1937
+ setSearchValue: function (key, value) {
1938
+ if (props.columns.findIndex(function (_a) {
1939
+ var prop = _a.prop;
1940
+ return prop == key;
1941
+ }) == -1) {
1942
+ console.warn("\u539F\u59CBsearch\u914D\u7F6E\u9879\u4E0D\u5B58\u5728".concat(key, "\u5C5E\u6027\uFF0C\u5EFA\u8BAE\u4FEE\u6539"));
1943
+ }
1944
+ searchValue[key] = value;
1945
+ },
1946
+ handleSearchClick: handleSearchClick,
1947
+ handleResetClick: handleResetClick
1948
+ });
1949
+ return function (_ctx, _cache) {
1950
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
1951
+ vue.createVNode(script$6, { model: searchValue }, {
1952
+ default: vue.withCtx(function () { return [
1953
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.columns, function (_a) {
1954
+ var style = _a.style, label = _a.label, prop = _a.prop, type = _a.type, disabled = _a.disabled, config = _a.config, listener = _a.listener;
1955
+ return (vue.openBlock(), vue.createBlock(script$5, {
1956
+ prop: prop,
1957
+ label: label,
1958
+ key: prop
1959
+ }, {
1960
+ default: vue.withCtx(function () { return [
1961
+ type
1962
+ ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(components.value[type]), vue.mergeProps({
1963
+ key: 0,
1964
+ style: style
1965
+ }, __assign(__assign({}, config), proxyColumnListener(listener || {})), {
1966
+ disabled: vue.unref(isFunction)(disabled) ? disabled(searchValue) : disabled,
1967
+ modelValue: searchValue[prop],
1968
+ "onUpdate:modelValue": function ($event) { return ((searchValue[prop]) = $event); }
1969
+ }), null, 16 /* FULL_PROPS */, ["style", "disabled", "modelValue", "onUpdate:modelValue"]))
1970
+ : vue.createCommentVNode("v-if", true)
1971
+ ]; }),
1972
+ _: 2 /* DYNAMIC */
1973
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["prop", "label"]));
1974
+ }), 128 /* KEYED_FRAGMENT */)),
1975
+ (__props.searchBtn.show)
1976
+ ? (vue.openBlock(), vue.createBlock(script$l, {
1977
+ key: 0,
1978
+ click: handleSearchClick
1979
+ }, {
1980
+ default: vue.withCtx(function () { return [
1981
+ vue.createTextVNode(vue.toDisplayString(__props.searchBtn.text), 1 /* TEXT */)
1982
+ ]; }),
1983
+ _: 1 /* STABLE */
1984
+ }))
1985
+ : vue.createCommentVNode("v-if", true),
1986
+ (__props.resetBtn.show)
1987
+ ? (vue.openBlock(), vue.createBlock(script$l, {
1988
+ key: 1,
1989
+ plain: true,
1990
+ click: handleResetClick
1991
+ }, {
1992
+ default: vue.withCtx(function () { return [
1993
+ vue.createTextVNode(vue.toDisplayString(__props.resetBtn.text), 1 /* TEXT */)
1994
+ ]; }),
1995
+ _: 1 /* STABLE */
1996
+ }))
1997
+ : vue.createCommentVNode("v-if", true),
1998
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.otherComponents, function (_a, index) {
1999
+ var render = _a.render;
2000
+ return (vue.openBlock(), vue.createBlock(vue.unref(BaseSearchRender), {
2001
+ render: render,
2002
+ key: index
2003
+ }, null, 8 /* PROPS */, ["render"]));
2004
+ }), 128 /* KEYED_FRAGMENT */))
2005
+ ]; }),
2006
+ _: 1 /* STABLE */
2007
+ }, 8 /* PROPS */, ["model"])
2008
+ ]));
2009
+ };
2010
+ } }));
2011
+
2012
+ script$4.__scopeId = "data-v-a1781a06";
2013
+ script$4.__file = "packages/xrk/search/search.vue";
2014
+
2015
+ var XrkSearch = script$4;
2016
+
2017
+ /*
2018
+ * @Description:
2019
+ * @Date: 2022-03-14 19:18:12
2020
+ */
2021
+ var useTableSetup = function () {
2022
+ var info = vue.reactive({
2023
+ selectionRows: new Map()
2024
+ });
2025
+ return {
2026
+ selectionRows: info.selectionRows,
2027
+ hasSelectionRow: function (rowId) {
2028
+ return info.selectionRows.has(rowId);
2029
+ },
2030
+ addSelectionRow: function (rowId, row) {
2031
+ info.selectionRows.set(rowId, row);
2032
+ },
2033
+ removeSelectionRow: function (rowId) {
2034
+ info.selectionRows.delete(rowId);
2035
+ },
2036
+ getSelectionRows: function () {
2037
+ var arr = [];
2038
+ info.selectionRows.forEach(function (value) {
2039
+ arr.push(value);
2040
+ });
2041
+ return arr;
2042
+ },
2043
+ clearSelectionRows: function () {
2044
+ info.selectionRows.clear();
2045
+ }
2046
+ };
2047
+ };
2048
+
2049
+ var __default__$3 = {
2050
+ name: 'base-table'
2051
+ };
2052
+ var script$3 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$3), { props: {
2053
+ data: { type: Array, required: true },
2054
+ columns: { type: null, required: true },
2055
+ height: { type: [String, Number], required: false },
2056
+ maxHeight: { type: [String, Number], required: false },
2057
+ stripe: { type: Boolean, required: false },
2058
+ border: { type: Boolean, required: false, default: true },
2059
+ size: { type: String, required: false },
2060
+ fit: { type: Boolean, required: false, default: true },
2061
+ rowClassName: { type: null, required: false },
2062
+ rowStyle: { type: null, required: false },
2063
+ cellClassName: { type: null, required: false },
2064
+ cellStyle: { type: null, required: false },
2065
+ headerRowClassName: { type: null, required: false },
2066
+ headerRowStyle: { type: null, required: false },
2067
+ headerCellClassName: { type: null, required: false },
2068
+ headerCellStyle: { type: null, required: false },
2069
+ rowKey: { type: [Function, String], required: false },
2070
+ defaultExpandAll: { type: Boolean, required: false },
2071
+ expandRowKeys: { type: Array, required: false },
2072
+ emptyText: { type: String, required: false, default: '暂无数据' },
2073
+ defaultSort: { type: Object, required: false }
2074
+ }, emits: ["sort-change", "select", "select-all"], setup: function (__props, _a) {
2075
+ var expose = _a.expose, emits = _a.emit;
2076
+ var _b = useTableSetup(), selectionRows = _b.selectionRows, getSelectionRows = _b.getSelectionRows, addSelectionRow = _b.addSelectionRow, removeSelectionRow = _b.removeSelectionRow, clearSelectionRows = _b.clearSelectionRows;
2077
+ var handleSortChange = function (info) {
2078
+ emits('sort-change', info);
2079
+ };
2080
+ var handleColumnSelect = function (selection, row) {
2081
+ emits('select', selection, row);
2082
+ };
2083
+ var handleColumnSelectAll = function (selection) {
2084
+ emits('select-all', selection);
2085
+ };
2086
+ expose({
2087
+ getSelectionRows: getSelectionRows,
2088
+ addSelectionRow: addSelectionRow,
2089
+ removeSelectionRow: removeSelectionRow,
2090
+ clearSelectionRows: clearSelectionRows
2091
+ });
2092
+ return function (_ctx, _cache) {
2093
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElTable), {
2094
+ class: "base-table",
2095
+ data: __props.data,
2096
+ height: __props.height,
2097
+ maxHeight: __props.maxHeight,
2098
+ stripe: __props.stripe,
2099
+ border: __props.border,
2100
+ size: __props.size,
2101
+ fit: __props.fit,
2102
+ rowClassName: __props.rowClassName,
2103
+ rowStyle: __props.rowStyle,
2104
+ cellClassName: __props.cellClassName,
2105
+ cellStyle: __props.cellStyle,
2106
+ headerRowClassName: __props.headerRowClassName,
2107
+ headerRowStyle: __props.headerRowStyle,
2108
+ rowKey: __props.rowKey,
2109
+ defaultExpandAll: __props.defaultExpandAll,
2110
+ expandRowKeys: __props.expandRowKeys,
2111
+ defaultSort: __props.defaultSort,
2112
+ emptyText: __props.emptyText,
2113
+ onSortChange: handleSortChange
2114
+ }, {
2115
+ empty: vue.withCtx(function () { return [
2116
+ vue.renderSlot(_ctx.$slots, "empty")
2117
+ ]; }),
2118
+ default: vue.withCtx(function () { return [
2119
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.columns, function (column) {
2120
+ return (vue.openBlock(), vue.createBlock(vue.unref(BaseTableColumn), vue.mergeProps({
2121
+ key: column.prop,
2122
+ pageAllData: __props.data,
2123
+ selectionRows: vue.unref(selectionRows),
2124
+ getSelectionRows: vue.unref(getSelectionRows),
2125
+ addSelectionRow: vue.unref(addSelectionRow),
2126
+ removeSelectionRow: vue.unref(removeSelectionRow),
2127
+ clearSelectionRows: vue.unref(clearSelectionRows)
2128
+ }, column, {
2129
+ onSelect: handleColumnSelect,
2130
+ onSelectAll: handleColumnSelectAll
2131
+ }), null, 16 /* FULL_PROPS */, ["pageAllData", "selectionRows", "getSelectionRows", "addSelectionRow", "removeSelectionRow", "clearSelectionRows"]));
2132
+ }), 128 /* KEYED_FRAGMENT */))
2133
+ ]; }),
2134
+ _: 3 /* FORWARDED */
2135
+ }, 8 /* PROPS */, ["data", "height", "maxHeight", "stripe", "border", "size", "fit", "rowClassName", "rowStyle", "cellClassName", "cellStyle", "headerRowClassName", "headerRowStyle", "rowKey", "defaultExpandAll", "expandRowKeys", "defaultSort", "emptyText"]));
2136
+ };
2137
+ } }));
2138
+
2139
+ script$3.__scopeId = "data-v-968a9a5a";
2140
+ script$3.__file = "packages/base/table/table.vue";
2141
+
2142
+ var _hoisted_1$2 = ["onClick"];
2143
+ var _hoisted_2$2 = {
2144
+ key: 2,
2145
+ class: "base-table-column"
2146
+ };
2147
+ var __default__$2 = {
2148
+ name: 'base-table-column'
2149
+ };
2150
+ var script$2 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$2), { props: {
2151
+ pageAllData: { type: Array, required: false },
2152
+ prop: { type: String, required: false },
2153
+ type: { type: String, required: false },
2154
+ index: { type: [Number, Function], required: false },
2155
+ label: { type: String, required: false },
2156
+ columnKey: { type: String, required: false },
2157
+ width: { type: [String, Number], required: false },
2158
+ minWidth: { type: [String, Number], required: false },
2159
+ fixed: { type: [Boolean, String], required: false },
2160
+ sortable: { type: [Boolean, String], required: false },
2161
+ sortMethod: { type: Function, required: false },
2162
+ sortBy: { type: [Array, String, Function], required: false },
2163
+ sortOrders: { type: Array, required: false },
2164
+ showOverflowTooltip: { type: Boolean, required: false, default: true },
2165
+ align: { type: String, required: false, default: 'center' },
2166
+ headerAlign: { type: String, required: false },
2167
+ className: { type: String, required: false },
2168
+ labelClassName: { type: String, required: false },
2169
+ textLineClamp: { type: Number, required: false, default: 1 },
2170
+ renderHeader: { type: Function, required: false },
2171
+ formatter: { type: Function, required: false },
2172
+ render: { type: Function, required: false },
2173
+ selectionDisabled: { type: [Function, Boolean], required: false },
2174
+ selectionRows: { type: null, required: false },
2175
+ hasSelectionRow: { type: Function, required: false },
2176
+ addSelectionRow: { type: Function, required: false },
2177
+ removeSelectionRow: { type: Function, required: false },
2178
+ getSelectionRows: { type: Function, required: false },
2179
+ clearSelectionRows: { type: Function, required: false },
2180
+ selectionAllBefore: { type: Function, required: false },
2181
+ selectionAddBefore: { type: Function, required: false },
2182
+ selectionAddAfter: { type: Function, required: false },
2183
+ selectionRemoveBefore: { type: Function, required: false },
2184
+ selectionRemoveAfter: { type: Function, required: false }
2185
+ }, emits: ["select", "select-all"], setup: function (__props, _a) {
2186
+ var _this = this;
2187
+ var emits = _a.emit;
2188
+ var _props = __props;
2189
+ var vLoading = ElementPlus.vLoading;
2190
+ var props = _props;
2191
+ var _selectionAllLoading = vue.ref(false);
2192
+ var BaseTableColumnHeaderRender = vue.defineComponent({
2193
+ name: 'table-column-header-render',
2194
+ props: ['column', 'index'],
2195
+ render: function (params) {
2196
+ return props.renderHeader
2197
+ ? props.renderHeader(props.type == '_selection'
2198
+ ? {
2199
+ column: params.column,
2200
+ index: params.index,
2201
+ selectionInfo: {
2202
+ toggleCheckAll: handleCheckboxAllClick,
2203
+ checkboxAllChecked: checkboxAllChecked,
2204
+ checkboxAllIndeterminate: checkboxAllIndeterminate,
2205
+ selectionAllLoading: _selectionAllLoading
2206
+ }
2207
+ }
2208
+ : { column: params.column, index: params.index })
2209
+ : '';
2210
+ }
2211
+ });
2212
+ var BaseTableColumnContentRender = vue.defineComponent({
2213
+ name: 'table-column-content-render',
2214
+ props: ['column', 'cellValue', 'row', 'index'],
2215
+ render: function (params) {
2216
+ return props.render
2217
+ ? props.render({
2218
+ column: params.column,
2219
+ index: params.index,
2220
+ cellValue: params.cellValue,
2221
+ row: params.row
2222
+ })
2223
+ : '';
2224
+ }
2225
+ });
2226
+ var _selectionDisabled = function (row) {
2227
+ var _a;
2228
+ if (isFunction(props.selectionDisabled)) {
2229
+ var status_1 = (_a = props === null || props === void 0 ? void 0 : props.selectionDisabled) === null || _a === void 0 ? void 0 : _a.call(props, row);
2230
+ // if (status && props.prop && selectionRows?.has(row[props.prop])) {
2231
+ // console.log(row[props.prop], row, '已被禁用,无法设置选中');
2232
+ // removeSelectionRow?.(row[props.prop]);
2233
+ // }
2234
+ return status_1;
2235
+ }
2236
+ else {
2237
+ return props.selectionDisabled;
2238
+ }
2239
+ };
2240
+ var getColumnValue = function (row, index, column) {
2241
+ if (props.type == 'index')
2242
+ return "".concat(index + 1);
2243
+ if (props.formatter) {
2244
+ return props.formatter({
2245
+ row: row,
2246
+ column: column,
2247
+ cellValue: props.prop && row[props.prop],
2248
+ index: index
2249
+ });
2250
+ }
2251
+ return props.prop && row[props.prop];
2252
+ };
2253
+ var selectionRows = props.selectionRows, addSelectionRow = props.addSelectionRow, removeSelectionRow = props.removeSelectionRow, getSelectionRows = props.getSelectionRows;
2254
+ var checked = vue.computed(function () {
2255
+ return function (row) {
2256
+ return props.prop && (selectionRows === null || selectionRows === void 0 ? void 0 : selectionRows.has(row[props.prop]));
2257
+ };
2258
+ });
2259
+ var filterPageAllData = vue.computed(function () {
2260
+ return Array.isArray(props.pageAllData)
2261
+ ? props.pageAllData.filter(function (row) { return !_selectionDisabled(row); })
2262
+ : [];
2263
+ });
2264
+ var checkboxAllChecked = vue.computed(function () {
2265
+ return (filterPageAllData.value.length > 0 &&
2266
+ filterPageAllData.value.every(function (row) {
2267
+ return props.prop && row[props.prop] && (selectionRows === null || selectionRows === void 0 ? void 0 : selectionRows.has(row[props.prop]));
2268
+ }));
2269
+ });
2270
+ var checkboxAllIndeterminate = vue.computed(function () {
2271
+ return (filterPageAllData.value.length > 0 &&
2272
+ !checkboxAllChecked.value &&
2273
+ filterPageAllData.value.some(function (row) {
2274
+ return props.prop && row[props.prop] && (selectionRows === null || selectionRows === void 0 ? void 0 : selectionRows.has(row[props.prop]));
2275
+ }));
2276
+ });
2277
+ var handleCheckboxAllClick = function () { return __awaiter(_this, void 0, void 0, function () {
2278
+ var fn;
2279
+ return __generator(this, function (_a) {
2280
+ switch (_a.label) {
2281
+ case 0:
2282
+ if (!Array.isArray(props.pageAllData)) return [3 /*break*/, 7];
2283
+ if (_selectionAllLoading.value)
2284
+ return [2 /*return*/];
2285
+ fn = function () {
2286
+ if (checkboxAllChecked.value) {
2287
+ // 已经选择全部
2288
+ filterPageAllData.value.forEach(function (row) {
2289
+ props.prop && (removeSelectionRow === null || removeSelectionRow === void 0 ? void 0 : removeSelectionRow(row[props.prop]));
2290
+ });
2291
+ }
2292
+ else {
2293
+ filterPageAllData.value.forEach(function (row) {
2294
+ props.prop && (addSelectionRow === null || addSelectionRow === void 0 ? void 0 : addSelectionRow(row[props.prop], row));
2295
+ });
2296
+ }
2297
+ };
2298
+ _a.label = 1;
2299
+ case 1:
2300
+ _a.trys.push([1, 5, , 6]);
2301
+ _selectionAllLoading.value = true;
2302
+ if (!isFunction(props.selectionAllBefore)) return [3 /*break*/, 3];
2303
+ return [4 /*yield*/, props.selectionAllBefore(fn)];
2304
+ case 2:
2305
+ _a.sent();
2306
+ return [3 /*break*/, 4];
2307
+ case 3:
2308
+ fn();
2309
+ _a.label = 4;
2310
+ case 4: return [3 /*break*/, 6];
2311
+ case 5:
2312
+ _a.sent();
2313
+ return [3 /*break*/, 6];
2314
+ case 6:
2315
+ _selectionAllLoading.value = false;
2316
+ _a.label = 7;
2317
+ case 7:
2318
+ emits('select-all', getSelectionRows === null || getSelectionRows === void 0 ? void 0 : getSelectionRows());
2319
+ return [2 /*return*/];
2320
+ }
2321
+ });
2322
+ }); };
2323
+ var handleCheckboxClick = function (row) { return __awaiter(_this, void 0, void 0, function () {
2324
+ var _a, _b;
2325
+ return __generator(this, function (_c) {
2326
+ switch (_c.label) {
2327
+ case 0:
2328
+ if (_selectionDisabled(row) || row._selectionLoading)
2329
+ return [2 /*return*/];
2330
+ if (!props.prop) return [3 /*break*/, 15];
2331
+ row._selectionLoading = true;
2332
+ _c.label = 1;
2333
+ case 1:
2334
+ _c.trys.push([1, 14, , 15]);
2335
+ if (!(selectionRows === null || selectionRows === void 0 ? void 0 : selectionRows.has(row[props.prop]))) return [3 /*break*/, 7];
2336
+ if (!isFunction(props.selectionRemoveBefore)) return [3 /*break*/, 3];
2337
+ return [4 /*yield*/, props.selectionRemoveBefore(row, removeSelectionRow
2338
+ ? removeSelectionRow.bind(null, row[props.prop])
2339
+ : function () { })];
2340
+ case 2:
2341
+ _c.sent();
2342
+ return [3 /*break*/, 4];
2343
+ case 3:
2344
+ removeSelectionRow === null || removeSelectionRow === void 0 ? void 0 : removeSelectionRow(row[props.prop]);
2345
+ _c.label = 4;
2346
+ case 4:
2347
+ row._selectionLoading = false;
2348
+ _a = isFunction(props.selectionRemoveAfter);
2349
+ if (!_a) return [3 /*break*/, 6];
2350
+ return [4 /*yield*/, props.selectionRemoveAfter(row)];
2351
+ case 5:
2352
+ _a = (_c.sent());
2353
+ _c.label = 6;
2354
+ case 6:
2355
+ return [3 /*break*/, 13];
2356
+ case 7:
2357
+ if (!isFunction(props.selectionAddBefore)) return [3 /*break*/, 9];
2358
+ return [4 /*yield*/, props.selectionAddBefore(row, addSelectionRow
2359
+ ? addSelectionRow.bind(null, row[props.prop], row)
2360
+ : function () { })];
2361
+ case 8:
2362
+ _c.sent();
2363
+ return [3 /*break*/, 10];
2364
+ case 9:
2365
+ addSelectionRow === null || addSelectionRow === void 0 ? void 0 : addSelectionRow(row[props.prop], row);
2366
+ _c.label = 10;
2367
+ case 10:
2368
+ row._selectionLoading = false;
2369
+ _b = isFunction(props.selectionAddAfter);
2370
+ if (!_b) return [3 /*break*/, 12];
2371
+ return [4 /*yield*/, props.selectionAddAfter(row)];
2372
+ case 11:
2373
+ _b = (_c.sent());
2374
+ _c.label = 12;
2375
+ case 12:
2376
+ _c.label = 13;
2377
+ case 13:
2378
+ emits('select', getSelectionRows === null || getSelectionRows === void 0 ? void 0 : getSelectionRows(), row);
2379
+ return [3 /*break*/, 15];
2380
+ case 14:
2381
+ _c.sent();
2382
+ row._selectionLoading = false;
2383
+ return [3 /*break*/, 15];
2384
+ case 15: return [2 /*return*/];
2385
+ }
2386
+ });
2387
+ }); };
2388
+ return function (_ctx, _cache) {
2389
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElTableColumn), {
2390
+ prop: __props.prop,
2391
+ type: __props.type,
2392
+ index: __props.index,
2393
+ label: __props.label,
2394
+ columnKey: __props.columnKey,
2395
+ width: __props.width,
2396
+ minWidth: __props.minWidth,
2397
+ fixed: __props.fixed,
2398
+ sortable: __props.sortable,
2399
+ sortMethod: __props.sortMethod,
2400
+ sortBy: __props.sortBy,
2401
+ sortOrders: __props.sortOrders,
2402
+ align: __props.align,
2403
+ headerAlign: __props.headerAlign,
2404
+ className: __props.className,
2405
+ labelClassName: __props.labelClassName,
2406
+ textLineClamp: __props.textLineClamp
2407
+ }, vue.createSlots({
2408
+ default: vue.withCtx(function (_a) {
2409
+ var row = _a.row, column = _a.column, $index = _a.$index;
2410
+ return [
2411
+ (__props.render)
2412
+ ? (vue.openBlock(), vue.createBlock(vue.unref(BaseTableColumnContentRender), {
2413
+ key: 0,
2414
+ row: row,
2415
+ column: column,
2416
+ cellValue: __props.prop ? row[__props.prop] : '',
2417
+ index: $index
2418
+ }, null, 8 /* PROPS */, ["row", "column", "cellValue", "index"]))
2419
+ : (__props.type == '_selection')
2420
+ ? (vue.openBlock(), vue.createElementBlock("div", {
2421
+ key: 1,
2422
+ style: { "display": "inline-block" },
2423
+ onClick: vue.withModifiers(function ($event) { return (handleCheckboxClick(row)); }, ["prevent"])
2424
+ }, [
2425
+ vue.withDirectives(vue.createVNode(vue.unref(BaseCheckbox), {
2426
+ class: "table-base-checkbox",
2427
+ "model-value": vue.unref(checked)(row),
2428
+ disabled: _selectionDisabled(row)
2429
+ }, null, 8 /* PROPS */, ["model-value", "disabled"]), [
2430
+ [vue.unref(vLoading), row._selectionLoading]
2431
+ ])
2432
+ ], 8 /* PROPS */, _hoisted_1$2))
2433
+ : (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
2434
+ vue.createVNode(vue.unref(BaseToolTip), {
2435
+ content: getColumnValue(row, $index, column),
2436
+ hideAfter: 0,
2437
+ enterable: false,
2438
+ transition: "none",
2439
+ overShow: __props.showOverflowTooltip,
2440
+ style: vue.normalizeStyle({ '-webkit-line-clamp': __props.textLineClamp || 1 })
2441
+ }, {
2442
+ default: vue.withCtx(function () { return [
2443
+ vue.createTextVNode(vue.toDisplayString(getColumnValue(row, $index, column)), 1 /* TEXT */)
2444
+ ]; }),
2445
+ _: 2 /* DYNAMIC */
2446
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["content", "overShow", "style"])
2447
+ ]))
2448
+ ];
2449
+ }),
2450
+ _: 2 /* DYNAMIC */
2451
+ }, [
2452
+ (__props.renderHeader)
2453
+ ? {
2454
+ name: "header",
2455
+ fn: vue.withCtx(function (_a) {
2456
+ var column = _a.column, $index = _a.$index;
2457
+ return [
2458
+ vue.createVNode(vue.unref(BaseTableColumnHeaderRender), {
2459
+ index: $index,
2460
+ column: column
2461
+ }, null, 8 /* PROPS */, ["index", "column"])
2462
+ ];
2463
+ })
2464
+ }
2465
+ : (__props.type == '_selection')
2466
+ ? {
2467
+ name: "header",
2468
+ fn: vue.withCtx(function () { return [
2469
+ vue.withDirectives((vue.openBlock(), vue.createBlock(vue.unref(BaseCheckbox), {
2470
+ class: "table-base-checkbox",
2471
+ onClick: vue.withModifiers(handleCheckboxAllClick, ["prevent"]),
2472
+ "model-value": vue.unref(checkboxAllChecked),
2473
+ indeterminate: vue.unref(checkboxAllIndeterminate)
2474
+ }, {
2475
+ default: vue.withCtx(function () { return [
2476
+ vue.createTextVNode(vue.toDisplayString(vue.unref(selectionRows).size > 0 ? "\u5DF2\u9009".concat(vue.unref(selectionRows).size, "\u9879") : ''), 1 /* TEXT */)
2477
+ ]; }),
2478
+ _: 1 /* STABLE */
2479
+ }, 8 /* PROPS */, ["onClick", "model-value", "indeterminate"])), [
2480
+ [vue.unref(vLoading), _selectionAllLoading.value]
2481
+ ])
2482
+ ]; })
2483
+ }
2484
+ : undefined
2485
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["prop", "type", "index", "label", "columnKey", "width", "minWidth", "fixed", "sortable", "sortMethod", "sortBy", "sortOrders", "align", "headerAlign", "className", "labelClassName", "textLineClamp"]));
2486
+ };
2487
+ } }));
2488
+
2489
+ script$2.__scopeId = "data-v-2a64ae40";
2490
+ script$2.__file = "packages/base/table/table-column.vue";
2491
+
2492
+ var useTableColumn$1 = function (props) {
2493
+ return __assign({ minWidth: '120px', width: props.type === 'index' ? '90px' : '' }, props);
2494
+ };
2495
+
2496
+ var BaseTable = script$3;
2497
+ var BaseTableColumn = script$2;
2498
+ var useTableColumn = useTableColumn$1;
2499
+
2500
+ var useTable = function (config) {
2501
+ var pageIsLoading = vue.ref(false);
2502
+ var pageAllData = vue.ref([]);
2503
+ var paginationTotal = vue.ref(0);
2504
+ var getList = function (query) { return __awaiter(void 0, void 0, void 0, function () {
2505
+ var res, error_1;
2506
+ return __generator(this, function (_a) {
2507
+ switch (_a.label) {
2508
+ case 0:
2509
+ if (pageIsLoading.value)
2510
+ return [2 /*return*/];
2511
+ pageIsLoading.value = true;
2512
+ _a.label = 1;
2513
+ case 1:
2514
+ _a.trys.push([1, 4, , 5]);
2515
+ if (!isFunction(config.getListAjax)) return [3 /*break*/, 3];
2516
+ return [4 /*yield*/, config.getListAjax(query)];
2517
+ case 2:
2518
+ res = _a.sent();
2519
+ pageAllData.value = res.data.list;
2520
+ paginationTotal.value = res.data.total;
2521
+ _a.label = 3;
2522
+ case 3: return [3 /*break*/, 5];
2523
+ case 4:
2524
+ error_1 = _a.sent();
2525
+ console.warn(error_1);
2526
+ return [3 /*break*/, 5];
2527
+ case 5:
2528
+ pageIsLoading.value = false;
2529
+ return [2 /*return*/];
2530
+ }
2531
+ });
2532
+ }); };
2533
+ return {
2534
+ pageIsLoading: pageIsLoading,
2535
+ pageAllData: pageAllData,
2536
+ paginationTotal: paginationTotal,
2537
+ getList: getList
2538
+ };
2539
+ };
2540
+
2541
+ var _hoisted_1$1 = { class: "slot-before slot" };
2542
+ var _hoisted_2$1 = { class: "slot-after slot" };
2543
+ var __default__$1 = {
2544
+ name: 'xrk-table'
2545
+ };
2546
+ var script$1 = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__$1), { props: {
2547
+ requestNow: { type: Boolean, required: false, default: true },
2548
+ getListAjax: { type: Function, required: true },
2549
+ searchConfig: { type: Object, required: true },
2550
+ tableConfig: { type: Object, required: true },
2551
+ paginationConfig: { type: Object, required: false }
2552
+ }, setup: function (__props, _a) {
2553
+ var _b;
2554
+ var _c, _d;
2555
+ var expose = _a.expose;
2556
+ var _props = __props;
2557
+ var props = _props;
2558
+ var vLoading = ElementPlus.vLoading;
2559
+ var paginationConfig = vue.computed(function () { return (__assign({ pageNoKey: 'pageNo', pageSizeKey: 'pageSize', paginationPageSize: 60, paginationCurrentPage: 1 }, (props.paginationConfig || {}))); });
2560
+ var TableSelectionRows = vue.ref([]);
2561
+ var XrkSearchRef = vue.ref(null);
2562
+ var XrkTablebaseTableRef = vue.ref(null);
2563
+ var BasePaginationRef = vue.ref(null);
2564
+ var pageNoKey = paginationConfig.value.pageNoKey;
2565
+ var pageSizeKey = paginationConfig.value.pageSizeKey;
2566
+ var paginationQuery = vue.ref((_b = {},
2567
+ _b[pageNoKey] = (_c = paginationConfig.value) === null || _c === void 0 ? void 0 : _c.paginationCurrentPage,
2568
+ _b[pageSizeKey] = (_d = paginationConfig.value) === null || _d === void 0 ? void 0 : _d.paginationPageSize,
2569
+ _b));
2570
+ var searchQuery = vue.ref({});
2571
+ var query = vue.computed(function () { return (__assign(__assign({}, paginationQuery.value), searchQuery.value)); });
2572
+ var initSearchQuery = function () {
2573
+ var _a, _b;
2574
+ var searchQueryDefault = ((_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.getSearchValue) === null || _b === void 0 ? void 0 : _b.call(_a)) || {};
2575
+ searchQuery.value = searchQueryDefault;
2576
+ };
2577
+ var initPageInfo = function (pageNo) {
2578
+ var _a;
2579
+ if (pageNo === void 0) { pageNo = 1; }
2580
+ (_a = BasePaginationRef.value) === null || _a === void 0 ? void 0 : _a.setPageInfo({
2581
+ pageSize: paginationQuery.value[pageSizeKey],
2582
+ currentPage: pageNo
2583
+ });
2584
+ paginationQuery.value[pageNoKey] = pageNo;
2585
+ };
2586
+ var clearSelectionRows = function () {
2587
+ var _a, _b;
2588
+ (_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.clearSelectionRows) === null || _b === void 0 ? void 0 : _b.call(_a);
2589
+ TableSelectionRows.value = [];
2590
+ };
2591
+ var handleSearch = function (searchValue) {
2592
+ searchQuery.value = xrkTools.base.deepClone(searchValue);
2593
+ initPageInfo(1);
2594
+ clearSelectionRows();
2595
+ getList === null || getList === void 0 ? void 0 : getList(query.value);
2596
+ };
2597
+ var handlePageChange = function () {
2598
+ var _a;
2599
+ var _b, _c;
2600
+ var pageInfo = (_c = (_b = BasePaginationRef.value) === null || _b === void 0 ? void 0 : _b.getPageInfo) === null || _c === void 0 ? void 0 : _c.call(_b);
2601
+ paginationQuery.value = (_a = {},
2602
+ _a[pageNoKey] = pageInfo.currentPage,
2603
+ _a[pageSizeKey] = pageInfo.pageSize,
2604
+ _a);
2605
+ getList === null || getList === void 0 ? void 0 : getList(query.value);
2606
+ };
2607
+ var handleTableSelect = function () {
2608
+ var _a, _b;
2609
+ var res = (_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.getSelectionRows) === null || _b === void 0 ? void 0 : _b.call(_a);
2610
+ TableSelectionRows.value = Array.isArray(res) ? res : [];
2611
+ };
2612
+ var _e = useTable({
2613
+ getListAjax: props.getListAjax
2614
+ }), pageAllData = _e.pageAllData, getList = _e.getList, paginationTotal = _e.paginationTotal, pageIsLoading = _e.pageIsLoading;
2615
+ vue.onMounted(function () {
2616
+ initSearchQuery();
2617
+ clearSelectionRows();
2618
+ props.requestNow && (getList === null || getList === void 0 ? void 0 : getList(query.value));
2619
+ });
2620
+ expose({
2621
+ getSelectionRows: function () { var _a, _b; return (_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.getSelectionRows) === null || _b === void 0 ? void 0 : _b.call(_a); },
2622
+ addSelectionRow: function (rowId, row) { var _a, _b; return (_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.addSelectionRow) === null || _b === void 0 ? void 0 : _b.call(_a, rowId, row); },
2623
+ removeSelectionRow: function (rowId) { var _a, _b; return (_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.removeSelectionRow) === null || _b === void 0 ? void 0 : _b.call(_a, rowId); },
2624
+ clearSelectionRows: function () { var _a, _b; return (_b = (_a = XrkTablebaseTableRef.value) === null || _a === void 0 ? void 0 : _a.clearSelectionRows) === null || _b === void 0 ? void 0 : _b.call(_a); },
2625
+ setSearchValue: function (key, value) { var _a, _b; return (_b = (_a = XrkSearchRef.value) === null || _a === void 0 ? void 0 : _a.setSearchValue) === null || _b === void 0 ? void 0 : _b.call(_a, key, value); },
2626
+ initCurrentList: function (customQuery) {
2627
+ initSearchQuery();
2628
+ getList === null || getList === void 0 ? void 0 : getList(__assign(__assign({}, (customQuery || {})), query.value));
2629
+ },
2630
+ initList: function (customQuery) {
2631
+ initSearchQuery();
2632
+ initPageInfo(1);
2633
+ getList === null || getList === void 0 ? void 0 : getList(__assign(__assign({}, (customQuery || {})), query.value));
2634
+ }
2635
+ });
2636
+ return function (_ctx, _cache) {
2637
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
2638
+ vue.createVNode(script$4, {
2639
+ ref_key: "XrkSearchRef",
2640
+ ref: XrkSearchRef,
2641
+ columns: __props.searchConfig.searchColumns,
2642
+ "search-btn": __props.searchConfig.searchBtn,
2643
+ "reset-btn": __props.searchConfig.resetBtn,
2644
+ "other-components": __props.searchConfig.othertComponents,
2645
+ onSearch: handleSearch
2646
+ }, null, 8 /* PROPS */, ["columns", "search-btn", "reset-btn", "other-components"]),
2647
+ vue.createElementVNode("div", _hoisted_1$1, [
2648
+ vue.renderSlot(_ctx.$slots, "tableBefore", {
2649
+ selectionRows: TableSelectionRows.value,
2650
+ tableData: vue.unref(pageAllData),
2651
+ searchQuery: vue.unref(query)
2652
+ })
2653
+ ]),
2654
+ vue.withDirectives(vue.createVNode(vue.unref(BaseTable), {
2655
+ class: "xrk-table-content",
2656
+ ref_key: "XrkTablebaseTableRef",
2657
+ ref: XrkTablebaseTableRef,
2658
+ data: vue.unref(pageAllData),
2659
+ columns: __props.tableConfig.tableColumns,
2660
+ onSelectAll: handleTableSelect,
2661
+ onSelect: handleTableSelect
2662
+ }, null, 8 /* PROPS */, ["data", "columns"]), [
2663
+ [vue.unref(vLoading), vue.unref(pageIsLoading)]
2664
+ ]),
2665
+ vue.createElementVNode("div", _hoisted_2$1, [
2666
+ vue.renderSlot(_ctx.$slots, "tableAfter", {
2667
+ selectionRows: TableSelectionRows.value,
2668
+ tableData: vue.unref(pageAllData),
2669
+ searchQuery: vue.unref(query)
2670
+ })
2671
+ ]),
2672
+ vue.createVNode(vue.unref(BasePagination), {
2673
+ ref_key: "BasePaginationRef",
2674
+ ref: BasePaginationRef,
2675
+ total: vue.unref(paginationTotal),
2676
+ pageSize: vue.unref(paginationConfig).paginationPageSize,
2677
+ currentPage: vue.unref(paginationConfig).paginationCurrentPage,
2678
+ onSizeChange: handlePageChange,
2679
+ onCurrentChange: handlePageChange
2680
+ }, null, 8 /* PROPS */, ["total", "pageSize", "currentPage"])
2681
+ ], 64 /* STABLE_FRAGMENT */));
2682
+ };
2683
+ } }));
2684
+
2685
+ script$1.__file = "packages/xrk/table/table.vue";
2686
+
2687
+ var XrkTable = script$1;
2688
+
2689
+ var _hoisted_1 = { key: 1 };
2690
+ var _hoisted_2 = { key: 1 };
2691
+ var __default__ = {
2692
+ name: 'base-dialog'
2693
+ };
2694
+ var script = /*#__PURE__*/ vue.defineComponent(__assign(__assign({}, __default__), { props: {
2695
+ modelValue: { type: Boolean, required: false, default: true },
2696
+ closeOnClickModal: { type: Boolean, required: false, default: false },
2697
+ closeOnPressEscape: { type: Boolean, required: false, default: false },
2698
+ appendToBody: { type: Boolean, required: false, default: true },
2699
+ destroyOnClose: { type: Boolean, required: false, default: true },
2700
+ center: { type: Boolean, required: false, default: true },
2701
+ showClose: { type: Boolean, required: false, default: false },
2702
+ beforeClose: { type: Function, required: false },
2703
+ beforeCancel: { type: Function, required: false },
2704
+ beforeConfirm: { type: Function, required: false },
2705
+ customClass: { type: String, required: false, default: '_base-dialog' },
2706
+ width: { type: [String, Number], required: false, default: '50%' },
2707
+ title: { type: String, required: false, default: '提示' },
2708
+ content: { type: String, required: false },
2709
+ showFooter: { type: Boolean, required: false, default: true },
2710
+ titleRender: { type: Function, required: false },
2711
+ contentRender: { type: Function, required: false },
2712
+ footerRender: { type: Function, required: false },
2713
+ confirmBtnConfig: { type: null, required: false, default: function () { return ({ show: true, content: '确定' }); } },
2714
+ cancelBtnConfig: { type: null, required: false, default: function () { return ({ show: true, content: '取消', plain: true }); } }
2715
+ }, emits: ["update:modelValue", "close"], setup: function (__props, _a) {
2716
+ var _this = this;
2717
+ var emits = _a.emit;
2718
+ var _props = __props;
2719
+ var props = _props;
2720
+ var show = vue.ref(props.modelValue || false);
2721
+ vue.watch(function () { return props.modelValue; }, function (newV) {
2722
+ show.value = newV || false;
2723
+ });
2724
+ var BaseDialogRender = vue.defineComponent({
2725
+ name: 'dialog-render',
2726
+ props: {
2727
+ render: Function
2728
+ },
2729
+ render: function (ctx) {
2730
+ return ctx.render
2731
+ ? ctx.render(function () {
2732
+ return hanldeBeforeClose(function () {
2733
+ show.value = false;
2734
+ });
2735
+ })
2736
+ : '';
2737
+ }
2738
+ });
2739
+ var hanldeBeforeClose = function (done) { return __awaiter(_this, void 0, void 0, function () {
2740
+ return __generator(this, function (_a) {
2741
+ switch (_a.label) {
2742
+ case 0:
2743
+ if (!isFunction(props.beforeClose)) return [3 /*break*/, 2];
2744
+ return [4 /*yield*/, props.beforeClose(done)];
2745
+ case 1:
2746
+ _a.sent();
2747
+ return [3 /*break*/, 3];
2748
+ case 2:
2749
+ done();
2750
+ _a.label = 3;
2751
+ case 3:
2752
+ emits('close');
2753
+ return [2 /*return*/];
2754
+ }
2755
+ });
2756
+ }); };
2757
+ var handleClosed = function () {
2758
+ emits('update:modelValue', !props.modelValue);
2759
+ };
2760
+ var handleCancelClick = function () { return __awaiter(_this, void 0, void 0, function () {
2761
+ return __generator(this, function (_a) {
2762
+ switch (_a.label) {
2763
+ case 0:
2764
+ if (!isFunction(props.beforeCancel)) return [3 /*break*/, 2];
2765
+ return [4 /*yield*/, props.beforeCancel(function () {
2766
+ show.value = false;
2767
+ })];
2768
+ case 1:
2769
+ _a.sent();
2770
+ return [3 /*break*/, 3];
2771
+ case 2:
2772
+ show.value = false;
2773
+ _a.label = 3;
2774
+ case 3:
2775
+ emits('close');
2776
+ return [2 /*return*/];
2777
+ }
2778
+ });
2779
+ }); };
2780
+ var handleConfirmClick = function () { return __awaiter(_this, void 0, void 0, function () {
2781
+ return __generator(this, function (_a) {
2782
+ switch (_a.label) {
2783
+ case 0:
2784
+ if (!isFunction(props.beforeConfirm)) return [3 /*break*/, 2];
2785
+ return [4 /*yield*/, props.beforeConfirm(function () {
2786
+ show.value = false;
2787
+ })];
2788
+ case 1:
2789
+ _a.sent();
2790
+ return [3 /*break*/, 3];
2791
+ case 2:
2792
+ show.value = false;
2793
+ _a.label = 3;
2794
+ case 3:
2795
+ emits('close');
2796
+ return [2 /*return*/];
2797
+ }
2798
+ });
2799
+ }); };
2800
+ return function (_ctx, _cache) {
2801
+ return (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElDialog), {
2802
+ "custom-class": "".concat(__props.customClass, " ").concat(__props.showFooter ? '' : 'hide-footer'),
2803
+ modelValue: show.value,
2804
+ closeOnClickModal: __props.closeOnClickModal,
2805
+ closeOnPressEscape: __props.closeOnPressEscape,
2806
+ appendToBody: __props.appendToBody,
2807
+ destroyOnClose: __props.destroyOnClose,
2808
+ center: __props.center,
2809
+ width: __props.width,
2810
+ showClose: __props.showClose,
2811
+ "before-close": hanldeBeforeClose,
2812
+ onClosed: handleClosed
2813
+ }, {
2814
+ header: vue.withCtx(function () { return [
2815
+ (__props.titleRender)
2816
+ ? (vue.openBlock(), vue.createBlock(vue.unref(BaseDialogRender), {
2817
+ key: 0,
2818
+ render: __props.titleRender
2819
+ }, null, 8 /* PROPS */, ["render"]))
2820
+ : (__props.title)
2821
+ ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_1, vue.toDisplayString(__props.title), 1 /* TEXT */))
2822
+ : vue.renderSlot(_ctx.$slots, "header", { key: 2 })
2823
+ ]; }),
2824
+ footer: vue.withCtx(function () { return [
2825
+ (__props.footerRender)
2826
+ ? (vue.openBlock(), vue.createBlock(vue.unref(BaseDialogRender), {
2827
+ key: 0,
2828
+ render: __props.footerRender
2829
+ }, null, 8 /* PROPS */, ["render"]))
2830
+ : (__props.showFooter)
2831
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
2832
+ (__props.cancelBtnConfig.show)
2833
+ ? (vue.openBlock(), vue.createBlock(vue.unref(BaseButton), vue.mergeProps({ key: 0 }, __props.cancelBtnConfig, { click: handleCancelClick }), {
2834
+ default: vue.withCtx(function () { return [
2835
+ vue.createTextVNode(vue.toDisplayString(__props.cancelBtnConfig.content), 1 /* TEXT */)
2836
+ ]; }),
2837
+ _: 1 /* STABLE */
2838
+ }, 16 /* FULL_PROPS */))
2839
+ : vue.createCommentVNode("v-if", true),
2840
+ (__props.confirmBtnConfig.show)
2841
+ ? (vue.openBlock(), vue.createBlock(vue.unref(BaseButton), vue.mergeProps({ key: 1 }, __props.confirmBtnConfig, { click: handleConfirmClick }), {
2842
+ default: vue.withCtx(function () { return [
2843
+ vue.createTextVNode(vue.toDisplayString(__props.confirmBtnConfig.content), 1 /* TEXT */)
2844
+ ]; }),
2845
+ _: 1 /* STABLE */
2846
+ }, 16 /* FULL_PROPS */))
2847
+ : vue.createCommentVNode("v-if", true)
2848
+ ]))
2849
+ : vue.createCommentVNode("v-if", true)
2850
+ ]; }),
2851
+ default: vue.withCtx(function () { return [
2852
+ (__props.contentRender)
2853
+ ? (vue.openBlock(), vue.createBlock(vue.unref(BaseDialogRender), {
2854
+ key: 0,
2855
+ render: __props.contentRender
2856
+ }, null, 8 /* PROPS */, ["render"]))
2857
+ : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
2858
+ ]; }),
2859
+ _: 3 /* FORWARDED */
2860
+ }, 8 /* PROPS */, ["custom-class", "modelValue", "closeOnClickModal", "closeOnPressEscape", "appendToBody", "destroyOnClose", "center", "width", "showClose"]));
2861
+ };
2862
+ } }));
2863
+
2864
+ script.__file = "packages/base/dialog/dialog.vue";
2865
+
2866
+ var BaseDialog = script;
2867
+ var createDialog = function (config) {
2868
+ var _a;
2869
+ var container = document.createElement('div');
2870
+ var customDialogCount = document.querySelectorAll('._xrk_create_dialog').length;
2871
+ container.classList.add('_xrk_create_dialog');
2872
+ container.style.position = 'relative';
2873
+ container.style.zIndex = "".concat(200 + customDialogCount);
2874
+ vue.render(vue.h(script, __assign(__assign({ modelValue: true }, (config || {})), { appendToBody: false, onClose: function () { return __awaiter(void 0, void 0, void 0, function () {
2875
+ var _a, _b;
2876
+ return __generator(this, function (_c) {
2877
+ switch (_c.label) {
2878
+ case 0: return [4 /*yield*/, ((_a = config === null || config === void 0 ? void 0 : config.onClose) === null || _a === void 0 ? void 0 : _a.call(config))];
2879
+ case 1:
2880
+ _c.sent();
2881
+ (_b = document.querySelector('body')) === null || _b === void 0 ? void 0 : _b.removeChild(container);
2882
+ return [2 /*return*/];
2883
+ }
2884
+ });
2885
+ }); } })), container);
2886
+ (_a = document.querySelector('body')) === null || _a === void 0 ? void 0 : _a.appendChild(container);
2887
+ };
2888
+
2889
+ /*
2890
+ * @Description:
2891
+ * @Date: 2022-07-05 16:34:24
2892
+ */
2893
+
2894
+ var AllComponents = /*#__PURE__*/Object.freeze({
2895
+ __proto__: null,
2896
+ BaseButton: BaseButton,
2897
+ BaseRadio: BaseRadio,
2898
+ BaseRadioGroup: BaseRadioGroup,
2899
+ BaseRadioButton: BaseRadioButton,
2900
+ BaseCheckbox: BaseCheckbox,
2901
+ BaseCheckboxGroup: BaseCheckboxGroup,
2902
+ BaseCheckboxButton: BaseCheckboxButton,
2903
+ BaseDatePicker: BaseDatePicker,
2904
+ BaseInput: BaseInput,
2905
+ BaseSelect: BaseSelect,
2906
+ BaseSwitch: BaseSwitch,
2907
+ BaseTag: BaseTag,
2908
+ BaseTagGroup: BaseTagGroup,
2909
+ BasePagination: BasePagination,
2910
+ BaseForm: BaseForm,
2911
+ BaseFormItem: BaseFormItem,
2912
+ XrkSearch: XrkSearch,
2913
+ BaseTable: BaseTable,
2914
+ XrkTable: XrkTable,
2915
+ BaseDialog: BaseDialog
2916
+ });
2917
+
2918
+ /*
2919
+ * @Description:
2920
+ * @Date: 2022-06-29 15:58:37
2921
+ */
2922
+ var useInputColumn = function (column) {
2923
+ return __assign(__assign({ type: 'input' }, column), { style: __assign({ width: '220px' }, (column.style || {})) });
2924
+ };
2925
+ var useSelectColumn = function (column) {
2926
+ return __assign(__assign({ type: 'select' }, column), { style: __assign({ width: '220px' }, (column.style || {})) });
2927
+ };
2928
+ var useDatePickerColumn = function (column) {
2929
+ var _a;
2930
+ return __assign(__assign({ type: 'datePicker' }, column), { style: __assign({ width: ['datetimerange', 'daterange', 'monthrange'].includes(((_a = column.config) === null || _a === void 0 ? void 0 : _a.type) || '')
2931
+ ? '280px'
2932
+ : '220px' }, (column.style || {})) });
2933
+ };
2934
+ var useSearchColumns = function (columns) {
2935
+ return columns.map(function (column) { return (__assign(__assign({}, column), { listener: column.listener || {}, config: __assign({ clearable: true }, (column.config || {})) })); });
2936
+ };
2937
+ var useSearchBtn = function (searchBtnConfig) {
2938
+ return __assign({ text: '搜索', show: true }, searchBtnConfig);
2939
+ };
2940
+ var useResetBtn = function (resetBtnConfig) {
2941
+ return __assign({ text: '重置', show: true }, resetBtnConfig);
2942
+ };
2943
+ var useOtherComponents = function (otherComponents) {
2944
+ return otherComponents;
2945
+ };
2946
+
2947
+ /*
2948
+ * @Description:
2949
+ * @Date: 2022-06-30 22:57:28
2950
+ */
2951
+ // 所有组件列表
2952
+ var components = Object.values(AllComponents).map(function (i) { return i; });
2953
+ var install = function (app) {
2954
+ app.use(ElementPlus__default["default"], { namespace: 'xrk', locale: locale });
2955
+ components.map(function (component) {
2956
+ app.component(component.name, component);
2957
+ });
2958
+ };
2959
+ var index = {
2960
+ version: '0.3.2',
2961
+ install: install
2962
+ };
2963
+
2964
+ exports.BaseButton = BaseButton;
2965
+ exports.BaseCheckbox = BaseCheckbox;
2966
+ exports.BaseCheckboxButton = BaseCheckboxButton;
2967
+ exports.BaseCheckboxGroup = BaseCheckboxGroup;
2968
+ exports.BaseDatePicker = BaseDatePicker;
2969
+ exports.BaseDialog = BaseDialog;
2970
+ exports.BaseForm = BaseForm;
2971
+ exports.BaseFormItem = BaseFormItem;
2972
+ exports.BaseInput = BaseInput;
2973
+ exports.BasePagination = BasePagination;
2974
+ exports.BaseRadio = BaseRadio;
2975
+ exports.BaseRadioButton = BaseRadioButton;
2976
+ exports.BaseRadioGroup = BaseRadioGroup;
2977
+ exports.BaseSelect = BaseSelect;
2978
+ exports.BaseSwitch = BaseSwitch;
2979
+ exports.BaseTable = BaseTable;
2980
+ exports.BaseTag = BaseTag;
2981
+ exports.BaseTagGroup = BaseTagGroup;
2982
+ exports.XrkSearch = XrkSearch;
2983
+ exports.XrkTable = XrkTable;
2984
+ exports.createDialog = createDialog;
2985
+ exports["default"] = index;
2986
+ exports.useDatePickerColumn = useDatePickerColumn;
2987
+ exports.useInputColumn = useInputColumn;
2988
+ exports.useOtherComponents = useOtherComponents;
2989
+ exports.useResetBtn = useResetBtn;
2990
+ exports.useSearchBtn = useSearchBtn;
2991
+ exports.useSearchColumns = useSearchColumns;
2992
+ exports.useSelectColumn = useSelectColumn;
2993
+ exports.useTableColumn = useTableColumn;
2994
+
2995
+ Object.defineProperty(exports, '__esModule', { value: true });
2996
+
2997
+ }));