@yidun/antd-super-table 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -18
- package/dist/config.d.ts +0 -7
- package/dist/index.js +1264 -1315
- package/dist/utils/service.d.ts +1 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._ellipsisElement_6fog1_1{width:100%;overflow:hidden;display:flex}._ellipsisElement_6fog1_1 ._elementItem_6fog1_6{min-width:0}._ellipsisElementHasGap_6fog1_10{gap:8px}._flexWrap_6fog1_14{flex-wrap:wrap}._ellipsisTag_6fog1_18{cursor:pointer}._imageEllipsisTag_6fog1_22{line-height:30px;min-width:32px;padding:0;text-align:center}._ellipsisList_6fog1_29{max-width:500px;display:flex;gap:8px;flex-wrap:wrap}._tableCellContent_1chn7_1 ._antTypographyEllipsis_1chn7_1{width:100%}._tableCellContent_1chn7_1 ._draggableIcon_1chn7_4{cursor:grab}._textListItem_1chn7_8{width:100%;margin-bottom:4px}._configBtn_1rypj_1{position:absolute;z-index:999;right:0;top:12px}._tableConfig_1rypj_8{width:260px}._tableConfig_1rypj_8 ._tableConfigHead_1rypj_11{padding:8px 16px}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14{padding:8px 0;height:300px;overflow:auto}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14 ._columnList_1rypj_19 ._columnItem_1rypj_19{display:flex;align-items:center;gap:8px;min-height:32px;padding:0 16px}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14 ._columnList_1rypj_19 ._columnItem_1rypj_19 ._columnItemContent_1rypj_26{flex:1;cursor:pointer}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14 ._columnList_1rypj_19 ._columnItem_1rypj_19 ._dragIcon_1rypj_30{cursor:grab}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14 ._columnList_1rypj_19 ._columnItem_1rypj_19 ._dragIconDisabled_1rypj_33{cursor:not-allowed}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14 ._columnList_1rypj_19 ._columnItem_1rypj_19 ._dragHandle_1rypj_36{cursor:grab}._tableConfig_1rypj_8 ._tableConfigContent_1rypj_14 ._emptyText_1rypj_39{line-height:200px;text-align:center}._tableConfig_1rypj_8 ._tableConfigFoot_1rypj_43{display:flex;align-items:center;justify-content:flex-end;border-top:1px solid #d9d9d9;padding:8px 16px}.pro-table-config-popover .ant-popover-inner-content{padding:0}._dynamicList_1woe5_1{list-style:none;padding:0;margin:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6{display:flex;align-items:center;gap:16px;padding:8px;background-color:#fff}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._dynamicListItemContent_1woe5_13{flex:1;min-width:0}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17{display:flex;align-items:center}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6 ._actionsIcons_1woe5_17 ._dragIcon_1woe5_21{cursor:grab}._dynamicList_1woe5_1 ._dynamicListItem_1woe5_6:last-child{border-bottom:none;margin-bottom:16px}._inputGroup_eukv3_1,._inputNumberGroup_149g6_1{width:100%}._inputNumberGroup_149g6_1 ._inputNumberGroupContent_149g6_4{width:100%;display:flex;align-items:center}._inputNumberGroup_149g6_1 ._inputNumber_149g6_1{width:unset!important;flex:1}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13{border-top-right-radius:0;border-bottom-right-radius:0;border-right-color:transparent}._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:focus,._inputNumberGroup_149g6_1 ._startInputNumber_149g6_13:hover{border-right-color:#1677ff}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent}._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:focus,._inputNumberGroup_149g6_1 ._endInputNumber_149g6_21:hover{border-left-color:#1677ff}._inputNumberGroup_149g6_1 ._divider_149g6_29{display:inline-block;padding:0 8px;line-height:30px;border-top:1px solid #d9d9d9;border-bottom:1px solid #d9d9d9}._formFieldItem_1imun_1{display:flex;align-items:center;min-width:0}._inputGroup_1imun_7{width:unset}._formFieldItemLabel_1imun_11{padding-left:8px;padding-right:8px;background-color:transparent!important;text-align:center;cursor:default!important;border-right:none!important}._customItemLabel_1imun_20{font-size:14px;padding-right:8px;color:#000000e0}.super-table-input-group{width:100%}.super-table-input-group .super-table-filter-form-item-label+.ant-input,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector,.super-table-input-group .super-table-filter-form-item-label+.ant-picker,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-number:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-select .ant-select-selector:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-picker:hover,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group:hover{border-left-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input{border-left-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-input:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector{border-start-start-radius:0!important;border-end-start-radius:0!important;border-left-color:transparent!important;border-right-color:transparent!important}.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:focus,.super-table-input-group .super-table-filter-form-item-label+.ant-input-group .ant-select .ant-select-selector:hover{border-left-color:#1677ff!important;border-right-color:#1677ff!important}.super-table-input-group .input-number-group .ant-input-number:first-child{border-top-left-radius:0;border-bottom-left-radius:0;border-left-color:transparent!important}.super-table-input-group .input-number-group .ant-input-number:first-child:focus,.super-table-input-group .input-number-group .ant-input-number:first-child:hover{border-left-color:#1677ff!important}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1{display:flex;align-items:center;gap:8px;min-width:0}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldSelect_njdgy_7{width:200px}._sceneForm_njdgy_1 ._queryFieldItem_njdgy_1 ._fieldComponent_njdgy_10{flex:1;min-width:0}._sceneList_3nrgr_1{max-height:50vh;overflow:auto}._sceneList_3nrgr_1 ._sceneListHead_3nrgr_5{background-color:#fafafa}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8{border-top:1px solid #d9d9d9;transition:all .3s;background-color:#fff}._sceneList_3nrgr_1 ._sceneListItem_3nrgr_8:hover{background-color:#f9f9f9}._sceneList_3nrgr_1 ._col_3nrgr_16{padding:12px 16px}._dragIcon_3nrgr_20{cursor:grab}._searchParams_1vdwi_1{flex:1;margin:12px 0}._superTable_1rx9j_1{background-color:#fff;padding:20px 24px}._superTable_1rx9j_1 ._superTableHeader_1rx9j_5{display:flex;gap:16px;border-bottom:1px solid #d9d9d9}._superTable_1rx9j_1 ._superTableHeader_1rx9j_5 ._searchForm_1rx9j_10{flex:1;padding-bottom:12px}._superTable_1rx9j_1 ._superTableHeader_1rx9j_5 ._searchForm_1rx9j_10 ._sceneSelect_1rx9j_14{width:240px}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._toolbar_1rx9j_17{padding-bottom:12px;display:flex;align-items:flex-start;justify-content:flex-end;gap:16px}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._toolbar_1rx9j_17 ._actionBtns_1rx9j_24{display:flex;align-items:center;gap:8px}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._toolbar_1rx9j_17 ._tableHeadWrapper_1rx9j_29{flex:1}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._tableContent_1rx9j_32{position:relative}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._headerCell_1rx9j_35{display:flex;align-items:center;gap:4px}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._headerCell_1rx9j_35 ._headerCellText_1rx9j_40{flex:1}._superTable_1rx9j_1 ._tableWrapper_1rx9j_17 ._headerCell_1rx9j_35 ._headerCellTooltipIcon_1rx9j_43{cursor:pointer}._sceneOpBtnWrapper_1rx9j_47{border-top:1px solid #d9d9d9;padding-top:8px}._sceneOpBtnWrapper_1rx9j_47 ._sceneOpBtn_1rx9j_47{text-align:left}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
2
|
var an = Object.defineProperty;
|
|
3
3
|
var on = (r, e, n) => e in r ? an(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
|
|
4
|
-
var
|
|
5
|
-
import { h as X, defineComponent as ie, computed as
|
|
6
|
-
import
|
|
7
|
-
import { DownOutlined as
|
|
8
|
-
import { slice as St, isFunction as
|
|
9
|
-
import { useStorage as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { JSONPath as
|
|
13
|
-
import { v5 as
|
|
4
|
+
var Me = (r, e, n) => on(r, typeof e != "symbol" ? e + "" : e, n);
|
|
5
|
+
import { h as X, defineComponent as ie, computed as M, resolveComponent as P, createElementBlock as U, openBlock as I, normalizeClass as $, unref as w, createCommentVNode as N, Fragment as xe, renderList as lt, normalizeStyle as $e, renderSlot as pe, createBlock as E, withCtx as C, createVNode as T, createTextVNode as K, toDisplayString as be, createElementVNode as J, withMemo as Mt, resolveDynamicComponent as Ke, normalizeProps as at, mergeProps as oe, ref as ee, watchEffect as $t, watch as he, useAttrs as sn, reactive as Ze, toRaw as me, createApp as ln, onBeforeUnmount as un, getCurrentInstance as cn, shallowRef as dn, onMounted as pn, createSlots as fn, nextTick as mn } from "vue";
|
|
6
|
+
import yn, { theme as gn, Form as vn, RangePicker as hn, DatePicker as bn, TreeSelect as _n, Cascader as Cn, Select as $n, InputNumber as wn, Input as Sn, Empty as In, ConfigProvider as Fn, message as ot } from "ant-design-vue";
|
|
7
|
+
import { DownOutlined as xn, HolderOutlined as De, EyeOutlined as kn, SettingOutlined as Tn, MinusCircleOutlined as wt, PlusOutlined as At, PlusCircleFilled as On, SettingFilled as Pn, FilterFilled as qn, ReloadOutlined as jn, InfoCircleFilled as Ln } from "@ant-design/icons-vue";
|
|
8
|
+
import { slice as St, isFunction as _e, get as Xe, castArray as je, debounce as yt, pick as ke, cloneDeep as Ge, omit as Nt, set as qe, sortBy as it, unionBy as En, uniqueId as Mn, merge as An } from "lodash-es";
|
|
9
|
+
import { useStorage as Nn } from "@vueuse/core";
|
|
10
|
+
import Re from "dayjs";
|
|
11
|
+
import Bn from "sortablejs";
|
|
12
|
+
import { JSONPath as Dn } from "jsonpath-plus";
|
|
13
|
+
import { v5 as Rn } from "uuid";
|
|
14
14
|
import gt from "vuedraggable";
|
|
15
|
-
const
|
|
15
|
+
const Vn = {
|
|
16
16
|
// Options.jsx
|
|
17
17
|
items_per_page: "条/页",
|
|
18
18
|
jump_to: "跳至",
|
|
@@ -35,7 +35,7 @@ function et() {
|
|
|
35
35
|
return r;
|
|
36
36
|
}, et.apply(null, arguments);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const Yn = {
|
|
39
39
|
locale: "zh_CN",
|
|
40
40
|
today: "今天",
|
|
41
41
|
now: "此刻",
|
|
@@ -77,13 +77,13 @@ const Vn = {
|
|
|
77
77
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
78
78
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
79
79
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
80
|
-
},
|
|
80
|
+
}, Yn),
|
|
81
81
|
timePickerLocale: et({}, Bt)
|
|
82
82
|
};
|
|
83
83
|
ut.lang.ok = "确定";
|
|
84
84
|
const se = "${label}不是一个有效的${type}", Dt = {
|
|
85
85
|
locale: "zh-cn",
|
|
86
|
-
Pagination:
|
|
86
|
+
Pagination: Vn,
|
|
87
87
|
DatePicker: ut,
|
|
88
88
|
TimePicker: Bt,
|
|
89
89
|
Calendar: ut,
|
|
@@ -215,27 +215,27 @@ const se = "${label}不是一个有效的${type}", Dt = {
|
|
|
215
215
|
scanned: "已扫描"
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
var
|
|
219
|
-
function
|
|
218
|
+
var Qe = { exports: {} }, Hn = Qe.exports, It;
|
|
219
|
+
function Un() {
|
|
220
220
|
return It || (It = 1, function(r, e) {
|
|
221
221
|
(function(n, t) {
|
|
222
|
-
r.exports = t(
|
|
223
|
-
})(
|
|
224
|
-
function t(
|
|
225
|
-
return
|
|
222
|
+
r.exports = t(Re);
|
|
223
|
+
})(Hn, function(n) {
|
|
224
|
+
function t(l) {
|
|
225
|
+
return l && typeof l == "object" && "default" in l ? l : { default: l };
|
|
226
226
|
}
|
|
227
|
-
var a = t(n), o = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(
|
|
228
|
-
return
|
|
229
|
-
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(
|
|
230
|
-
var
|
|
231
|
-
return
|
|
227
|
+
var a = t(n), o = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(l, s) {
|
|
228
|
+
return s === "W" ? l + "周" : l + "日";
|
|
229
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(l, s) {
|
|
230
|
+
var d = 100 * l + s;
|
|
231
|
+
return d < 600 ? "凌晨" : d < 900 ? "早上" : d < 1100 ? "上午" : d < 1300 ? "中午" : d < 1800 ? "下午" : "晚上";
|
|
232
232
|
} };
|
|
233
233
|
return a.default.locale(o, null, !0), o;
|
|
234
234
|
});
|
|
235
|
-
}(
|
|
235
|
+
}(Qe)), Qe.exports;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
const { defaultAlgorithm:
|
|
237
|
+
Un();
|
|
238
|
+
const { defaultAlgorithm: Wn, defaultSeed: zn } = gn, we = Wn(zn);
|
|
239
239
|
var ve = /* @__PURE__ */ ((r) => (r.order = "_order", r.orderInScene = "_orderInScene", r.defaultValue = "_defaultValue", r.selected = "_selected", r))(ve || {});
|
|
240
240
|
const Rt = Object.values(ve), R = {
|
|
241
241
|
/** 文本(默认)*/
|
|
@@ -280,36 +280,31 @@ const Rt = Object.values(ve), R = {
|
|
|
280
280
|
update: "update",
|
|
281
281
|
/** 设置查询条件 */
|
|
282
282
|
search: "search"
|
|
283
|
-
}, Vt = ["key", "index", "width", "visible"]
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
update: "https://union-admin.nis.netease.com/gateway/union-user/v1/api/user-preference/update",
|
|
287
|
-
delete: "https://union-admin.nis.netease.com/gateway/union-user/v1/api/user-preference/delete"
|
|
288
|
-
};
|
|
289
|
-
function Ie() {
|
|
290
|
-
return Ie = Object.assign ? Object.assign.bind() : function(r) {
|
|
283
|
+
}, Vt = ["key", "index", "width", "visible"];
|
|
284
|
+
function Fe() {
|
|
285
|
+
return Fe = Object.assign ? Object.assign.bind() : function(r) {
|
|
291
286
|
for (var e = 1; e < arguments.length; e++) {
|
|
292
287
|
var n = arguments[e];
|
|
293
288
|
for (var t in n)
|
|
294
289
|
Object.prototype.hasOwnProperty.call(n, t) && (r[t] = n[t]);
|
|
295
290
|
}
|
|
296
291
|
return r;
|
|
297
|
-
},
|
|
292
|
+
}, Fe.apply(this, arguments);
|
|
298
293
|
}
|
|
299
|
-
function
|
|
300
|
-
r.prototype = Object.create(e.prototype), r.prototype.constructor = r,
|
|
294
|
+
function Gn(r, e) {
|
|
295
|
+
r.prototype = Object.create(e.prototype), r.prototype.constructor = r, Ve(r, e);
|
|
301
296
|
}
|
|
302
297
|
function ct(r) {
|
|
303
298
|
return ct = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
|
|
304
299
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
305
300
|
}, ct(r);
|
|
306
301
|
}
|
|
307
|
-
function
|
|
308
|
-
return
|
|
302
|
+
function Ve(r, e) {
|
|
303
|
+
return Ve = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, a) {
|
|
309
304
|
return t.__proto__ = a, t;
|
|
310
|
-
},
|
|
305
|
+
}, Ve(r, e);
|
|
311
306
|
}
|
|
312
|
-
function
|
|
307
|
+
function Qn() {
|
|
313
308
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
314
309
|
if (typeof Proxy == "function") return !0;
|
|
315
310
|
try {
|
|
@@ -319,13 +314,13 @@ function Gn() {
|
|
|
319
314
|
return !1;
|
|
320
315
|
}
|
|
321
316
|
}
|
|
322
|
-
function
|
|
323
|
-
return
|
|
324
|
-
var
|
|
325
|
-
|
|
326
|
-
var
|
|
327
|
-
return
|
|
328
|
-
},
|
|
317
|
+
function Je(r, e, n) {
|
|
318
|
+
return Qn() ? Je = Reflect.construct.bind() : Je = function(a, o, l) {
|
|
319
|
+
var s = [null];
|
|
320
|
+
s.push.apply(s, o);
|
|
321
|
+
var d = Function.bind.apply(a, s), v = new d();
|
|
322
|
+
return l && Ve(v, l.prototype), v;
|
|
323
|
+
}, Je.apply(null, arguments);
|
|
329
324
|
}
|
|
330
325
|
function Jn(r) {
|
|
331
326
|
return Function.toString.call(r).indexOf("[native code]") !== -1;
|
|
@@ -341,7 +336,7 @@ function dt(r) {
|
|
|
341
336
|
e.set(t, a);
|
|
342
337
|
}
|
|
343
338
|
function a() {
|
|
344
|
-
return
|
|
339
|
+
return Je(t, arguments, ct(this).constructor);
|
|
345
340
|
}
|
|
346
341
|
return a.prototype = Object.create(t.prototype, {
|
|
347
342
|
constructor: {
|
|
@@ -350,12 +345,12 @@ function dt(r) {
|
|
|
350
345
|
writable: !0,
|
|
351
346
|
configurable: !0
|
|
352
347
|
}
|
|
353
|
-
}),
|
|
348
|
+
}), Ve(a, t);
|
|
354
349
|
}, dt(r);
|
|
355
350
|
}
|
|
356
|
-
var
|
|
351
|
+
var Kn = /%[sdj%]/g, Yt = function() {
|
|
357
352
|
};
|
|
358
|
-
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (
|
|
353
|
+
typeof process < "u" && process.env && process.env.NODE_ENV !== "production" && typeof window < "u" && typeof document < "u" && (Yt = function(e, n) {
|
|
359
354
|
typeof console < "u" && console.warn && typeof ASYNC_VALIDATOR_NO_WARNING > "u" && n.every(function(t) {
|
|
360
355
|
return typeof t == "string";
|
|
361
356
|
}) && console.warn(e, n);
|
|
@@ -375,12 +370,12 @@ function le(r) {
|
|
|
375
370
|
if (typeof r == "function")
|
|
376
371
|
return r.apply(null, n);
|
|
377
372
|
if (typeof r == "string") {
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
373
|
+
var l = r.replace(Kn, function(s) {
|
|
374
|
+
if (s === "%%")
|
|
380
375
|
return "%";
|
|
381
376
|
if (a >= o)
|
|
382
|
-
return
|
|
383
|
-
switch (
|
|
377
|
+
return s;
|
|
378
|
+
switch (s) {
|
|
384
379
|
case "%s":
|
|
385
380
|
return String(n[a++]);
|
|
386
381
|
case "%d":
|
|
@@ -393,84 +388,84 @@ function le(r) {
|
|
|
393
388
|
}
|
|
394
389
|
break;
|
|
395
390
|
default:
|
|
396
|
-
return
|
|
391
|
+
return s;
|
|
397
392
|
}
|
|
398
393
|
});
|
|
399
|
-
return
|
|
394
|
+
return l;
|
|
400
395
|
}
|
|
401
396
|
return r;
|
|
402
397
|
}
|
|
403
|
-
function
|
|
398
|
+
function Zn(r) {
|
|
404
399
|
return r === "string" || r === "url" || r === "hex" || r === "email" || r === "date" || r === "pattern";
|
|
405
400
|
}
|
|
406
401
|
function Z(r, e) {
|
|
407
|
-
return !!(r == null || e === "array" && Array.isArray(r) && !r.length ||
|
|
402
|
+
return !!(r == null || e === "array" && Array.isArray(r) && !r.length || Zn(e) && typeof r == "string" && !r);
|
|
408
403
|
}
|
|
409
|
-
function
|
|
404
|
+
function Xn(r, e, n) {
|
|
410
405
|
var t = [], a = 0, o = r.length;
|
|
411
|
-
function s
|
|
412
|
-
t.push.apply(t,
|
|
406
|
+
function l(s) {
|
|
407
|
+
t.push.apply(t, s || []), a++, a === o && n(t);
|
|
413
408
|
}
|
|
414
|
-
r.forEach(function(
|
|
415
|
-
e(
|
|
409
|
+
r.forEach(function(s) {
|
|
410
|
+
e(s, l);
|
|
416
411
|
});
|
|
417
412
|
}
|
|
418
413
|
function Ft(r, e, n) {
|
|
419
414
|
var t = 0, a = r.length;
|
|
420
|
-
function o(
|
|
421
|
-
if (
|
|
422
|
-
n(
|
|
415
|
+
function o(l) {
|
|
416
|
+
if (l && l.length) {
|
|
417
|
+
n(l);
|
|
423
418
|
return;
|
|
424
419
|
}
|
|
425
|
-
var
|
|
426
|
-
t = t + 1,
|
|
420
|
+
var s = t;
|
|
421
|
+
t = t + 1, s < a ? e(r[s], o) : n([]);
|
|
427
422
|
}
|
|
428
423
|
o([]);
|
|
429
424
|
}
|
|
430
|
-
function
|
|
425
|
+
function er(r) {
|
|
431
426
|
var e = [];
|
|
432
427
|
return Object.keys(r).forEach(function(n) {
|
|
433
428
|
e.push.apply(e, r[n] || []);
|
|
434
429
|
}), e;
|
|
435
430
|
}
|
|
436
431
|
var xt = /* @__PURE__ */ function(r) {
|
|
437
|
-
|
|
432
|
+
Gn(e, r);
|
|
438
433
|
function e(n, t) {
|
|
439
434
|
var a;
|
|
440
435
|
return a = r.call(this, "Async Validation Error") || this, a.errors = n, a.fields = t, a;
|
|
441
436
|
}
|
|
442
437
|
return e;
|
|
443
438
|
}(/* @__PURE__ */ dt(Error));
|
|
444
|
-
function
|
|
439
|
+
function tr(r, e, n, t, a) {
|
|
445
440
|
if (e.first) {
|
|
446
|
-
var o = new Promise(function(
|
|
447
|
-
var
|
|
448
|
-
return t(p), p.length ? y(new xt(p, pt(p))) :
|
|
449
|
-
}, g =
|
|
450
|
-
Ft(g, n,
|
|
441
|
+
var o = new Promise(function(c, y) {
|
|
442
|
+
var F = function(p) {
|
|
443
|
+
return t(p), p.length ? y(new xt(p, pt(p))) : c(a);
|
|
444
|
+
}, g = er(r);
|
|
445
|
+
Ft(g, n, F);
|
|
451
446
|
});
|
|
452
|
-
return o.catch(function(
|
|
453
|
-
return
|
|
447
|
+
return o.catch(function(c) {
|
|
448
|
+
return c;
|
|
454
449
|
}), o;
|
|
455
450
|
}
|
|
456
|
-
var
|
|
457
|
-
var
|
|
458
|
-
if (b.push.apply(b, _), v++, v ===
|
|
459
|
-
return t(b), b.length ? y(new xt(b, pt(b))) :
|
|
451
|
+
var l = e.firstFields === !0 ? Object.keys(r) : e.firstFields || [], s = Object.keys(r), d = s.length, v = 0, b = [], m = new Promise(function(c, y) {
|
|
452
|
+
var F = function(_) {
|
|
453
|
+
if (b.push.apply(b, _), v++, v === d)
|
|
454
|
+
return t(b), b.length ? y(new xt(b, pt(b))) : c(a);
|
|
460
455
|
};
|
|
461
|
-
|
|
456
|
+
s.length || (t(b), c(a)), s.forEach(function(g) {
|
|
462
457
|
var _ = r[g];
|
|
463
|
-
|
|
458
|
+
l.indexOf(g) !== -1 ? Ft(_, n, F) : Xn(_, n, F);
|
|
464
459
|
});
|
|
465
460
|
});
|
|
466
|
-
return
|
|
467
|
-
return
|
|
468
|
-
}),
|
|
461
|
+
return m.catch(function(c) {
|
|
462
|
+
return c;
|
|
463
|
+
}), m;
|
|
469
464
|
}
|
|
470
|
-
function
|
|
465
|
+
function nr(r) {
|
|
471
466
|
return !!(r && r.message !== void 0);
|
|
472
467
|
}
|
|
473
|
-
function
|
|
468
|
+
function rr(r, e) {
|
|
474
469
|
for (var n = r, t = 0; t < e.length; t++) {
|
|
475
470
|
if (n == null)
|
|
476
471
|
return n;
|
|
@@ -481,7 +476,7 @@ function nr(r, e) {
|
|
|
481
476
|
function kt(r, e) {
|
|
482
477
|
return function(n) {
|
|
483
478
|
var t;
|
|
484
|
-
return r.fullFields ? t =
|
|
479
|
+
return r.fullFields ? t = rr(e, r.fullFields) : t = e[n.field || r.fullField], nr(n) ? (n.field = n.field || r.fullField, n.fieldValue = t, n) : {
|
|
485
480
|
message: typeof n == "function" ? n() : n,
|
|
486
481
|
fieldValue: t,
|
|
487
482
|
field: n.field || r.fullField
|
|
@@ -493,20 +488,20 @@ function Tt(r, e) {
|
|
|
493
488
|
for (var n in e)
|
|
494
489
|
if (e.hasOwnProperty(n)) {
|
|
495
490
|
var t = e[n];
|
|
496
|
-
typeof t == "object" && typeof r[n] == "object" ? r[n] =
|
|
491
|
+
typeof t == "object" && typeof r[n] == "object" ? r[n] = Fe({}, r[n], t) : r[n] = t;
|
|
497
492
|
}
|
|
498
493
|
}
|
|
499
494
|
return r;
|
|
500
495
|
}
|
|
501
|
-
var
|
|
502
|
-
e.required && (!t.hasOwnProperty(e.field) || Z(n,
|
|
503
|
-
},
|
|
496
|
+
var Ht = function(e, n, t, a, o, l) {
|
|
497
|
+
e.required && (!t.hasOwnProperty(e.field) || Z(n, l || e.type)) && a.push(le(o.messages.required, e.fullField));
|
|
498
|
+
}, ar = function(e, n, t, a, o) {
|
|
504
499
|
(/^\s+$/.test(n) || n === "") && a.push(le(o.messages.whitespace, e.fullField));
|
|
505
|
-
}, Ue,
|
|
500
|
+
}, Ue, or = function() {
|
|
506
501
|
if (Ue)
|
|
507
502
|
return Ue;
|
|
508
|
-
var r = "[a-fA-F\\d:]", e = function(
|
|
509
|
-
return
|
|
503
|
+
var r = "[a-fA-F\\d:]", e = function(S) {
|
|
504
|
+
return S && S.includeBoundaries ? "(?:(?<=\\s|^)(?=" + r + ")|(?<=" + r + ")(?=\\s|$))" : "";
|
|
510
505
|
}, n = "(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}", t = "[a-fA-F\\d]{1,4}", a = (`
|
|
511
506
|
(?:
|
|
512
507
|
(?:` + t + ":){7}(?:" + t + `|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
|
@@ -518,16 +513,16 @@ var Ut = function(e, n, t, a, o, s) {
|
|
|
518
513
|
(?:` + t + ":){1}(?:(?::" + t + "){0,4}:" + n + "|(?::" + t + `){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
|
519
514
|
(?::(?:(?::` + t + "){0,5}:" + n + "|(?::" + t + `){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
|
520
515
|
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
|
521
|
-
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), o = new RegExp("(?:^" + n + "$)|(?:^" + a + "$)"),
|
|
522
|
-
return
|
|
516
|
+
`).replace(/\s*\/\/.*$/gm, "").replace(/\n/g, "").trim(), o = new RegExp("(?:^" + n + "$)|(?:^" + a + "$)"), l = new RegExp("^" + n + "$"), s = new RegExp("^" + a + "$"), d = function(S) {
|
|
517
|
+
return S && S.exact ? o : new RegExp("(?:" + e(S) + n + e(S) + ")|(?:" + e(S) + a + e(S) + ")", "g");
|
|
523
518
|
};
|
|
524
|
-
|
|
525
|
-
return
|
|
526
|
-
},
|
|
527
|
-
return
|
|
519
|
+
d.v4 = function(f) {
|
|
520
|
+
return f && f.exact ? l : new RegExp("" + e(f) + n + e(f), "g");
|
|
521
|
+
}, d.v6 = function(f) {
|
|
522
|
+
return f && f.exact ? s : new RegExp("" + e(f) + a + e(f), "g");
|
|
528
523
|
};
|
|
529
|
-
var v = "(?:(?:[a-z]+:)?//)", b = "(?:\\S+(?::\\S*)?@)?",
|
|
530
|
-
return Ue = new RegExp("(?:^" +
|
|
524
|
+
var v = "(?:(?:[a-z]+:)?//)", b = "(?:\\S+(?::\\S*)?@)?", m = d.v4().source, c = d.v6().source, y = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)", F = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*", g = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))", _ = "(?::\\d{2,5})?", p = '(?:[/?#][^\\s"]*)?', L = "(?:" + v + "|www\\.)" + b + "(?:localhost|" + m + "|" + c + "|" + y + F + g + ")" + _ + p;
|
|
525
|
+
return Ue = new RegExp("(?:^" + L + "$)", "i"), Ue;
|
|
531
526
|
}, Ot = {
|
|
532
527
|
// http://emailregex.com/
|
|
533
528
|
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,
|
|
@@ -536,12 +531,12 @@ var Ut = function(e, n, t, a, o, s) {
|
|
|
536
531
|
// 'i',
|
|
537
532
|
// ),
|
|
538
533
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
539
|
-
},
|
|
534
|
+
}, Ne = {
|
|
540
535
|
integer: function(e) {
|
|
541
|
-
return
|
|
536
|
+
return Ne.number(e) && parseInt(e, 10) === e;
|
|
542
537
|
},
|
|
543
538
|
float: function(e) {
|
|
544
|
-
return
|
|
539
|
+
return Ne.number(e) && !Ne.integer(e);
|
|
545
540
|
},
|
|
546
541
|
array: function(e) {
|
|
547
542
|
return Array.isArray(e);
|
|
@@ -562,7 +557,7 @@ var Ut = function(e, n, t, a, o, s) {
|
|
|
562
557
|
return isNaN(e) ? !1 : typeof e == "number";
|
|
563
558
|
},
|
|
564
559
|
object: function(e) {
|
|
565
|
-
return typeof e == "object" && !
|
|
560
|
+
return typeof e == "object" && !Ne.array(e);
|
|
566
561
|
},
|
|
567
562
|
method: function(e) {
|
|
568
563
|
return typeof e == "function";
|
|
@@ -571,177 +566,177 @@ var Ut = function(e, n, t, a, o, s) {
|
|
|
571
566
|
return typeof e == "string" && e.length <= 320 && !!e.match(Ot.email);
|
|
572
567
|
},
|
|
573
568
|
url: function(e) {
|
|
574
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
569
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(or());
|
|
575
570
|
},
|
|
576
571
|
hex: function(e) {
|
|
577
572
|
return typeof e == "string" && !!e.match(Ot.hex);
|
|
578
573
|
}
|
|
579
|
-
},
|
|
574
|
+
}, sr = function(e, n, t, a, o) {
|
|
580
575
|
if (e.required && n === void 0) {
|
|
581
|
-
|
|
576
|
+
Ht(e, n, t, a, o);
|
|
582
577
|
return;
|
|
583
578
|
}
|
|
584
|
-
var
|
|
585
|
-
|
|
586
|
-
},
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
579
|
+
var l = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], s = e.type;
|
|
580
|
+
l.indexOf(s) > -1 ? Ne[s](n) || a.push(le(o.messages.types[s], e.fullField, e.type)) : s && typeof n !== e.type && a.push(le(o.messages.types[s], e.fullField, e.type));
|
|
581
|
+
}, lr = function(e, n, t, a, o) {
|
|
582
|
+
var l = typeof e.len == "number", s = typeof e.min == "number", d = typeof e.max == "number", v = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, b = n, m = null, c = typeof n == "number", y = typeof n == "string", F = Array.isArray(n);
|
|
583
|
+
if (c ? m = "number" : y ? m = "string" : F && (m = "array"), !m)
|
|
589
584
|
return !1;
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
e[
|
|
593
|
-
},
|
|
585
|
+
F && (b = n.length), y && (b = n.replace(v, "_").length), l ? b !== e.len && a.push(le(o.messages[m].len, e.fullField, e.len)) : s && !d && b < e.min ? a.push(le(o.messages[m].min, e.fullField, e.min)) : d && !s && b > e.max ? a.push(le(o.messages[m].max, e.fullField, e.max)) : s && d && (b < e.min || b > e.max) && a.push(le(o.messages[m].range, e.fullField, e.min, e.max));
|
|
586
|
+
}, Pe = "enum", ir = function(e, n, t, a, o) {
|
|
587
|
+
e[Pe] = Array.isArray(e[Pe]) ? e[Pe] : [], e[Pe].indexOf(n) === -1 && a.push(le(o.messages[Pe], e.fullField, e[Pe].join(", ")));
|
|
588
|
+
}, ur = function(e, n, t, a, o) {
|
|
594
589
|
if (e.pattern) {
|
|
595
590
|
if (e.pattern instanceof RegExp)
|
|
596
591
|
e.pattern.lastIndex = 0, e.pattern.test(n) || a.push(le(o.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
597
592
|
else if (typeof e.pattern == "string") {
|
|
598
|
-
var
|
|
599
|
-
|
|
593
|
+
var l = new RegExp(e.pattern);
|
|
594
|
+
l.test(n) || a.push(le(o.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
600
595
|
}
|
|
601
596
|
}
|
|
602
597
|
}, A = {
|
|
603
|
-
required:
|
|
604
|
-
whitespace:
|
|
605
|
-
type:
|
|
606
|
-
range:
|
|
607
|
-
enum:
|
|
608
|
-
pattern:
|
|
609
|
-
}, ur = function(e, n, t, a, o) {
|
|
610
|
-
var s = [], i = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
611
|
-
if (i) {
|
|
612
|
-
if (Z(n, "string") && !e.required)
|
|
613
|
-
return t();
|
|
614
|
-
A.required(e, n, a, s, o, "string"), Z(n, "string") || (A.type(e, n, a, s, o), A.range(e, n, a, s, o), A.pattern(e, n, a, s, o), e.whitespace === !0 && A.whitespace(e, n, a, s, o));
|
|
615
|
-
}
|
|
616
|
-
t(s);
|
|
598
|
+
required: Ht,
|
|
599
|
+
whitespace: ar,
|
|
600
|
+
type: sr,
|
|
601
|
+
range: lr,
|
|
602
|
+
enum: ir,
|
|
603
|
+
pattern: ur
|
|
617
604
|
}, cr = function(e, n, t, a, o) {
|
|
618
|
-
var
|
|
619
|
-
if (
|
|
620
|
-
if (Z(n) && !e.required)
|
|
605
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
606
|
+
if (s) {
|
|
607
|
+
if (Z(n, "string") && !e.required)
|
|
621
608
|
return t();
|
|
622
|
-
A.required(e, n, a,
|
|
609
|
+
A.required(e, n, a, l, o, "string"), Z(n, "string") || (A.type(e, n, a, l, o), A.range(e, n, a, l, o), A.pattern(e, n, a, l, o), e.whitespace === !0 && A.whitespace(e, n, a, l, o));
|
|
623
610
|
}
|
|
624
|
-
t(
|
|
611
|
+
t(l);
|
|
625
612
|
}, dr = function(e, n, t, a, o) {
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
628
|
-
if (
|
|
613
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
614
|
+
if (s) {
|
|
615
|
+
if (Z(n) && !e.required)
|
|
629
616
|
return t();
|
|
630
|
-
A.required(e, n, a,
|
|
617
|
+
A.required(e, n, a, l, o), n !== void 0 && A.type(e, n, a, l, o);
|
|
631
618
|
}
|
|
632
|
-
t(
|
|
619
|
+
t(l);
|
|
633
620
|
}, pr = function(e, n, t, a, o) {
|
|
634
|
-
var
|
|
635
|
-
if (
|
|
636
|
-
if (Z(n) && !e.required)
|
|
621
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
622
|
+
if (s) {
|
|
623
|
+
if (n === "" && (n = void 0), Z(n) && !e.required)
|
|
637
624
|
return t();
|
|
638
|
-
A.required(e, n, a,
|
|
625
|
+
A.required(e, n, a, l, o), n !== void 0 && (A.type(e, n, a, l, o), A.range(e, n, a, l, o));
|
|
639
626
|
}
|
|
640
|
-
t(
|
|
627
|
+
t(l);
|
|
641
628
|
}, fr = function(e, n, t, a, o) {
|
|
642
|
-
var
|
|
643
|
-
if (
|
|
629
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
630
|
+
if (s) {
|
|
644
631
|
if (Z(n) && !e.required)
|
|
645
632
|
return t();
|
|
646
|
-
A.required(e, n, a,
|
|
633
|
+
A.required(e, n, a, l, o), n !== void 0 && A.type(e, n, a, l, o);
|
|
647
634
|
}
|
|
648
|
-
t(
|
|
635
|
+
t(l);
|
|
649
636
|
}, mr = function(e, n, t, a, o) {
|
|
650
|
-
var
|
|
651
|
-
if (
|
|
637
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
638
|
+
if (s) {
|
|
652
639
|
if (Z(n) && !e.required)
|
|
653
640
|
return t();
|
|
654
|
-
A.required(e, n, a,
|
|
641
|
+
A.required(e, n, a, l, o), Z(n) || A.type(e, n, a, l, o);
|
|
655
642
|
}
|
|
656
|
-
t(
|
|
643
|
+
t(l);
|
|
657
644
|
}, yr = function(e, n, t, a, o) {
|
|
658
|
-
var
|
|
659
|
-
if (
|
|
645
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
646
|
+
if (s) {
|
|
660
647
|
if (Z(n) && !e.required)
|
|
661
648
|
return t();
|
|
662
|
-
A.required(e, n, a,
|
|
649
|
+
A.required(e, n, a, l, o), n !== void 0 && (A.type(e, n, a, l, o), A.range(e, n, a, l, o));
|
|
663
650
|
}
|
|
664
|
-
t(
|
|
651
|
+
t(l);
|
|
665
652
|
}, gr = function(e, n, t, a, o) {
|
|
666
|
-
var
|
|
667
|
-
if (
|
|
668
|
-
if (n
|
|
653
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
654
|
+
if (s) {
|
|
655
|
+
if (Z(n) && !e.required)
|
|
669
656
|
return t();
|
|
670
|
-
A.required(e, n, a,
|
|
657
|
+
A.required(e, n, a, l, o), n !== void 0 && (A.type(e, n, a, l, o), A.range(e, n, a, l, o));
|
|
671
658
|
}
|
|
672
|
-
t(
|
|
659
|
+
t(l);
|
|
673
660
|
}, vr = function(e, n, t, a, o) {
|
|
674
|
-
var
|
|
675
|
-
if (
|
|
661
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
662
|
+
if (s) {
|
|
663
|
+
if (n == null && !e.required)
|
|
664
|
+
return t();
|
|
665
|
+
A.required(e, n, a, l, o, "array"), n != null && (A.type(e, n, a, l, o), A.range(e, n, a, l, o));
|
|
666
|
+
}
|
|
667
|
+
t(l);
|
|
668
|
+
}, hr = function(e, n, t, a, o) {
|
|
669
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
670
|
+
if (s) {
|
|
676
671
|
if (Z(n) && !e.required)
|
|
677
672
|
return t();
|
|
678
|
-
A.required(e, n, a,
|
|
673
|
+
A.required(e, n, a, l, o), n !== void 0 && A.type(e, n, a, l, o);
|
|
679
674
|
}
|
|
680
|
-
t(
|
|
681
|
-
},
|
|
682
|
-
var
|
|
683
|
-
if (
|
|
675
|
+
t(l);
|
|
676
|
+
}, br = "enum", _r = function(e, n, t, a, o) {
|
|
677
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
678
|
+
if (s) {
|
|
684
679
|
if (Z(n) && !e.required)
|
|
685
680
|
return t();
|
|
686
|
-
A.required(e, n, a,
|
|
681
|
+
A.required(e, n, a, l, o), n !== void 0 && A[br](e, n, a, l, o);
|
|
687
682
|
}
|
|
688
|
-
t(
|
|
689
|
-
},
|
|
690
|
-
var
|
|
691
|
-
if (
|
|
683
|
+
t(l);
|
|
684
|
+
}, Cr = function(e, n, t, a, o) {
|
|
685
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
686
|
+
if (s) {
|
|
692
687
|
if (Z(n, "string") && !e.required)
|
|
693
688
|
return t();
|
|
694
|
-
A.required(e, n, a,
|
|
689
|
+
A.required(e, n, a, l, o), Z(n, "string") || A.pattern(e, n, a, l, o);
|
|
695
690
|
}
|
|
696
|
-
t(
|
|
697
|
-
},
|
|
698
|
-
var
|
|
699
|
-
if (
|
|
691
|
+
t(l);
|
|
692
|
+
}, $r = function(e, n, t, a, o) {
|
|
693
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
694
|
+
if (s) {
|
|
700
695
|
if (Z(n, "date") && !e.required)
|
|
701
696
|
return t();
|
|
702
|
-
if (A.required(e, n, a,
|
|
703
|
-
var
|
|
704
|
-
n instanceof Date ?
|
|
697
|
+
if (A.required(e, n, a, l, o), !Z(n, "date")) {
|
|
698
|
+
var d;
|
|
699
|
+
n instanceof Date ? d = n : d = new Date(n), A.type(e, d, a, l, o), d && A.range(e, d.getTime(), a, l, o);
|
|
705
700
|
}
|
|
706
701
|
}
|
|
707
|
-
t(
|
|
708
|
-
},
|
|
709
|
-
var
|
|
710
|
-
A.required(e, n, a,
|
|
702
|
+
t(l);
|
|
703
|
+
}, wr = function(e, n, t, a, o) {
|
|
704
|
+
var l = [], s = Array.isArray(n) ? "array" : typeof n;
|
|
705
|
+
A.required(e, n, a, l, o, s), t(l);
|
|
711
706
|
}, st = function(e, n, t, a, o) {
|
|
712
|
-
var
|
|
713
|
-
if (
|
|
714
|
-
if (Z(n,
|
|
707
|
+
var l = e.type, s = [], d = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
708
|
+
if (d) {
|
|
709
|
+
if (Z(n, l) && !e.required)
|
|
715
710
|
return t();
|
|
716
|
-
A.required(e, n, a,
|
|
711
|
+
A.required(e, n, a, s, o, l), Z(n, l) || A.type(e, n, a, s, o);
|
|
717
712
|
}
|
|
718
|
-
t(
|
|
719
|
-
},
|
|
720
|
-
var
|
|
721
|
-
if (
|
|
713
|
+
t(s);
|
|
714
|
+
}, Sr = function(e, n, t, a, o) {
|
|
715
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
716
|
+
if (s) {
|
|
722
717
|
if (Z(n) && !e.required)
|
|
723
718
|
return t();
|
|
724
|
-
A.required(e, n, a,
|
|
719
|
+
A.required(e, n, a, l, o);
|
|
725
720
|
}
|
|
726
|
-
t(
|
|
727
|
-
},
|
|
728
|
-
string:
|
|
729
|
-
method:
|
|
730
|
-
number:
|
|
731
|
-
boolean:
|
|
732
|
-
regexp:
|
|
733
|
-
integer:
|
|
734
|
-
float:
|
|
735
|
-
array:
|
|
736
|
-
object:
|
|
737
|
-
enum:
|
|
738
|
-
pattern:
|
|
739
|
-
date:
|
|
721
|
+
t(l);
|
|
722
|
+
}, Be = {
|
|
723
|
+
string: cr,
|
|
724
|
+
method: dr,
|
|
725
|
+
number: pr,
|
|
726
|
+
boolean: fr,
|
|
727
|
+
regexp: mr,
|
|
728
|
+
integer: yr,
|
|
729
|
+
float: gr,
|
|
730
|
+
array: vr,
|
|
731
|
+
object: hr,
|
|
732
|
+
enum: _r,
|
|
733
|
+
pattern: Cr,
|
|
734
|
+
date: $r,
|
|
740
735
|
url: st,
|
|
741
736
|
hex: st,
|
|
742
737
|
email: st,
|
|
743
|
-
required:
|
|
744
|
-
any:
|
|
738
|
+
required: wr,
|
|
739
|
+
any: Sr
|
|
745
740
|
};
|
|
746
741
|
function ft() {
|
|
747
742
|
return {
|
|
@@ -796,7 +791,7 @@ function ft() {
|
|
|
796
791
|
}
|
|
797
792
|
};
|
|
798
793
|
}
|
|
799
|
-
var mt = ft(),
|
|
794
|
+
var mt = ft(), Le = /* @__PURE__ */ function() {
|
|
800
795
|
function r(n) {
|
|
801
796
|
this.rules = null, this._messages = mt, this.define(n);
|
|
802
797
|
}
|
|
@@ -808,171 +803,171 @@ var mt = ft(), je = /* @__PURE__ */ function() {
|
|
|
808
803
|
if (typeof t != "object" || Array.isArray(t))
|
|
809
804
|
throw new Error("Rules must be an object");
|
|
810
805
|
this.rules = {}, Object.keys(t).forEach(function(o) {
|
|
811
|
-
var
|
|
812
|
-
a.rules[o] = Array.isArray(
|
|
806
|
+
var l = t[o];
|
|
807
|
+
a.rules[o] = Array.isArray(l) ? l : [l];
|
|
813
808
|
});
|
|
814
809
|
}, e.messages = function(t) {
|
|
815
810
|
return t && (this._messages = Tt(ft(), t)), this._messages;
|
|
816
811
|
}, e.validate = function(t, a, o) {
|
|
817
|
-
var
|
|
812
|
+
var l = this;
|
|
818
813
|
a === void 0 && (a = {}), o === void 0 && (o = function() {
|
|
819
814
|
});
|
|
820
|
-
var
|
|
821
|
-
if (typeof
|
|
822
|
-
return v && v(null,
|
|
815
|
+
var s = t, d = a, v = o;
|
|
816
|
+
if (typeof d == "function" && (v = d, d = {}), !this.rules || Object.keys(this.rules).length === 0)
|
|
817
|
+
return v && v(null, s), Promise.resolve(s);
|
|
823
818
|
function b(g) {
|
|
824
819
|
var _ = [], p = {};
|
|
825
|
-
function
|
|
826
|
-
if (Array.isArray(
|
|
827
|
-
var
|
|
828
|
-
_ = (
|
|
820
|
+
function L(S) {
|
|
821
|
+
if (Array.isArray(S)) {
|
|
822
|
+
var j;
|
|
823
|
+
_ = (j = _).concat.apply(j, S);
|
|
829
824
|
} else
|
|
830
|
-
_.push(
|
|
825
|
+
_.push(S);
|
|
831
826
|
}
|
|
832
|
-
for (var
|
|
833
|
-
|
|
834
|
-
_.length ? (p = pt(_), v(_, p)) : v(null,
|
|
827
|
+
for (var f = 0; f < g.length; f++)
|
|
828
|
+
L(g[f]);
|
|
829
|
+
_.length ? (p = pt(_), v(_, p)) : v(null, s);
|
|
835
830
|
}
|
|
836
|
-
if (
|
|
837
|
-
var
|
|
838
|
-
|
|
831
|
+
if (d.messages) {
|
|
832
|
+
var m = this.messages();
|
|
833
|
+
m === mt && (m = ft()), Tt(m, d.messages), d.messages = m;
|
|
839
834
|
} else
|
|
840
|
-
|
|
841
|
-
var
|
|
835
|
+
d.messages = this.messages();
|
|
836
|
+
var c = {}, y = d.keys || Object.keys(this.rules);
|
|
842
837
|
y.forEach(function(g) {
|
|
843
|
-
var _ =
|
|
844
|
-
_.forEach(function(
|
|
845
|
-
var
|
|
846
|
-
typeof
|
|
847
|
-
validator:
|
|
848
|
-
} :
|
|
849
|
-
rule:
|
|
838
|
+
var _ = l.rules[g], p = s[g];
|
|
839
|
+
_.forEach(function(L) {
|
|
840
|
+
var f = L;
|
|
841
|
+
typeof f.transform == "function" && (s === t && (s = Fe({}, s)), p = s[g] = f.transform(p)), typeof f == "function" ? f = {
|
|
842
|
+
validator: f
|
|
843
|
+
} : f = Fe({}, f), f.validator = l.getValidationMethod(f), f.validator && (f.field = g, f.fullField = f.fullField || g, f.type = l.getType(f), c[g] = c[g] || [], c[g].push({
|
|
844
|
+
rule: f,
|
|
850
845
|
value: p,
|
|
851
|
-
source:
|
|
846
|
+
source: s,
|
|
852
847
|
field: g
|
|
853
848
|
}));
|
|
854
849
|
});
|
|
855
850
|
});
|
|
856
|
-
var
|
|
857
|
-
return
|
|
858
|
-
var p = g.rule,
|
|
859
|
-
|
|
860
|
-
function
|
|
861
|
-
return
|
|
862
|
-
fullField: p.fullField + "." +
|
|
863
|
-
fullFields: p.fullFields ? [].concat(p.fullFields, [
|
|
851
|
+
var F = {};
|
|
852
|
+
return tr(c, d, function(g, _) {
|
|
853
|
+
var p = g.rule, L = (p.type === "object" || p.type === "array") && (typeof p.fields == "object" || typeof p.defaultField == "object");
|
|
854
|
+
L = L && (p.required || !p.required && g.value), p.field = g.field;
|
|
855
|
+
function f(V, te) {
|
|
856
|
+
return Fe({}, te, {
|
|
857
|
+
fullField: p.fullField + "." + V,
|
|
858
|
+
fullFields: p.fullFields ? [].concat(p.fullFields, [V]) : [V]
|
|
864
859
|
});
|
|
865
860
|
}
|
|
866
|
-
function
|
|
867
|
-
|
|
868
|
-
var te = Array.isArray(
|
|
869
|
-
!
|
|
870
|
-
var
|
|
871
|
-
if (
|
|
872
|
-
return
|
|
873
|
-
if (!
|
|
874
|
-
_(
|
|
861
|
+
function S(V) {
|
|
862
|
+
V === void 0 && (V = []);
|
|
863
|
+
var te = Array.isArray(V) ? V : [V];
|
|
864
|
+
!d.suppressWarning && te.length && r.warning("async-validator:", te), te.length && p.message !== void 0 && (te = [].concat(p.message));
|
|
865
|
+
var D = te.map(kt(p, s));
|
|
866
|
+
if (d.first && D.length)
|
|
867
|
+
return F[p.field] = 1, _(D);
|
|
868
|
+
if (!L)
|
|
869
|
+
_(D);
|
|
875
870
|
else {
|
|
876
871
|
if (p.required && !g.value)
|
|
877
|
-
return p.message !== void 0 ?
|
|
872
|
+
return p.message !== void 0 ? D = [].concat(p.message).map(kt(p, s)) : d.error && (D = [d.error(p, le(d.messages.required, p.field))]), _(D);
|
|
878
873
|
var ue = {};
|
|
879
|
-
p.defaultField && Object.keys(g.value).map(function(
|
|
880
|
-
ue[
|
|
881
|
-
}), ue =
|
|
882
|
-
var
|
|
883
|
-
Object.keys(ue).forEach(function(
|
|
884
|
-
var
|
|
885
|
-
|
|
874
|
+
p.defaultField && Object.keys(g.value).map(function(re) {
|
|
875
|
+
ue[re] = p.defaultField;
|
|
876
|
+
}), ue = Fe({}, ue, g.rule.fields);
|
|
877
|
+
var Te = {};
|
|
878
|
+
Object.keys(ue).forEach(function(re) {
|
|
879
|
+
var ae = ue[re], Ie = Array.isArray(ae) ? ae : [ae];
|
|
880
|
+
Te[re] = Ie.map(f.bind(null, re));
|
|
886
881
|
});
|
|
887
|
-
var
|
|
888
|
-
|
|
889
|
-
var
|
|
890
|
-
|
|
882
|
+
var Se = new r(Te);
|
|
883
|
+
Se.messages(d.messages), g.rule.options && (g.rule.options.messages = d.messages, g.rule.options.error = d.error), Se.validate(g.value, g.rule.options || d, function(re) {
|
|
884
|
+
var ae = [];
|
|
885
|
+
D && D.length && ae.push.apply(ae, D), re && re.length && ae.push.apply(ae, re), _(ae.length ? ae : null);
|
|
891
886
|
});
|
|
892
887
|
}
|
|
893
888
|
}
|
|
894
|
-
var
|
|
889
|
+
var j;
|
|
895
890
|
if (p.asyncValidator)
|
|
896
|
-
|
|
891
|
+
j = p.asyncValidator(p, g.value, S, g.source, d);
|
|
897
892
|
else if (p.validator) {
|
|
898
893
|
try {
|
|
899
|
-
|
|
900
|
-
} catch (
|
|
901
|
-
console.error == null || console.error(
|
|
902
|
-
throw
|
|
903
|
-
}, 0),
|
|
894
|
+
j = p.validator(p, g.value, S, g.source, d);
|
|
895
|
+
} catch (V) {
|
|
896
|
+
console.error == null || console.error(V), d.suppressValidatorError || setTimeout(function() {
|
|
897
|
+
throw V;
|
|
898
|
+
}, 0), S(V.message);
|
|
904
899
|
}
|
|
905
|
-
|
|
900
|
+
j === !0 ? S() : j === !1 ? S(typeof p.message == "function" ? p.message(p.fullField || p.field) : p.message || (p.fullField || p.field) + " fails") : j instanceof Array ? S(j) : j instanceof Error && S(j.message);
|
|
906
901
|
}
|
|
907
|
-
|
|
908
|
-
return
|
|
909
|
-
}, function(
|
|
910
|
-
return
|
|
902
|
+
j && j.then && j.then(function() {
|
|
903
|
+
return S();
|
|
904
|
+
}, function(V) {
|
|
905
|
+
return S(V);
|
|
911
906
|
});
|
|
912
907
|
}, function(g) {
|
|
913
908
|
b(g);
|
|
914
|
-
},
|
|
909
|
+
}, s);
|
|
915
910
|
}, e.getType = function(t) {
|
|
916
|
-
if (t.type === void 0 && t.pattern instanceof RegExp && (t.type = "pattern"), typeof t.validator != "function" && t.type && !
|
|
911
|
+
if (t.type === void 0 && t.pattern instanceof RegExp && (t.type = "pattern"), typeof t.validator != "function" && t.type && !Be.hasOwnProperty(t.type))
|
|
917
912
|
throw new Error(le("Unknown rule type %s", t.type));
|
|
918
913
|
return t.type || "string";
|
|
919
914
|
}, e.getValidationMethod = function(t) {
|
|
920
915
|
if (typeof t.validator == "function")
|
|
921
916
|
return t.validator;
|
|
922
917
|
var a = Object.keys(t), o = a.indexOf("message");
|
|
923
|
-
return o !== -1 && a.splice(o, 1), a.length === 1 && a[0] === "required" ?
|
|
918
|
+
return o !== -1 && a.splice(o, 1), a.length === 1 && a[0] === "required" ? Be.required : Be[this.getType(t)] || void 0;
|
|
924
919
|
}, r;
|
|
925
920
|
}();
|
|
926
|
-
|
|
921
|
+
Le.register = function(e, n) {
|
|
927
922
|
if (typeof n != "function")
|
|
928
923
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
929
|
-
|
|
924
|
+
Be[e] = n;
|
|
930
925
|
};
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
const ge = (r) => Object.prototype.toString.call(r).slice(8, -1).toLowerCase(),
|
|
926
|
+
Le.warning = Yt;
|
|
927
|
+
Le.messages = mt;
|
|
928
|
+
Le.validators = Be;
|
|
929
|
+
const ge = (r) => Object.prototype.toString.call(r).slice(8, -1).toLowerCase(), Ir = (r) => (xr(r), r.map((e, n) => ({
|
|
935
930
|
...e,
|
|
936
931
|
props: e.props ?? {},
|
|
937
932
|
visible: e.visible ?? !0,
|
|
938
933
|
_order: n,
|
|
939
934
|
_defaultValue: e.value
|
|
940
|
-
}))),
|
|
941
|
-
const { content: t, width: a = 120, visible: o = !0, resizable:
|
|
935
|
+
}))), Pt = (r) => (kr(r), r.map((e, n) => {
|
|
936
|
+
const { content: t, width: a = 120, visible: o = !0, resizable: l = !0, ellipsis: s = !0, component: d } = e;
|
|
942
937
|
return {
|
|
943
938
|
...e,
|
|
944
939
|
dataIndex: typeof t == "string" ? t : void 0,
|
|
945
940
|
width: a,
|
|
946
941
|
visible: o,
|
|
947
|
-
resizable:
|
|
948
|
-
ellipsis:
|
|
949
|
-
component:
|
|
942
|
+
resizable: l,
|
|
943
|
+
ellipsis: s,
|
|
944
|
+
component: d ? X(d) : void 0,
|
|
950
945
|
index: n
|
|
951
946
|
};
|
|
952
|
-
})),
|
|
953
|
-
const a =
|
|
947
|
+
})), Fr = (r, e, n) => r.sort((t, a) => n.indexOf(t.code) - n.indexOf(a.code)).map((t) => {
|
|
948
|
+
const a = Or(t.value ?? "", null);
|
|
954
949
|
if (a)
|
|
955
950
|
return {
|
|
956
951
|
...t,
|
|
957
952
|
items: a.map((o) => {
|
|
958
|
-
var
|
|
959
|
-
const
|
|
960
|
-
return
|
|
953
|
+
var s;
|
|
954
|
+
const l = e[o.name];
|
|
955
|
+
return l ? l.type !== o.type ? console.warn(`formItem type not match: name = ${o.name}, type = ${o.type}`) : o.type === H.datePicker && o.value ? {
|
|
961
956
|
...o,
|
|
962
|
-
value: o.value ?
|
|
963
|
-
} : o.type === H.rangePicker && ((
|
|
957
|
+
value: o.value ? Re(o.value) : void 0
|
|
958
|
+
} : o.type === H.rangePicker && ((s = o.value) != null && s.length) ? {
|
|
964
959
|
...o,
|
|
965
|
-
value: o.value.map(
|
|
960
|
+
value: o.value.map(Re)
|
|
966
961
|
} : o : console.warn(`formItem not exit: name = ${o.name}`);
|
|
967
962
|
}).filter(Boolean)
|
|
968
963
|
};
|
|
969
964
|
}).filter(Boolean);
|
|
970
|
-
function
|
|
965
|
+
function Ce(...r) {
|
|
971
966
|
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...r);
|
|
972
967
|
}
|
|
973
|
-
const
|
|
968
|
+
const xr = (r) => {
|
|
974
969
|
r.forEach((e) => {
|
|
975
|
-
new
|
|
970
|
+
new Le({
|
|
976
971
|
type: [
|
|
977
972
|
{ required: !0 },
|
|
978
973
|
{
|
|
@@ -1000,9 +995,9 @@ const Fr = (r) => {
|
|
|
1000
995
|
});
|
|
1001
996
|
});
|
|
1002
997
|
});
|
|
1003
|
-
},
|
|
998
|
+
}, kr = (r) => {
|
|
1004
999
|
r.forEach((e) => {
|
|
1005
|
-
new
|
|
1000
|
+
new Le({
|
|
1006
1001
|
key: [{ required: !0, type: "string" }],
|
|
1007
1002
|
type: [
|
|
1008
1003
|
{
|
|
@@ -1044,41 +1039,34 @@ const Fr = (r) => {
|
|
|
1044
1039
|
});
|
|
1045
1040
|
});
|
|
1046
1041
|
});
|
|
1047
|
-
},
|
|
1042
|
+
}, Tr = (r, e) => {
|
|
1048
1043
|
if (!r) return 0;
|
|
1049
1044
|
const t = document.createElement("canvas").getContext("2d");
|
|
1050
1045
|
return t ? (t.font = [
|
|
1051
1046
|
400,
|
|
1052
|
-
`${
|
|
1053
|
-
|
|
1047
|
+
`${we.fontSize}px`,
|
|
1048
|
+
we.fontFamily
|
|
1054
1049
|
].join(" "), Math.ceil(t.measureText(r).width)) : 0;
|
|
1055
|
-
},
|
|
1050
|
+
}, Or = (r, e) => {
|
|
1056
1051
|
if (r === "" || r === null)
|
|
1057
1052
|
return e;
|
|
1058
1053
|
try {
|
|
1059
1054
|
return JSON.parse(r);
|
|
1060
1055
|
} catch (n) {
|
|
1061
|
-
return
|
|
1056
|
+
return Ce(`[pro-table]: parseJsonSafe error, ${n}`, {
|
|
1062
1057
|
jsonString: r,
|
|
1063
1058
|
defaultVal: e
|
|
1064
1059
|
}), e;
|
|
1065
1060
|
}
|
|
1066
|
-
},
|
|
1061
|
+
}, Pr = (r) => {
|
|
1067
1062
|
let e = 0;
|
|
1068
1063
|
for (let n = 0; n < r.length; n++)
|
|
1069
1064
|
e = (e << 5) - e + r.charCodeAt(n), e |= 0;
|
|
1070
1065
|
return e.toString(16);
|
|
1071
|
-
},
|
|
1072
|
-
const e =
|
|
1073
|
-
return
|
|
1074
|
-
},
|
|
1075
|
-
document.cookie.replace(
|
|
1076
|
-
new RegExp(
|
|
1077
|
-
"(?:(?:^|.*;)\\s*" + encodeURIComponent(r).replace(/[-.+*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"
|
|
1078
|
-
),
|
|
1079
|
-
"$1"
|
|
1080
|
-
)
|
|
1081
|
-
) || "", qr = /* @__PURE__ */ ie({
|
|
1066
|
+
}, Ut = (r) => {
|
|
1067
|
+
const e = Pr(r);
|
|
1068
|
+
return Rn(e, "1b671a64-40d5-491e-99b0-da01ff1f3341").replace(/-/g, "");
|
|
1069
|
+
}, qr = /* @__PURE__ */ ie({
|
|
1082
1070
|
__name: "EllipsisElement",
|
|
1083
1071
|
props: {
|
|
1084
1072
|
/**
|
|
@@ -1145,117 +1133,117 @@ const Fr = (r) => {
|
|
|
1145
1133
|
}
|
|
1146
1134
|
},
|
|
1147
1135
|
setup(r) {
|
|
1148
|
-
const e = r, n =
|
|
1136
|
+
const e = r, n = M(() => e.list.map((s) => ge(s) === "object" ? s : { label: s }).map((s, d) => ({ ...s, index: d, __key: s.key ?? `${d}-${String(s.label)}` }))), t = M(() => St(n.value, 0, e.maxCount)), a = M(
|
|
1149
1137
|
() => St(n.value, e.maxCount, n.value.length)
|
|
1150
|
-
), o =
|
|
1151
|
-
key:
|
|
1138
|
+
), o = M(() => a.value.map(({ index: s, disabled: d, label: v, onClick: b }) => ({
|
|
1139
|
+
key: s + e.maxCount,
|
|
1152
1140
|
label: v,
|
|
1153
|
-
disabled:
|
|
1141
|
+
disabled: d,
|
|
1154
1142
|
onClick: () => b == null ? void 0 : b(e.record)
|
|
1155
|
-
}))),
|
|
1156
|
-
const
|
|
1157
|
-
return b === R.text && (
|
|
1143
|
+
}))), l = M(() => {
|
|
1144
|
+
const s = {}, { maxCount: d, cellWidth: v, type: b } = e;
|
|
1145
|
+
return b === R.text && (s.flex = 1), b === R.link && t.value.length > 1 && (s.maxWidth = `${((v - 50) / v / d * 100).toFixed(2)}%`), s;
|
|
1158
1146
|
});
|
|
1159
|
-
return (
|
|
1160
|
-
const v = P("a-tag"), b = P("a-popover"),
|
|
1147
|
+
return (s, d) => {
|
|
1148
|
+
const v = P("a-tag"), b = P("a-popover"), m = P("a-button"), c = P("a-menu"), y = P("a-dropdown");
|
|
1161
1149
|
return I(), U("div", {
|
|
1162
|
-
class:
|
|
1163
|
-
|
|
1150
|
+
class: $([
|
|
1151
|
+
s.$style.ellipsisElement,
|
|
1164
1152
|
{
|
|
1165
|
-
[
|
|
1153
|
+
[s.$style.ellipsisElementHasGap]: ![w(R).button, w(R).tag].includes(r.type)
|
|
1166
1154
|
}
|
|
1167
1155
|
])
|
|
1168
1156
|
}, [
|
|
1169
|
-
(I(!0), U(
|
|
1170
|
-
key:
|
|
1171
|
-
class:
|
|
1172
|
-
style:
|
|
1157
|
+
(I(!0), U(xe, null, lt(t.value, (F, g) => (I(), U("div", {
|
|
1158
|
+
key: F.__key,
|
|
1159
|
+
class: $(s.$style.elementItem),
|
|
1160
|
+
style: $e(l.value)
|
|
1173
1161
|
}, [
|
|
1174
|
-
pe(
|
|
1175
|
-
item:
|
|
1162
|
+
pe(s.$slots, "default", {
|
|
1163
|
+
item: F,
|
|
1176
1164
|
index: g
|
|
1177
1165
|
})
|
|
1178
1166
|
], 6))), 128)),
|
|
1179
|
-
a.value.length ? (I(), U(
|
|
1180
|
-
r.displayType === "popover" ? (I(),
|
|
1167
|
+
a.value.length ? (I(), U(xe, { key: 0 }, [
|
|
1168
|
+
r.displayType === "popover" ? (I(), E(b, {
|
|
1181
1169
|
key: 0,
|
|
1182
1170
|
trigger: r.trigger,
|
|
1183
1171
|
"overlay-style": { maxWidth: "500px" },
|
|
1184
1172
|
"destroy-on-close": ""
|
|
1185
1173
|
}, {
|
|
1186
|
-
content:
|
|
1187
|
-
|
|
1188
|
-
class:
|
|
1174
|
+
content: C(() => [
|
|
1175
|
+
J("div", {
|
|
1176
|
+
class: $(s.$style.ellipsisList)
|
|
1189
1177
|
}, [
|
|
1190
|
-
(I(!0), U(
|
|
1191
|
-
key:
|
|
1192
|
-
item:
|
|
1178
|
+
(I(!0), U(xe, null, lt(a.value, (F, g) => pe(s.$slots, "default", {
|
|
1179
|
+
key: F.__key,
|
|
1180
|
+
item: F,
|
|
1193
1181
|
index: g + r.maxCount,
|
|
1194
1182
|
inPopover: !0
|
|
1195
1183
|
})), 128))
|
|
1196
1184
|
], 2)
|
|
1197
1185
|
]),
|
|
1198
|
-
default:
|
|
1186
|
+
default: C(() => [
|
|
1199
1187
|
T(v, {
|
|
1200
1188
|
size: "mini",
|
|
1201
1189
|
type: "info",
|
|
1202
|
-
class:
|
|
1203
|
-
|
|
1190
|
+
class: $([
|
|
1191
|
+
s.$style.ellipsisTag,
|
|
1204
1192
|
{
|
|
1205
|
-
[
|
|
1193
|
+
[s.$style.imageEllipsisTag]: r.type === w(R).image
|
|
1206
1194
|
}
|
|
1207
1195
|
])
|
|
1208
1196
|
}, {
|
|
1209
|
-
default:
|
|
1210
|
-
K(
|
|
1197
|
+
default: C(() => [
|
|
1198
|
+
K(be(`+${a.value.length}...`), 1)
|
|
1211
1199
|
]),
|
|
1212
1200
|
_: 1
|
|
1213
1201
|
}, 8, ["class"])
|
|
1214
1202
|
]),
|
|
1215
1203
|
_: 3
|
|
1216
|
-
}, 8, ["trigger"])) :
|
|
1217
|
-
r.displayType === "dropdown" ? (I(),
|
|
1204
|
+
}, 8, ["trigger"])) : N("", !0),
|
|
1205
|
+
r.displayType === "dropdown" ? (I(), E(y, {
|
|
1218
1206
|
key: 1,
|
|
1219
1207
|
"destroy-on-close": "",
|
|
1220
1208
|
trigger: r.trigger
|
|
1221
1209
|
}, {
|
|
1222
|
-
overlay:
|
|
1223
|
-
T(
|
|
1210
|
+
overlay: C(() => [
|
|
1211
|
+
T(c, { items: o.value }, null, 8, ["items"])
|
|
1224
1212
|
]),
|
|
1225
|
-
default:
|
|
1226
|
-
T(
|
|
1213
|
+
default: C(() => [
|
|
1214
|
+
T(m, {
|
|
1227
1215
|
type: "link",
|
|
1228
1216
|
size: "small"
|
|
1229
1217
|
}, {
|
|
1230
|
-
default:
|
|
1231
|
-
|
|
1232
|
-
T(
|
|
1218
|
+
default: C(() => [
|
|
1219
|
+
d[0] || (d[0] = K(" 更多 ")),
|
|
1220
|
+
T(w(xn))
|
|
1233
1221
|
]),
|
|
1234
1222
|
_: 1
|
|
1235
1223
|
})
|
|
1236
1224
|
]),
|
|
1237
1225
|
_: 1
|
|
1238
|
-
}, 8, ["trigger"])) :
|
|
1239
|
-
], 64)) :
|
|
1226
|
+
}, 8, ["trigger"])) : N("", !0)
|
|
1227
|
+
], 64)) : N("", !0)
|
|
1240
1228
|
], 2);
|
|
1241
1229
|
};
|
|
1242
1230
|
}
|
|
1243
|
-
}),
|
|
1244
|
-
ellipsisElement:
|
|
1245
|
-
elementItem:
|
|
1246
|
-
ellipsisElementHasGap:
|
|
1247
|
-
flexWrap:
|
|
1231
|
+
}), jr = "_ellipsisElement_6fog1_1", Lr = "_elementItem_6fog1_6", Er = "_ellipsisElementHasGap_6fog1_10", Mr = "_flexWrap_6fog1_14", Ar = "_ellipsisTag_6fog1_18", Nr = "_imageEllipsisTag_6fog1_22", Br = "_ellipsisList_6fog1_29", Dr = {
|
|
1232
|
+
ellipsisElement: jr,
|
|
1233
|
+
elementItem: Lr,
|
|
1234
|
+
ellipsisElementHasGap: Er,
|
|
1235
|
+
flexWrap: Mr,
|
|
1248
1236
|
ellipsisTag: Ar,
|
|
1249
|
-
imageEllipsisTag:
|
|
1250
|
-
ellipsisList:
|
|
1237
|
+
imageEllipsisTag: Nr,
|
|
1238
|
+
ellipsisList: Br
|
|
1251
1239
|
}, fe = (r, e) => {
|
|
1252
1240
|
const n = r.__vccOpts || r;
|
|
1253
1241
|
for (const [t, a] of e)
|
|
1254
1242
|
n[t] = a;
|
|
1255
1243
|
return n;
|
|
1256
|
-
},
|
|
1257
|
-
$style:
|
|
1258
|
-
},
|
|
1244
|
+
}, Rr = {
|
|
1245
|
+
$style: Dr
|
|
1246
|
+
}, Vr = /* @__PURE__ */ fe(qr, [["__cssModules", Rr]]), Yr = { key: 1 }, Hr = /* @__PURE__ */ ie({
|
|
1259
1247
|
__name: "TableCellContent",
|
|
1260
1248
|
props: {
|
|
1261
1249
|
/**
|
|
@@ -1295,139 +1283,139 @@ const Fr = (r) => {
|
|
|
1295
1283
|
}
|
|
1296
1284
|
},
|
|
1297
1285
|
setup(r) {
|
|
1298
|
-
const e = r, n = /* @__PURE__ */ new Map(), t =
|
|
1299
|
-
const { index: y, record:
|
|
1300
|
-
return
|
|
1301
|
-
}), a =
|
|
1302
|
-
const { index: y, record:
|
|
1303
|
-
if (
|
|
1304
|
-
return _(
|
|
1286
|
+
const e = r, n = /* @__PURE__ */ new Map(), t = M(() => {
|
|
1287
|
+
const { index: y, record: F, column: g } = e, _ = (g == null ? void 0 : g.type) ?? R.text;
|
|
1288
|
+
return _e(_) ? _(F, y) : _;
|
|
1289
|
+
}), a = M(() => {
|
|
1290
|
+
const { index: y, record: F, column: g } = e, _ = g.content;
|
|
1291
|
+
if (_e(_))
|
|
1292
|
+
return _(F, y);
|
|
1305
1293
|
if (typeof _ == "string") {
|
|
1306
1294
|
if (_.startsWith("$")) {
|
|
1307
1295
|
let p = n.get(_);
|
|
1308
1296
|
p || (p = /* @__PURE__ */ new WeakMap(), n.set(_, p));
|
|
1309
|
-
const
|
|
1310
|
-
if (
|
|
1311
|
-
const
|
|
1312
|
-
return p.set(
|
|
1297
|
+
const L = p.get(F);
|
|
1298
|
+
if (L !== void 0) return L;
|
|
1299
|
+
const f = Dn({ path: _, json: F });
|
|
1300
|
+
return p.set(F, f), f;
|
|
1313
1301
|
}
|
|
1314
|
-
return Xe(
|
|
1302
|
+
return Xe(F, _, "");
|
|
1315
1303
|
}
|
|
1316
1304
|
return "";
|
|
1317
|
-
}), o =
|
|
1318
|
-
const { index: y, record:
|
|
1305
|
+
}), o = M(() => je(a.value)), l = M(() => {
|
|
1306
|
+
const { index: y, record: F, column: g } = e;
|
|
1319
1307
|
if (t.value === R.component) {
|
|
1320
1308
|
const { props: _ = {} } = g;
|
|
1321
|
-
return
|
|
1309
|
+
return _e(_) ? _(F, y) : {
|
|
1322
1310
|
..._,
|
|
1323
1311
|
index: y,
|
|
1324
|
-
record:
|
|
1312
|
+
record: F
|
|
1325
1313
|
};
|
|
1326
1314
|
}
|
|
1327
1315
|
return {};
|
|
1328
|
-
}),
|
|
1329
|
-
const { index: y, record:
|
|
1316
|
+
}), s = M(() => {
|
|
1317
|
+
const { index: y, record: F, column: g } = e, _ = g.tooltip ?? [R.text, R.link].includes(t.value);
|
|
1330
1318
|
if (!_) return "";
|
|
1331
|
-
if (
|
|
1332
|
-
return _(
|
|
1319
|
+
if (_e(_))
|
|
1320
|
+
return _(F, y);
|
|
1333
1321
|
const p = o.value[0];
|
|
1334
1322
|
return (p == null ? void 0 : p.label) || p;
|
|
1335
|
-
}),
|
|
1336
|
-
return (y,
|
|
1337
|
-
var
|
|
1338
|
-
const g = P("a-button"), _ = P("a-typography-text"), p = P("a-tag"),
|
|
1339
|
-
return
|
|
1323
|
+
}), d = M(() => !(["", void 0, null].includes(a.value) && ![R.component, R.sort].includes(t.value))), v = (y) => typeof y == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(y), b = (y) => e.hasRouter && !v(y), m = (y) => b(y) ? "router-link" : "a", c = (y, F) => b(y) ? { to: y, target: F ?? "_blank" } : { href: y, target: F ?? "_blank" };
|
|
1324
|
+
return (y, F) => {
|
|
1325
|
+
var f;
|
|
1326
|
+
const g = P("a-button"), _ = P("a-typography-text"), p = P("a-tag"), L = P("a-image");
|
|
1327
|
+
return d.value ? (I(), U("div", {
|
|
1340
1328
|
key: 0,
|
|
1341
|
-
class:
|
|
1329
|
+
class: $(y.$style.tableCellContent)
|
|
1342
1330
|
}, [
|
|
1343
|
-
t.value ===
|
|
1331
|
+
t.value === w(R).sort ? (I(), E(g, {
|
|
1344
1332
|
key: 0,
|
|
1345
1333
|
type: "text",
|
|
1346
1334
|
size: "small",
|
|
1347
|
-
icon: X(
|
|
1348
|
-
class:
|
|
1349
|
-
}, null, 8, ["icon", "class"])) :
|
|
1350
|
-
t.value ===
|
|
1335
|
+
icon: X(w(De)),
|
|
1336
|
+
class: $([y.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1337
|
+
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
1338
|
+
t.value === w(R).component ? (I(), E(Ke(r.column.component), at(oe({ key: 1 }, l.value)), null, 16)) : Mt([(f = r.column) == null ? void 0 : f.key, r.index, o.value], () => (I(), E(Vr, {
|
|
1351
1339
|
key: 2,
|
|
1352
1340
|
list: o.value,
|
|
1353
|
-
"max-count": t.value ===
|
|
1341
|
+
"max-count": t.value === w(R).text ? 1 : r.column.maxCount,
|
|
1354
1342
|
record: r.record,
|
|
1355
1343
|
type: t.value,
|
|
1356
1344
|
"cell-width": r.column.width,
|
|
1357
|
-
"display-type": [
|
|
1345
|
+
"display-type": [w(R).button].includes(t.value) ? "dropdown" : "popover"
|
|
1358
1346
|
}, {
|
|
1359
|
-
default:
|
|
1360
|
-
t.value ===
|
|
1361
|
-
|
|
1347
|
+
default: C(({ item: S, index: j, inPopover: V }) => [
|
|
1348
|
+
t.value === w(R).text ? (I(), U(xe, { key: 0 }, [
|
|
1349
|
+
j === 0 ? (I(), E(_, {
|
|
1362
1350
|
key: 0,
|
|
1363
|
-
ellipsis: { tooltip:
|
|
1364
|
-
content: String(
|
|
1365
|
-
class:
|
|
1351
|
+
ellipsis: { tooltip: s.value },
|
|
1352
|
+
content: String(S.label),
|
|
1353
|
+
class: $(y.$style.antTypographyEllipsis)
|
|
1366
1354
|
}, null, 8, ["ellipsis", "content", "class"])) : (I(), U("div", {
|
|
1367
1355
|
key: 1,
|
|
1368
|
-
class:
|
|
1369
|
-
},
|
|
1370
|
-
], 64)) :
|
|
1371
|
-
t.value ===
|
|
1372
|
-
default:
|
|
1373
|
-
r.column.ellipsis ? (I(),
|
|
1356
|
+
class: $(y.$style.textListItem)
|
|
1357
|
+
}, be(S.label), 3))
|
|
1358
|
+
], 64)) : N("", !0),
|
|
1359
|
+
t.value === w(R).link ? (I(), E(Ke(m(S.to)), at(oe({ key: 1 }, c(S.to, S.target))), {
|
|
1360
|
+
default: C(() => [
|
|
1361
|
+
r.column.ellipsis ? (I(), E(_, {
|
|
1374
1362
|
key: 0,
|
|
1375
|
-
ellipsis: { tooltip:
|
|
1376
|
-
content: String(
|
|
1377
|
-
style:
|
|
1378
|
-
class:
|
|
1379
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (I(), U("span",
|
|
1363
|
+
ellipsis: { tooltip: S.label },
|
|
1364
|
+
content: String(S.label),
|
|
1365
|
+
style: $e({ color: w(we).colorPrimary }),
|
|
1366
|
+
class: $(y.$style.antTypographyEllipsis)
|
|
1367
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : (I(), U("span", Yr, be(S.label), 1))
|
|
1380
1368
|
]),
|
|
1381
1369
|
_: 2
|
|
1382
|
-
}, 1040)) :
|
|
1383
|
-
t.value ===
|
|
1384
|
-
default:
|
|
1385
|
-
K(
|
|
1370
|
+
}, 1040)) : N("", !0),
|
|
1371
|
+
t.value === w(R).tag ? (I(), E(p, at(oe({ key: 2 }, S)), {
|
|
1372
|
+
default: C(() => [
|
|
1373
|
+
K(be(S.label), 1)
|
|
1386
1374
|
]),
|
|
1387
1375
|
_: 2
|
|
1388
|
-
}, 1040)) :
|
|
1389
|
-
t.value ===
|
|
1376
|
+
}, 1040)) : N("", !0),
|
|
1377
|
+
t.value === w(R).button ? (I(), E(g, oe({
|
|
1390
1378
|
key: 3,
|
|
1391
1379
|
type: "link",
|
|
1392
1380
|
size: "small",
|
|
1393
|
-
disabled:
|
|
1394
|
-
},
|
|
1381
|
+
disabled: S.disabled
|
|
1382
|
+
}, S.buttonProps, {
|
|
1395
1383
|
onClick: (te) => {
|
|
1396
|
-
var
|
|
1397
|
-
return (
|
|
1384
|
+
var D;
|
|
1385
|
+
return (D = S.onClick) == null ? void 0 : D.call(S, r.record, r.index);
|
|
1398
1386
|
}
|
|
1399
1387
|
}), {
|
|
1400
|
-
default:
|
|
1401
|
-
K(
|
|
1388
|
+
default: C(() => [
|
|
1389
|
+
K(be(S.label), 1)
|
|
1402
1390
|
]),
|
|
1403
1391
|
_: 2
|
|
1404
|
-
}, 1040, ["disabled", "onClick"])) :
|
|
1405
|
-
t.value ===
|
|
1392
|
+
}, 1040, ["disabled", "onClick"])) : N("", !0),
|
|
1393
|
+
t.value === w(R).image ? (I(), E(L, {
|
|
1406
1394
|
key: 4,
|
|
1407
|
-
width:
|
|
1408
|
-
height:
|
|
1409
|
-
src:
|
|
1395
|
+
width: V ? 100 : 32,
|
|
1396
|
+
height: V ? 100 : 32,
|
|
1397
|
+
src: S.label,
|
|
1410
1398
|
style: { objectFit: "cover" }
|
|
1411
1399
|
}, {
|
|
1412
|
-
previewMask:
|
|
1413
|
-
T(
|
|
1400
|
+
previewMask: C(() => [
|
|
1401
|
+
T(w(kn))
|
|
1414
1402
|
]),
|
|
1415
1403
|
_: 2
|
|
1416
|
-
}, 1032, ["width", "height", "src"])) :
|
|
1404
|
+
}, 1032, ["width", "height", "src"])) : N("", !0)
|
|
1417
1405
|
]),
|
|
1418
1406
|
_: 1
|
|
1419
|
-
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])),
|
|
1420
|
-
], 2)) :
|
|
1407
|
+
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])), F, 0)
|
|
1408
|
+
], 2)) : N("", !0);
|
|
1421
1409
|
};
|
|
1422
1410
|
}
|
|
1423
|
-
}),
|
|
1424
|
-
tableCellContent:
|
|
1425
|
-
antTypographyEllipsis:
|
|
1426
|
-
draggableIcon:
|
|
1427
|
-
textListItem:
|
|
1411
|
+
}), Ur = "_tableCellContent_1chn7_1", Wr = "_antTypographyEllipsis_1chn7_1", zr = "_draggableIcon_1chn7_4", Gr = "_textListItem_1chn7_8", Qr = {
|
|
1412
|
+
tableCellContent: Ur,
|
|
1413
|
+
antTypographyEllipsis: Wr,
|
|
1414
|
+
draggableIcon: zr,
|
|
1415
|
+
textListItem: Gr
|
|
1428
1416
|
}, Jr = {
|
|
1429
|
-
$style:
|
|
1430
|
-
},
|
|
1417
|
+
$style: Qr
|
|
1418
|
+
}, Kr = /* @__PURE__ */ fe(Hr, [["__cssModules", Jr]]), Zr = ie({
|
|
1431
1419
|
name: "VNodes",
|
|
1432
1420
|
props: {
|
|
1433
1421
|
vnodes: {
|
|
@@ -1438,7 +1426,7 @@ const Fr = (r) => {
|
|
|
1438
1426
|
render() {
|
|
1439
1427
|
return this.vnodes;
|
|
1440
1428
|
}
|
|
1441
|
-
}),
|
|
1429
|
+
}), Xr = /* @__PURE__ */ ie({
|
|
1442
1430
|
__name: "TableConfig",
|
|
1443
1431
|
props: {
|
|
1444
1432
|
/**
|
|
@@ -1453,124 +1441,124 @@ const Fr = (r) => {
|
|
|
1453
1441
|
},
|
|
1454
1442
|
emits: ["change"],
|
|
1455
1443
|
setup(r, { emit: e }) {
|
|
1456
|
-
const n = ee(!1), t = r, a = e, o = ee([]),
|
|
1444
|
+
const n = ee(!1), t = r, a = e, o = ee([]), l = ee([]), s = ee(""), d = ee("");
|
|
1457
1445
|
$t(() => {
|
|
1458
1446
|
o.value = t.columns;
|
|
1459
1447
|
});
|
|
1460
1448
|
const v = ({ title: p }) => {
|
|
1461
|
-
var
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1464
|
-
}, b =
|
|
1465
|
-
|
|
1466
|
-
}, 300),
|
|
1449
|
+
var f;
|
|
1450
|
+
const L = (f = d.value) == null ? void 0 : f.trim();
|
|
1451
|
+
return L ? p.toLocaleLowerCase().includes(L.toLocaleLowerCase()) : !0;
|
|
1452
|
+
}, b = M(() => o.value.every((p) => !v(p))), m = yt((p) => {
|
|
1453
|
+
d.value = p.target.value;
|
|
1454
|
+
}, 300), c = M(() => o.value.every((p) => p.visible === !1)), y = () => {
|
|
1467
1455
|
n.value = !1, a(
|
|
1468
1456
|
"change",
|
|
1469
|
-
o.value.map((p) =>
|
|
1457
|
+
o.value.map((p) => ke(p, Vt))
|
|
1470
1458
|
);
|
|
1471
|
-
},
|
|
1472
|
-
n.value = !1, o.value =
|
|
1459
|
+
}, F = () => {
|
|
1460
|
+
n.value = !1, o.value = l.value, l.value = [];
|
|
1473
1461
|
}, g = () => {
|
|
1474
1462
|
n.value = !1, a("change", []);
|
|
1475
1463
|
}, _ = (p) => {
|
|
1476
|
-
p && (
|
|
1464
|
+
p && (l.value = Ge(o.value));
|
|
1477
1465
|
};
|
|
1478
1466
|
return $t(() => {
|
|
1479
|
-
n.value || (
|
|
1480
|
-
}), (p,
|
|
1481
|
-
const
|
|
1482
|
-
return I(),
|
|
1467
|
+
n.value || (s.value = "", d.value = "");
|
|
1468
|
+
}), (p, L) => {
|
|
1469
|
+
const f = P("a-button"), S = P("a-input"), j = P("a-checkbox"), V = P("a-typography-text"), te = P("a-popover");
|
|
1470
|
+
return I(), E(te, {
|
|
1483
1471
|
open: n.value,
|
|
1484
|
-
"onUpdate:open":
|
|
1472
|
+
"onUpdate:open": L[1] || (L[1] = (D) => n.value = D),
|
|
1485
1473
|
placement: "bottomRight",
|
|
1486
1474
|
trigger: "click",
|
|
1487
1475
|
"overlay-inner-style": { padding: 0 },
|
|
1488
1476
|
"overlay-class-name": "pro-table-config-popover",
|
|
1489
1477
|
onOpenChange: _
|
|
1490
1478
|
}, {
|
|
1491
|
-
content:
|
|
1492
|
-
|
|
1493
|
-
class:
|
|
1479
|
+
content: C(() => [
|
|
1480
|
+
J("div", {
|
|
1481
|
+
class: $(p.$style.tableConfig)
|
|
1494
1482
|
}, [
|
|
1495
|
-
|
|
1496
|
-
class:
|
|
1483
|
+
J("div", {
|
|
1484
|
+
class: $(p.$style.tableConfigHead)
|
|
1497
1485
|
}, [
|
|
1498
|
-
T(
|
|
1499
|
-
value:
|
|
1500
|
-
"onUpdate:value":
|
|
1486
|
+
T(S, {
|
|
1487
|
+
value: s.value,
|
|
1488
|
+
"onUpdate:value": L[0] || (L[0] = (D) => s.value = D),
|
|
1501
1489
|
placeholder: "搜索标题",
|
|
1502
|
-
onChange:
|
|
1490
|
+
onChange: w(m)
|
|
1503
1491
|
}, null, 8, ["value", "onChange"])
|
|
1504
1492
|
], 2),
|
|
1505
|
-
|
|
1506
|
-
class:
|
|
1493
|
+
J("div", {
|
|
1494
|
+
class: $(p.$style.tableConfigContent)
|
|
1507
1495
|
}, [
|
|
1508
|
-
T(
|
|
1496
|
+
T(w(gt), {
|
|
1509
1497
|
list: o.value,
|
|
1510
1498
|
"item-key": "key",
|
|
1511
|
-
class:
|
|
1499
|
+
class: $(p.$style.columnList),
|
|
1512
1500
|
handle: ".table-column-draggable-handle"
|
|
1513
1501
|
}, {
|
|
1514
|
-
item:
|
|
1515
|
-
v(
|
|
1502
|
+
item: C(({ element: D }) => [
|
|
1503
|
+
v(D) ? (I(), U("div", {
|
|
1516
1504
|
key: 0,
|
|
1517
|
-
class:
|
|
1518
|
-
style:
|
|
1505
|
+
class: $(p.$style.columnItem),
|
|
1506
|
+
style: $e({ background: w(we).colorBgContainer })
|
|
1519
1507
|
}, [
|
|
1520
|
-
T(
|
|
1521
|
-
checked:
|
|
1522
|
-
"onUpdate:checked": (ue) =>
|
|
1508
|
+
T(j, {
|
|
1509
|
+
checked: D.visible,
|
|
1510
|
+
"onUpdate:checked": (ue) => D.visible = ue
|
|
1523
1511
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1524
|
-
T(
|
|
1525
|
-
ellipsis: { tooltip:
|
|
1526
|
-
content:
|
|
1527
|
-
class:
|
|
1528
|
-
onClick: (ue) =>
|
|
1512
|
+
T(V, {
|
|
1513
|
+
ellipsis: { tooltip: D.title },
|
|
1514
|
+
content: D.title,
|
|
1515
|
+
class: $([p.$style.columnItemContent, p.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1516
|
+
onClick: (ue) => D.visible = !D.visible
|
|
1529
1517
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1530
|
-
T(
|
|
1518
|
+
T(f, {
|
|
1531
1519
|
type: "text",
|
|
1532
1520
|
size: "small",
|
|
1533
|
-
icon: X(
|
|
1534
|
-
style:
|
|
1535
|
-
class:
|
|
1521
|
+
icon: X(w(De)),
|
|
1522
|
+
style: $e({ color: w(we).colorTextQuaternary }),
|
|
1523
|
+
class: $([D.fixed ? p.$style.dragIconDisabled : "table-column-draggable-handle", p.$style.dragIcon])
|
|
1536
1524
|
}, null, 8, ["icon", "style", "class"])
|
|
1537
|
-
], 6)) :
|
|
1525
|
+
], 6)) : N("", !0)
|
|
1538
1526
|
]),
|
|
1539
1527
|
_: 1
|
|
1540
1528
|
}, 8, ["list", "class"]),
|
|
1541
1529
|
b.value ? (I(), U("div", {
|
|
1542
1530
|
key: 0,
|
|
1543
|
-
class:
|
|
1544
|
-
style:
|
|
1545
|
-
}, " 未找到相关查询项 ", 6)) :
|
|
1531
|
+
class: $(p.$style.emptyText),
|
|
1532
|
+
style: $e({ color: w(we).colorTextSecondary })
|
|
1533
|
+
}, " 未找到相关查询项 ", 6)) : N("", !0)
|
|
1546
1534
|
], 2),
|
|
1547
|
-
|
|
1548
|
-
class:
|
|
1535
|
+
J("div", {
|
|
1536
|
+
class: $(p.$style.tableConfigFoot)
|
|
1549
1537
|
}, [
|
|
1550
|
-
T(
|
|
1538
|
+
T(f, {
|
|
1551
1539
|
type: "link",
|
|
1552
|
-
disabled:
|
|
1540
|
+
disabled: c.value,
|
|
1553
1541
|
onClick: y
|
|
1554
1542
|
}, {
|
|
1555
|
-
default:
|
|
1543
|
+
default: C(() => L[2] || (L[2] = [
|
|
1556
1544
|
K(" 确定 ")
|
|
1557
1545
|
])),
|
|
1558
1546
|
_: 1
|
|
1559
1547
|
}, 8, ["disabled"]),
|
|
1560
|
-
T(
|
|
1548
|
+
T(f, {
|
|
1561
1549
|
type: "link",
|
|
1562
|
-
onClick:
|
|
1550
|
+
onClick: F
|
|
1563
1551
|
}, {
|
|
1564
|
-
default:
|
|
1552
|
+
default: C(() => L[3] || (L[3] = [
|
|
1565
1553
|
K(" 取消 ")
|
|
1566
1554
|
])),
|
|
1567
1555
|
_: 1
|
|
1568
1556
|
}),
|
|
1569
|
-
T(
|
|
1557
|
+
T(f, {
|
|
1570
1558
|
type: "link",
|
|
1571
1559
|
onClick: g
|
|
1572
1560
|
}, {
|
|
1573
|
-
default:
|
|
1561
|
+
default: C(() => L[4] || (L[4] = [
|
|
1574
1562
|
K(" 重置 ")
|
|
1575
1563
|
])),
|
|
1576
1564
|
_: 1
|
|
@@ -1578,33 +1566,33 @@ const Fr = (r) => {
|
|
|
1578
1566
|
], 2)
|
|
1579
1567
|
], 2)
|
|
1580
1568
|
]),
|
|
1581
|
-
default:
|
|
1582
|
-
T(
|
|
1569
|
+
default: C(() => [
|
|
1570
|
+
T(f, {
|
|
1583
1571
|
type: "text",
|
|
1584
|
-
icon: X(
|
|
1585
|
-
class:
|
|
1572
|
+
icon: X(w(Tn)),
|
|
1573
|
+
class: $(p.$style.configBtn)
|
|
1586
1574
|
}, null, 8, ["icon", "class"])
|
|
1587
1575
|
]),
|
|
1588
1576
|
_: 1
|
|
1589
1577
|
}, 8, ["open"]);
|
|
1590
1578
|
};
|
|
1591
1579
|
}
|
|
1592
|
-
}),
|
|
1593
|
-
configBtn:
|
|
1594
|
-
tableConfig:
|
|
1595
|
-
tableConfigHead:
|
|
1596
|
-
tableConfigContent:
|
|
1597
|
-
columnList:
|
|
1598
|
-
columnItem:
|
|
1599
|
-
columnItemContent:
|
|
1600
|
-
dragIcon:
|
|
1601
|
-
dragIconDisabled:
|
|
1602
|
-
dragHandle:
|
|
1603
|
-
emptyText:
|
|
1604
|
-
tableConfigFoot:
|
|
1605
|
-
},
|
|
1606
|
-
$style:
|
|
1607
|
-
},
|
|
1580
|
+
}), ea = "_configBtn_1rypj_1", ta = "_tableConfig_1rypj_8", na = "_tableConfigHead_1rypj_11", ra = "_tableConfigContent_1rypj_14", aa = "_columnList_1rypj_19", oa = "_columnItem_1rypj_19", sa = "_columnItemContent_1rypj_26", la = "_dragIcon_1rypj_30", ia = "_dragIconDisabled_1rypj_33", ua = "_dragHandle_1rypj_36", ca = "_emptyText_1rypj_39", da = "_tableConfigFoot_1rypj_43", pa = {
|
|
1581
|
+
configBtn: ea,
|
|
1582
|
+
tableConfig: ta,
|
|
1583
|
+
tableConfigHead: na,
|
|
1584
|
+
tableConfigContent: ra,
|
|
1585
|
+
columnList: aa,
|
|
1586
|
+
columnItem: oa,
|
|
1587
|
+
columnItemContent: sa,
|
|
1588
|
+
dragIcon: la,
|
|
1589
|
+
dragIconDisabled: ia,
|
|
1590
|
+
dragHandle: ua,
|
|
1591
|
+
emptyText: ca,
|
|
1592
|
+
tableConfigFoot: da
|
|
1593
|
+
}, fa = {
|
|
1594
|
+
$style: pa
|
|
1595
|
+
}, ma = /* @__PURE__ */ fe(Xr, [["__cssModules", fa]]), ya = /* @__PURE__ */ ie({
|
|
1608
1596
|
__name: "DynamicList",
|
|
1609
1597
|
props: {
|
|
1610
1598
|
/**
|
|
@@ -1680,7 +1668,7 @@ const Fr = (r) => {
|
|
|
1680
1668
|
sortButtonProps: {
|
|
1681
1669
|
type: [Object, Function],
|
|
1682
1670
|
default: () => ({
|
|
1683
|
-
icon: X(
|
|
1671
|
+
icon: X(De)
|
|
1684
1672
|
})
|
|
1685
1673
|
},
|
|
1686
1674
|
/**
|
|
@@ -1712,115 +1700,115 @@ const Fr = (r) => {
|
|
|
1712
1700
|
},
|
|
1713
1701
|
emits: ["update:value", "add", "remove", "change"],
|
|
1714
1702
|
setup(r, { emit: e }) {
|
|
1715
|
-
const n = r, t = e, a =
|
|
1703
|
+
const n = r, t = e, a = vn.useInjectFormItemContext(), o = ee(n.value), l = () => {
|
|
1716
1704
|
const v = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
1717
1705
|
return Array.from({ length: 16 }).map(() => v[Math.floor(Math.random() * v.length)]).join("");
|
|
1718
|
-
},
|
|
1706
|
+
}, s = (v) => {
|
|
1719
1707
|
var b;
|
|
1720
1708
|
if (o.value.length < n.maxLength) {
|
|
1721
|
-
const
|
|
1722
|
-
id:
|
|
1709
|
+
const m = {
|
|
1710
|
+
id: l(),
|
|
1723
1711
|
...((b = n.getNewItemData) == null ? void 0 : b.call(n)) ?? {}
|
|
1724
1712
|
};
|
|
1725
|
-
o.value.splice(v + 1, 0,
|
|
1713
|
+
o.value.splice(v + 1, 0, m), t("add", m, v + 1);
|
|
1726
1714
|
}
|
|
1727
|
-
},
|
|
1715
|
+
}, d = (v) => {
|
|
1728
1716
|
o.value.splice(v, 1), t("remove", v);
|
|
1729
1717
|
};
|
|
1730
|
-
return
|
|
1718
|
+
return he(
|
|
1731
1719
|
() => o.value,
|
|
1732
1720
|
() => {
|
|
1733
|
-
t("update:value",
|
|
1721
|
+
t("update:value", w(o.value)), t("change", w(o.value)), a.onFieldChange();
|
|
1734
1722
|
},
|
|
1735
1723
|
{
|
|
1736
1724
|
deep: !0,
|
|
1737
1725
|
immediate: !0
|
|
1738
1726
|
}
|
|
1739
|
-
),
|
|
1727
|
+
), he(
|
|
1740
1728
|
() => n.value,
|
|
1741
1729
|
() => {
|
|
1742
|
-
o.value =
|
|
1730
|
+
o.value = w(n.value);
|
|
1743
1731
|
},
|
|
1744
1732
|
{
|
|
1745
1733
|
deep: !0,
|
|
1746
1734
|
immediate: !0
|
|
1747
1735
|
}
|
|
1748
1736
|
), (v, b) => {
|
|
1749
|
-
const
|
|
1750
|
-
return I(), U(
|
|
1751
|
-
T(
|
|
1737
|
+
const m = P("a-button");
|
|
1738
|
+
return I(), U(xe, null, [
|
|
1739
|
+
T(w(gt), {
|
|
1752
1740
|
list: o.value,
|
|
1753
1741
|
"item-key": r.itemKey,
|
|
1754
1742
|
disabled: !r.sortable,
|
|
1755
1743
|
handle: ".draggable-icon",
|
|
1756
|
-
class:
|
|
1744
|
+
class: $([v.$style.dynamicList, r.className])
|
|
1757
1745
|
}, {
|
|
1758
|
-
item:
|
|
1759
|
-
|
|
1760
|
-
class:
|
|
1746
|
+
item: C(({ element: c, index: y }) => [
|
|
1747
|
+
J("div", {
|
|
1748
|
+
class: $([v.$style.dynamicListItem, r.itemClassName])
|
|
1761
1749
|
}, [
|
|
1762
|
-
|
|
1763
|
-
class:
|
|
1750
|
+
J("div", {
|
|
1751
|
+
class: $(v.$style.dynamicListItemContent)
|
|
1764
1752
|
}, [
|
|
1765
1753
|
pe(v.$slots, "default", {
|
|
1766
|
-
item:
|
|
1754
|
+
item: c,
|
|
1767
1755
|
index: y
|
|
1768
1756
|
})
|
|
1769
1757
|
], 2),
|
|
1770
|
-
|
|
1771
|
-
class:
|
|
1758
|
+
J("div", {
|
|
1759
|
+
class: $(v.$style.actionsIcons)
|
|
1772
1760
|
}, [
|
|
1773
|
-
T(
|
|
1761
|
+
T(m, oe({
|
|
1774
1762
|
type: "link",
|
|
1775
1763
|
danger: "",
|
|
1776
1764
|
size: "small",
|
|
1777
|
-
icon: X(
|
|
1778
|
-
},
|
|
1779
|
-
onClick: (
|
|
1765
|
+
icon: X(w(wt))
|
|
1766
|
+
}, w(_e)(r.deleteButtonProps) ? r.deleteButtonProps(c, y) : r.deleteButtonProps, {
|
|
1767
|
+
onClick: (F) => d(y)
|
|
1780
1768
|
}), {
|
|
1781
|
-
default:
|
|
1782
|
-
K(
|
|
1769
|
+
default: C(() => [
|
|
1770
|
+
K(be(r.deleteButtonText), 1)
|
|
1783
1771
|
]),
|
|
1784
1772
|
_: 2
|
|
1785
1773
|
}, 1040, ["icon", "onClick"]),
|
|
1786
|
-
r.sortable ? (I(),
|
|
1774
|
+
r.sortable ? (I(), E(m, oe({
|
|
1787
1775
|
key: 0,
|
|
1788
1776
|
class: ["draggable-icon", v.$style.dragIcon],
|
|
1789
1777
|
size: "small",
|
|
1790
1778
|
type: "text",
|
|
1791
|
-
icon: X(
|
|
1792
|
-
},
|
|
1779
|
+
icon: X(w(De))
|
|
1780
|
+
}, w(_e)(r.sortButtonProps) ? r.sortButtonProps(c, y) : r.sortButtonProps), null, 16, ["class", "icon"])) : N("", !0)
|
|
1793
1781
|
], 2)
|
|
1794
1782
|
], 2)
|
|
1795
1783
|
]),
|
|
1796
1784
|
_: 3
|
|
1797
1785
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
1798
|
-
|
|
1799
|
-
o.value.length < r.maxLength ? (I(),
|
|
1786
|
+
J("div", null, [
|
|
1787
|
+
o.value.length < r.maxLength ? (I(), E(m, oe({
|
|
1800
1788
|
key: 0,
|
|
1801
1789
|
type: "link",
|
|
1802
|
-
icon: X(
|
|
1803
|
-
},
|
|
1804
|
-
onClick: b[0] || (b[0] = (
|
|
1790
|
+
icon: X(w(At))
|
|
1791
|
+
}, w(_e)(r.addButtonProps) ? r.addButtonProps() : r.addButtonProps, {
|
|
1792
|
+
onClick: b[0] || (b[0] = (c) => s(o.value.length - 1))
|
|
1805
1793
|
}), {
|
|
1806
|
-
default:
|
|
1807
|
-
K(
|
|
1794
|
+
default: C(() => [
|
|
1795
|
+
K(be(r.addButtonText), 1)
|
|
1808
1796
|
]),
|
|
1809
1797
|
_: 1
|
|
1810
|
-
}, 16, ["icon"])) :
|
|
1798
|
+
}, 16, ["icon"])) : N("", !0)
|
|
1811
1799
|
])
|
|
1812
1800
|
], 64);
|
|
1813
1801
|
};
|
|
1814
1802
|
}
|
|
1815
|
-
}),
|
|
1816
|
-
dynamicList:
|
|
1817
|
-
dynamicListItem:
|
|
1818
|
-
dynamicListItemContent:
|
|
1819
|
-
actionsIcons:
|
|
1820
|
-
dragIcon:
|
|
1821
|
-
},
|
|
1822
|
-
$style:
|
|
1823
|
-
},
|
|
1803
|
+
}), ga = "_dynamicList_1woe5_1", va = "_dynamicListItem_1woe5_6", ha = "_dynamicListItemContent_1woe5_13", ba = "_actionsIcons_1woe5_17", _a = "_dragIcon_1woe5_21", Ca = {
|
|
1804
|
+
dynamicList: ga,
|
|
1805
|
+
dynamicListItem: va,
|
|
1806
|
+
dynamicListItemContent: ha,
|
|
1807
|
+
actionsIcons: ba,
|
|
1808
|
+
dragIcon: _a
|
|
1809
|
+
}, $a = {
|
|
1810
|
+
$style: Ca
|
|
1811
|
+
}, wa = /* @__PURE__ */ fe(ya, [["__cssModules", $a]]), Sa = /* @__PURE__ */ ie({
|
|
1824
1812
|
__name: "InputGroup",
|
|
1825
1813
|
props: {
|
|
1826
1814
|
/**
|
|
@@ -1850,51 +1838,51 @@ const Fr = (r) => {
|
|
|
1850
1838
|
},
|
|
1851
1839
|
emits: ["update:value", "change"],
|
|
1852
1840
|
setup(r, { emit: e }) {
|
|
1853
|
-
const n = r, t = e, a =
|
|
1841
|
+
const n = r, t = e, a = M({
|
|
1854
1842
|
get() {
|
|
1855
1843
|
return n.value;
|
|
1856
1844
|
},
|
|
1857
|
-
set(
|
|
1858
|
-
t("update:value",
|
|
1845
|
+
set(l) {
|
|
1846
|
+
t("update:value", l), t("change", l);
|
|
1859
1847
|
}
|
|
1860
|
-
}), o =
|
|
1861
|
-
var
|
|
1862
|
-
const
|
|
1863
|
-
return ((
|
|
1848
|
+
}), o = M(() => {
|
|
1849
|
+
var s, d;
|
|
1850
|
+
const l = n.inModal ? "30%" : "50%";
|
|
1851
|
+
return ((d = (s = n.formItem.addonSelectProps) == null ? void 0 : s.style) == null ? void 0 : d.width) ?? l;
|
|
1864
1852
|
});
|
|
1865
|
-
return (
|
|
1866
|
-
const
|
|
1867
|
-
return I(),
|
|
1853
|
+
return (l, s) => {
|
|
1854
|
+
const d = P("a-select"), v = P("a-input"), b = P("a-input-group");
|
|
1855
|
+
return I(), E(b, {
|
|
1868
1856
|
compact: "",
|
|
1869
|
-
class:
|
|
1857
|
+
class: $(l.$style.inputGroup)
|
|
1870
1858
|
}, {
|
|
1871
|
-
default:
|
|
1872
|
-
T(
|
|
1859
|
+
default: C(() => [
|
|
1860
|
+
T(d, oe({
|
|
1873
1861
|
value: a.value.select,
|
|
1874
|
-
"onUpdate:value":
|
|
1862
|
+
"onUpdate:value": s[0] || (s[0] = (m) => a.value.select = m),
|
|
1875
1863
|
style: {
|
|
1876
|
-
...
|
|
1864
|
+
...w(Xe)(r.formItem, "addonBeforeProps.style", {}),
|
|
1877
1865
|
width: o.value
|
|
1878
1866
|
}
|
|
1879
|
-
},
|
|
1880
|
-
T(v,
|
|
1867
|
+
}, w(Nt)(r.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
1868
|
+
T(v, oe({
|
|
1881
1869
|
value: a.value.value,
|
|
1882
|
-
"onUpdate:value":
|
|
1870
|
+
"onUpdate:value": s[1] || (s[1] = (m) => a.value.value = m),
|
|
1883
1871
|
style: {
|
|
1884
|
-
...
|
|
1872
|
+
...w(Xe)(r.formItem, "props.style", {}),
|
|
1885
1873
|
width: `calc(100% - ${o.value})`
|
|
1886
1874
|
}
|
|
1887
|
-
},
|
|
1875
|
+
}, w(ke)(r.formItem, ["props"])), null, 16, ["value", "style"])
|
|
1888
1876
|
]),
|
|
1889
1877
|
_: 1
|
|
1890
1878
|
}, 8, ["class"]);
|
|
1891
1879
|
};
|
|
1892
1880
|
}
|
|
1893
|
-
}),
|
|
1894
|
-
inputGroup:
|
|
1895
|
-
},
|
|
1896
|
-
$style:
|
|
1897
|
-
},
|
|
1881
|
+
}), Ia = "_inputGroup_eukv3_1", Fa = {
|
|
1882
|
+
inputGroup: Ia
|
|
1883
|
+
}, xa = {
|
|
1884
|
+
$style: Fa
|
|
1885
|
+
}, ka = /* @__PURE__ */ fe(Sa, [["__cssModules", xa]]), We = null, Ta = /* @__PURE__ */ ie({
|
|
1898
1886
|
__name: "InputNumberRange",
|
|
1899
1887
|
props: {
|
|
1900
1888
|
/**
|
|
@@ -1916,63 +1904,63 @@ const Fr = (r) => {
|
|
|
1916
1904
|
},
|
|
1917
1905
|
emits: ["update:value"],
|
|
1918
1906
|
setup(r, { emit: e }) {
|
|
1919
|
-
const n = r, t = e, a =
|
|
1907
|
+
const n = r, t = e, a = M({
|
|
1920
1908
|
get() {
|
|
1921
|
-
var
|
|
1922
|
-
return ((
|
|
1909
|
+
var s;
|
|
1910
|
+
return ((s = n.value) == null ? void 0 : s[0]) ?? We;
|
|
1923
1911
|
},
|
|
1924
|
-
set(
|
|
1925
|
-
var
|
|
1926
|
-
t("update:value", [
|
|
1912
|
+
set(s) {
|
|
1913
|
+
var d;
|
|
1914
|
+
t("update:value", [s, ((d = n.value) == null ? void 0 : d[1]) ?? We]);
|
|
1927
1915
|
}
|
|
1928
|
-
}), o =
|
|
1916
|
+
}), o = M({
|
|
1929
1917
|
get() {
|
|
1930
|
-
var
|
|
1931
|
-
return ((
|
|
1918
|
+
var s;
|
|
1919
|
+
return ((s = n.value) == null ? void 0 : s[1]) ?? We;
|
|
1932
1920
|
},
|
|
1933
|
-
set(
|
|
1934
|
-
var
|
|
1935
|
-
t("update:value", [((
|
|
1921
|
+
set(s) {
|
|
1922
|
+
var d;
|
|
1923
|
+
t("update:value", [((d = n.value) == null ? void 0 : d[0]) ?? We, s]);
|
|
1936
1924
|
}
|
|
1937
|
-
}),
|
|
1938
|
-
return (
|
|
1939
|
-
var b,
|
|
1925
|
+
}), l = M(() => Nt(n.formItem.props, ["placeholder"]));
|
|
1926
|
+
return (s, d) => {
|
|
1927
|
+
var b, m, c, y;
|
|
1940
1928
|
const v = P("a-input-number");
|
|
1941
1929
|
return I(), U("div", {
|
|
1942
|
-
class:
|
|
1930
|
+
class: $([s.$style.inputNumberGroup, "input-number-group"])
|
|
1943
1931
|
}, [
|
|
1944
|
-
|
|
1945
|
-
class:
|
|
1932
|
+
J("div", {
|
|
1933
|
+
class: $(s.$style.inputNumberGroupContent)
|
|
1946
1934
|
}, [
|
|
1947
|
-
T(v,
|
|
1935
|
+
T(v, oe(l.value, {
|
|
1948
1936
|
value: a.value,
|
|
1949
|
-
"onUpdate:value":
|
|
1950
|
-
class: [
|
|
1951
|
-
placeholder: ((
|
|
1937
|
+
"onUpdate:value": d[0] || (d[0] = (F) => a.value = F),
|
|
1938
|
+
class: [s.$style.inputNumber, s.$style.startInputNumber],
|
|
1939
|
+
placeholder: ((m = w(je)((b = n.formItem.props) == null ? void 0 : b.placeholder)) == null ? void 0 : m[0]) ?? "请输入"
|
|
1952
1940
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
1953
|
-
|
|
1954
|
-
class:
|
|
1941
|
+
J("span", {
|
|
1942
|
+
class: $(s.$style.divider)
|
|
1955
1943
|
}, "~", 2),
|
|
1956
|
-
T(v,
|
|
1944
|
+
T(v, oe(l.value, {
|
|
1957
1945
|
value: o.value,
|
|
1958
|
-
"onUpdate:value":
|
|
1959
|
-
class: [
|
|
1960
|
-
placeholder: ((y =
|
|
1946
|
+
"onUpdate:value": d[1] || (d[1] = (F) => o.value = F),
|
|
1947
|
+
class: [s.$style.inputNumber, s.$style.endInputNumber],
|
|
1948
|
+
placeholder: ((y = w(je)((c = n.formItem.props) == null ? void 0 : c.placeholder)) == null ? void 0 : y[1]) ?? "请输入"
|
|
1961
1949
|
}), null, 16, ["value", "class", "placeholder"])
|
|
1962
1950
|
], 2)
|
|
1963
1951
|
], 2);
|
|
1964
1952
|
};
|
|
1965
1953
|
}
|
|
1966
|
-
}),
|
|
1967
|
-
inputNumberGroup:
|
|
1968
|
-
inputNumberGroupContent:
|
|
1954
|
+
}), Oa = "_inputNumberGroup_149g6_1", Pa = "_inputNumberGroupContent_149g6_4", qa = "_inputNumber_149g6_1", ja = "_startInputNumber_149g6_13", La = "_endInputNumber_149g6_21", Ea = "_divider_149g6_29", Ma = {
|
|
1955
|
+
inputNumberGroup: Oa,
|
|
1956
|
+
inputNumberGroupContent: Pa,
|
|
1969
1957
|
inputNumber: qa,
|
|
1970
|
-
startInputNumber:
|
|
1971
|
-
endInputNumber:
|
|
1972
|
-
divider:
|
|
1958
|
+
startInputNumber: ja,
|
|
1959
|
+
endInputNumber: La,
|
|
1960
|
+
divider: Ea
|
|
1973
1961
|
}, Aa = {
|
|
1974
|
-
$style:
|
|
1975
|
-
},
|
|
1962
|
+
$style: Ma
|
|
1963
|
+
}, Na = /* @__PURE__ */ fe(Ta, [["__cssModules", Aa]]), Ba = 8, Da = /* @__PURE__ */ ie({
|
|
1976
1964
|
__name: "FormFieldItem",
|
|
1977
1965
|
props: {
|
|
1978
1966
|
/**
|
|
@@ -2015,31 +2003,31 @@ const Fr = (r) => {
|
|
|
2015
2003
|
emits: ["update:value", "change"],
|
|
2016
2004
|
setup(r, { emit: e }) {
|
|
2017
2005
|
const n = {
|
|
2018
|
-
[H.input]:
|
|
2019
|
-
[H.inputGroup]:
|
|
2020
|
-
[H.inputNumber]:
|
|
2021
|
-
[H.inputNumberRange]:
|
|
2022
|
-
[H.select]:
|
|
2023
|
-
[H.cascader]:
|
|
2024
|
-
[H.treeSelect]:
|
|
2025
|
-
[H.datePicker]:
|
|
2026
|
-
[H.rangePicker]:
|
|
2027
|
-
}, t = r, a = e, o = sn(),
|
|
2006
|
+
[H.input]: Sn,
|
|
2007
|
+
[H.inputGroup]: ka,
|
|
2008
|
+
[H.inputNumber]: wn,
|
|
2009
|
+
[H.inputNumberRange]: Na,
|
|
2010
|
+
[H.select]: $n,
|
|
2011
|
+
[H.cascader]: Cn,
|
|
2012
|
+
[H.treeSelect]: _n,
|
|
2013
|
+
[H.datePicker]: bn,
|
|
2014
|
+
[H.rangePicker]: hn
|
|
2015
|
+
}, t = r, a = e, o = sn(), l = M({
|
|
2028
2016
|
get() {
|
|
2029
2017
|
return t.value;
|
|
2030
2018
|
},
|
|
2031
|
-
set(
|
|
2032
|
-
a("update:value",
|
|
2019
|
+
set(c) {
|
|
2020
|
+
a("update:value", c), a("change", c);
|
|
2033
2021
|
}
|
|
2034
|
-
}),
|
|
2035
|
-
const
|
|
2036
|
-
return Math.max(
|
|
2037
|
-
}), v =
|
|
2038
|
-
const { type:
|
|
2039
|
-
return
|
|
2040
|
-
}), b =
|
|
2022
|
+
}), s = M(() => !t.inModal && t.formItem.showLabel !== !1), d = M(() => {
|
|
2023
|
+
const c = Tr(t.formItem.label);
|
|
2024
|
+
return Math.max(c, 20) + Ba * 2 + 2;
|
|
2025
|
+
}), v = M(() => {
|
|
2026
|
+
const { type: c, component: y } = t.formItem;
|
|
2027
|
+
return c === "component" ? y : n[c];
|
|
2028
|
+
}), b = M(() => {
|
|
2041
2029
|
var g;
|
|
2042
|
-
const
|
|
2030
|
+
const c = t.formItem, y = {
|
|
2043
2031
|
[H.input]: {
|
|
2044
2032
|
placeholder: "请输入",
|
|
2045
2033
|
clearable: !0
|
|
@@ -2047,13 +2035,13 @@ const Fr = (r) => {
|
|
|
2047
2035
|
[H.inputGroup]: {
|
|
2048
2036
|
placeholder: "请输入",
|
|
2049
2037
|
clearable: !0,
|
|
2050
|
-
formItem:
|
|
2038
|
+
formItem: c
|
|
2051
2039
|
},
|
|
2052
2040
|
[H.inputNumber]: {
|
|
2053
2041
|
placeholder: "请输入"
|
|
2054
2042
|
},
|
|
2055
2043
|
[H.inputNumberRange]: {
|
|
2056
|
-
formItem:
|
|
2044
|
+
formItem: c
|
|
2057
2045
|
},
|
|
2058
2046
|
[H.select]: {
|
|
2059
2047
|
placeholder: "请选择",
|
|
@@ -2064,67 +2052,67 @@ const Fr = (r) => {
|
|
|
2064
2052
|
maxTagTextLength: 40,
|
|
2065
2053
|
maxTagCount: "responsive"
|
|
2066
2054
|
}
|
|
2067
|
-
},
|
|
2055
|
+
}, F = {
|
|
2068
2056
|
...o,
|
|
2069
|
-
...y[
|
|
2070
|
-
...
|
|
2057
|
+
...y[c.type] ?? {},
|
|
2058
|
+
...c.props ?? {},
|
|
2071
2059
|
style: {
|
|
2072
|
-
...((g =
|
|
2073
|
-
width:
|
|
2060
|
+
...((g = c.props) == null ? void 0 : g.style) ?? {},
|
|
2061
|
+
width: c.type !== H.component ? "100%" : void 0
|
|
2074
2062
|
},
|
|
2075
2063
|
inModal: t.inModal
|
|
2076
2064
|
};
|
|
2077
|
-
return t.inModal || (
|
|
2078
|
-
}),
|
|
2079
|
-
return (
|
|
2080
|
-
const
|
|
2065
|
+
return t.inModal || (s.value && qe(F, "style.width", `calc(100% - ${d.value}px)`), c.type === H.select && qe(F, "maxTagCount", "responsive")), F;
|
|
2066
|
+
}), m = M(() => t.formItem.modelPropName ?? "value");
|
|
2067
|
+
return (c, y) => {
|
|
2068
|
+
const F = P("a-input"), g = P("a-input-group");
|
|
2081
2069
|
return I(), U("div", {
|
|
2082
|
-
class:
|
|
2070
|
+
class: $(c.$style.formFieldItem)
|
|
2083
2071
|
}, [
|
|
2084
|
-
|
|
2072
|
+
s.value ? (I(), E(g, {
|
|
2085
2073
|
key: 0,
|
|
2086
2074
|
compact: "",
|
|
2087
|
-
class:
|
|
2075
|
+
class: $([c.$style.inputGroup, "super-table-input-group"])
|
|
2088
2076
|
}, {
|
|
2089
|
-
default:
|
|
2090
|
-
r.inModal ?
|
|
2077
|
+
default: C(() => [
|
|
2078
|
+
r.inModal ? N("", !0) : (I(), E(F, {
|
|
2091
2079
|
key: 0,
|
|
2092
2080
|
value: r.formItem.label,
|
|
2093
2081
|
disabled: "",
|
|
2094
|
-
style:
|
|
2095
|
-
color:
|
|
2096
|
-
width: `${
|
|
2082
|
+
style: $e({
|
|
2083
|
+
color: w(we).colorText,
|
|
2084
|
+
width: `${d.value}px`
|
|
2097
2085
|
}),
|
|
2098
|
-
class:
|
|
2086
|
+
class: $([c.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
2099
2087
|
}, null, 8, ["value", "style", "class"])),
|
|
2100
|
-
v.value ? (I(),
|
|
2088
|
+
v.value ? (I(), E(Ke(v.value), oe({
|
|
2101
2089
|
key: 1,
|
|
2102
|
-
[
|
|
2103
|
-
["onUpdate:" +
|
|
2104
|
-
}, b.value), null, 16)) :
|
|
2090
|
+
[m.value]: l.value,
|
|
2091
|
+
["onUpdate:" + m.value]: y[0] || (y[0] = (_) => l.value = _)
|
|
2092
|
+
}, b.value), null, 16)) : N("", !0)
|
|
2105
2093
|
]),
|
|
2106
2094
|
_: 1
|
|
2107
|
-
}, 8, ["class"])) : (I(), U(
|
|
2108
|
-
r.formItem.type ===
|
|
2095
|
+
}, 8, ["class"])) : (I(), U(xe, { key: 1 }, [
|
|
2096
|
+
r.formItem.type === w(H).component && r.formItem.showLabel ? (I(), U("span", {
|
|
2109
2097
|
key: 0,
|
|
2110
|
-
class:
|
|
2111
|
-
},
|
|
2112
|
-
(I(),
|
|
2113
|
-
[
|
|
2114
|
-
["onUpdate:" +
|
|
2098
|
+
class: $(c.$style.customItemLabel)
|
|
2099
|
+
}, be(r.formItem.label), 3)) : N("", !0),
|
|
2100
|
+
(I(), E(Ke(v.value), oe({
|
|
2101
|
+
[m.value]: l.value,
|
|
2102
|
+
["onUpdate:" + m.value]: y[1] || (y[1] = (_) => l.value = _)
|
|
2115
2103
|
}, b.value), null, 16))
|
|
2116
2104
|
], 64))
|
|
2117
2105
|
], 2);
|
|
2118
2106
|
};
|
|
2119
2107
|
}
|
|
2120
|
-
}),
|
|
2121
|
-
formFieldItem:
|
|
2122
|
-
inputGroup:
|
|
2123
|
-
formFieldItemLabel:
|
|
2124
|
-
customItemLabel:
|
|
2125
|
-
},
|
|
2126
|
-
$style:
|
|
2127
|
-
},
|
|
2108
|
+
}), Ra = "_formFieldItem_1imun_1", Va = "_inputGroup_1imun_7", Ya = "_formFieldItemLabel_1imun_11", Ha = "_customItemLabel_1imun_20", Ua = {
|
|
2109
|
+
formFieldItem: Ra,
|
|
2110
|
+
inputGroup: Va,
|
|
2111
|
+
formFieldItemLabel: Ya,
|
|
2112
|
+
customItemLabel: Ha
|
|
2113
|
+
}, Wa = {
|
|
2114
|
+
$style: Ua
|
|
2115
|
+
}, Wt = /* @__PURE__ */ fe(Da, [["__cssModules", Wa]]), za = /* @__PURE__ */ ie({
|
|
2128
2116
|
__name: "SceneConfigModal",
|
|
2129
2117
|
props: {
|
|
2130
2118
|
// 当前编辑的场景
|
|
@@ -2165,13 +2153,13 @@ const Fr = (r) => {
|
|
|
2165
2153
|
},
|
|
2166
2154
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
2167
2155
|
setup(r, { expose: e, emit: n }) {
|
|
2168
|
-
var
|
|
2169
|
-
const t = r, a = n, o = ee(Ge(t.formConfigMap)),
|
|
2170
|
-
Object.values(o.value).filter(({ visible:
|
|
2156
|
+
var Ie, Y;
|
|
2157
|
+
const t = r, a = n, o = ee(Ge(t.formConfigMap)), l = M(() => it(
|
|
2158
|
+
Object.values(o.value).filter(({ visible: x }) => x !== !1),
|
|
2171
2159
|
ve.order
|
|
2172
|
-
)),
|
|
2173
|
-
name: ((
|
|
2174
|
-
items: t.actionType === ce.search ?
|
|
2160
|
+
)), s = ["name", "value", "type"], d = l.value.filter((x) => x._selected).map((x) => ke(x, s)), v = ee(!0), b = ee(!1), m = ee(), c = Ze({
|
|
2161
|
+
name: ((Ie = t.currentScene) == null ? void 0 : Ie.name) ?? "",
|
|
2162
|
+
items: t.actionType === ce.search ? d : Ge(((Y = t.currentScene) == null ? void 0 : Y.items) ?? [])
|
|
2175
2163
|
}), y = Ze({
|
|
2176
2164
|
name: [
|
|
2177
2165
|
{
|
|
@@ -2191,178 +2179,178 @@ const Fr = (r) => {
|
|
|
2191
2179
|
type: "array"
|
|
2192
2180
|
}
|
|
2193
2181
|
]
|
|
2194
|
-
}),
|
|
2195
|
-
const
|
|
2196
|
-
return
|
|
2197
|
-
}, _ =
|
|
2182
|
+
}), F = M(() => c.items.map(({ name: x }) => x)), g = () => {
|
|
2183
|
+
const x = l.value.find((k) => !F.value.includes(k.name));
|
|
2184
|
+
return x ? ke(Ge(x), s) : {};
|
|
2185
|
+
}, _ = M(() => ({
|
|
2198
2186
|
[ce.create]: "新建场景",
|
|
2199
2187
|
[ce.update]: "更新场景",
|
|
2200
2188
|
[ce.search]: "高级筛选"
|
|
2201
|
-
})[t.actionType]), p = (
|
|
2202
|
-
const
|
|
2203
|
-
|
|
2204
|
-
},
|
|
2205
|
-
const
|
|
2206
|
-
return [
|
|
2207
|
-
},
|
|
2208
|
-
const
|
|
2209
|
-
(W,
|
|
2189
|
+
})[t.actionType]), p = (x, k) => {
|
|
2190
|
+
const B = t.formConfigMap[k.name];
|
|
2191
|
+
B && (k.type = B.type, k.value = B.value, k.label = B.label, f(k.name, k.value));
|
|
2192
|
+
}, L = (x) => {
|
|
2193
|
+
const k = t.formConfigMap[x], B = c.items.map((ne) => ne.name), W = l.value.filter((ne) => !B.includes(ne.name));
|
|
2194
|
+
return [k, ...W];
|
|
2195
|
+
}, f = (x, k) => {
|
|
2196
|
+
const B = c.items.reduce(
|
|
2197
|
+
(W, ne) => (W[ne.name] = ne.value, W),
|
|
2210
2198
|
{}
|
|
2211
2199
|
);
|
|
2212
|
-
a("form-item-change",
|
|
2213
|
-
},
|
|
2214
|
-
|
|
2215
|
-
},
|
|
2216
|
-
var
|
|
2217
|
-
const
|
|
2200
|
+
a("form-item-change", x, k, B);
|
|
2201
|
+
}, S = ({ name: x, value: k }) => {
|
|
2202
|
+
f(x, k);
|
|
2203
|
+
}, j = async () => {
|
|
2204
|
+
var B;
|
|
2205
|
+
const x = c.items.map((W, ne) => {
|
|
2218
2206
|
const de = o.value[W.name];
|
|
2219
|
-
return de && (de.value = W.value, de[ve.orderInScene] =
|
|
2207
|
+
return de && (de.value = W.value, de[ve.orderInScene] = ne, de[ve.selected] = !0), de;
|
|
2220
2208
|
}).filter(Boolean);
|
|
2221
2209
|
if (t.actionType === ce.search && !b.value) {
|
|
2222
|
-
a("update-form-config",
|
|
2210
|
+
a("update-form-config", x), a("search", c.items, x), a("cancel");
|
|
2223
2211
|
return;
|
|
2224
2212
|
}
|
|
2225
|
-
await ((
|
|
2226
|
-
const
|
|
2213
|
+
await ((B = m.value) == null ? void 0 : B.validateFields());
|
|
2214
|
+
const k = me(c);
|
|
2227
2215
|
t.currentScene ? await t.onUpdate({
|
|
2228
2216
|
...t.currentScene,
|
|
2229
|
-
...
|
|
2230
|
-
}) : await t.onCreate(
|
|
2217
|
+
...k
|
|
2218
|
+
}) : await t.onCreate(k), a("update-form-config", x), a("cancel");
|
|
2231
2219
|
};
|
|
2232
2220
|
(() => {
|
|
2233
|
-
if (
|
|
2234
|
-
const
|
|
2235
|
-
|
|
2221
|
+
if (c.items.length) return;
|
|
2222
|
+
const x = En(
|
|
2223
|
+
l.value.filter(({ fixed: B, selected: W }) => B || W),
|
|
2236
2224
|
"name"
|
|
2237
2225
|
);
|
|
2238
|
-
if (
|
|
2239
|
-
|
|
2226
|
+
if (x.length) {
|
|
2227
|
+
c.items = it(x, "_order").map((B) => ke(B, s)), console.log("formState.items", c.items);
|
|
2240
2228
|
return;
|
|
2241
2229
|
}
|
|
2242
|
-
const
|
|
2243
|
-
|
|
2230
|
+
const k = g();
|
|
2231
|
+
k && c.items.push(k);
|
|
2244
2232
|
})();
|
|
2245
|
-
const te = (
|
|
2246
|
-
var
|
|
2233
|
+
const te = (x) => {
|
|
2234
|
+
var k;
|
|
2247
2235
|
return {
|
|
2248
|
-
disabled: (
|
|
2236
|
+
disabled: (k = o.value[x.name]) == null ? void 0 : k.fixed
|
|
2249
2237
|
};
|
|
2250
|
-
},
|
|
2251
|
-
if (Rt.includes(
|
|
2252
|
-
return
|
|
2253
|
-
if (!
|
|
2254
|
-
return
|
|
2255
|
-
if (
|
|
2256
|
-
return
|
|
2257
|
-
qe(o.value, `${
|
|
2258
|
-
},
|
|
2259
|
-
var
|
|
2260
|
-
return (
|
|
2261
|
-
},
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2264
|
-
},
|
|
2265
|
-
Object.entries(
|
|
2266
|
-
|
|
2238
|
+
}, D = (x) => o.value[x], ue = (x, k, B) => {
|
|
2239
|
+
if (Rt.includes(k))
|
|
2240
|
+
return Ce("setFormItem error,", `form item with prop "${x}" is readonly`);
|
|
2241
|
+
if (!D(x))
|
|
2242
|
+
return Ce("setFormItem error,", `Cannot find form item with name "${x}"`);
|
|
2243
|
+
if (k === "visible" && o.value[x].fixed)
|
|
2244
|
+
return Ce("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
2245
|
+
qe(o.value, `${x}.${k}`, B), o.value[x].visible || (c.items = c.items.filter((W) => W.name !== x));
|
|
2246
|
+
}, Te = (x) => {
|
|
2247
|
+
var k;
|
|
2248
|
+
return (k = c.items.find((B) => B.name === x)) == null ? void 0 : k.value;
|
|
2249
|
+
}, Se = (x, k) => {
|
|
2250
|
+
const B = c.items.find((W) => W.name === x);
|
|
2251
|
+
B && (B.value = k);
|
|
2252
|
+
}, re = (x) => {
|
|
2253
|
+
Object.entries(x).forEach(([k, B]) => {
|
|
2254
|
+
Se(k, B);
|
|
2267
2255
|
});
|
|
2268
2256
|
};
|
|
2269
|
-
function
|
|
2270
|
-
return (
|
|
2271
|
-
(
|
|
2272
|
-
const
|
|
2273
|
-
return
|
|
2257
|
+
function ae(x) {
|
|
2258
|
+
return (x ? je(x) : c.items.map((B) => B.name)).reduce(
|
|
2259
|
+
(B, W) => {
|
|
2260
|
+
const ne = c.items.find((de) => de.name === W);
|
|
2261
|
+
return ne && (B[W] = ne.value), B;
|
|
2274
2262
|
},
|
|
2275
2263
|
{}
|
|
2276
2264
|
);
|
|
2277
2265
|
}
|
|
2278
2266
|
return e({
|
|
2279
|
-
getFormItem:
|
|
2267
|
+
getFormItem: D,
|
|
2280
2268
|
setFormItem: ue,
|
|
2281
|
-
getFormValues:
|
|
2282
|
-
setFormValues:
|
|
2283
|
-
getFormValue:
|
|
2284
|
-
setFormValue:
|
|
2285
|
-
}), (
|
|
2286
|
-
const
|
|
2287
|
-
return I(),
|
|
2269
|
+
getFormValues: ae,
|
|
2270
|
+
setFormValues: re,
|
|
2271
|
+
getFormValue: Te,
|
|
2272
|
+
setFormValue: Se
|
|
2273
|
+
}), (x, k) => {
|
|
2274
|
+
const B = P("a-input"), W = P("a-form-item"), ne = P("a-select"), de = P("a-form"), tt = P("a-checkbox"), Oe = P("a-modal");
|
|
2275
|
+
return I(), E(Oe, {
|
|
2288
2276
|
open: v.value,
|
|
2289
|
-
"onUpdate:open":
|
|
2277
|
+
"onUpdate:open": k[3] || (k[3] = (Q) => v.value = Q),
|
|
2290
2278
|
title: _.value,
|
|
2291
2279
|
width: 720,
|
|
2292
2280
|
"body-style": {
|
|
2293
2281
|
maxHeight: "70vh",
|
|
2294
2282
|
overflow: "auto"
|
|
2295
2283
|
},
|
|
2296
|
-
onOk:
|
|
2297
|
-
onCancel:
|
|
2284
|
+
onOk: j,
|
|
2285
|
+
onCancel: k[4] || (k[4] = (Q) => a("cancel"))
|
|
2298
2286
|
}, {
|
|
2299
|
-
default:
|
|
2287
|
+
default: C(() => [
|
|
2300
2288
|
T(de, {
|
|
2301
2289
|
ref_key: "formRef",
|
|
2302
|
-
ref:
|
|
2303
|
-
model:
|
|
2290
|
+
ref: m,
|
|
2291
|
+
model: c,
|
|
2304
2292
|
rules: y,
|
|
2305
|
-
class:
|
|
2293
|
+
class: $(x.$style.sceneForm)
|
|
2306
2294
|
}, {
|
|
2307
|
-
default:
|
|
2308
|
-
r.actionType !==
|
|
2295
|
+
default: C(() => [
|
|
2296
|
+
r.actionType !== w(ce).search || b.value ? (I(), E(W, {
|
|
2309
2297
|
key: 0,
|
|
2310
2298
|
label: "场景名称",
|
|
2311
2299
|
name: "name",
|
|
2312
2300
|
"label-col": { span: 24 },
|
|
2313
2301
|
"wrapper-col": { span: 12 }
|
|
2314
2302
|
}, {
|
|
2315
|
-
default:
|
|
2316
|
-
T(
|
|
2317
|
-
value:
|
|
2318
|
-
"onUpdate:value":
|
|
2303
|
+
default: C(() => [
|
|
2304
|
+
T(B, {
|
|
2305
|
+
value: c.name,
|
|
2306
|
+
"onUpdate:value": k[0] || (k[0] = (Q) => c.name = Q),
|
|
2319
2307
|
placeholder: "请输入"
|
|
2320
2308
|
}, null, 8, ["value"])
|
|
2321
2309
|
]),
|
|
2322
2310
|
_: 1
|
|
2323
|
-
})) :
|
|
2311
|
+
})) : N("", !0),
|
|
2324
2312
|
T(W, {
|
|
2325
2313
|
label: "筛选条件",
|
|
2326
2314
|
name: "items",
|
|
2327
2315
|
"label-col": { span: 24 },
|
|
2328
2316
|
"wrapper-col": { span: 24 }
|
|
2329
2317
|
}, {
|
|
2330
|
-
default:
|
|
2331
|
-
T(
|
|
2332
|
-
value:
|
|
2333
|
-
"onUpdate:value":
|
|
2318
|
+
default: C(() => [
|
|
2319
|
+
T(wa, {
|
|
2320
|
+
value: c.items,
|
|
2321
|
+
"onUpdate:value": k[1] || (k[1] = (Q) => c.items = Q),
|
|
2334
2322
|
"add-button-text": "添加筛选条件",
|
|
2335
2323
|
"get-new-item-data": g,
|
|
2336
|
-
"max-length":
|
|
2324
|
+
"max-length": l.value.length,
|
|
2337
2325
|
"delete-button-props": te,
|
|
2338
|
-
onAdd:
|
|
2326
|
+
onAdd: S
|
|
2339
2327
|
}, {
|
|
2340
|
-
default:
|
|
2341
|
-
|
|
2342
|
-
class:
|
|
2328
|
+
default: C(({ item: Q }) => [
|
|
2329
|
+
J("div", {
|
|
2330
|
+
class: $(x.$style.queryFieldItem)
|
|
2343
2331
|
}, [
|
|
2344
|
-
T(
|
|
2345
|
-
value:
|
|
2346
|
-
"onUpdate:value": (ye) =>
|
|
2332
|
+
T(ne, {
|
|
2333
|
+
value: Q.name,
|
|
2334
|
+
"onUpdate:value": (ye) => Q.name = ye,
|
|
2347
2335
|
"show-search": "",
|
|
2348
|
-
options:
|
|
2336
|
+
options: L(Q.name),
|
|
2349
2337
|
"field-names": { value: "name" },
|
|
2350
2338
|
"option-filter-prop": "label",
|
|
2351
2339
|
placeholder: "请选择要筛选的字段名",
|
|
2352
|
-
class:
|
|
2353
|
-
onChange: (ye) => p(ye,
|
|
2340
|
+
class: $(x.$style.fieldSelect),
|
|
2341
|
+
onChange: (ye) => p(ye, Q)
|
|
2354
2342
|
}, null, 8, ["value", "onUpdate:value", "options", "class", "onChange"]),
|
|
2355
|
-
|
|
2356
|
-
class:
|
|
2343
|
+
J("div", {
|
|
2344
|
+
class: $(x.$style.fieldComponent)
|
|
2357
2345
|
}, [
|
|
2358
|
-
|
|
2346
|
+
Q.name ? (I(), E(Wt, {
|
|
2359
2347
|
key: 0,
|
|
2360
|
-
value:
|
|
2361
|
-
"onUpdate:value": (ye) =>
|
|
2348
|
+
value: Q.value,
|
|
2349
|
+
"onUpdate:value": (ye) => Q.value = ye,
|
|
2362
2350
|
"in-modal": "",
|
|
2363
|
-
"form-item": o.value[
|
|
2364
|
-
onChange: (ye) =>
|
|
2365
|
-
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) :
|
|
2351
|
+
"form-item": o.value[Q.name],
|
|
2352
|
+
onChange: (ye) => f(Q.name, ye)
|
|
2353
|
+
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : N("", !0)
|
|
2366
2354
|
], 2)
|
|
2367
2355
|
], 2)
|
|
2368
2356
|
]),
|
|
@@ -2374,29 +2362,29 @@ const Fr = (r) => {
|
|
|
2374
2362
|
]),
|
|
2375
2363
|
_: 1
|
|
2376
2364
|
}, 8, ["model", "rules", "class"]),
|
|
2377
|
-
r.actionType ===
|
|
2365
|
+
r.actionType === w(ce).search && r.allowCreateScene ? (I(), E(tt, {
|
|
2378
2366
|
key: 0,
|
|
2379
2367
|
checked: b.value,
|
|
2380
|
-
"onUpdate:checked":
|
|
2368
|
+
"onUpdate:checked": k[2] || (k[2] = (Q) => b.value = Q)
|
|
2381
2369
|
}, {
|
|
2382
|
-
default:
|
|
2370
|
+
default: C(() => k[5] || (k[5] = [
|
|
2383
2371
|
K(" 保存为场景 ")
|
|
2384
2372
|
])),
|
|
2385
2373
|
_: 1
|
|
2386
|
-
}, 8, ["checked"])) :
|
|
2374
|
+
}, 8, ["checked"])) : N("", !0)
|
|
2387
2375
|
]),
|
|
2388
2376
|
_: 1
|
|
2389
2377
|
}, 8, ["open", "title"]);
|
|
2390
2378
|
};
|
|
2391
2379
|
}
|
|
2392
|
-
}),
|
|
2393
|
-
sceneForm:
|
|
2394
|
-
queryFieldItem:
|
|
2380
|
+
}), Ga = "_sceneForm_njdgy_1", Qa = "_queryFieldItem_njdgy_1", Ja = "_fieldSelect_njdgy_7", Ka = "_fieldComponent_njdgy_10", Za = {
|
|
2381
|
+
sceneForm: Ga,
|
|
2382
|
+
queryFieldItem: Qa,
|
|
2395
2383
|
fieldSelect: Ja,
|
|
2396
|
-
fieldComponent:
|
|
2397
|
-
},
|
|
2398
|
-
$style:
|
|
2399
|
-
},
|
|
2384
|
+
fieldComponent: Ka
|
|
2385
|
+
}, Xa = {
|
|
2386
|
+
$style: Za
|
|
2387
|
+
}, eo = /* @__PURE__ */ fe(za, [["__cssModules", Xa]]), to = /* @__PURE__ */ ie({
|
|
2400
2388
|
__name: "SceneListModal",
|
|
2401
2389
|
props: {
|
|
2402
2390
|
/**
|
|
@@ -2437,50 +2425,50 @@ const Fr = (r) => {
|
|
|
2437
2425
|
},
|
|
2438
2426
|
emits: ["cancel", "create", "update", "delete", "sort"],
|
|
2439
2427
|
setup(r, { emit: e }) {
|
|
2440
|
-
const n = r, t = e, a = ee(n.list), o = ee(!0),
|
|
2441
|
-
await n.onDelete(
|
|
2442
|
-
},
|
|
2443
|
-
|
|
2444
|
-
}, v = (
|
|
2445
|
-
|
|
2428
|
+
const n = r, t = e, a = ee(n.list), o = ee(!0), l = () => t("cancel"), s = async (m) => {
|
|
2429
|
+
await n.onDelete(m), a.value = a.value.filter((c) => c.code !== m);
|
|
2430
|
+
}, d = () => {
|
|
2431
|
+
l(), t("create");
|
|
2432
|
+
}, v = (m) => {
|
|
2433
|
+
l(), t("update", m);
|
|
2446
2434
|
}, b = () => {
|
|
2447
2435
|
t(
|
|
2448
2436
|
"sort",
|
|
2449
|
-
a.value.map(({ code:
|
|
2437
|
+
a.value.map(({ code: m }) => m)
|
|
2450
2438
|
);
|
|
2451
2439
|
};
|
|
2452
|
-
return (
|
|
2453
|
-
const y = P("a-col"),
|
|
2454
|
-
return I(),
|
|
2440
|
+
return (m, c) => {
|
|
2441
|
+
const y = P("a-col"), F = P("a-row"), g = P("a-typography-text"), _ = P("a-button"), p = P("a-popconfirm"), L = P("a-empty"), f = P("a-modal");
|
|
2442
|
+
return I(), E(f, {
|
|
2455
2443
|
open: o.value,
|
|
2456
|
-
"onUpdate:open":
|
|
2444
|
+
"onUpdate:open": c[0] || (c[0] = (S) => o.value = S),
|
|
2457
2445
|
title: "场景管理",
|
|
2458
2446
|
width: 720,
|
|
2459
2447
|
footer: null,
|
|
2460
|
-
onCancel:
|
|
2448
|
+
onCancel: l
|
|
2461
2449
|
}, {
|
|
2462
|
-
default:
|
|
2463
|
-
|
|
2464
|
-
class:
|
|
2450
|
+
default: C(() => [
|
|
2451
|
+
J("div", {
|
|
2452
|
+
class: $(m.$style.sceneList)
|
|
2465
2453
|
}, [
|
|
2466
|
-
T(
|
|
2467
|
-
class:
|
|
2454
|
+
T(F, {
|
|
2455
|
+
class: $(m.$style.sceneListHead)
|
|
2468
2456
|
}, {
|
|
2469
|
-
default:
|
|
2457
|
+
default: C(() => [
|
|
2470
2458
|
T(y, {
|
|
2471
2459
|
span: 16,
|
|
2472
|
-
class:
|
|
2460
|
+
class: $(m.$style.col)
|
|
2473
2461
|
}, {
|
|
2474
|
-
default:
|
|
2462
|
+
default: C(() => c[1] || (c[1] = [
|
|
2475
2463
|
K(" 场景名称 ")
|
|
2476
2464
|
])),
|
|
2477
2465
|
_: 1
|
|
2478
2466
|
}, 8, ["class"]),
|
|
2479
2467
|
T(y, {
|
|
2480
2468
|
span: 8,
|
|
2481
|
-
class:
|
|
2469
|
+
class: $(m.$style.col)
|
|
2482
2470
|
}, {
|
|
2483
|
-
default:
|
|
2471
|
+
default: C(() => c[2] || (c[2] = [
|
|
2484
2472
|
K(" 操作 ")
|
|
2485
2473
|
])),
|
|
2486
2474
|
_: 1
|
|
@@ -2488,56 +2476,56 @@ const Fr = (r) => {
|
|
|
2488
2476
|
]),
|
|
2489
2477
|
_: 1
|
|
2490
2478
|
}, 8, ["class"]),
|
|
2491
|
-
a.value.length ? (I(),
|
|
2479
|
+
a.value.length ? (I(), E(w(gt), {
|
|
2492
2480
|
key: 0,
|
|
2493
2481
|
list: a.value,
|
|
2494
2482
|
"item-key": "id",
|
|
2495
2483
|
handle: ".table-column-draggable-icon",
|
|
2496
2484
|
onChange: b
|
|
2497
2485
|
}, {
|
|
2498
|
-
item:
|
|
2499
|
-
T(
|
|
2500
|
-
class:
|
|
2486
|
+
item: C(({ element: S }) => [
|
|
2487
|
+
T(F, {
|
|
2488
|
+
class: $(m.$style.sceneListItem)
|
|
2501
2489
|
}, {
|
|
2502
|
-
default:
|
|
2490
|
+
default: C(() => [
|
|
2503
2491
|
T(y, {
|
|
2504
2492
|
span: 16,
|
|
2505
|
-
class:
|
|
2493
|
+
class: $(m.$style.col)
|
|
2506
2494
|
}, {
|
|
2507
|
-
default:
|
|
2495
|
+
default: C(() => [
|
|
2508
2496
|
T(g, {
|
|
2509
|
-
ellipsis: { tooltip:
|
|
2510
|
-
content:
|
|
2497
|
+
ellipsis: { tooltip: S.name },
|
|
2498
|
+
content: S.name
|
|
2511
2499
|
}, null, 8, ["ellipsis", "content"])
|
|
2512
2500
|
]),
|
|
2513
2501
|
_: 2
|
|
2514
2502
|
}, 1032, ["class"]),
|
|
2515
2503
|
T(y, {
|
|
2516
2504
|
span: 8,
|
|
2517
|
-
class:
|
|
2505
|
+
class: $(m.$style.col)
|
|
2518
2506
|
}, {
|
|
2519
|
-
default:
|
|
2507
|
+
default: C(() => [
|
|
2520
2508
|
T(_, {
|
|
2521
2509
|
type: "link",
|
|
2522
2510
|
size: "small",
|
|
2523
|
-
onClick: (
|
|
2511
|
+
onClick: (j) => v(S)
|
|
2524
2512
|
}, {
|
|
2525
|
-
default:
|
|
2513
|
+
default: C(() => c[3] || (c[3] = [
|
|
2526
2514
|
K(" 编辑 ")
|
|
2527
2515
|
])),
|
|
2528
2516
|
_: 2
|
|
2529
2517
|
}, 1032, ["onClick"]),
|
|
2530
2518
|
T(p, {
|
|
2531
2519
|
title: "确定删除?",
|
|
2532
|
-
onConfirm: (
|
|
2520
|
+
onConfirm: (j) => s(S.code)
|
|
2533
2521
|
}, {
|
|
2534
|
-
default:
|
|
2522
|
+
default: C(() => [
|
|
2535
2523
|
T(_, {
|
|
2536
2524
|
type: "link",
|
|
2537
2525
|
size: "small",
|
|
2538
2526
|
danger: ""
|
|
2539
2527
|
}, {
|
|
2540
|
-
default:
|
|
2528
|
+
default: C(() => c[4] || (c[4] = [
|
|
2541
2529
|
K(" 删除 ")
|
|
2542
2530
|
])),
|
|
2543
2531
|
_: 1
|
|
@@ -2548,8 +2536,8 @@ const Fr = (r) => {
|
|
|
2548
2536
|
T(_, {
|
|
2549
2537
|
type: "text",
|
|
2550
2538
|
size: "small",
|
|
2551
|
-
icon: X(
|
|
2552
|
-
class:
|
|
2539
|
+
icon: X(w(De)),
|
|
2540
|
+
class: $(["table-column-draggable-icon", m.$style.dragIcon])
|
|
2553
2541
|
}, null, 8, ["icon", "class"])
|
|
2554
2542
|
]),
|
|
2555
2543
|
_: 2
|
|
@@ -2559,36 +2547,36 @@ const Fr = (r) => {
|
|
|
2559
2547
|
}, 1032, ["class"])
|
|
2560
2548
|
]),
|
|
2561
2549
|
_: 1
|
|
2562
|
-
}, 8, ["list"])) : (I(), L
|
|
2550
|
+
}, 8, ["list"])) : (I(), E(L, {
|
|
2563
2551
|
key: 1,
|
|
2564
|
-
image:
|
|
2552
|
+
image: w(In).PRESENTED_IMAGE_SIMPLE
|
|
2565
2553
|
}, null, 8, ["image"]))
|
|
2566
2554
|
], 2),
|
|
2567
|
-
r.allowCreateScene ? (I(),
|
|
2555
|
+
r.allowCreateScene ? (I(), E(_, {
|
|
2568
2556
|
key: 0,
|
|
2569
2557
|
type: "link",
|
|
2570
|
-
icon: X(
|
|
2571
|
-
onClick:
|
|
2558
|
+
icon: X(w(At)),
|
|
2559
|
+
onClick: d
|
|
2572
2560
|
}, {
|
|
2573
|
-
default:
|
|
2561
|
+
default: C(() => c[5] || (c[5] = [
|
|
2574
2562
|
K(" 新建场景 ")
|
|
2575
2563
|
])),
|
|
2576
2564
|
_: 1
|
|
2577
|
-
}, 8, ["icon"])) :
|
|
2565
|
+
}, 8, ["icon"])) : N("", !0)
|
|
2578
2566
|
]),
|
|
2579
2567
|
_: 1
|
|
2580
2568
|
}, 8, ["open"]);
|
|
2581
2569
|
};
|
|
2582
2570
|
}
|
|
2583
|
-
}),
|
|
2584
|
-
sceneList:
|
|
2585
|
-
sceneListHead:
|
|
2586
|
-
sceneListItem:
|
|
2587
|
-
col:
|
|
2588
|
-
dragIcon:
|
|
2589
|
-
},
|
|
2590
|
-
$style:
|
|
2591
|
-
},
|
|
2571
|
+
}), no = "_sceneList_3nrgr_1", ro = "_sceneListHead_3nrgr_5", ao = "_sceneListItem_3nrgr_8", oo = "_col_3nrgr_16", so = "_dragIcon_3nrgr_20", lo = {
|
|
2572
|
+
sceneList: no,
|
|
2573
|
+
sceneListHead: ro,
|
|
2574
|
+
sceneListItem: ao,
|
|
2575
|
+
col: oo,
|
|
2576
|
+
dragIcon: so
|
|
2577
|
+
}, io = {
|
|
2578
|
+
$style: lo
|
|
2579
|
+
}, uo = /* @__PURE__ */ fe(to, [["__cssModules", io]]), co = /* @__PURE__ */ ie({
|
|
2592
2580
|
__name: "FormSearchParams",
|
|
2593
2581
|
props: {
|
|
2594
2582
|
/**
|
|
@@ -2609,35 +2597,35 @@ const Fr = (r) => {
|
|
|
2609
2597
|
},
|
|
2610
2598
|
emits: ["form-item-change"],
|
|
2611
2599
|
setup(r, { emit: e }) {
|
|
2612
|
-
const n = r, t = e, a =
|
|
2613
|
-
Object.values(n.formConfigMap).filter((
|
|
2600
|
+
const n = r, t = e, a = M(() => it(
|
|
2601
|
+
Object.values(n.formConfigMap).filter((d) => d[ve.selected]),
|
|
2614
2602
|
ve.orderInScene
|
|
2615
|
-
)), o = (
|
|
2616
|
-
t("form-item-change",
|
|
2617
|
-
},
|
|
2603
|
+
)), o = (d, v) => {
|
|
2604
|
+
t("form-item-change", d, v);
|
|
2605
|
+
}, l = yt(o, 500), s = (d, v) => {
|
|
2618
2606
|
[
|
|
2619
2607
|
H.input,
|
|
2620
2608
|
H.inputNumber,
|
|
2621
2609
|
H.inputGroup,
|
|
2622
2610
|
H.inputNumberRange
|
|
2623
|
-
].includes(n.formConfigMap[
|
|
2611
|
+
].includes(n.formConfigMap[d].type) ? l(d, v) : o(d, v);
|
|
2624
2612
|
};
|
|
2625
|
-
return (
|
|
2626
|
-
const b = P("a-col"),
|
|
2627
|
-
return I(),
|
|
2613
|
+
return (d, v) => {
|
|
2614
|
+
const b = P("a-col"), m = P("a-row");
|
|
2615
|
+
return I(), E(m, {
|
|
2628
2616
|
gutter: [8, 8],
|
|
2629
|
-
class:
|
|
2617
|
+
class: $(d.$style.searchParams)
|
|
2630
2618
|
}, {
|
|
2631
|
-
default:
|
|
2632
|
-
(I(!0), U(
|
|
2633
|
-
key:
|
|
2634
|
-
span: (r.formConfigMap[
|
|
2619
|
+
default: C(() => [
|
|
2620
|
+
(I(!0), U(xe, null, lt(a.value, (c) => (I(), E(b, {
|
|
2621
|
+
key: c.name,
|
|
2622
|
+
span: (r.formConfigMap[c.name].span ?? 1) * r.formItemColSpan
|
|
2635
2623
|
}, {
|
|
2636
|
-
default:
|
|
2637
|
-
T(
|
|
2638
|
-
value: r.formConfigMap[
|
|
2639
|
-
"form-item": r.formConfigMap[
|
|
2640
|
-
onChange: (y) =>
|
|
2624
|
+
default: C(() => [
|
|
2625
|
+
T(Wt, {
|
|
2626
|
+
value: r.formConfigMap[c.name].value,
|
|
2627
|
+
"form-item": r.formConfigMap[c.name],
|
|
2628
|
+
onChange: (y) => s(c.name, y)
|
|
2641
2629
|
}, null, 8, ["value", "form-item", "onChange"])
|
|
2642
2630
|
]),
|
|
2643
2631
|
_: 2
|
|
@@ -2647,21 +2635,21 @@ const Fr = (r) => {
|
|
|
2647
2635
|
}, 8, ["class"]);
|
|
2648
2636
|
};
|
|
2649
2637
|
}
|
|
2650
|
-
}),
|
|
2651
|
-
searchParams:
|
|
2652
|
-
},
|
|
2653
|
-
$style:
|
|
2654
|
-
},
|
|
2655
|
-
|
|
2656
|
-
function
|
|
2638
|
+
}), po = "_searchParams_1vdwi_1", fo = {
|
|
2639
|
+
searchParams: po
|
|
2640
|
+
}, mo = {
|
|
2641
|
+
$style: fo
|
|
2642
|
+
}, yo = /* @__PURE__ */ fe(co, [["__cssModules", mo]]);
|
|
2643
|
+
Re.locale("zh-cn");
|
|
2644
|
+
function qt(r) {
|
|
2657
2645
|
return Array.from(document.body.children).includes(r);
|
|
2658
2646
|
}
|
|
2659
|
-
class
|
|
2647
|
+
class go {
|
|
2660
2648
|
constructor(e = {}) {
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2649
|
+
Me(this, "currents");
|
|
2650
|
+
Me(this, "dialogs");
|
|
2651
|
+
Me(this, "staticDialogs");
|
|
2652
|
+
Me(this, "rootVm");
|
|
2665
2653
|
this.currents = [], this.dialogs = {}, this.staticDialogs = e, this.rootVm = null;
|
|
2666
2654
|
}
|
|
2667
2655
|
// 设置rootVm
|
|
@@ -2678,13 +2666,13 @@ class yo {
|
|
|
2678
2666
|
}
|
|
2679
2667
|
// 打开dialog
|
|
2680
2668
|
open(e, n) {
|
|
2681
|
-
const { props: t, onCreated: a, onMounted: o } = n || {},
|
|
2682
|
-
if (!
|
|
2669
|
+
const { props: t, onCreated: a, onMounted: o } = n || {}, l = this.staticDialogs[e] || this.dialogs[e] || null;
|
|
2670
|
+
if (!l) {
|
|
2683
2671
|
console.error(`Dialog "${e}" is not existing, please register it firstly.`);
|
|
2684
2672
|
return;
|
|
2685
2673
|
}
|
|
2686
|
-
const
|
|
2687
|
-
|
|
2674
|
+
const s = document.createElement("div"), d = `dialog_${Mn()}`;
|
|
2675
|
+
s.setAttribute("id", d), document.body.appendChild(s);
|
|
2688
2676
|
const v = ln({
|
|
2689
2677
|
data() {
|
|
2690
2678
|
return {
|
|
@@ -2693,30 +2681,30 @@ class yo {
|
|
|
2693
2681
|
},
|
|
2694
2682
|
render() {
|
|
2695
2683
|
return X(
|
|
2696
|
-
|
|
2684
|
+
Fn,
|
|
2697
2685
|
{
|
|
2698
|
-
key:
|
|
2686
|
+
key: d,
|
|
2699
2687
|
locale: Dt
|
|
2700
2688
|
},
|
|
2701
2689
|
() => [
|
|
2702
|
-
X(
|
|
2703
|
-
key:
|
|
2690
|
+
X(l, {
|
|
2691
|
+
key: d,
|
|
2704
2692
|
destroyOnClose: !0,
|
|
2705
2693
|
...t,
|
|
2706
2694
|
open: this.open,
|
|
2707
2695
|
onCancel: () => {
|
|
2708
|
-
var
|
|
2709
|
-
this.open = !1, (
|
|
2696
|
+
var m;
|
|
2697
|
+
this.open = !1, (m = t == null ? void 0 : t.onCancel) == null || m.call(t);
|
|
2710
2698
|
}
|
|
2711
2699
|
})
|
|
2712
2700
|
]
|
|
2713
2701
|
);
|
|
2714
2702
|
}
|
|
2715
|
-
}).use(
|
|
2703
|
+
}).use(yn);
|
|
2716
2704
|
a == null || a(v);
|
|
2717
|
-
const b = v.mount(`#${
|
|
2718
|
-
return o == null || o(b), b.$watch("open", (
|
|
2719
|
-
|
|
2705
|
+
const b = v.mount(`#${d}`);
|
|
2706
|
+
return o == null || o(b), b.$watch("open", (m) => {
|
|
2707
|
+
m || this.destroy();
|
|
2720
2708
|
}), this.currents.push(v), v;
|
|
2721
2709
|
}
|
|
2722
2710
|
// 关闭dialog
|
|
@@ -2730,23 +2718,23 @@ class yo {
|
|
|
2730
2718
|
var n, t, a;
|
|
2731
2719
|
const e = this.currents.pop();
|
|
2732
2720
|
if (e) {
|
|
2733
|
-
const o =
|
|
2734
|
-
|
|
2721
|
+
const o = qt((n = e._instance) == null ? void 0 : n.vnode.el) ? (t = e._instance) == null ? void 0 : t.vnode.el : (a = e._instance) == null ? void 0 : a.vnode.el.parentElement;
|
|
2722
|
+
qt(o) && document.body.removeChild(o), e.unmount();
|
|
2735
2723
|
}
|
|
2736
2724
|
}
|
|
2737
2725
|
}
|
|
2738
|
-
const Ae = new
|
|
2739
|
-
function
|
|
2726
|
+
const Ae = new go();
|
|
2727
|
+
function jt(r, e) {
|
|
2740
2728
|
const n = Symbol("dialog");
|
|
2741
2729
|
Ae.register(n, r);
|
|
2742
2730
|
function t() {
|
|
2743
|
-
Ae.open(n,
|
|
2731
|
+
Ae.open(n, w(e));
|
|
2744
2732
|
}
|
|
2745
2733
|
function a() {
|
|
2746
2734
|
Ae.close();
|
|
2747
2735
|
}
|
|
2748
|
-
function o(
|
|
2749
|
-
Ae.open(n,
|
|
2736
|
+
function o(l) {
|
|
2737
|
+
Ae.open(n, l);
|
|
2750
2738
|
}
|
|
2751
2739
|
return un(() => {
|
|
2752
2740
|
Ae.unregister(n);
|
|
@@ -2756,11 +2744,11 @@ function Lt(r, e) {
|
|
|
2756
2744
|
openByConfig: o
|
|
2757
2745
|
};
|
|
2758
2746
|
}
|
|
2759
|
-
const ze = 2e3,
|
|
2747
|
+
const ze = 2e3, vo = (r) => {
|
|
2760
2748
|
const { getScenes: e, setScenes: n } = r;
|
|
2761
2749
|
return {
|
|
2762
2750
|
querySceneList: async (t) => {
|
|
2763
|
-
const a = e(), o = t.type ? a.filter((
|
|
2751
|
+
const a = e(), o = t.type ? a.filter((l) => l.type === t.type) : a;
|
|
2764
2752
|
return {
|
|
2765
2753
|
code: ze,
|
|
2766
2754
|
data: o,
|
|
@@ -2768,7 +2756,7 @@ const ze = 2e3, go = (r) => {
|
|
|
2768
2756
|
};
|
|
2769
2757
|
},
|
|
2770
2758
|
createScene: async (t) => {
|
|
2771
|
-
const a = e(), o =
|
|
2759
|
+
const a = e(), o = Ut(Math.random().toString());
|
|
2772
2760
|
return a.push({ ...t, code: o }), n(a), {
|
|
2773
2761
|
code: ze,
|
|
2774
2762
|
data: o,
|
|
@@ -2776,7 +2764,7 @@ const ze = 2e3, go = (r) => {
|
|
|
2776
2764
|
};
|
|
2777
2765
|
},
|
|
2778
2766
|
updateScene: async (t) => {
|
|
2779
|
-
const a = e(), o = a.findIndex((
|
|
2767
|
+
const a = e(), o = a.findIndex((l) => l.code === t.code);
|
|
2780
2768
|
return o === -1 ? {
|
|
2781
2769
|
code: 404,
|
|
2782
2770
|
data: null,
|
|
@@ -2788,7 +2776,7 @@ const ze = 2e3, go = (r) => {
|
|
|
2788
2776
|
});
|
|
2789
2777
|
},
|
|
2790
2778
|
deleteScene: async (t) => {
|
|
2791
|
-
const o = e().filter((
|
|
2779
|
+
const o = e().filter((l) => !t.includes(l.code));
|
|
2792
2780
|
return n(o), {
|
|
2793
2781
|
code: ze,
|
|
2794
2782
|
data: null,
|
|
@@ -2796,47 +2784,7 @@ const ze = 2e3, go = (r) => {
|
|
|
2796
2784
|
};
|
|
2797
2785
|
}
|
|
2798
2786
|
};
|
|
2799
|
-
},
|
|
2800
|
-
const e = r.sceneRequestUrls ?? Yt, n = async (t, a = {}) => {
|
|
2801
|
-
try {
|
|
2802
|
-
const o = {
|
|
2803
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
2804
|
-
"Content-Type": "application/json",
|
|
2805
|
-
Authorization: `Bearer ${Pt("NIST_TOKEN")}`,
|
|
2806
|
-
"Yidun-Token": Pt("Yidun-Token") || ""
|
|
2807
|
-
}, s = await fetch(t, {
|
|
2808
|
-
...a,
|
|
2809
|
-
headers: {
|
|
2810
|
-
...o,
|
|
2811
|
-
...a.headers
|
|
2812
|
-
}
|
|
2813
|
-
});
|
|
2814
|
-
if (!s.ok)
|
|
2815
|
-
throw new Error(`HTTP error! status: ${s.status}`);
|
|
2816
|
-
return await s.json();
|
|
2817
|
-
} catch (o) {
|
|
2818
|
-
throw console.error("API request failed:", o), o;
|
|
2819
|
-
}
|
|
2820
|
-
};
|
|
2821
|
-
return {
|
|
2822
|
-
querySceneList: async (t) => {
|
|
2823
|
-
const a = new URLSearchParams(t).toString();
|
|
2824
|
-
return n(`${e.query}?${a}`);
|
|
2825
|
-
},
|
|
2826
|
-
createScene: async (t) => n(e.create, {
|
|
2827
|
-
method: "POST",
|
|
2828
|
-
body: JSON.stringify(t)
|
|
2829
|
-
}),
|
|
2830
|
-
updateScene: async (t) => n(e.update, {
|
|
2831
|
-
method: "POST",
|
|
2832
|
-
body: JSON.stringify(t)
|
|
2833
|
-
}),
|
|
2834
|
-
deleteScene: async (t) => n(e.delete, {
|
|
2835
|
-
method: "POST",
|
|
2836
|
-
body: JSON.stringify(t)
|
|
2837
|
-
})
|
|
2838
|
-
};
|
|
2839
|
-
}, ho = () => {
|
|
2787
|
+
}, Lt = () => {
|
|
2840
2788
|
const r = {
|
|
2841
2789
|
code: -1,
|
|
2842
2790
|
data: [],
|
|
@@ -2848,7 +2796,7 @@ const ze = 2e3, go = (r) => {
|
|
|
2848
2796
|
updateScene: async () => r,
|
|
2849
2797
|
deleteScene: async () => r
|
|
2850
2798
|
};
|
|
2851
|
-
},
|
|
2799
|
+
}, ho = ["innerHTML"], bo = /* @__PURE__ */ ie({
|
|
2852
2800
|
__name: "SuperTable",
|
|
2853
2801
|
props: {
|
|
2854
2802
|
/**
|
|
@@ -2944,10 +2892,10 @@ const ze = 2e3, go = (r) => {
|
|
|
2944
2892
|
type: String,
|
|
2945
2893
|
default: "local"
|
|
2946
2894
|
},
|
|
2947
|
-
/**
|
|
2948
|
-
|
|
2895
|
+
/** 场景请求函数配置 */
|
|
2896
|
+
sceneRequest: {
|
|
2949
2897
|
type: Object,
|
|
2950
|
-
default:
|
|
2898
|
+
default: void 0
|
|
2951
2899
|
},
|
|
2952
2900
|
/** 开启表格设置 */
|
|
2953
2901
|
enableTableConfig: {
|
|
@@ -2958,70 +2906,70 @@ const ze = 2e3, go = (r) => {
|
|
|
2958
2906
|
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change"],
|
|
2959
2907
|
setup(r, { expose: e, emit: n }) {
|
|
2960
2908
|
var _t;
|
|
2961
|
-
|
|
2962
|
-
const t = r, a = n, o =
|
|
2963
|
-
var u, h,
|
|
2964
|
-
const
|
|
2965
|
-
return !!((
|
|
2966
|
-
}), s = ee(), { openByConfig:
|
|
2967
|
-
(
|
|
2909
|
+
Re.locale("zh-cn");
|
|
2910
|
+
const t = r, a = n, o = ee(!1), l = M(() => {
|
|
2911
|
+
var u, h, O;
|
|
2912
|
+
const i = (u = cn()) == null ? void 0 : u.appContext.app;
|
|
2913
|
+
return !!((O = (h = i == null ? void 0 : i.config) == null ? void 0 : h.globalProperties) != null && O.$router);
|
|
2914
|
+
}), s = ee(), { openByConfig: d } = jt(eo), { openByConfig: v } = jt(uo), b = Pt(t.columns).reduce(
|
|
2915
|
+
(i, u) => (i[u.key] = ke(u, Vt), i),
|
|
2968
2916
|
{}
|
|
2969
|
-
),
|
|
2917
|
+
), m = Ut([location.hostname, location.pathname, t.sceneType].join("")), c = Nn(`superTable_${m}`, {
|
|
2970
2918
|
pathname: location.pathname,
|
|
2971
2919
|
sceneCode: null,
|
|
2972
2920
|
sceneSort: [],
|
|
2973
2921
|
sceneList: [],
|
|
2974
|
-
columnConfig:
|
|
2975
|
-
}),
|
|
2976
|
-
getScenes: () =>
|
|
2977
|
-
setScenes: (
|
|
2978
|
-
|
|
2922
|
+
columnConfig: b
|
|
2923
|
+
}), y = M(() => t.enableScene ? t.sceneStorageType === "api" ? t.sceneRequest ? t.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'), Lt()) : vo({
|
|
2924
|
+
getScenes: () => c.value.sceneList,
|
|
2925
|
+
setScenes: (i) => {
|
|
2926
|
+
c.value.sceneList = i;
|
|
2979
2927
|
}
|
|
2980
|
-
}) :
|
|
2928
|
+
}) : Lt()), F = ee(!1), g = M(() => Object.keys(t.customQueryParams).length > 0), _ = ee(!1), p = yt(async () => {
|
|
2981
2929
|
try {
|
|
2982
|
-
|
|
2983
|
-
const { total:
|
|
2930
|
+
Y.loading = !0;
|
|
2931
|
+
const { total: i, data: u } = await t.request({
|
|
2984
2932
|
params: bt(),
|
|
2985
|
-
pageSize:
|
|
2986
|
-
pageNum:
|
|
2933
|
+
pageSize: Y.pagination.pageSize,
|
|
2934
|
+
pageNum: Y.pagination.current
|
|
2987
2935
|
});
|
|
2988
|
-
|
|
2989
|
-
} catch (
|
|
2990
|
-
|
|
2936
|
+
Y.dataSource = u, Y.pagination.total = i;
|
|
2937
|
+
} catch (i) {
|
|
2938
|
+
Y.dataSource = [], console.error(i);
|
|
2991
2939
|
} finally {
|
|
2992
|
-
|
|
2940
|
+
Y.loading = !1;
|
|
2993
2941
|
}
|
|
2994
|
-
}, t.debounceWait),
|
|
2995
|
-
t.enableScene && !
|
|
2996
|
-
},
|
|
2997
|
-
for (const u in
|
|
2998
|
-
const h =
|
|
2999
|
-
h.value =
|
|
2942
|
+
}, t.debounceWait), L = () => {
|
|
2943
|
+
t.enableScene && !j.loaded || (Y.pagination.current = 1, p());
|
|
2944
|
+
}, f = ee({}), S = (i = []) => {
|
|
2945
|
+
for (const u in f.value) {
|
|
2946
|
+
const h = f.value[u], O = i.find((q) => q.name === u);
|
|
2947
|
+
h.value = O ? O.value : h._defaultValue, h[ve.selected] = !!O, h[ve.orderInScene] = O ? i.findIndex((q) => q.name === (O == null ? void 0 : O.name)) : void 0;
|
|
3000
2948
|
}
|
|
3001
|
-
|
|
3002
|
-
},
|
|
2949
|
+
L();
|
|
2950
|
+
}, j = Ze({
|
|
3003
2951
|
list: [],
|
|
3004
2952
|
loading: !1,
|
|
3005
2953
|
submiting: !1,
|
|
3006
2954
|
loaded: !1
|
|
3007
|
-
}), V =
|
|
2955
|
+
}), V = M(() => je(me(t.defaultScene)).filter(Boolean).map(({ name: u = "默认场景", code: h = "default_scene", items: O }) => ({
|
|
3008
2956
|
name: u,
|
|
3009
2957
|
code: h,
|
|
3010
2958
|
isCustom: !0,
|
|
3011
|
-
items:
|
|
2959
|
+
items: O.filter((q) => !!f.value[q.name]).map((q) => {
|
|
3012
2960
|
var z;
|
|
3013
2961
|
return {
|
|
3014
|
-
name:
|
|
3015
|
-
value:
|
|
3016
|
-
type: (z =
|
|
2962
|
+
name: q.name,
|
|
2963
|
+
value: q.value ?? f.value[q.name]._defaultValue,
|
|
2964
|
+
type: (z = f.value[q.name]) == null ? void 0 : z.type
|
|
3017
2965
|
};
|
|
3018
2966
|
})
|
|
3019
2967
|
})));
|
|
3020
|
-
|
|
2968
|
+
he(
|
|
3021
2969
|
() => t.formItems,
|
|
3022
2970
|
() => {
|
|
3023
|
-
|
|
3024
|
-
|
|
2971
|
+
Ir(me(t.formItems)).forEach((i) => {
|
|
2972
|
+
f.value[i.name] = An(me(f.value[i.name]) ?? {}, i);
|
|
3025
2973
|
});
|
|
3026
2974
|
},
|
|
3027
2975
|
{
|
|
@@ -3029,78 +2977,78 @@ const ze = 2e3, go = (r) => {
|
|
|
3029
2977
|
deep: !0
|
|
3030
2978
|
}
|
|
3031
2979
|
);
|
|
3032
|
-
const
|
|
2980
|
+
const te = async () => {
|
|
3033
2981
|
try {
|
|
3034
|
-
|
|
3035
|
-
const { code:
|
|
3036
|
-
if (
|
|
3037
|
-
const
|
|
3038
|
-
|
|
3039
|
-
const
|
|
3040
|
-
if (!
|
|
3041
|
-
|
|
2982
|
+
j.loading = !0;
|
|
2983
|
+
const { code: i, data: u = [], msg: h } = await y.value.querySceneList({ type: m });
|
|
2984
|
+
if (i === 2e3) {
|
|
2985
|
+
const O = j.list.find((z) => z.code === c.value.sceneCode);
|
|
2986
|
+
j.list = Fr(u, f.value, c.value.sceneSort);
|
|
2987
|
+
const q = j.list.find((z) => z.code === c.value.sceneCode);
|
|
2988
|
+
if (!j.loaded && g.value) {
|
|
2989
|
+
c.value.sceneCode = null, j.loaded = !0;
|
|
3042
2990
|
const z = Object.entries(t.customQueryParams).map(([Ye, rt]) => {
|
|
3043
2991
|
var He;
|
|
3044
2992
|
return {
|
|
3045
2993
|
name: Ye,
|
|
3046
2994
|
value: rt,
|
|
3047
|
-
type: (He =
|
|
2995
|
+
type: (He = f.value[Ye]) == null ? void 0 : He.type
|
|
3048
2996
|
};
|
|
3049
2997
|
});
|
|
3050
|
-
|
|
2998
|
+
S(z);
|
|
3051
2999
|
return;
|
|
3052
3000
|
}
|
|
3053
|
-
(!
|
|
3001
|
+
(!j.loaded || O && O.value !== (q == null ? void 0 : q.value)) && S(q == null ? void 0 : q.items), j.loaded = !0;
|
|
3054
3002
|
} else
|
|
3055
3003
|
ot.error(h);
|
|
3056
3004
|
} finally {
|
|
3057
|
-
|
|
3005
|
+
j.loading = !1;
|
|
3058
3006
|
}
|
|
3059
|
-
},
|
|
3007
|
+
}, D = ({ code: i, msg: u }) => i === 2e3 ? (ot.success("操作成功"), te(), Promise.resolve(u)) : (ot.error(u), Promise.reject(u)), ue = async ({ name: i, items: u }) => {
|
|
3060
3008
|
try {
|
|
3061
|
-
const h = await
|
|
3062
|
-
type:
|
|
3063
|
-
name:
|
|
3009
|
+
const h = await y.value.createScene({
|
|
3010
|
+
type: m,
|
|
3011
|
+
name: i,
|
|
3064
3012
|
value: JSON.stringify(u),
|
|
3065
3013
|
asPrivate: !0
|
|
3066
3014
|
});
|
|
3067
|
-
|
|
3015
|
+
c.value.sceneCode = h == null ? void 0 : h.data, D(h);
|
|
3068
3016
|
} catch (h) {
|
|
3069
3017
|
return Promise.reject(h);
|
|
3070
3018
|
}
|
|
3071
|
-
},
|
|
3019
|
+
}, Te = async (i) => {
|
|
3072
3020
|
try {
|
|
3073
|
-
const u = await
|
|
3074
|
-
code:
|
|
3075
|
-
name:
|
|
3076
|
-
value: JSON.stringify(
|
|
3021
|
+
const u = await y.value.updateScene({
|
|
3022
|
+
code: i.code,
|
|
3023
|
+
name: i.name,
|
|
3024
|
+
value: JSON.stringify(i.items)
|
|
3077
3025
|
});
|
|
3078
|
-
return
|
|
3026
|
+
return D(u);
|
|
3079
3027
|
} catch (u) {
|
|
3080
3028
|
return Promise.reject(u);
|
|
3081
3029
|
}
|
|
3082
|
-
},
|
|
3030
|
+
}, Se = async (i) => {
|
|
3083
3031
|
try {
|
|
3084
|
-
const u = await
|
|
3085
|
-
u.code === 2e3 && (
|
|
3032
|
+
const u = await y.value.deleteScene([i]);
|
|
3033
|
+
u.code === 2e3 && (c.value.sceneCode = null, i === c.value.sceneCode && (S([]), c.value.sceneCode = void 0)), D(u);
|
|
3086
3034
|
} catch (u) {
|
|
3087
3035
|
return Promise.reject(u);
|
|
3088
3036
|
}
|
|
3089
|
-
},
|
|
3090
|
-
|
|
3091
|
-
() => [
|
|
3037
|
+
}, re = M(() => j.list.length < t.maxSceneCount);
|
|
3038
|
+
he(
|
|
3039
|
+
() => [c.value.sceneCode, j.list],
|
|
3092
3040
|
() => {
|
|
3093
|
-
if (
|
|
3094
|
-
|
|
3041
|
+
if (g.value && !_.value) {
|
|
3042
|
+
_.value = !0;
|
|
3095
3043
|
return;
|
|
3096
3044
|
}
|
|
3097
|
-
const
|
|
3098
|
-
(u) => u.code ===
|
|
3045
|
+
const i = [...V.value, ...j.list].find(
|
|
3046
|
+
(u) => u.code === c.value.sceneCode
|
|
3099
3047
|
);
|
|
3100
|
-
|
|
3048
|
+
S((i == null ? void 0 : i.items) ?? []);
|
|
3101
3049
|
}
|
|
3102
3050
|
);
|
|
3103
|
-
const
|
|
3051
|
+
const ae = M(() => `super_table_row_${m}`), Ie = dn(), Y = Ze({
|
|
3104
3052
|
...t.tableProps,
|
|
3105
3053
|
dataSource: [],
|
|
3106
3054
|
columns: [],
|
|
@@ -3112,15 +3060,15 @@ const ze = 2e3, go = (r) => {
|
|
|
3112
3060
|
current: 1,
|
|
3113
3061
|
showQuickJumper: !0,
|
|
3114
3062
|
showSizeChanger: !0,
|
|
3115
|
-
showTotal: (
|
|
3063
|
+
showTotal: (i) => `共${i}条数据`,
|
|
3116
3064
|
...Xe(t.tableProps, "pagination", {}),
|
|
3117
|
-
onShowSizeChange: (
|
|
3118
|
-
var h,
|
|
3119
|
-
((h = t.tableProps) == null ? void 0 : h.pagination) !== !1 && ((z = (
|
|
3065
|
+
onShowSizeChange: (i, u) => {
|
|
3066
|
+
var h, O, q, z;
|
|
3067
|
+
((h = t.tableProps) == null ? void 0 : h.pagination) !== !1 && ((z = (q = (O = t.tableProps) == null ? void 0 : O.pagination) == null ? void 0 : q.onShowSizeChange) == null || z.call(q, 1, u));
|
|
3120
3068
|
},
|
|
3121
|
-
onChange: (
|
|
3122
|
-
var h,
|
|
3123
|
-
|
|
3069
|
+
onChange: (i, u) => {
|
|
3070
|
+
var h, O, q, z;
|
|
3071
|
+
Y.pagination.current = u !== Y.pagination.pageSize ? 1 : i, Y.pagination.pageSize = u, ((h = t.tableProps) == null ? void 0 : h.pagination) !== !1 && ((z = (q = (O = t.tableProps) == null ? void 0 : O.pagination) == null ? void 0 : q.onChange) == null || z.call(q, i, u)), p();
|
|
3124
3072
|
}
|
|
3125
3073
|
},
|
|
3126
3074
|
tableLayout: "fixed",
|
|
@@ -3130,52 +3078,52 @@ const ze = 2e3, go = (r) => {
|
|
|
3130
3078
|
scrollToFirstRowOnChange: !0,
|
|
3131
3079
|
...((_t = t.tableProps) == null ? void 0 : _t.scroll) ?? {}
|
|
3132
3080
|
},
|
|
3133
|
-
rowClassName: (
|
|
3081
|
+
rowClassName: (i, u, h) => {
|
|
3134
3082
|
var z;
|
|
3135
|
-
let
|
|
3136
|
-
const
|
|
3137
|
-
return
|
|
3083
|
+
let O = "";
|
|
3084
|
+
const q = (z = t.tableProps) == null ? void 0 : z.rowClassName;
|
|
3085
|
+
return _e(q) ? O = q(i, u, h) : typeof q == "string" && (O = q), [O, ae.value].join(" ");
|
|
3138
3086
|
}
|
|
3139
|
-
}),
|
|
3087
|
+
}), x = M(() => {
|
|
3140
3088
|
try {
|
|
3141
|
-
return t.formatDataSource(me(
|
|
3089
|
+
return t.formatDataSource(me(Y.dataSource));
|
|
3142
3090
|
} catch {
|
|
3143
|
-
return me(
|
|
3091
|
+
return me(Y.dataSource);
|
|
3144
3092
|
}
|
|
3145
|
-
}), k =
|
|
3146
|
-
const u =
|
|
3093
|
+
}), k = M(() => Pt(t.columns).map((i) => {
|
|
3094
|
+
const u = c.value.columnConfig[i.key];
|
|
3147
3095
|
return {
|
|
3148
|
-
...
|
|
3149
|
-
width: (u == null ? void 0 : u.width) ??
|
|
3150
|
-
visible: (u == null ? void 0 : u.visible) ??
|
|
3151
|
-
index: (u == null ? void 0 : u.index) ??
|
|
3096
|
+
...i,
|
|
3097
|
+
width: (u == null ? void 0 : u.width) ?? i.width,
|
|
3098
|
+
visible: (u == null ? void 0 : u.visible) ?? i.visible,
|
|
3099
|
+
index: (u == null ? void 0 : u.index) ?? i.index
|
|
3152
3100
|
};
|
|
3153
|
-
})),
|
|
3154
|
-
|
|
3155
|
-
...
|
|
3156
|
-
width:
|
|
3101
|
+
})), B = (i, u) => {
|
|
3102
|
+
c.value.columnConfig[u.key] = {
|
|
3103
|
+
...c.value.columnConfig[u.key] ?? {},
|
|
3104
|
+
width: i
|
|
3157
3105
|
};
|
|
3158
|
-
},
|
|
3159
|
-
|
|
3160
|
-
(u, h,
|
|
3106
|
+
}, W = (i) => {
|
|
3107
|
+
c.value.columnConfig = i.reduce(
|
|
3108
|
+
(u, h, O) => (u[h.key] = {
|
|
3161
3109
|
...h,
|
|
3162
|
-
index:
|
|
3110
|
+
index: O
|
|
3163
3111
|
}, u),
|
|
3164
3112
|
{}
|
|
3165
3113
|
);
|
|
3166
3114
|
};
|
|
3167
|
-
|
|
3115
|
+
he(
|
|
3168
3116
|
() => [k.value, t.sortable],
|
|
3169
3117
|
() => {
|
|
3170
|
-
const
|
|
3118
|
+
const i = {
|
|
3171
3119
|
key: R.sort,
|
|
3172
3120
|
type: R.sort,
|
|
3173
3121
|
title: "",
|
|
3174
3122
|
fixed: !0,
|
|
3175
3123
|
width: 60
|
|
3176
3124
|
};
|
|
3177
|
-
|
|
3178
|
-
...t.sortable ? [
|
|
3125
|
+
Y.columns = [
|
|
3126
|
+
...t.sortable ? [i] : [],
|
|
3179
3127
|
...k.value.filter(({ visible: u }) => u).sort((u, h) => u.index - h.index)
|
|
3180
3128
|
];
|
|
3181
3129
|
},
|
|
@@ -3184,20 +3132,20 @@ const ze = 2e3, go = (r) => {
|
|
|
3184
3132
|
immediate: !0
|
|
3185
3133
|
}
|
|
3186
3134
|
);
|
|
3187
|
-
const
|
|
3135
|
+
const ne = () => new Promise((i) => {
|
|
3188
3136
|
const u = () => {
|
|
3189
|
-
var
|
|
3190
|
-
const h = (
|
|
3137
|
+
var O, q;
|
|
3138
|
+
const h = (q = (O = Ie.value) == null ? void 0 : O.$el) == null ? void 0 : q.querySelector(".ant-table-tbody");
|
|
3191
3139
|
if (h) {
|
|
3192
|
-
|
|
3140
|
+
i(h);
|
|
3193
3141
|
return;
|
|
3194
3142
|
}
|
|
3195
3143
|
requestAnimationFrame(u);
|
|
3196
3144
|
};
|
|
3197
3145
|
u();
|
|
3198
|
-
}),
|
|
3199
|
-
const
|
|
3200
|
-
|
|
3146
|
+
}), de = async () => {
|
|
3147
|
+
const i = await ne();
|
|
3148
|
+
i && new Bn(i, {
|
|
3201
3149
|
animation: 150,
|
|
3202
3150
|
handle: ".super-table-column-draggable-handle",
|
|
3203
3151
|
setData: (u) => {
|
|
@@ -3205,106 +3153,106 @@ const ze = 2e3, go = (r) => {
|
|
|
3205
3153
|
h.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", u.setDragImage(h, 0, 0);
|
|
3206
3154
|
},
|
|
3207
3155
|
onEnd: (u) => {
|
|
3208
|
-
const { oldIndex: h, newIndex:
|
|
3209
|
-
if (h === void 0 ||
|
|
3210
|
-
const
|
|
3211
|
-
|
|
3156
|
+
const { oldIndex: h, newIndex: O } = u;
|
|
3157
|
+
if (h === void 0 || O === void 0) return;
|
|
3158
|
+
const q = me(Y.dataSource), [z] = q.splice(h, 1);
|
|
3159
|
+
q.splice(O, 0, z), a("row-sort-end", q);
|
|
3212
3160
|
}
|
|
3213
3161
|
});
|
|
3214
|
-
},
|
|
3215
|
-
|
|
3216
|
-
},
|
|
3217
|
-
|
|
3162
|
+
}, tt = (i, u) => {
|
|
3163
|
+
f.value[i].value = u, a("form-item-change", i, u, me(f.value[i]), nt), f.value[i].quiet !== !0 && L();
|
|
3164
|
+
}, Oe = (i, u) => {
|
|
3165
|
+
F.value = !1, d({
|
|
3218
3166
|
props: {
|
|
3219
3167
|
ref: s,
|
|
3220
3168
|
currentScene: u,
|
|
3221
|
-
actionType:
|
|
3222
|
-
formConfigMap:
|
|
3223
|
-
onCreate:
|
|
3224
|
-
onUpdate:
|
|
3169
|
+
actionType: i,
|
|
3170
|
+
formConfigMap: f.value,
|
|
3171
|
+
onCreate: ue,
|
|
3172
|
+
onUpdate: Te,
|
|
3225
3173
|
onUpdateFormConfig: (h) => {
|
|
3226
|
-
h.forEach((
|
|
3227
|
-
qe(
|
|
3174
|
+
h.forEach((O) => {
|
|
3175
|
+
qe(f.value, O.name, O);
|
|
3228
3176
|
});
|
|
3229
3177
|
},
|
|
3230
3178
|
onSearch: (h) => {
|
|
3231
|
-
|
|
3179
|
+
S(h);
|
|
3232
3180
|
},
|
|
3233
|
-
onFormItemChange(h,
|
|
3234
|
-
a("form-item-change", h,
|
|
3181
|
+
onFormItemChange(h, O) {
|
|
3182
|
+
a("form-item-change", h, O, me(f.value[h]), nt);
|
|
3235
3183
|
},
|
|
3236
3184
|
onCancel() {
|
|
3237
3185
|
s.value = void 0;
|
|
3238
3186
|
}
|
|
3239
3187
|
}
|
|
3240
3188
|
});
|
|
3241
|
-
},
|
|
3242
|
-
|
|
3189
|
+
}, Q = () => {
|
|
3190
|
+
F.value = !1, v({
|
|
3243
3191
|
props: {
|
|
3244
|
-
list:
|
|
3245
|
-
allowCreateScene:
|
|
3246
|
-
onCreate: () =>
|
|
3247
|
-
onUpdate: (
|
|
3248
|
-
onDelete: (
|
|
3249
|
-
onSort: (
|
|
3250
|
-
|
|
3192
|
+
list: j.list,
|
|
3193
|
+
allowCreateScene: w(re),
|
|
3194
|
+
onCreate: () => Oe(ce.create),
|
|
3195
|
+
onUpdate: (i) => Oe(ce.update, i),
|
|
3196
|
+
onDelete: (i) => Se(i),
|
|
3197
|
+
onSort: (i) => {
|
|
3198
|
+
c.value.sceneSort = i, j.list = j.list.sort((u, h) => i.indexOf(u.code) - i.indexOf(h.code));
|
|
3251
3199
|
}
|
|
3252
3200
|
}
|
|
3253
3201
|
});
|
|
3254
|
-
},
|
|
3255
|
-
await
|
|
3256
|
-
const u =
|
|
3202
|
+
}, ye = async (i) => {
|
|
3203
|
+
await mn();
|
|
3204
|
+
const u = j.list.find((h) => h.code === i);
|
|
3257
3205
|
a("scene-change", u);
|
|
3258
|
-
},
|
|
3259
|
-
qe(
|
|
3260
|
-
}, vt = (
|
|
3206
|
+
}, zt = ({ name: i }) => {
|
|
3207
|
+
qe(f.value, `${i}._selected`, !1), L();
|
|
3208
|
+
}, vt = (i) => f.value[i], Gt = (i, u, h) => {
|
|
3261
3209
|
if (Rt.includes(u))
|
|
3262
|
-
return
|
|
3263
|
-
if (!vt(
|
|
3264
|
-
return
|
|
3265
|
-
if (u === "visible" &&
|
|
3266
|
-
return
|
|
3267
|
-
qe(
|
|
3268
|
-
}, ht = (
|
|
3269
|
-
if (!
|
|
3270
|
-
return
|
|
3271
|
-
|
|
3272
|
-
},
|
|
3273
|
-
Object.entries(
|
|
3210
|
+
return Ce("setFormItem error,", `form item with prop "${i}" is readonly`);
|
|
3211
|
+
if (!vt(i))
|
|
3212
|
+
return Ce("setFormItem error,", `Cannot find form item with name "${i}"`);
|
|
3213
|
+
if (u === "visible" && f.value[i].fixed)
|
|
3214
|
+
return Ce("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
3215
|
+
qe(f.value, `${i}.${u}`, h);
|
|
3216
|
+
}, ht = (i, u) => {
|
|
3217
|
+
if (!f.value[i])
|
|
3218
|
+
return Ce("setFormValue error,", `Cannot find form item with name "${i}"`);
|
|
3219
|
+
f.value[i].value = u;
|
|
3220
|
+
}, Qt = (i) => {
|
|
3221
|
+
Object.entries(i).forEach(([u, h]) => {
|
|
3274
3222
|
ht(u, h);
|
|
3275
3223
|
});
|
|
3276
|
-
},
|
|
3224
|
+
}, Jt = (i) => {
|
|
3277
3225
|
var u;
|
|
3278
|
-
return (u =
|
|
3279
|
-
}, bt = (
|
|
3280
|
-
const u = {}, h =
|
|
3281
|
-
for (const
|
|
3282
|
-
const
|
|
3283
|
-
|
|
3226
|
+
return (u = f.value[i]) == null ? void 0 : u.value;
|
|
3227
|
+
}, bt = (i) => {
|
|
3228
|
+
const u = {}, h = i ? ke(f.value, je(i)) : f.value;
|
|
3229
|
+
for (const O in h) {
|
|
3230
|
+
const q = h[O];
|
|
3231
|
+
q._selected && (u[O] = me(q.value));
|
|
3284
3232
|
}
|
|
3285
3233
|
return u;
|
|
3286
|
-
}, Kt = () =>
|
|
3287
|
-
|
|
3288
|
-
}, Xt = (
|
|
3289
|
-
|
|
3234
|
+
}, Kt = () => Y.dataSource, Zt = (i) => {
|
|
3235
|
+
Y.dataSource = i;
|
|
3236
|
+
}, Xt = (i, u) => {
|
|
3237
|
+
Y.dataSource[i] = u;
|
|
3290
3238
|
}, nt = {
|
|
3291
|
-
getFormItem(
|
|
3292
|
-
return s.value ? s.value.getFormItem(
|
|
3239
|
+
getFormItem(i) {
|
|
3240
|
+
return s.value ? s.value.getFormItem(i) : vt(i);
|
|
3293
3241
|
},
|
|
3294
|
-
setFormItem(
|
|
3295
|
-
s.value ? s.value.setFormItem(
|
|
3242
|
+
setFormItem(i, u, h) {
|
|
3243
|
+
s.value ? s.value.setFormItem(i, u, h) : Gt(i, u, h);
|
|
3296
3244
|
},
|
|
3297
|
-
getFormValues(
|
|
3298
|
-
return s.value ? s.value.getFormValues(
|
|
3245
|
+
getFormValues(i) {
|
|
3246
|
+
return s.value ? s.value.getFormValues(i) : bt(i);
|
|
3299
3247
|
},
|
|
3300
|
-
setFormValues(
|
|
3301
|
-
s.value ? s.value.setFormValues(
|
|
3248
|
+
setFormValues(i) {
|
|
3249
|
+
s.value ? s.value.setFormValues(i) : Qt(i);
|
|
3302
3250
|
},
|
|
3303
|
-
getFormValue(
|
|
3304
|
-
return s.value ? s.value.getFormValue(
|
|
3251
|
+
getFormValue(i) {
|
|
3252
|
+
return s.value ? s.value.getFormValue(i) : Jt(i);
|
|
3305
3253
|
},
|
|
3306
|
-
setFormValue(
|
|
3307
|
-
s.value ? s.value.setFormValue(
|
|
3254
|
+
setFormValue(i, u) {
|
|
3255
|
+
s.value ? s.value.setFormValue(i, u) : ht(i, u);
|
|
3308
3256
|
}
|
|
3309
3257
|
}, en = {
|
|
3310
3258
|
...nt,
|
|
@@ -3313,93 +3261,94 @@ const ze = 2e3, go = (r) => {
|
|
|
3313
3261
|
setTableData: Zt,
|
|
3314
3262
|
setTableDataItem: Xt
|
|
3315
3263
|
},
|
|
3316
|
-
onRefresh:
|
|
3264
|
+
onRefresh: L,
|
|
3265
|
+
isInitialized: o
|
|
3317
3266
|
};
|
|
3318
|
-
return e(en),
|
|
3267
|
+
return e(en), he(() => [...t.refreshDeps], L, {
|
|
3319
3268
|
deep: !0,
|
|
3320
3269
|
immediate: !0
|
|
3321
|
-
}),
|
|
3270
|
+
}), he(
|
|
3322
3271
|
() => t.enableScene,
|
|
3323
|
-
(
|
|
3324
|
-
|
|
3272
|
+
(i) => {
|
|
3273
|
+
i ? te() : S([]);
|
|
3325
3274
|
}
|
|
3326
|
-
),
|
|
3275
|
+
), he(
|
|
3327
3276
|
() => t.sortable,
|
|
3328
|
-
(
|
|
3329
|
-
|
|
3277
|
+
(i) => {
|
|
3278
|
+
i && de();
|
|
3330
3279
|
},
|
|
3331
3280
|
{
|
|
3332
3281
|
immediate: !0
|
|
3333
3282
|
}
|
|
3334
|
-
),
|
|
3335
|
-
t.enableScene ?
|
|
3336
|
-
}), (
|
|
3337
|
-
const h = P("a-form-item"),
|
|
3338
|
-
return I(),
|
|
3339
|
-
default:
|
|
3340
|
-
|
|
3341
|
-
class:
|
|
3342
|
-
style:
|
|
3283
|
+
), pn(async () => {
|
|
3284
|
+
t.enableScene ? await te() : p(), o.value = !0;
|
|
3285
|
+
}), (i, u) => {
|
|
3286
|
+
const h = P("a-form-item"), O = P("a-button"), q = P("a-select"), z = P("a-divider"), Ye = P("a-space"), rt = P("a-form"), He = P("a-typography-text"), tn = P("a-tooltip"), nn = P("a-table"), rn = P("a-config-provider");
|
|
3287
|
+
return I(), E(rn, { locale: w(Dt) }, {
|
|
3288
|
+
default: C(() => [
|
|
3289
|
+
J("div", {
|
|
3290
|
+
class: $([i.$style.superTable, "ants-super-table"]),
|
|
3291
|
+
style: $e(r.wrapperStyle)
|
|
3343
3292
|
}, [
|
|
3344
|
-
r.enableScene ||
|
|
3293
|
+
r.enableScene || i.$slots.extra ? (I(), U("div", {
|
|
3345
3294
|
key: 0,
|
|
3346
|
-
class:
|
|
3295
|
+
class: $(i.$style.superTableHeader)
|
|
3347
3296
|
}, [
|
|
3348
|
-
r.enableScene ? (I(),
|
|
3297
|
+
r.enableScene ? (I(), E(rt, {
|
|
3349
3298
|
key: 0,
|
|
3350
3299
|
layout: "inline",
|
|
3351
|
-
class:
|
|
3300
|
+
class: $(i.$style.searchForm)
|
|
3352
3301
|
}, {
|
|
3353
|
-
default:
|
|
3354
|
-
|
|
3355
|
-
default:
|
|
3356
|
-
pe(
|
|
3302
|
+
default: C(() => [
|
|
3303
|
+
i.$slots.sceneAddonBefore ? (I(), E(h, { key: 0 }, {
|
|
3304
|
+
default: C(() => [
|
|
3305
|
+
pe(i.$slots, "sceneAddonBefore")
|
|
3357
3306
|
]),
|
|
3358
3307
|
_: 3
|
|
3359
|
-
})) :
|
|
3308
|
+
})) : N("", !0),
|
|
3360
3309
|
T(h, { label: "场景选择" }, {
|
|
3361
|
-
default:
|
|
3362
|
-
T(
|
|
3363
|
-
value:
|
|
3364
|
-
"onUpdate:value": u[1] || (u[1] = (G) =>
|
|
3365
|
-
class:
|
|
3310
|
+
default: C(() => [
|
|
3311
|
+
T(q, {
|
|
3312
|
+
value: w(c).sceneCode,
|
|
3313
|
+
"onUpdate:value": u[1] || (u[1] = (G) => w(c).sceneCode = G),
|
|
3314
|
+
class: $(i.$style.sceneSelect),
|
|
3366
3315
|
placeholder: "请选择",
|
|
3367
3316
|
"allow-clear": "",
|
|
3368
3317
|
"show-search": "",
|
|
3369
3318
|
"option-filter-prop": "name",
|
|
3370
|
-
options: [...V.value, ...
|
|
3319
|
+
options: [...V.value, ...j.list],
|
|
3371
3320
|
"field-names": { value: "code", label: "name" },
|
|
3372
|
-
open:
|
|
3373
|
-
loading:
|
|
3374
|
-
onChange:
|
|
3375
|
-
onDropdownVisibleChange: u[2] || (u[2] = (G) =>
|
|
3321
|
+
open: F.value,
|
|
3322
|
+
loading: j.loading,
|
|
3323
|
+
onChange: ye,
|
|
3324
|
+
onDropdownVisibleChange: u[2] || (u[2] = (G) => F.value = G)
|
|
3376
3325
|
}, {
|
|
3377
|
-
dropdownRender:
|
|
3378
|
-
T(
|
|
3379
|
-
|
|
3380
|
-
class:
|
|
3326
|
+
dropdownRender: C(({ menuNode: G }) => [
|
|
3327
|
+
T(w(Zr), { vnodes: G }, null, 8, ["vnodes"]),
|
|
3328
|
+
J("div", {
|
|
3329
|
+
class: $(i.$style.sceneOpBtnWrapper)
|
|
3381
3330
|
}, [
|
|
3382
|
-
T(
|
|
3331
|
+
T(O, {
|
|
3383
3332
|
type: "link",
|
|
3384
3333
|
block: "",
|
|
3385
|
-
icon: X(
|
|
3386
|
-
class:
|
|
3387
|
-
disabled: !
|
|
3388
|
-
onClick: u[0] || (u[0] = (
|
|
3334
|
+
icon: X(w(On)),
|
|
3335
|
+
class: $(i.$style.sceneOpBtn),
|
|
3336
|
+
disabled: !re.value,
|
|
3337
|
+
onClick: u[0] || (u[0] = (Ee) => Oe(w(ce).create))
|
|
3389
3338
|
}, {
|
|
3390
|
-
default:
|
|
3339
|
+
default: C(() => u[6] || (u[6] = [
|
|
3391
3340
|
K(" 新建场景 ")
|
|
3392
3341
|
])),
|
|
3393
3342
|
_: 1
|
|
3394
3343
|
}, 8, ["icon", "class", "disabled"]),
|
|
3395
|
-
T(
|
|
3344
|
+
T(O, {
|
|
3396
3345
|
type: "link",
|
|
3397
3346
|
block: "",
|
|
3398
|
-
icon: X(
|
|
3399
|
-
class:
|
|
3400
|
-
onClick:
|
|
3347
|
+
icon: X(w(Pn)),
|
|
3348
|
+
class: $(i.$style.sceneOpBtn),
|
|
3349
|
+
onClick: Q
|
|
3401
3350
|
}, {
|
|
3402
|
-
default:
|
|
3351
|
+
default: C(() => u[7] || (u[7] = [
|
|
3403
3352
|
K(" 场景管理 ")
|
|
3404
3353
|
])),
|
|
3405
3354
|
_: 1
|
|
@@ -3412,149 +3361,149 @@ const ze = 2e3, go = (r) => {
|
|
|
3412
3361
|
_: 1
|
|
3413
3362
|
}),
|
|
3414
3363
|
T(h, null, {
|
|
3415
|
-
default:
|
|
3364
|
+
default: C(() => [
|
|
3416
3365
|
T(Ye, null, {
|
|
3417
|
-
split:
|
|
3366
|
+
split: C(() => [
|
|
3418
3367
|
T(z, { type: "vertical" })
|
|
3419
3368
|
]),
|
|
3420
|
-
default:
|
|
3421
|
-
T(
|
|
3369
|
+
default: C(() => [
|
|
3370
|
+
T(O, {
|
|
3422
3371
|
type: "primary",
|
|
3423
|
-
icon: X(
|
|
3424
|
-
onClick: u[3] || (u[3] = (G) =>
|
|
3372
|
+
icon: X(w(qn)),
|
|
3373
|
+
onClick: u[3] || (u[3] = (G) => Oe(w(ce).search))
|
|
3425
3374
|
}, {
|
|
3426
|
-
default:
|
|
3375
|
+
default: C(() => u[8] || (u[8] = [
|
|
3427
3376
|
K(" 高级筛选 ")
|
|
3428
3377
|
])),
|
|
3429
3378
|
_: 1
|
|
3430
3379
|
}, 8, ["icon"]),
|
|
3431
|
-
r.showRefreshButton ? (I(),
|
|
3380
|
+
r.showRefreshButton ? (I(), E(O, {
|
|
3432
3381
|
key: 0,
|
|
3433
3382
|
type: "primary",
|
|
3434
3383
|
ghost: "",
|
|
3435
|
-
icon: X(
|
|
3436
|
-
loading:
|
|
3437
|
-
onClick:
|
|
3384
|
+
icon: X(w(jn)),
|
|
3385
|
+
loading: Y.loading,
|
|
3386
|
+
onClick: L
|
|
3438
3387
|
}, {
|
|
3439
|
-
default:
|
|
3388
|
+
default: C(() => u[9] || (u[9] = [
|
|
3440
3389
|
K(" 刷新 ")
|
|
3441
3390
|
])),
|
|
3442
3391
|
_: 1
|
|
3443
|
-
}, 8, ["icon", "loading"])) :
|
|
3392
|
+
}, 8, ["icon", "loading"])) : N("", !0)
|
|
3444
3393
|
]),
|
|
3445
3394
|
_: 1
|
|
3446
3395
|
})
|
|
3447
3396
|
]),
|
|
3448
3397
|
_: 1
|
|
3449
3398
|
}),
|
|
3450
|
-
|
|
3451
|
-
default:
|
|
3452
|
-
pe(
|
|
3399
|
+
i.$slots.sceneAddonAfter ? (I(), E(h, { key: 1 }, {
|
|
3400
|
+
default: C(() => [
|
|
3401
|
+
pe(i.$slots, "sceneAddonAfter")
|
|
3453
3402
|
]),
|
|
3454
3403
|
_: 3
|
|
3455
|
-
})) :
|
|
3404
|
+
})) : N("", !0)
|
|
3456
3405
|
]),
|
|
3457
3406
|
_: 3
|
|
3458
|
-
}, 8, ["class"])) :
|
|
3459
|
-
|
|
3407
|
+
}, 8, ["class"])) : N("", !0),
|
|
3408
|
+
i.$slots.extra ? (I(), U("div", {
|
|
3460
3409
|
key: 1,
|
|
3461
|
-
class:
|
|
3410
|
+
class: $(i.$style.superTableExtra)
|
|
3462
3411
|
}, [
|
|
3463
|
-
pe(
|
|
3464
|
-
], 2)) :
|
|
3465
|
-
], 2)) :
|
|
3466
|
-
T(
|
|
3467
|
-
"form-config-map":
|
|
3412
|
+
pe(i.$slots, "extra")
|
|
3413
|
+
], 2)) : N("", !0)
|
|
3414
|
+
], 2)) : N("", !0),
|
|
3415
|
+
T(yo, {
|
|
3416
|
+
"form-config-map": f.value,
|
|
3468
3417
|
"form-item-col-span": r.formItemColSpan,
|
|
3469
|
-
onFormItemChange:
|
|
3470
|
-
onDelete: u[4] || (u[4] = (G) =>
|
|
3418
|
+
onFormItemChange: tt,
|
|
3419
|
+
onDelete: u[4] || (u[4] = (G) => zt(G))
|
|
3471
3420
|
}, null, 8, ["form-config-map", "form-item-col-span"]),
|
|
3472
|
-
|
|
3473
|
-
class:
|
|
3421
|
+
J("div", {
|
|
3422
|
+
class: $(i.$style.tableWrapper)
|
|
3474
3423
|
}, [
|
|
3475
|
-
|
|
3424
|
+
i.$slots.tableHead || i.$slots.toolBar ? (I(), U("div", {
|
|
3476
3425
|
key: 0,
|
|
3477
|
-
class:
|
|
3426
|
+
class: $(i.$style.toolbar)
|
|
3478
3427
|
}, [
|
|
3479
|
-
|
|
3480
|
-
class:
|
|
3428
|
+
J("div", {
|
|
3429
|
+
class: $(i.$style.tableHeadWrapper)
|
|
3481
3430
|
}, [
|
|
3482
|
-
pe(
|
|
3431
|
+
pe(i.$slots, "tableHead")
|
|
3483
3432
|
], 2),
|
|
3484
|
-
|
|
3433
|
+
i.$slots.toolBarExtra ? (I(), U("div", {
|
|
3485
3434
|
key: 0,
|
|
3486
|
-
class:
|
|
3435
|
+
class: $(i.$style.actionBtns)
|
|
3487
3436
|
}, [
|
|
3488
|
-
pe(
|
|
3489
|
-
], 2)) :
|
|
3490
|
-
], 2)) :
|
|
3491
|
-
|
|
3492
|
-
class:
|
|
3437
|
+
pe(i.$slots, "toolBarExtra")
|
|
3438
|
+
], 2)) : N("", !0)
|
|
3439
|
+
], 2)) : N("", !0),
|
|
3440
|
+
J("div", {
|
|
3441
|
+
class: $(i.$style.tableContent)
|
|
3493
3442
|
}, [
|
|
3494
|
-
r.enableTableConfig ? (I(),
|
|
3443
|
+
r.enableTableConfig ? (I(), E(ma, {
|
|
3495
3444
|
key: 0,
|
|
3496
3445
|
columns: k.value,
|
|
3497
|
-
onChange:
|
|
3498
|
-
}, null, 8, ["columns"])) :
|
|
3499
|
-
T(nn,
|
|
3446
|
+
onChange: W
|
|
3447
|
+
}, null, 8, ["columns"])) : N("", !0),
|
|
3448
|
+
T(nn, oe({
|
|
3500
3449
|
ref_key: "tableRef",
|
|
3501
|
-
ref:
|
|
3502
|
-
"data-source":
|
|
3503
|
-
},
|
|
3504
|
-
headerCell:
|
|
3450
|
+
ref: Ie,
|
|
3451
|
+
"data-source": x.value
|
|
3452
|
+
}, Y, { onResizeColumn: B }), fn({
|
|
3453
|
+
headerCell: C(({ column: G }) => [
|
|
3505
3454
|
G.class !== "ant-table-row-expand-icon-cell" ? (I(), U("div", {
|
|
3506
3455
|
key: 0,
|
|
3507
|
-
class:
|
|
3456
|
+
class: $(i.$style.headerCell)
|
|
3508
3457
|
}, [
|
|
3509
3458
|
T(He, {
|
|
3510
3459
|
ellipsis: { tooltip: G.title },
|
|
3511
3460
|
content: G.title,
|
|
3512
|
-
class:
|
|
3461
|
+
class: $(i.$style.headerCellText)
|
|
3513
3462
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
3514
|
-
G.titleTooltip ? (I(),
|
|
3515
|
-
title:
|
|
3516
|
-
|
|
3463
|
+
G.titleTooltip ? (I(), E(tn, { key: 0 }, {
|
|
3464
|
+
title: C(() => [
|
|
3465
|
+
J("span", {
|
|
3517
3466
|
innerHTML: G.titleTooltip
|
|
3518
|
-
}, null, 8,
|
|
3467
|
+
}, null, 8, ho)
|
|
3519
3468
|
]),
|
|
3520
|
-
default:
|
|
3521
|
-
T(
|
|
3522
|
-
style:
|
|
3523
|
-
class:
|
|
3469
|
+
default: C(() => [
|
|
3470
|
+
T(w(Ln), {
|
|
3471
|
+
style: $e({ color: w(we).colorTextQuaternary }),
|
|
3472
|
+
class: $(i.$style.headerCellTooltipIcon)
|
|
3524
3473
|
}, null, 8, ["style", "class"])
|
|
3525
3474
|
]),
|
|
3526
3475
|
_: 2
|
|
3527
|
-
}, 1024)) :
|
|
3528
|
-
], 2)) :
|
|
3476
|
+
}, 1024)) : N("", !0)
|
|
3477
|
+
], 2)) : N("", !0)
|
|
3529
3478
|
]),
|
|
3530
|
-
bodyCell:
|
|
3531
|
-
|
|
3479
|
+
bodyCell: C(({ column: G, record: Ee, index: Ct }) => [
|
|
3480
|
+
Mt([Ee == null ? void 0 : Ee[Y.rowKey], G == null ? void 0 : G.key, Ct], () => T(Kr, {
|
|
3532
3481
|
column: G,
|
|
3533
|
-
record:
|
|
3482
|
+
record: Ee,
|
|
3534
3483
|
index: Ct,
|
|
3535
|
-
hasRouter:
|
|
3484
|
+
hasRouter: l.value
|
|
3536
3485
|
}, null, 8, ["column", "record", "index", "hasRouter"]), u, 5)
|
|
3537
3486
|
]),
|
|
3538
|
-
default:
|
|
3539
|
-
|
|
3487
|
+
default: C(() => [
|
|
3488
|
+
i.$slots.expandColumnTitle ? pe(i.$slots, "expandColumnTitle", { key: 0 }) : N("", !0)
|
|
3540
3489
|
]),
|
|
3541
3490
|
_: 2
|
|
3542
3491
|
}, [
|
|
3543
|
-
|
|
3492
|
+
i.$slots.expandedRowRender ? {
|
|
3544
3493
|
name: "expandedRowRender",
|
|
3545
|
-
fn:
|
|
3546
|
-
pe(
|
|
3494
|
+
fn: C(({ record: G }) => [
|
|
3495
|
+
pe(i.$slots, "expandedRowRender", { record: G })
|
|
3547
3496
|
]),
|
|
3548
3497
|
key: "0"
|
|
3549
3498
|
} : void 0
|
|
3550
3499
|
]), 1040, ["data-source"])
|
|
3551
3500
|
], 2),
|
|
3552
|
-
|
|
3501
|
+
i.$slots.tableFoot ? (I(), U("div", {
|
|
3553
3502
|
key: 1,
|
|
3554
|
-
class:
|
|
3503
|
+
class: $(i.$style.tableFootWrapper)
|
|
3555
3504
|
}, [
|
|
3556
|
-
pe(
|
|
3557
|
-
], 2)) :
|
|
3505
|
+
pe(i.$slots, "tableFoot")
|
|
3506
|
+
], 2)) : N("", !0)
|
|
3558
3507
|
], 2)
|
|
3559
3508
|
], 6)
|
|
3560
3509
|
]),
|
|
@@ -3562,24 +3511,24 @@ const ze = 2e3, go = (r) => {
|
|
|
3562
3511
|
}, 8, ["locale"]);
|
|
3563
3512
|
};
|
|
3564
3513
|
}
|
|
3565
|
-
}),
|
|
3566
|
-
superTable:
|
|
3567
|
-
superTableHeader:
|
|
3568
|
-
searchForm:
|
|
3569
|
-
sceneSelect:
|
|
3570
|
-
tableWrapper:
|
|
3571
|
-
toolbar:
|
|
3572
|
-
actionBtns:
|
|
3573
|
-
tableHeadWrapper:
|
|
3574
|
-
tableContent:
|
|
3575
|
-
headerCell:
|
|
3576
|
-
headerCellText:
|
|
3514
|
+
}), _o = "_superTable_1rx9j_1", Co = "_superTableHeader_1rx9j_5", $o = "_searchForm_1rx9j_10", wo = "_sceneSelect_1rx9j_14", So = "_tableWrapper_1rx9j_17", Io = "_toolbar_1rx9j_17", Fo = "_actionBtns_1rx9j_24", xo = "_tableHeadWrapper_1rx9j_29", ko = "_tableContent_1rx9j_32", To = "_headerCell_1rx9j_35", Oo = "_headerCellText_1rx9j_40", Po = "_headerCellTooltipIcon_1rx9j_43", qo = "_sceneOpBtnWrapper_1rx9j_47", jo = "_sceneOpBtn_1rx9j_47", Lo = {
|
|
3515
|
+
superTable: _o,
|
|
3516
|
+
superTableHeader: Co,
|
|
3517
|
+
searchForm: $o,
|
|
3518
|
+
sceneSelect: wo,
|
|
3519
|
+
tableWrapper: So,
|
|
3520
|
+
toolbar: Io,
|
|
3521
|
+
actionBtns: Fo,
|
|
3522
|
+
tableHeadWrapper: xo,
|
|
3523
|
+
tableContent: ko,
|
|
3524
|
+
headerCell: To,
|
|
3525
|
+
headerCellText: Oo,
|
|
3577
3526
|
headerCellTooltipIcon: Po,
|
|
3578
|
-
sceneOpBtnWrapper:
|
|
3579
|
-
sceneOpBtn:
|
|
3580
|
-
},
|
|
3581
|
-
$style:
|
|
3582
|
-
}, Et = /* @__PURE__ */ fe(
|
|
3527
|
+
sceneOpBtnWrapper: qo,
|
|
3528
|
+
sceneOpBtn: jo
|
|
3529
|
+
}, Eo = {
|
|
3530
|
+
$style: Lo
|
|
3531
|
+
}, Et = /* @__PURE__ */ fe(bo, [["__cssModules", Eo]]);
|
|
3583
3532
|
Et.install = (r) => {
|
|
3584
3533
|
r.component("SuperTable", Et);
|
|
3585
3534
|
};
|