@yidun/antd-super-table 0.0.5 → 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 +144 -17
- package/dist/config.d.ts +0 -7
- package/dist/index.js +1306 -1360
- package/dist/typings.d.ts +202 -215
- package/dist/typings.ts +318 -0
- package/dist/utils/service.d.ts +1 -24
- package/example.png +0 -0
- package/package.json +4 -2
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
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { h as X, defineComponent as ie, computed as
|
|
6
|
-
import
|
|
7
|
-
import { DownOutlined as
|
|
8
|
-
import { slice as
|
|
9
|
-
import { useStorage as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { JSONPath as
|
|
13
|
-
import { v5 as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
2
|
+
var an = Object.defineProperty;
|
|
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 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
|
+
import gt from "vuedraggable";
|
|
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: "此刻",
|
|
@@ -62,10 +62,10 @@ const Nn = {
|
|
|
62
62
|
nextDecade: "下一年代",
|
|
63
63
|
previousCentury: "上一世纪",
|
|
64
64
|
nextCentury: "下一世纪"
|
|
65
|
-
},
|
|
65
|
+
}, Bt = {
|
|
66
66
|
placeholder: "请选择时间",
|
|
67
67
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
68
|
-
},
|
|
68
|
+
}, ut = {
|
|
69
69
|
lang: et({
|
|
70
70
|
placeholder: "请选择日期",
|
|
71
71
|
yearPlaceholder: "请选择年份",
|
|
@@ -77,16 +77,16 @@ const Nn = {
|
|
|
77
77
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
78
78
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
79
79
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
80
|
-
},
|
|
81
|
-
timePickerLocale: et({},
|
|
80
|
+
}, Yn),
|
|
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:
|
|
87
|
-
DatePicker:
|
|
88
|
-
TimePicker:
|
|
89
|
-
Calendar:
|
|
86
|
+
Pagination: Vn,
|
|
87
|
+
DatePicker: ut,
|
|
88
|
+
TimePicker: Bt,
|
|
89
|
+
Calendar: ut,
|
|
90
90
|
// locales for all components
|
|
91
91
|
global: {
|
|
92
92
|
placeholder: "请选择"
|
|
@@ -215,29 +215,29 @@ const se = "${label}不是一个有效的${type}", Dt = {
|
|
|
215
215
|
scanned: "已扫描"
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
var
|
|
219
|
-
function
|
|
220
|
-
return
|
|
218
|
+
var Qe = { exports: {} }, Hn = Qe.exports, It;
|
|
219
|
+
function Un() {
|
|
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:
|
|
239
|
-
var
|
|
240
|
-
const
|
|
237
|
+
Un();
|
|
238
|
+
const { defaultAlgorithm: Wn, defaultSeed: zn } = gn, we = Wn(zn);
|
|
239
|
+
var ve = /* @__PURE__ */ ((r) => (r.order = "_order", r.orderInScene = "_orderInScene", r.defaultValue = "_defaultValue", r.selected = "_selected", r))(ve || {});
|
|
240
|
+
const Rt = Object.values(ve), R = {
|
|
241
241
|
/** 文本(默认)*/
|
|
242
242
|
text: "text",
|
|
243
243
|
/** 链接 */
|
|
@@ -280,36 +280,31 @@ const Bt = Object.values(ge), R = {
|
|
|
280
280
|
update: "update",
|
|
281
281
|
/** 设置查询条件 */
|
|
282
282
|
search: "search"
|
|
283
|
-
},
|
|
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
|
-
function
|
|
303
|
-
return
|
|
297
|
+
function ct(r) {
|
|
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,21 +314,21 @@ function Hn() {
|
|
|
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
|
-
function
|
|
325
|
+
function Jn(r) {
|
|
331
326
|
return Function.toString.call(r).indexOf("[native code]") !== -1;
|
|
332
327
|
}
|
|
333
|
-
function
|
|
328
|
+
function dt(r) {
|
|
334
329
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
335
|
-
return
|
|
336
|
-
if (t === null || !
|
|
330
|
+
return dt = function(t) {
|
|
331
|
+
if (t === null || !Jn(t)) return t;
|
|
337
332
|
if (typeof t != "function")
|
|
338
333
|
throw new TypeError("Super expression must either be null or a function");
|
|
339
334
|
if (typeof e < "u") {
|
|
@@ -341,7 +336,7 @@ function ct(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,17 +345,17 @@ function ct(r) {
|
|
|
350
345
|
writable: !0,
|
|
351
346
|
configurable: !0
|
|
352
347
|
}
|
|
353
|
-
}),
|
|
354
|
-
},
|
|
348
|
+
}), Ve(a, t);
|
|
349
|
+
}, dt(r);
|
|
355
350
|
}
|
|
356
|
-
var
|
|
351
|
+
var Kn = /%[sdj%]/g, Yt = function() {
|
|
357
352
|
};
|
|
358
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);
|
|
362
357
|
});
|
|
363
|
-
function
|
|
358
|
+
function pt(r) {
|
|
364
359
|
if (!r || !r.length) return null;
|
|
365
360
|
var e = {};
|
|
366
361
|
return r.forEach(function(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
|
-
function
|
|
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
|
-
var
|
|
437
|
-
|
|
431
|
+
var xt = /* @__PURE__ */ function(r) {
|
|
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
|
-
}(/* @__PURE__ */
|
|
444
|
-
function
|
|
438
|
+
}(/* @__PURE__ */ dt(Error));
|
|
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
|
|
449
|
-
}, g =
|
|
450
|
-
|
|
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
|
|
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;
|
|
@@ -478,35 +473,35 @@ function Zn(r, e) {
|
|
|
478
473
|
}
|
|
479
474
|
return n;
|
|
480
475
|
}
|
|
481
|
-
function
|
|
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
|
|
488
483
|
};
|
|
489
484
|
};
|
|
490
485
|
}
|
|
491
|
-
function
|
|
486
|
+
function Tt(r, e) {
|
|
492
487
|
if (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 Ht = function(e, n, t, a, o,
|
|
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,17 +513,17 @@ var Ht = 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("(?:^" +
|
|
531
|
-
},
|
|
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;
|
|
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,}))$/,
|
|
534
529
|
// url: new RegExp(
|
|
@@ -536,12 +531,12 @@ var Ht = 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,188 +557,188 @@ var Ht = 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";
|
|
569
564
|
},
|
|
570
565
|
email: function(e) {
|
|
571
|
-
return typeof e == "string" && e.length <= 320 && !!e.match(
|
|
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
|
-
return typeof e == "string" && !!e.match(
|
|
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
598
|
required: Ht,
|
|
604
|
-
whitespace:
|
|
605
|
-
type:
|
|
606
|
-
range:
|
|
607
|
-
enum:
|
|
608
|
-
pattern:
|
|
609
|
-
},
|
|
610
|
-
var
|
|
611
|
-
if (
|
|
599
|
+
whitespace: ar,
|
|
600
|
+
type: sr,
|
|
601
|
+
range: lr,
|
|
602
|
+
enum: ir,
|
|
603
|
+
pattern: ur
|
|
604
|
+
}, cr = function(e, n, t, a, o) {
|
|
605
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
606
|
+
if (s) {
|
|
612
607
|
if (Z(n, "string") && !e.required)
|
|
613
608
|
return t();
|
|
614
|
-
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));
|
|
615
610
|
}
|
|
616
|
-
t(
|
|
617
|
-
},
|
|
618
|
-
var
|
|
619
|
-
if (
|
|
611
|
+
t(l);
|
|
612
|
+
}, dr = function(e, n, t, a, o) {
|
|
613
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
614
|
+
if (s) {
|
|
620
615
|
if (Z(n) && !e.required)
|
|
621
616
|
return t();
|
|
622
|
-
A.required(e, n, a,
|
|
617
|
+
A.required(e, n, a, l, o), n !== void 0 && A.type(e, n, a, l, o);
|
|
623
618
|
}
|
|
624
|
-
t(
|
|
625
|
-
},
|
|
626
|
-
var
|
|
627
|
-
if (
|
|
619
|
+
t(l);
|
|
620
|
+
}, pr = function(e, n, t, a, o) {
|
|
621
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
622
|
+
if (s) {
|
|
628
623
|
if (n === "" && (n = void 0), Z(n) && !e.required)
|
|
629
624
|
return t();
|
|
630
|
-
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));
|
|
631
626
|
}
|
|
632
|
-
t(
|
|
633
|
-
},
|
|
634
|
-
var
|
|
635
|
-
if (
|
|
627
|
+
t(l);
|
|
628
|
+
}, fr = function(e, n, t, a, o) {
|
|
629
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
630
|
+
if (s) {
|
|
636
631
|
if (Z(n) && !e.required)
|
|
637
632
|
return t();
|
|
638
|
-
A.required(e, n, a,
|
|
633
|
+
A.required(e, n, a, l, o), n !== void 0 && A.type(e, n, a, l, o);
|
|
639
634
|
}
|
|
640
|
-
t(
|
|
641
|
-
},
|
|
642
|
-
var
|
|
643
|
-
if (
|
|
635
|
+
t(l);
|
|
636
|
+
}, mr = function(e, n, t, a, o) {
|
|
637
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
638
|
+
if (s) {
|
|
644
639
|
if (Z(n) && !e.required)
|
|
645
640
|
return t();
|
|
646
|
-
A.required(e, n, a,
|
|
641
|
+
A.required(e, n, a, l, o), Z(n) || A.type(e, n, a, l, o);
|
|
647
642
|
}
|
|
648
|
-
t(
|
|
649
|
-
},
|
|
650
|
-
var
|
|
651
|
-
if (
|
|
643
|
+
t(l);
|
|
644
|
+
}, yr = function(e, n, t, a, o) {
|
|
645
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
646
|
+
if (s) {
|
|
652
647
|
if (Z(n) && !e.required)
|
|
653
648
|
return t();
|
|
654
|
-
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));
|
|
655
650
|
}
|
|
656
|
-
t(
|
|
657
|
-
},
|
|
658
|
-
var
|
|
659
|
-
if (
|
|
651
|
+
t(l);
|
|
652
|
+
}, gr = function(e, n, t, a, o) {
|
|
653
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
654
|
+
if (s) {
|
|
660
655
|
if (Z(n) && !e.required)
|
|
661
656
|
return t();
|
|
662
|
-
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));
|
|
663
658
|
}
|
|
664
|
-
t(
|
|
665
|
-
},
|
|
666
|
-
var
|
|
667
|
-
if (
|
|
659
|
+
t(l);
|
|
660
|
+
}, vr = function(e, n, t, a, o) {
|
|
661
|
+
var l = [], s = e.required || !e.required && a.hasOwnProperty(e.field);
|
|
662
|
+
if (s) {
|
|
668
663
|
if (n == null && !e.required)
|
|
669
664
|
return t();
|
|
670
|
-
A.required(e, n, a,
|
|
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));
|
|
671
666
|
}
|
|
672
|
-
t(
|
|
673
|
-
},
|
|
674
|
-
var
|
|
675
|
-
if (
|
|
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,
|
|
711
|
-
},
|
|
712
|
-
var
|
|
713
|
-
if (
|
|
714
|
-
if (Z(n,
|
|
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);
|
|
706
|
+
}, st = function(e, n, t, a, o) {
|
|
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:
|
|
740
|
-
url:
|
|
741
|
-
hex:
|
|
742
|
-
email:
|
|
743
|
-
required:
|
|
744
|
-
any:
|
|
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,
|
|
735
|
+
url: st,
|
|
736
|
+
hex: st,
|
|
737
|
+
email: st,
|
|
738
|
+
required: wr,
|
|
739
|
+
any: Sr
|
|
745
740
|
};
|
|
746
|
-
function
|
|
741
|
+
function ft() {
|
|
747
742
|
return {
|
|
748
743
|
default: "Validation error on field %s",
|
|
749
744
|
required: "%s is required",
|
|
@@ -796,9 +791,9 @@ function pt() {
|
|
|
796
791
|
}
|
|
797
792
|
};
|
|
798
793
|
}
|
|
799
|
-
var
|
|
794
|
+
var mt = ft(), Le = /* @__PURE__ */ function() {
|
|
800
795
|
function r(n) {
|
|
801
|
-
this.rules = null, this._messages =
|
|
796
|
+
this.rules = null, this._messages = mt, this.define(n);
|
|
802
797
|
}
|
|
803
798
|
var e = r.prototype;
|
|
804
799
|
return e.define = function(t) {
|
|
@@ -808,176 +803,176 @@ var ft = pt(), 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
|
-
return t && (this._messages =
|
|
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 =
|
|
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
|
|
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
|
{
|
|
979
974
|
validator(t, a, o) {
|
|
980
|
-
return ["string", "function"].includes(
|
|
975
|
+
return ["string", "function"].includes(ge(a)) ? o() : o(new Error("type must be string or function"));
|
|
981
976
|
}
|
|
982
977
|
}
|
|
983
978
|
],
|
|
@@ -991,7 +986,7 @@ const $r = (r) => {
|
|
|
991
986
|
required: e.type === "component"
|
|
992
987
|
},
|
|
993
988
|
props: {
|
|
994
|
-
validator: (t, a, o) => a && !["object", "function"].includes(
|
|
989
|
+
validator: (t, a, o) => a && !["object", "function"].includes(ge(a)) ? o(new Error("props must be object or function")) : o()
|
|
995
990
|
}
|
|
996
991
|
}).validate(e, (t) => {
|
|
997
992
|
t && console.error(`[pro-table]: defineFormItems error, [${t[0].message}]`, {
|
|
@@ -1000,31 +995,31 @@ const $r = (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
|
{
|
|
1009
1004
|
validator(t, a, o) {
|
|
1010
|
-
return a ? ["string", "function"].includes(
|
|
1005
|
+
return a ? ["string", "function"].includes(ge(a)) ? ge(a) === "string" && !Object.keys(R).includes(a) ? o(new Error(`type must be one of ${Object.keys(R).join(", ")}`)) : o() : o(new Error("type must be string or function")) : o();
|
|
1011
1006
|
}
|
|
1012
1007
|
}
|
|
1013
1008
|
],
|
|
1014
1009
|
title: [{ required: !0 }, { type: "string" }],
|
|
1015
1010
|
titleTooltip: {
|
|
1016
1011
|
validator(t, a, o) {
|
|
1017
|
-
return a && !["string", "function"].includes(
|
|
1012
|
+
return a && !["string", "function"].includes(ge(a)) ? o(new Error("titleTooltip must be string or function")) : o();
|
|
1018
1013
|
}
|
|
1019
1014
|
},
|
|
1020
1015
|
content: {
|
|
1021
1016
|
validator(t, a, o) {
|
|
1022
|
-
return a && !["string", "function"].includes(
|
|
1017
|
+
return a && !["string", "function"].includes(ge(a)) ? o(new Error("content must be string or function")) : o();
|
|
1023
1018
|
}
|
|
1024
1019
|
},
|
|
1025
1020
|
tooltip: {
|
|
1026
1021
|
validator(t, a, o) {
|
|
1027
|
-
return a && !["string", "boolean", "function"].includes(
|
|
1022
|
+
return a && !["string", "boolean", "function"].includes(ge(a)) ? o(new Error("tooltip must be string, boolean, or function")) : o();
|
|
1028
1023
|
}
|
|
1029
1024
|
},
|
|
1030
1025
|
component: {
|
|
@@ -1034,7 +1029,7 @@ const $r = (r) => {
|
|
|
1034
1029
|
ellipsis: { type: "boolean" },
|
|
1035
1030
|
props: {
|
|
1036
1031
|
validator(t, a, o) {
|
|
1037
|
-
return a && !["object", "function"].includes(
|
|
1032
|
+
return a && !["object", "function"].includes(ge(a)) ? o(new Error("props must be object or function")) : o();
|
|
1038
1033
|
}
|
|
1039
1034
|
}
|
|
1040
1035
|
}).validate(e, (t) => {
|
|
@@ -1044,41 +1039,34 @@ const $r = (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
1066
|
}, Ut = (r) => {
|
|
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
|
-
) || "", xr = /* @__PURE__ */ ie({
|
|
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,91 +1133,91 @@ const $r = (r) => {
|
|
|
1145
1133
|
}
|
|
1146
1134
|
},
|
|
1147
1135
|
setup(r) {
|
|
1148
|
-
const e = r, n =
|
|
1149
|
-
() =>
|
|
1150
|
-
), o =
|
|
1151
|
-
key:
|
|
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(
|
|
1137
|
+
() => St(n.value, e.maxCount, n.value.length)
|
|
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 =
|
|
1161
|
-
return
|
|
1162
|
-
class:
|
|
1163
|
-
|
|
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");
|
|
1149
|
+
return I(), U("div", {
|
|
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
|
-
(
|
|
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 ? (
|
|
1180
|
-
r.displayType === "popover" ? (
|
|
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:
|
|
1174
|
+
content: C(() => [
|
|
1187
1175
|
J("div", {
|
|
1188
|
-
class:
|
|
1176
|
+
class: $(s.$style.ellipsisList)
|
|
1189
1177
|
}, [
|
|
1190
|
-
(
|
|
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:
|
|
1199
|
-
|
|
1186
|
+
default: C(() => [
|
|
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
1204
|
}, 8, ["trigger"])) : N("", !0),
|
|
1217
|
-
r.displayType === "dropdown" ? (
|
|
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
|
-
|
|
1210
|
+
overlay: C(() => [
|
|
1211
|
+
T(c, { items: o.value }, null, 8, ["items"])
|
|
1224
1212
|
]),
|
|
1225
|
-
default:
|
|
1226
|
-
|
|
1213
|
+
default: C(() => [
|
|
1214
|
+
T(m, {
|
|
1227
1215
|
type: "link",
|
|
1228
1216
|
size: "small"
|
|
1229
1217
|
}, {
|
|
1230
|
-
default:
|
|
1231
|
-
|
|
1232
|
-
|
|
1218
|
+
default: C(() => [
|
|
1219
|
+
d[0] || (d[0] = K(" 更多 ")),
|
|
1220
|
+
T(w(xn))
|
|
1233
1221
|
]),
|
|
1234
1222
|
_: 1
|
|
1235
1223
|
})
|
|
@@ -1240,22 +1228,22 @@ const $r = (r) => {
|
|
|
1240
1228
|
], 2);
|
|
1241
1229
|
};
|
|
1242
1230
|
}
|
|
1243
|
-
}),
|
|
1244
|
-
ellipsisElement:
|
|
1245
|
-
elementItem:
|
|
1246
|
-
ellipsisElementHasGap:
|
|
1247
|
-
flexWrap:
|
|
1248
|
-
ellipsisTag:
|
|
1249
|
-
imageEllipsisTag:
|
|
1250
|
-
ellipsisList:
|
|
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,
|
|
1236
|
+
ellipsisTag: Ar,
|
|
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,140 +1283,139 @@ const $r = (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 =
|
|
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:
|
|
1335
|
+
icon: X(w(De)),
|
|
1336
|
+
class: $([y.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1349
1337
|
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
1350
|
-
t.value ===
|
|
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:
|
|
1366
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (
|
|
1351
|
+
ellipsis: { tooltip: s.value },
|
|
1352
|
+
content: String(S.label),
|
|
1353
|
+
class: $(y.$style.antTypographyEllipsis)
|
|
1354
|
+
}, null, 8, ["ellipsis", "content", "class"])) : (I(), U("div", {
|
|
1367
1355
|
key: 1,
|
|
1368
|
-
class:
|
|
1369
|
-
},
|
|
1356
|
+
class: $(y.$style.textListItem)
|
|
1357
|
+
}, be(S.label), 3))
|
|
1370
1358
|
], 64)) : N("", !0),
|
|
1371
|
-
t.value ===
|
|
1372
|
-
default:
|
|
1373
|
-
r.column.ellipsis ? (
|
|
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"])) : (
|
|
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
1370
|
}, 1040)) : N("", !0),
|
|
1383
|
-
t.value ===
|
|
1384
|
-
default:
|
|
1385
|
-
K(
|
|
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
1376
|
}, 1040)) : N("", !0),
|
|
1389
|
-
t.value ===
|
|
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
1392
|
}, 1040, ["disabled", "onClick"])) : N("", !0),
|
|
1405
|
-
t.value ===
|
|
1393
|
+
t.value === w(R).image ? (I(), E(L, {
|
|
1406
1394
|
key: 4,
|
|
1407
|
-
width:
|
|
1408
|
-
height:
|
|
1409
|
-
src:
|
|
1410
|
-
alt: m.label,
|
|
1395
|
+
width: V ? 100 : 32,
|
|
1396
|
+
height: V ? 100 : 32,
|
|
1397
|
+
src: S.label,
|
|
1411
1398
|
style: { objectFit: "cover" }
|
|
1412
1399
|
}, {
|
|
1413
|
-
previewMask:
|
|
1414
|
-
|
|
1400
|
+
previewMask: C(() => [
|
|
1401
|
+
T(w(kn))
|
|
1415
1402
|
]),
|
|
1416
1403
|
_: 2
|
|
1417
|
-
}, 1032, ["width", "height", "src"
|
|
1404
|
+
}, 1032, ["width", "height", "src"])) : N("", !0)
|
|
1418
1405
|
]),
|
|
1419
1406
|
_: 1
|
|
1420
|
-
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])),
|
|
1407
|
+
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])), F, 0)
|
|
1421
1408
|
], 2)) : N("", !0);
|
|
1422
1409
|
};
|
|
1423
1410
|
}
|
|
1424
|
-
}),
|
|
1425
|
-
tableCellContent:
|
|
1426
|
-
antTypographyEllipsis:
|
|
1427
|
-
draggableIcon:
|
|
1428
|
-
textListItem:
|
|
1429
|
-
},
|
|
1430
|
-
$style:
|
|
1431
|
-
},
|
|
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
|
|
1416
|
+
}, Jr = {
|
|
1417
|
+
$style: Qr
|
|
1418
|
+
}, Kr = /* @__PURE__ */ fe(Hr, [["__cssModules", Jr]]), Zr = ie({
|
|
1432
1419
|
name: "VNodes",
|
|
1433
1420
|
props: {
|
|
1434
1421
|
vnodes: {
|
|
@@ -1439,7 +1426,7 @@ const $r = (r) => {
|
|
|
1439
1426
|
render() {
|
|
1440
1427
|
return this.vnodes;
|
|
1441
1428
|
}
|
|
1442
|
-
}),
|
|
1429
|
+
}), Xr = /* @__PURE__ */ ie({
|
|
1443
1430
|
__name: "TableConfig",
|
|
1444
1431
|
props: {
|
|
1445
1432
|
/**
|
|
@@ -1454,124 +1441,124 @@ const $r = (r) => {
|
|
|
1454
1441
|
},
|
|
1455
1442
|
emits: ["change"],
|
|
1456
1443
|
setup(r, { emit: e }) {
|
|
1457
|
-
const n = ee(!1), t = r, a = e, o = ee([]),
|
|
1458
|
-
|
|
1444
|
+
const n = ee(!1), t = r, a = e, o = ee([]), l = ee([]), s = ee(""), d = ee("");
|
|
1445
|
+
$t(() => {
|
|
1459
1446
|
o.value = t.columns;
|
|
1460
1447
|
});
|
|
1461
1448
|
const v = ({ title: p }) => {
|
|
1462
|
-
var
|
|
1463
|
-
const
|
|
1464
|
-
return
|
|
1465
|
-
}, b =
|
|
1466
|
-
|
|
1467
|
-
}, 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 = () => {
|
|
1468
1455
|
n.value = !1, a(
|
|
1469
1456
|
"change",
|
|
1470
|
-
o.value.map((p) =>
|
|
1457
|
+
o.value.map((p) => ke(p, Vt))
|
|
1471
1458
|
);
|
|
1472
|
-
},
|
|
1473
|
-
n.value = !1, o.value =
|
|
1459
|
+
}, F = () => {
|
|
1460
|
+
n.value = !1, o.value = l.value, l.value = [];
|
|
1474
1461
|
}, g = () => {
|
|
1475
1462
|
n.value = !1, a("change", []);
|
|
1476
1463
|
}, _ = (p) => {
|
|
1477
|
-
p && (
|
|
1464
|
+
p && (l.value = Ge(o.value));
|
|
1478
1465
|
};
|
|
1479
|
-
return
|
|
1480
|
-
n.value || (
|
|
1481
|
-
}), (p,
|
|
1482
|
-
const
|
|
1483
|
-
return
|
|
1466
|
+
return $t(() => {
|
|
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, {
|
|
1484
1471
|
open: n.value,
|
|
1485
|
-
"onUpdate:open":
|
|
1472
|
+
"onUpdate:open": L[1] || (L[1] = (D) => n.value = D),
|
|
1486
1473
|
placement: "bottomRight",
|
|
1487
1474
|
trigger: "click",
|
|
1488
1475
|
"overlay-inner-style": { padding: 0 },
|
|
1489
1476
|
"overlay-class-name": "pro-table-config-popover",
|
|
1490
1477
|
onOpenChange: _
|
|
1491
1478
|
}, {
|
|
1492
|
-
content:
|
|
1479
|
+
content: C(() => [
|
|
1493
1480
|
J("div", {
|
|
1494
|
-
class:
|
|
1481
|
+
class: $(p.$style.tableConfig)
|
|
1495
1482
|
}, [
|
|
1496
1483
|
J("div", {
|
|
1497
|
-
class:
|
|
1484
|
+
class: $(p.$style.tableConfigHead)
|
|
1498
1485
|
}, [
|
|
1499
|
-
|
|
1500
|
-
value:
|
|
1501
|
-
"onUpdate:value":
|
|
1486
|
+
T(S, {
|
|
1487
|
+
value: s.value,
|
|
1488
|
+
"onUpdate:value": L[0] || (L[0] = (D) => s.value = D),
|
|
1502
1489
|
placeholder: "搜索标题",
|
|
1503
|
-
onChange:
|
|
1490
|
+
onChange: w(m)
|
|
1504
1491
|
}, null, 8, ["value", "onChange"])
|
|
1505
1492
|
], 2),
|
|
1506
1493
|
J("div", {
|
|
1507
|
-
class:
|
|
1494
|
+
class: $(p.$style.tableConfigContent)
|
|
1508
1495
|
}, [
|
|
1509
|
-
|
|
1496
|
+
T(w(gt), {
|
|
1510
1497
|
list: o.value,
|
|
1511
1498
|
"item-key": "key",
|
|
1512
|
-
class:
|
|
1499
|
+
class: $(p.$style.columnList),
|
|
1513
1500
|
handle: ".table-column-draggable-handle"
|
|
1514
1501
|
}, {
|
|
1515
|
-
item:
|
|
1516
|
-
v(
|
|
1502
|
+
item: C(({ element: D }) => [
|
|
1503
|
+
v(D) ? (I(), U("div", {
|
|
1517
1504
|
key: 0,
|
|
1518
|
-
class:
|
|
1519
|
-
style:
|
|
1505
|
+
class: $(p.$style.columnItem),
|
|
1506
|
+
style: $e({ background: w(we).colorBgContainer })
|
|
1520
1507
|
}, [
|
|
1521
|
-
|
|
1522
|
-
checked:
|
|
1523
|
-
"onUpdate:checked": (ue) =>
|
|
1508
|
+
T(j, {
|
|
1509
|
+
checked: D.visible,
|
|
1510
|
+
"onUpdate:checked": (ue) => D.visible = ue
|
|
1524
1511
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
1525
|
-
|
|
1526
|
-
ellipsis: { tooltip:
|
|
1527
|
-
content:
|
|
1528
|
-
class:
|
|
1529
|
-
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
|
|
1530
1517
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1531
|
-
|
|
1518
|
+
T(f, {
|
|
1532
1519
|
type: "text",
|
|
1533
1520
|
size: "small",
|
|
1534
|
-
icon: X(
|
|
1535
|
-
style:
|
|
1536
|
-
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])
|
|
1537
1524
|
}, null, 8, ["icon", "style", "class"])
|
|
1538
1525
|
], 6)) : N("", !0)
|
|
1539
1526
|
]),
|
|
1540
1527
|
_: 1
|
|
1541
1528
|
}, 8, ["list", "class"]),
|
|
1542
|
-
b.value ? (
|
|
1529
|
+
b.value ? (I(), U("div", {
|
|
1543
1530
|
key: 0,
|
|
1544
|
-
class:
|
|
1545
|
-
style:
|
|
1531
|
+
class: $(p.$style.emptyText),
|
|
1532
|
+
style: $e({ color: w(we).colorTextSecondary })
|
|
1546
1533
|
}, " 未找到相关查询项 ", 6)) : N("", !0)
|
|
1547
1534
|
], 2),
|
|
1548
1535
|
J("div", {
|
|
1549
|
-
class:
|
|
1536
|
+
class: $(p.$style.tableConfigFoot)
|
|
1550
1537
|
}, [
|
|
1551
|
-
|
|
1538
|
+
T(f, {
|
|
1552
1539
|
type: "link",
|
|
1553
|
-
disabled:
|
|
1540
|
+
disabled: c.value,
|
|
1554
1541
|
onClick: y
|
|
1555
1542
|
}, {
|
|
1556
|
-
default:
|
|
1543
|
+
default: C(() => L[2] || (L[2] = [
|
|
1557
1544
|
K(" 确定 ")
|
|
1558
1545
|
])),
|
|
1559
1546
|
_: 1
|
|
1560
1547
|
}, 8, ["disabled"]),
|
|
1561
|
-
|
|
1548
|
+
T(f, {
|
|
1562
1549
|
type: "link",
|
|
1563
|
-
onClick:
|
|
1550
|
+
onClick: F
|
|
1564
1551
|
}, {
|
|
1565
|
-
default:
|
|
1552
|
+
default: C(() => L[3] || (L[3] = [
|
|
1566
1553
|
K(" 取消 ")
|
|
1567
1554
|
])),
|
|
1568
1555
|
_: 1
|
|
1569
1556
|
}),
|
|
1570
|
-
|
|
1557
|
+
T(f, {
|
|
1571
1558
|
type: "link",
|
|
1572
1559
|
onClick: g
|
|
1573
1560
|
}, {
|
|
1574
|
-
default:
|
|
1561
|
+
default: C(() => L[4] || (L[4] = [
|
|
1575
1562
|
K(" 重置 ")
|
|
1576
1563
|
])),
|
|
1577
1564
|
_: 1
|
|
@@ -1579,33 +1566,33 @@ const $r = (r) => {
|
|
|
1579
1566
|
], 2)
|
|
1580
1567
|
], 2)
|
|
1581
1568
|
]),
|
|
1582
|
-
default:
|
|
1583
|
-
|
|
1569
|
+
default: C(() => [
|
|
1570
|
+
T(f, {
|
|
1584
1571
|
type: "text",
|
|
1585
|
-
icon: X(
|
|
1586
|
-
class:
|
|
1572
|
+
icon: X(w(Tn)),
|
|
1573
|
+
class: $(p.$style.configBtn)
|
|
1587
1574
|
}, null, 8, ["icon", "class"])
|
|
1588
1575
|
]),
|
|
1589
1576
|
_: 1
|
|
1590
1577
|
}, 8, ["open"]);
|
|
1591
1578
|
};
|
|
1592
1579
|
}
|
|
1593
|
-
}),
|
|
1594
|
-
configBtn:
|
|
1595
|
-
tableConfig:
|
|
1596
|
-
tableConfigHead:
|
|
1597
|
-
tableConfigContent:
|
|
1598
|
-
columnList:
|
|
1599
|
-
columnItem:
|
|
1600
|
-
columnItemContent:
|
|
1601
|
-
dragIcon:
|
|
1602
|
-
dragIconDisabled:
|
|
1603
|
-
dragHandle:
|
|
1604
|
-
emptyText:
|
|
1605
|
-
tableConfigFoot:
|
|
1606
|
-
},
|
|
1607
|
-
$style:
|
|
1608
|
-
},
|
|
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({
|
|
1609
1596
|
__name: "DynamicList",
|
|
1610
1597
|
props: {
|
|
1611
1598
|
/**
|
|
@@ -1663,7 +1650,7 @@ const $r = (r) => {
|
|
|
1663
1650
|
deleteButtonProps: {
|
|
1664
1651
|
type: [Object, Function],
|
|
1665
1652
|
default: () => ({
|
|
1666
|
-
icon: X(
|
|
1653
|
+
icon: X(wt)
|
|
1667
1654
|
})
|
|
1668
1655
|
},
|
|
1669
1656
|
/**
|
|
@@ -1713,99 +1700,99 @@ const $r = (r) => {
|
|
|
1713
1700
|
},
|
|
1714
1701
|
emits: ["update:value", "add", "remove", "change"],
|
|
1715
1702
|
setup(r, { emit: e }) {
|
|
1716
|
-
const n = r, t = e, a =
|
|
1703
|
+
const n = r, t = e, a = vn.useInjectFormItemContext(), o = ee(n.value), l = () => {
|
|
1717
1704
|
const v = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
1718
1705
|
return Array.from({ length: 16 }).map(() => v[Math.floor(Math.random() * v.length)]).join("");
|
|
1719
|
-
},
|
|
1706
|
+
}, s = (v) => {
|
|
1720
1707
|
var b;
|
|
1721
1708
|
if (o.value.length < n.maxLength) {
|
|
1722
|
-
const
|
|
1723
|
-
id:
|
|
1709
|
+
const m = {
|
|
1710
|
+
id: l(),
|
|
1724
1711
|
...((b = n.getNewItemData) == null ? void 0 : b.call(n)) ?? {}
|
|
1725
1712
|
};
|
|
1726
|
-
o.value.splice(v + 1, 0,
|
|
1713
|
+
o.value.splice(v + 1, 0, m), t("add", m, v + 1);
|
|
1727
1714
|
}
|
|
1728
|
-
},
|
|
1715
|
+
}, d = (v) => {
|
|
1729
1716
|
o.value.splice(v, 1), t("remove", v);
|
|
1730
1717
|
};
|
|
1731
|
-
return
|
|
1718
|
+
return he(
|
|
1732
1719
|
() => o.value,
|
|
1733
1720
|
() => {
|
|
1734
|
-
t("update:value",
|
|
1721
|
+
t("update:value", w(o.value)), t("change", w(o.value)), a.onFieldChange();
|
|
1735
1722
|
},
|
|
1736
1723
|
{
|
|
1737
1724
|
deep: !0,
|
|
1738
1725
|
immediate: !0
|
|
1739
1726
|
}
|
|
1740
|
-
),
|
|
1727
|
+
), he(
|
|
1741
1728
|
() => n.value,
|
|
1742
1729
|
() => {
|
|
1743
|
-
o.value =
|
|
1730
|
+
o.value = w(n.value);
|
|
1744
1731
|
},
|
|
1745
1732
|
{
|
|
1746
1733
|
deep: !0,
|
|
1747
1734
|
immediate: !0
|
|
1748
1735
|
}
|
|
1749
1736
|
), (v, b) => {
|
|
1750
|
-
const
|
|
1751
|
-
return
|
|
1752
|
-
|
|
1737
|
+
const m = P("a-button");
|
|
1738
|
+
return I(), U(xe, null, [
|
|
1739
|
+
T(w(gt), {
|
|
1753
1740
|
list: o.value,
|
|
1754
1741
|
"item-key": r.itemKey,
|
|
1755
1742
|
disabled: !r.sortable,
|
|
1756
1743
|
handle: ".draggable-icon",
|
|
1757
|
-
class:
|
|
1744
|
+
class: $([v.$style.dynamicList, r.className])
|
|
1758
1745
|
}, {
|
|
1759
|
-
item:
|
|
1746
|
+
item: C(({ element: c, index: y }) => [
|
|
1760
1747
|
J("div", {
|
|
1761
|
-
class:
|
|
1748
|
+
class: $([v.$style.dynamicListItem, r.itemClassName])
|
|
1762
1749
|
}, [
|
|
1763
1750
|
J("div", {
|
|
1764
|
-
class:
|
|
1751
|
+
class: $(v.$style.dynamicListItemContent)
|
|
1765
1752
|
}, [
|
|
1766
1753
|
pe(v.$slots, "default", {
|
|
1767
|
-
item:
|
|
1754
|
+
item: c,
|
|
1768
1755
|
index: y
|
|
1769
1756
|
})
|
|
1770
1757
|
], 2),
|
|
1771
1758
|
J("div", {
|
|
1772
|
-
class:
|
|
1759
|
+
class: $(v.$style.actionsIcons)
|
|
1773
1760
|
}, [
|
|
1774
|
-
|
|
1761
|
+
T(m, oe({
|
|
1775
1762
|
type: "link",
|
|
1776
1763
|
danger: "",
|
|
1777
1764
|
size: "small",
|
|
1778
|
-
icon: X(
|
|
1779
|
-
},
|
|
1780
|
-
onClick: (
|
|
1765
|
+
icon: X(w(wt))
|
|
1766
|
+
}, w(_e)(r.deleteButtonProps) ? r.deleteButtonProps(c, y) : r.deleteButtonProps, {
|
|
1767
|
+
onClick: (F) => d(y)
|
|
1781
1768
|
}), {
|
|
1782
|
-
default:
|
|
1783
|
-
K(
|
|
1769
|
+
default: C(() => [
|
|
1770
|
+
K(be(r.deleteButtonText), 1)
|
|
1784
1771
|
]),
|
|
1785
1772
|
_: 2
|
|
1786
1773
|
}, 1040, ["icon", "onClick"]),
|
|
1787
|
-
r.sortable ? (
|
|
1774
|
+
r.sortable ? (I(), E(m, oe({
|
|
1788
1775
|
key: 0,
|
|
1789
1776
|
class: ["draggable-icon", v.$style.dragIcon],
|
|
1790
1777
|
size: "small",
|
|
1791
1778
|
type: "text",
|
|
1792
|
-
icon: X(
|
|
1793
|
-
},
|
|
1779
|
+
icon: X(w(De))
|
|
1780
|
+
}, w(_e)(r.sortButtonProps) ? r.sortButtonProps(c, y) : r.sortButtonProps), null, 16, ["class", "icon"])) : N("", !0)
|
|
1794
1781
|
], 2)
|
|
1795
1782
|
], 2)
|
|
1796
1783
|
]),
|
|
1797
1784
|
_: 3
|
|
1798
1785
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
1799
1786
|
J("div", null, [
|
|
1800
|
-
o.value.length < r.maxLength ? (
|
|
1787
|
+
o.value.length < r.maxLength ? (I(), E(m, oe({
|
|
1801
1788
|
key: 0,
|
|
1802
1789
|
type: "link",
|
|
1803
|
-
icon: X(
|
|
1804
|
-
},
|
|
1805
|
-
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))
|
|
1806
1793
|
}), {
|
|
1807
|
-
default:
|
|
1808
|
-
K(
|
|
1794
|
+
default: C(() => [
|
|
1795
|
+
K(be(r.addButtonText), 1)
|
|
1809
1796
|
]),
|
|
1810
1797
|
_: 1
|
|
1811
1798
|
}, 16, ["icon"])) : N("", !0)
|
|
@@ -1813,15 +1800,15 @@ const $r = (r) => {
|
|
|
1813
1800
|
], 64);
|
|
1814
1801
|
};
|
|
1815
1802
|
}
|
|
1816
|
-
}),
|
|
1817
|
-
dynamicList:
|
|
1818
|
-
dynamicListItem:
|
|
1819
|
-
dynamicListItemContent:
|
|
1820
|
-
actionsIcons:
|
|
1821
|
-
dragIcon:
|
|
1822
|
-
},
|
|
1823
|
-
$style:
|
|
1824
|
-
},
|
|
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({
|
|
1825
1812
|
__name: "InputGroup",
|
|
1826
1813
|
props: {
|
|
1827
1814
|
/**
|
|
@@ -1851,51 +1838,51 @@ const $r = (r) => {
|
|
|
1851
1838
|
},
|
|
1852
1839
|
emits: ["update:value", "change"],
|
|
1853
1840
|
setup(r, { emit: e }) {
|
|
1854
|
-
const n = r, t = e, a =
|
|
1841
|
+
const n = r, t = e, a = M({
|
|
1855
1842
|
get() {
|
|
1856
1843
|
return n.value;
|
|
1857
1844
|
},
|
|
1858
|
-
set(
|
|
1859
|
-
t("update:value",
|
|
1845
|
+
set(l) {
|
|
1846
|
+
t("update:value", l), t("change", l);
|
|
1860
1847
|
}
|
|
1861
|
-
}), o =
|
|
1862
|
-
var
|
|
1863
|
-
const
|
|
1864
|
-
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;
|
|
1865
1852
|
});
|
|
1866
|
-
return (
|
|
1867
|
-
const
|
|
1868
|
-
return
|
|
1853
|
+
return (l, s) => {
|
|
1854
|
+
const d = P("a-select"), v = P("a-input"), b = P("a-input-group");
|
|
1855
|
+
return I(), E(b, {
|
|
1869
1856
|
compact: "",
|
|
1870
|
-
class:
|
|
1857
|
+
class: $(l.$style.inputGroup)
|
|
1871
1858
|
}, {
|
|
1872
|
-
default:
|
|
1873
|
-
|
|
1859
|
+
default: C(() => [
|
|
1860
|
+
T(d, oe({
|
|
1874
1861
|
value: a.value.select,
|
|
1875
|
-
"onUpdate:value":
|
|
1862
|
+
"onUpdate:value": s[0] || (s[0] = (m) => a.value.select = m),
|
|
1876
1863
|
style: {
|
|
1877
|
-
...
|
|
1864
|
+
...w(Xe)(r.formItem, "addonBeforeProps.style", {}),
|
|
1878
1865
|
width: o.value
|
|
1879
1866
|
}
|
|
1880
|
-
},
|
|
1881
|
-
|
|
1867
|
+
}, w(Nt)(r.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
1868
|
+
T(v, oe({
|
|
1882
1869
|
value: a.value.value,
|
|
1883
|
-
"onUpdate:value":
|
|
1870
|
+
"onUpdate:value": s[1] || (s[1] = (m) => a.value.value = m),
|
|
1884
1871
|
style: {
|
|
1885
|
-
...
|
|
1872
|
+
...w(Xe)(r.formItem, "props.style", {}),
|
|
1886
1873
|
width: `calc(100% - ${o.value})`
|
|
1887
1874
|
}
|
|
1888
|
-
},
|
|
1875
|
+
}, w(ke)(r.formItem, ["props"])), null, 16, ["value", "style"])
|
|
1889
1876
|
]),
|
|
1890
1877
|
_: 1
|
|
1891
1878
|
}, 8, ["class"]);
|
|
1892
1879
|
};
|
|
1893
1880
|
}
|
|
1894
|
-
}),
|
|
1895
|
-
inputGroup:
|
|
1896
|
-
},
|
|
1897
|
-
$style:
|
|
1898
|
-
},
|
|
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({
|
|
1899
1886
|
__name: "InputNumberRange",
|
|
1900
1887
|
props: {
|
|
1901
1888
|
/**
|
|
@@ -1917,63 +1904,63 @@ const $r = (r) => {
|
|
|
1917
1904
|
},
|
|
1918
1905
|
emits: ["update:value"],
|
|
1919
1906
|
setup(r, { emit: e }) {
|
|
1920
|
-
const n = r, t = e, a =
|
|
1907
|
+
const n = r, t = e, a = M({
|
|
1921
1908
|
get() {
|
|
1922
|
-
var
|
|
1923
|
-
return ((
|
|
1909
|
+
var s;
|
|
1910
|
+
return ((s = n.value) == null ? void 0 : s[0]) ?? We;
|
|
1924
1911
|
},
|
|
1925
|
-
set(
|
|
1926
|
-
var
|
|
1927
|
-
t("update:value", [
|
|
1912
|
+
set(s) {
|
|
1913
|
+
var d;
|
|
1914
|
+
t("update:value", [s, ((d = n.value) == null ? void 0 : d[1]) ?? We]);
|
|
1928
1915
|
}
|
|
1929
|
-
}), o =
|
|
1916
|
+
}), o = M({
|
|
1930
1917
|
get() {
|
|
1931
|
-
var
|
|
1932
|
-
return ((
|
|
1918
|
+
var s;
|
|
1919
|
+
return ((s = n.value) == null ? void 0 : s[1]) ?? We;
|
|
1933
1920
|
},
|
|
1934
|
-
set(
|
|
1935
|
-
var
|
|
1936
|
-
t("update:value", [((
|
|
1921
|
+
set(s) {
|
|
1922
|
+
var d;
|
|
1923
|
+
t("update:value", [((d = n.value) == null ? void 0 : d[0]) ?? We, s]);
|
|
1937
1924
|
}
|
|
1938
|
-
}),
|
|
1939
|
-
return (
|
|
1940
|
-
var b,
|
|
1941
|
-
const v =
|
|
1942
|
-
return
|
|
1943
|
-
class:
|
|
1925
|
+
}), l = M(() => Nt(n.formItem.props, ["placeholder"]));
|
|
1926
|
+
return (s, d) => {
|
|
1927
|
+
var b, m, c, y;
|
|
1928
|
+
const v = P("a-input-number");
|
|
1929
|
+
return I(), U("div", {
|
|
1930
|
+
class: $([s.$style.inputNumberGroup, "input-number-group"])
|
|
1944
1931
|
}, [
|
|
1945
1932
|
J("div", {
|
|
1946
|
-
class:
|
|
1933
|
+
class: $(s.$style.inputNumberGroupContent)
|
|
1947
1934
|
}, [
|
|
1948
|
-
|
|
1935
|
+
T(v, oe(l.value, {
|
|
1949
1936
|
value: a.value,
|
|
1950
|
-
"onUpdate:value":
|
|
1951
|
-
class: [
|
|
1952
|
-
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]) ?? "请输入"
|
|
1953
1940
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
1954
1941
|
J("span", {
|
|
1955
|
-
class:
|
|
1942
|
+
class: $(s.$style.divider)
|
|
1956
1943
|
}, "~", 2),
|
|
1957
|
-
|
|
1944
|
+
T(v, oe(l.value, {
|
|
1958
1945
|
value: o.value,
|
|
1959
|
-
"onUpdate:value":
|
|
1960
|
-
class: [
|
|
1961
|
-
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]) ?? "请输入"
|
|
1962
1949
|
}), null, 16, ["value", "class", "placeholder"])
|
|
1963
1950
|
], 2)
|
|
1964
1951
|
], 2);
|
|
1965
1952
|
};
|
|
1966
1953
|
}
|
|
1967
|
-
}),
|
|
1968
|
-
inputNumberGroup:
|
|
1969
|
-
inputNumberGroupContent:
|
|
1970
|
-
inputNumber:
|
|
1971
|
-
startInputNumber:
|
|
1972
|
-
endInputNumber:
|
|
1973
|
-
divider:
|
|
1974
|
-
},
|
|
1975
|
-
$style:
|
|
1976
|
-
},
|
|
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,
|
|
1957
|
+
inputNumber: qa,
|
|
1958
|
+
startInputNumber: ja,
|
|
1959
|
+
endInputNumber: La,
|
|
1960
|
+
divider: Ea
|
|
1961
|
+
}, Aa = {
|
|
1962
|
+
$style: Ma
|
|
1963
|
+
}, Na = /* @__PURE__ */ fe(Ta, [["__cssModules", Aa]]), Ba = 8, Da = /* @__PURE__ */ ie({
|
|
1977
1964
|
__name: "FormFieldItem",
|
|
1978
1965
|
props: {
|
|
1979
1966
|
/**
|
|
@@ -2016,31 +2003,31 @@ const $r = (r) => {
|
|
|
2016
2003
|
emits: ["update:value", "change"],
|
|
2017
2004
|
setup(r, { emit: e }) {
|
|
2018
2005
|
const n = {
|
|
2019
|
-
[H.input]:
|
|
2020
|
-
[H.inputGroup]:
|
|
2021
|
-
[H.inputNumber]:
|
|
2022
|
-
[H.inputNumberRange]:
|
|
2023
|
-
[H.select]:
|
|
2024
|
-
[H.cascader]:
|
|
2025
|
-
[H.treeSelect]:
|
|
2026
|
-
[H.datePicker]:
|
|
2027
|
-
[H.rangePicker]:
|
|
2028
|
-
}, t = r, a = e, o =
|
|
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({
|
|
2029
2016
|
get() {
|
|
2030
2017
|
return t.value;
|
|
2031
2018
|
},
|
|
2032
|
-
set(
|
|
2033
|
-
a("update:value",
|
|
2019
|
+
set(c) {
|
|
2020
|
+
a("update:value", c), a("change", c);
|
|
2034
2021
|
}
|
|
2035
|
-
}),
|
|
2036
|
-
const
|
|
2037
|
-
return Math.max(
|
|
2038
|
-
}), v =
|
|
2039
|
-
const { type:
|
|
2040
|
-
return
|
|
2041
|
-
}), 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(() => {
|
|
2042
2029
|
var g;
|
|
2043
|
-
const
|
|
2030
|
+
const c = t.formItem, y = {
|
|
2044
2031
|
[H.input]: {
|
|
2045
2032
|
placeholder: "请输入",
|
|
2046
2033
|
clearable: !0
|
|
@@ -2048,13 +2035,13 @@ const $r = (r) => {
|
|
|
2048
2035
|
[H.inputGroup]: {
|
|
2049
2036
|
placeholder: "请输入",
|
|
2050
2037
|
clearable: !0,
|
|
2051
|
-
formItem:
|
|
2038
|
+
formItem: c
|
|
2052
2039
|
},
|
|
2053
2040
|
[H.inputNumber]: {
|
|
2054
2041
|
placeholder: "请输入"
|
|
2055
2042
|
},
|
|
2056
2043
|
[H.inputNumberRange]: {
|
|
2057
|
-
formItem:
|
|
2044
|
+
formItem: c
|
|
2058
2045
|
},
|
|
2059
2046
|
[H.select]: {
|
|
2060
2047
|
placeholder: "请选择",
|
|
@@ -2065,67 +2052,67 @@ const $r = (r) => {
|
|
|
2065
2052
|
maxTagTextLength: 40,
|
|
2066
2053
|
maxTagCount: "responsive"
|
|
2067
2054
|
}
|
|
2068
|
-
},
|
|
2055
|
+
}, F = {
|
|
2069
2056
|
...o,
|
|
2070
|
-
...y[
|
|
2071
|
-
...
|
|
2057
|
+
...y[c.type] ?? {},
|
|
2058
|
+
...c.props ?? {},
|
|
2072
2059
|
style: {
|
|
2073
|
-
...((g =
|
|
2074
|
-
width:
|
|
2060
|
+
...((g = c.props) == null ? void 0 : g.style) ?? {},
|
|
2061
|
+
width: c.type !== H.component ? "100%" : void 0
|
|
2075
2062
|
},
|
|
2076
2063
|
inModal: t.inModal
|
|
2077
2064
|
};
|
|
2078
|
-
return t.inModal || (
|
|
2079
|
-
}),
|
|
2080
|
-
return (
|
|
2081
|
-
const
|
|
2082
|
-
return
|
|
2083
|
-
class:
|
|
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");
|
|
2069
|
+
return I(), U("div", {
|
|
2070
|
+
class: $(c.$style.formFieldItem)
|
|
2084
2071
|
}, [
|
|
2085
|
-
|
|
2072
|
+
s.value ? (I(), E(g, {
|
|
2086
2073
|
key: 0,
|
|
2087
2074
|
compact: "",
|
|
2088
|
-
class:
|
|
2075
|
+
class: $([c.$style.inputGroup, "super-table-input-group"])
|
|
2089
2076
|
}, {
|
|
2090
|
-
default:
|
|
2091
|
-
r.inModal ? N("", !0) : (
|
|
2077
|
+
default: C(() => [
|
|
2078
|
+
r.inModal ? N("", !0) : (I(), E(F, {
|
|
2092
2079
|
key: 0,
|
|
2093
2080
|
value: r.formItem.label,
|
|
2094
2081
|
disabled: "",
|
|
2095
|
-
style:
|
|
2096
|
-
color:
|
|
2097
|
-
width: `${
|
|
2082
|
+
style: $e({
|
|
2083
|
+
color: w(we).colorText,
|
|
2084
|
+
width: `${d.value}px`
|
|
2098
2085
|
}),
|
|
2099
|
-
class:
|
|
2086
|
+
class: $([c.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
2100
2087
|
}, null, 8, ["value", "style", "class"])),
|
|
2101
|
-
v.value ? (
|
|
2088
|
+
v.value ? (I(), E(Ke(v.value), oe({
|
|
2102
2089
|
key: 1,
|
|
2103
|
-
[
|
|
2104
|
-
["onUpdate:" +
|
|
2090
|
+
[m.value]: l.value,
|
|
2091
|
+
["onUpdate:" + m.value]: y[0] || (y[0] = (_) => l.value = _)
|
|
2105
2092
|
}, b.value), null, 16)) : N("", !0)
|
|
2106
2093
|
]),
|
|
2107
2094
|
_: 1
|
|
2108
|
-
}, 8, ["class"])) : (
|
|
2109
|
-
r.formItem.type ===
|
|
2095
|
+
}, 8, ["class"])) : (I(), U(xe, { key: 1 }, [
|
|
2096
|
+
r.formItem.type === w(H).component && r.formItem.showLabel ? (I(), U("span", {
|
|
2110
2097
|
key: 0,
|
|
2111
|
-
class:
|
|
2112
|
-
},
|
|
2113
|
-
(
|
|
2114
|
-
[
|
|
2115
|
-
["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 = _)
|
|
2116
2103
|
}, b.value), null, 16))
|
|
2117
2104
|
], 64))
|
|
2118
2105
|
], 2);
|
|
2119
2106
|
};
|
|
2120
2107
|
}
|
|
2121
|
-
}),
|
|
2122
|
-
formFieldItem:
|
|
2123
|
-
inputGroup:
|
|
2124
|
-
formFieldItemLabel:
|
|
2125
|
-
customItemLabel:
|
|
2126
|
-
},
|
|
2127
|
-
$style:
|
|
2128
|
-
}, Wt = /* @__PURE__ */ fe(
|
|
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({
|
|
2129
2116
|
__name: "SceneConfigModal",
|
|
2130
2117
|
props: {
|
|
2131
2118
|
// 当前编辑的场景
|
|
@@ -2166,13 +2153,13 @@ const $r = (r) => {
|
|
|
2166
2153
|
},
|
|
2167
2154
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
2168
2155
|
setup(r, { expose: e, emit: n }) {
|
|
2169
|
-
var
|
|
2170
|
-
const t = r, a = n, o = ee(Ge(t.formConfigMap)),
|
|
2171
|
-
Object.values(o.value).filter(({ visible:
|
|
2172
|
-
|
|
2173
|
-
)),
|
|
2174
|
-
name: ((
|
|
2175
|
-
items: t.actionType === ce.search ?
|
|
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),
|
|
2159
|
+
ve.order
|
|
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) ?? [])
|
|
2176
2163
|
}), y = Ze({
|
|
2177
2164
|
name: [
|
|
2178
2165
|
{
|
|
@@ -2192,177 +2179,177 @@ const $r = (r) => {
|
|
|
2192
2179
|
type: "array"
|
|
2193
2180
|
}
|
|
2194
2181
|
]
|
|
2195
|
-
}),
|
|
2196
|
-
const
|
|
2197
|
-
return
|
|
2198
|
-
}, _ =
|
|
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(() => ({
|
|
2199
2186
|
[ce.create]: "新建场景",
|
|
2200
2187
|
[ce.update]: "更新场景",
|
|
2201
2188
|
[ce.search]: "高级筛选"
|
|
2202
|
-
})[t.actionType]), p = (
|
|
2203
|
-
const
|
|
2204
|
-
|
|
2205
|
-
},
|
|
2206
|
-
const
|
|
2207
|
-
return [
|
|
2208
|
-
},
|
|
2209
|
-
const
|
|
2210
|
-
(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),
|
|
2211
2198
|
{}
|
|
2212
2199
|
);
|
|
2213
|
-
a("form-item-change",
|
|
2214
|
-
},
|
|
2215
|
-
|
|
2216
|
-
},
|
|
2217
|
-
var
|
|
2218
|
-
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) => {
|
|
2219
2206
|
const de = o.value[W.name];
|
|
2220
|
-
return de && (de.value = W.value, de[
|
|
2207
|
+
return de && (de.value = W.value, de[ve.orderInScene] = ne, de[ve.selected] = !0), de;
|
|
2221
2208
|
}).filter(Boolean);
|
|
2222
2209
|
if (t.actionType === ce.search && !b.value) {
|
|
2223
|
-
a("update-form-config",
|
|
2210
|
+
a("update-form-config", x), a("search", c.items, x), a("cancel");
|
|
2224
2211
|
return;
|
|
2225
2212
|
}
|
|
2226
|
-
await ((
|
|
2227
|
-
const
|
|
2213
|
+
await ((B = m.value) == null ? void 0 : B.validateFields());
|
|
2214
|
+
const k = me(c);
|
|
2228
2215
|
t.currentScene ? await t.onUpdate({
|
|
2229
2216
|
...t.currentScene,
|
|
2230
|
-
...
|
|
2231
|
-
}) : await t.onCreate(
|
|
2217
|
+
...k
|
|
2218
|
+
}) : await t.onCreate(k), a("update-form-config", x), a("cancel");
|
|
2232
2219
|
};
|
|
2233
2220
|
(() => {
|
|
2234
|
-
if (
|
|
2235
|
-
const
|
|
2236
|
-
|
|
2221
|
+
if (c.items.length) return;
|
|
2222
|
+
const x = En(
|
|
2223
|
+
l.value.filter(({ fixed: B, selected: W }) => B || W),
|
|
2237
2224
|
"name"
|
|
2238
2225
|
);
|
|
2239
|
-
if (
|
|
2240
|
-
|
|
2226
|
+
if (x.length) {
|
|
2227
|
+
c.items = it(x, "_order").map((B) => ke(B, s)), console.log("formState.items", c.items);
|
|
2241
2228
|
return;
|
|
2242
2229
|
}
|
|
2243
|
-
const
|
|
2244
|
-
|
|
2230
|
+
const k = g();
|
|
2231
|
+
k && c.items.push(k);
|
|
2245
2232
|
})();
|
|
2246
|
-
const te = (
|
|
2247
|
-
var
|
|
2233
|
+
const te = (x) => {
|
|
2234
|
+
var k;
|
|
2248
2235
|
return {
|
|
2249
|
-
disabled: (
|
|
2236
|
+
disabled: (k = o.value[x.name]) == null ? void 0 : k.fixed
|
|
2250
2237
|
};
|
|
2251
|
-
},
|
|
2252
|
-
if (
|
|
2253
|
-
return
|
|
2254
|
-
if (!
|
|
2255
|
-
return
|
|
2256
|
-
if (
|
|
2257
|
-
return
|
|
2258
|
-
|
|
2259
|
-
},
|
|
2260
|
-
var
|
|
2261
|
-
return (
|
|
2262
|
-
},
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2265
|
-
},
|
|
2266
|
-
Object.entries(
|
|
2267
|
-
|
|
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);
|
|
2268
2255
|
});
|
|
2269
2256
|
};
|
|
2270
|
-
function
|
|
2271
|
-
return (
|
|
2272
|
-
(
|
|
2273
|
-
const
|
|
2274
|
-
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;
|
|
2275
2262
|
},
|
|
2276
2263
|
{}
|
|
2277
2264
|
);
|
|
2278
2265
|
}
|
|
2279
2266
|
return e({
|
|
2280
|
-
getFormItem:
|
|
2267
|
+
getFormItem: D,
|
|
2281
2268
|
setFormItem: ue,
|
|
2282
|
-
getFormValues:
|
|
2283
|
-
setFormValues:
|
|
2284
|
-
getFormValue:
|
|
2285
|
-
setFormValue:
|
|
2286
|
-
}), (
|
|
2287
|
-
const
|
|
2288
|
-
return
|
|
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, {
|
|
2289
2276
|
open: v.value,
|
|
2290
|
-
"onUpdate:open":
|
|
2277
|
+
"onUpdate:open": k[3] || (k[3] = (Q) => v.value = Q),
|
|
2291
2278
|
title: _.value,
|
|
2292
2279
|
width: 720,
|
|
2293
2280
|
"body-style": {
|
|
2294
2281
|
maxHeight: "70vh",
|
|
2295
2282
|
overflow: "auto"
|
|
2296
2283
|
},
|
|
2297
|
-
onOk:
|
|
2298
|
-
onCancel:
|
|
2284
|
+
onOk: j,
|
|
2285
|
+
onCancel: k[4] || (k[4] = (Q) => a("cancel"))
|
|
2299
2286
|
}, {
|
|
2300
|
-
default:
|
|
2301
|
-
|
|
2287
|
+
default: C(() => [
|
|
2288
|
+
T(de, {
|
|
2302
2289
|
ref_key: "formRef",
|
|
2303
|
-
ref:
|
|
2304
|
-
model:
|
|
2290
|
+
ref: m,
|
|
2291
|
+
model: c,
|
|
2305
2292
|
rules: y,
|
|
2306
|
-
class:
|
|
2293
|
+
class: $(x.$style.sceneForm)
|
|
2307
2294
|
}, {
|
|
2308
|
-
default:
|
|
2309
|
-
r.actionType !==
|
|
2295
|
+
default: C(() => [
|
|
2296
|
+
r.actionType !== w(ce).search || b.value ? (I(), E(W, {
|
|
2310
2297
|
key: 0,
|
|
2311
2298
|
label: "场景名称",
|
|
2312
2299
|
name: "name",
|
|
2313
2300
|
"label-col": { span: 24 },
|
|
2314
2301
|
"wrapper-col": { span: 12 }
|
|
2315
2302
|
}, {
|
|
2316
|
-
default:
|
|
2317
|
-
|
|
2318
|
-
value:
|
|
2319
|
-
"onUpdate:value":
|
|
2303
|
+
default: C(() => [
|
|
2304
|
+
T(B, {
|
|
2305
|
+
value: c.name,
|
|
2306
|
+
"onUpdate:value": k[0] || (k[0] = (Q) => c.name = Q),
|
|
2320
2307
|
placeholder: "请输入"
|
|
2321
2308
|
}, null, 8, ["value"])
|
|
2322
2309
|
]),
|
|
2323
2310
|
_: 1
|
|
2324
2311
|
})) : N("", !0),
|
|
2325
|
-
|
|
2312
|
+
T(W, {
|
|
2326
2313
|
label: "筛选条件",
|
|
2327
2314
|
name: "items",
|
|
2328
2315
|
"label-col": { span: 24 },
|
|
2329
2316
|
"wrapper-col": { span: 24 }
|
|
2330
2317
|
}, {
|
|
2331
|
-
default:
|
|
2332
|
-
|
|
2333
|
-
value:
|
|
2334
|
-
"onUpdate:value":
|
|
2318
|
+
default: C(() => [
|
|
2319
|
+
T(wa, {
|
|
2320
|
+
value: c.items,
|
|
2321
|
+
"onUpdate:value": k[1] || (k[1] = (Q) => c.items = Q),
|
|
2335
2322
|
"add-button-text": "添加筛选条件",
|
|
2336
2323
|
"get-new-item-data": g,
|
|
2337
|
-
"max-length":
|
|
2324
|
+
"max-length": l.value.length,
|
|
2338
2325
|
"delete-button-props": te,
|
|
2339
|
-
onAdd:
|
|
2326
|
+
onAdd: S
|
|
2340
2327
|
}, {
|
|
2341
|
-
default:
|
|
2328
|
+
default: C(({ item: Q }) => [
|
|
2342
2329
|
J("div", {
|
|
2343
|
-
class:
|
|
2330
|
+
class: $(x.$style.queryFieldItem)
|
|
2344
2331
|
}, [
|
|
2345
|
-
|
|
2332
|
+
T(ne, {
|
|
2346
2333
|
value: Q.name,
|
|
2347
|
-
"onUpdate:value": (
|
|
2334
|
+
"onUpdate:value": (ye) => Q.name = ye,
|
|
2348
2335
|
"show-search": "",
|
|
2349
|
-
options:
|
|
2336
|
+
options: L(Q.name),
|
|
2350
2337
|
"field-names": { value: "name" },
|
|
2351
2338
|
"option-filter-prop": "label",
|
|
2352
2339
|
placeholder: "请选择要筛选的字段名",
|
|
2353
|
-
class:
|
|
2354
|
-
onChange: (
|
|
2340
|
+
class: $(x.$style.fieldSelect),
|
|
2341
|
+
onChange: (ye) => p(ye, Q)
|
|
2355
2342
|
}, null, 8, ["value", "onUpdate:value", "options", "class", "onChange"]),
|
|
2356
2343
|
J("div", {
|
|
2357
|
-
class:
|
|
2344
|
+
class: $(x.$style.fieldComponent)
|
|
2358
2345
|
}, [
|
|
2359
|
-
Q.name ? (
|
|
2346
|
+
Q.name ? (I(), E(Wt, {
|
|
2360
2347
|
key: 0,
|
|
2361
2348
|
value: Q.value,
|
|
2362
|
-
"onUpdate:value": (
|
|
2349
|
+
"onUpdate:value": (ye) => Q.value = ye,
|
|
2363
2350
|
"in-modal": "",
|
|
2364
2351
|
"form-item": o.value[Q.name],
|
|
2365
|
-
onChange: (
|
|
2352
|
+
onChange: (ye) => f(Q.name, ye)
|
|
2366
2353
|
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : N("", !0)
|
|
2367
2354
|
], 2)
|
|
2368
2355
|
], 2)
|
|
@@ -2375,12 +2362,12 @@ const $r = (r) => {
|
|
|
2375
2362
|
]),
|
|
2376
2363
|
_: 1
|
|
2377
2364
|
}, 8, ["model", "rules", "class"]),
|
|
2378
|
-
r.actionType ===
|
|
2365
|
+
r.actionType === w(ce).search && r.allowCreateScene ? (I(), E(tt, {
|
|
2379
2366
|
key: 0,
|
|
2380
2367
|
checked: b.value,
|
|
2381
|
-
"onUpdate:checked":
|
|
2368
|
+
"onUpdate:checked": k[2] || (k[2] = (Q) => b.value = Q)
|
|
2382
2369
|
}, {
|
|
2383
|
-
default:
|
|
2370
|
+
default: C(() => k[5] || (k[5] = [
|
|
2384
2371
|
K(" 保存为场景 ")
|
|
2385
2372
|
])),
|
|
2386
2373
|
_: 1
|
|
@@ -2390,14 +2377,14 @@ const $r = (r) => {
|
|
|
2390
2377
|
}, 8, ["open", "title"]);
|
|
2391
2378
|
};
|
|
2392
2379
|
}
|
|
2393
|
-
}),
|
|
2394
|
-
sceneForm:
|
|
2395
|
-
queryFieldItem:
|
|
2396
|
-
fieldSelect:
|
|
2397
|
-
fieldComponent:
|
|
2398
|
-
},
|
|
2399
|
-
$style:
|
|
2400
|
-
},
|
|
2380
|
+
}), Ga = "_sceneForm_njdgy_1", Qa = "_queryFieldItem_njdgy_1", Ja = "_fieldSelect_njdgy_7", Ka = "_fieldComponent_njdgy_10", Za = {
|
|
2381
|
+
sceneForm: Ga,
|
|
2382
|
+
queryFieldItem: Qa,
|
|
2383
|
+
fieldSelect: Ja,
|
|
2384
|
+
fieldComponent: Ka
|
|
2385
|
+
}, Xa = {
|
|
2386
|
+
$style: Za
|
|
2387
|
+
}, eo = /* @__PURE__ */ fe(za, [["__cssModules", Xa]]), to = /* @__PURE__ */ ie({
|
|
2401
2388
|
__name: "SceneListModal",
|
|
2402
2389
|
props: {
|
|
2403
2390
|
/**
|
|
@@ -2438,50 +2425,50 @@ const $r = (r) => {
|
|
|
2438
2425
|
},
|
|
2439
2426
|
emits: ["cancel", "create", "update", "delete", "sort"],
|
|
2440
2427
|
setup(r, { emit: e }) {
|
|
2441
|
-
const n = r, t = e, a = ee(n.list), o = ee(!0),
|
|
2442
|
-
await n.onDelete(
|
|
2443
|
-
},
|
|
2444
|
-
|
|
2445
|
-
}, v = (
|
|
2446
|
-
|
|
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);
|
|
2447
2434
|
}, b = () => {
|
|
2448
2435
|
t(
|
|
2449
2436
|
"sort",
|
|
2450
|
-
a.value.map(({ code:
|
|
2437
|
+
a.value.map(({ code: m }) => m)
|
|
2451
2438
|
);
|
|
2452
2439
|
};
|
|
2453
|
-
return (
|
|
2454
|
-
const y =
|
|
2455
|
-
return
|
|
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, {
|
|
2456
2443
|
open: o.value,
|
|
2457
|
-
"onUpdate:open":
|
|
2444
|
+
"onUpdate:open": c[0] || (c[0] = (S) => o.value = S),
|
|
2458
2445
|
title: "场景管理",
|
|
2459
2446
|
width: 720,
|
|
2460
2447
|
footer: null,
|
|
2461
|
-
onCancel:
|
|
2448
|
+
onCancel: l
|
|
2462
2449
|
}, {
|
|
2463
|
-
default:
|
|
2450
|
+
default: C(() => [
|
|
2464
2451
|
J("div", {
|
|
2465
|
-
class:
|
|
2452
|
+
class: $(m.$style.sceneList)
|
|
2466
2453
|
}, [
|
|
2467
|
-
|
|
2468
|
-
class:
|
|
2454
|
+
T(F, {
|
|
2455
|
+
class: $(m.$style.sceneListHead)
|
|
2469
2456
|
}, {
|
|
2470
|
-
default:
|
|
2471
|
-
|
|
2457
|
+
default: C(() => [
|
|
2458
|
+
T(y, {
|
|
2472
2459
|
span: 16,
|
|
2473
|
-
class:
|
|
2460
|
+
class: $(m.$style.col)
|
|
2474
2461
|
}, {
|
|
2475
|
-
default:
|
|
2462
|
+
default: C(() => c[1] || (c[1] = [
|
|
2476
2463
|
K(" 场景名称 ")
|
|
2477
2464
|
])),
|
|
2478
2465
|
_: 1
|
|
2479
2466
|
}, 8, ["class"]),
|
|
2480
|
-
|
|
2467
|
+
T(y, {
|
|
2481
2468
|
span: 8,
|
|
2482
|
-
class:
|
|
2469
|
+
class: $(m.$style.col)
|
|
2483
2470
|
}, {
|
|
2484
|
-
default:
|
|
2471
|
+
default: C(() => c[2] || (c[2] = [
|
|
2485
2472
|
K(" 操作 ")
|
|
2486
2473
|
])),
|
|
2487
2474
|
_: 1
|
|
@@ -2489,56 +2476,56 @@ const $r = (r) => {
|
|
|
2489
2476
|
]),
|
|
2490
2477
|
_: 1
|
|
2491
2478
|
}, 8, ["class"]),
|
|
2492
|
-
a.value.length ? (
|
|
2479
|
+
a.value.length ? (I(), E(w(gt), {
|
|
2493
2480
|
key: 0,
|
|
2494
2481
|
list: a.value,
|
|
2495
2482
|
"item-key": "id",
|
|
2496
2483
|
handle: ".table-column-draggable-icon",
|
|
2497
2484
|
onChange: b
|
|
2498
2485
|
}, {
|
|
2499
|
-
item:
|
|
2500
|
-
|
|
2501
|
-
class:
|
|
2486
|
+
item: C(({ element: S }) => [
|
|
2487
|
+
T(F, {
|
|
2488
|
+
class: $(m.$style.sceneListItem)
|
|
2502
2489
|
}, {
|
|
2503
|
-
default:
|
|
2504
|
-
|
|
2490
|
+
default: C(() => [
|
|
2491
|
+
T(y, {
|
|
2505
2492
|
span: 16,
|
|
2506
|
-
class:
|
|
2493
|
+
class: $(m.$style.col)
|
|
2507
2494
|
}, {
|
|
2508
|
-
default:
|
|
2509
|
-
|
|
2510
|
-
ellipsis: { tooltip:
|
|
2511
|
-
content:
|
|
2495
|
+
default: C(() => [
|
|
2496
|
+
T(g, {
|
|
2497
|
+
ellipsis: { tooltip: S.name },
|
|
2498
|
+
content: S.name
|
|
2512
2499
|
}, null, 8, ["ellipsis", "content"])
|
|
2513
2500
|
]),
|
|
2514
2501
|
_: 2
|
|
2515
2502
|
}, 1032, ["class"]),
|
|
2516
|
-
|
|
2503
|
+
T(y, {
|
|
2517
2504
|
span: 8,
|
|
2518
|
-
class:
|
|
2505
|
+
class: $(m.$style.col)
|
|
2519
2506
|
}, {
|
|
2520
|
-
default:
|
|
2521
|
-
|
|
2507
|
+
default: C(() => [
|
|
2508
|
+
T(_, {
|
|
2522
2509
|
type: "link",
|
|
2523
2510
|
size: "small",
|
|
2524
|
-
onClick: (
|
|
2511
|
+
onClick: (j) => v(S)
|
|
2525
2512
|
}, {
|
|
2526
|
-
default:
|
|
2513
|
+
default: C(() => c[3] || (c[3] = [
|
|
2527
2514
|
K(" 编辑 ")
|
|
2528
2515
|
])),
|
|
2529
2516
|
_: 2
|
|
2530
2517
|
}, 1032, ["onClick"]),
|
|
2531
|
-
|
|
2518
|
+
T(p, {
|
|
2532
2519
|
title: "确定删除?",
|
|
2533
|
-
onConfirm: (
|
|
2520
|
+
onConfirm: (j) => s(S.code)
|
|
2534
2521
|
}, {
|
|
2535
|
-
default:
|
|
2536
|
-
|
|
2522
|
+
default: C(() => [
|
|
2523
|
+
T(_, {
|
|
2537
2524
|
type: "link",
|
|
2538
2525
|
size: "small",
|
|
2539
2526
|
danger: ""
|
|
2540
2527
|
}, {
|
|
2541
|
-
default:
|
|
2528
|
+
default: C(() => c[4] || (c[4] = [
|
|
2542
2529
|
K(" 删除 ")
|
|
2543
2530
|
])),
|
|
2544
2531
|
_: 1
|
|
@@ -2546,11 +2533,11 @@ const $r = (r) => {
|
|
|
2546
2533
|
]),
|
|
2547
2534
|
_: 2
|
|
2548
2535
|
}, 1032, ["onConfirm"]),
|
|
2549
|
-
|
|
2536
|
+
T(_, {
|
|
2550
2537
|
type: "text",
|
|
2551
2538
|
size: "small",
|
|
2552
|
-
icon: X(
|
|
2553
|
-
class:
|
|
2539
|
+
icon: X(w(De)),
|
|
2540
|
+
class: $(["table-column-draggable-icon", m.$style.dragIcon])
|
|
2554
2541
|
}, null, 8, ["icon", "class"])
|
|
2555
2542
|
]),
|
|
2556
2543
|
_: 2
|
|
@@ -2560,18 +2547,18 @@ const $r = (r) => {
|
|
|
2560
2547
|
}, 1032, ["class"])
|
|
2561
2548
|
]),
|
|
2562
2549
|
_: 1
|
|
2563
|
-
}, 8, ["list"])) : (
|
|
2550
|
+
}, 8, ["list"])) : (I(), E(L, {
|
|
2564
2551
|
key: 1,
|
|
2565
|
-
image:
|
|
2552
|
+
image: w(In).PRESENTED_IMAGE_SIMPLE
|
|
2566
2553
|
}, null, 8, ["image"]))
|
|
2567
2554
|
], 2),
|
|
2568
|
-
r.allowCreateScene ? (
|
|
2555
|
+
r.allowCreateScene ? (I(), E(_, {
|
|
2569
2556
|
key: 0,
|
|
2570
2557
|
type: "link",
|
|
2571
|
-
icon: X(
|
|
2572
|
-
onClick:
|
|
2558
|
+
icon: X(w(At)),
|
|
2559
|
+
onClick: d
|
|
2573
2560
|
}, {
|
|
2574
|
-
default:
|
|
2561
|
+
default: C(() => c[5] || (c[5] = [
|
|
2575
2562
|
K(" 新建场景 ")
|
|
2576
2563
|
])),
|
|
2577
2564
|
_: 1
|
|
@@ -2581,15 +2568,15 @@ const $r = (r) => {
|
|
|
2581
2568
|
}, 8, ["open"]);
|
|
2582
2569
|
};
|
|
2583
2570
|
}
|
|
2584
|
-
}),
|
|
2585
|
-
sceneList:
|
|
2586
|
-
sceneListHead:
|
|
2587
|
-
sceneListItem:
|
|
2588
|
-
col:
|
|
2589
|
-
dragIcon:
|
|
2590
|
-
},
|
|
2591
|
-
$style:
|
|
2592
|
-
},
|
|
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({
|
|
2593
2580
|
__name: "FormSearchParams",
|
|
2594
2581
|
props: {
|
|
2595
2582
|
/**
|
|
@@ -2610,35 +2597,35 @@ const $r = (r) => {
|
|
|
2610
2597
|
},
|
|
2611
2598
|
emits: ["form-item-change"],
|
|
2612
2599
|
setup(r, { emit: e }) {
|
|
2613
|
-
const n = r, t = e, a =
|
|
2614
|
-
Object.values(n.formConfigMap).filter((
|
|
2615
|
-
|
|
2616
|
-
)), o = (
|
|
2617
|
-
t("form-item-change",
|
|
2618
|
-
},
|
|
2600
|
+
const n = r, t = e, a = M(() => it(
|
|
2601
|
+
Object.values(n.formConfigMap).filter((d) => d[ve.selected]),
|
|
2602
|
+
ve.orderInScene
|
|
2603
|
+
)), o = (d, v) => {
|
|
2604
|
+
t("form-item-change", d, v);
|
|
2605
|
+
}, l = yt(o, 500), s = (d, v) => {
|
|
2619
2606
|
[
|
|
2620
2607
|
H.input,
|
|
2621
2608
|
H.inputNumber,
|
|
2622
2609
|
H.inputGroup,
|
|
2623
2610
|
H.inputNumberRange
|
|
2624
|
-
].includes(n.formConfigMap[
|
|
2611
|
+
].includes(n.formConfigMap[d].type) ? l(d, v) : o(d, v);
|
|
2625
2612
|
};
|
|
2626
|
-
return (
|
|
2627
|
-
const b =
|
|
2628
|
-
return
|
|
2613
|
+
return (d, v) => {
|
|
2614
|
+
const b = P("a-col"), m = P("a-row");
|
|
2615
|
+
return I(), E(m, {
|
|
2629
2616
|
gutter: [8, 8],
|
|
2630
|
-
class:
|
|
2617
|
+
class: $(d.$style.searchParams)
|
|
2631
2618
|
}, {
|
|
2632
|
-
default:
|
|
2633
|
-
(
|
|
2634
|
-
key:
|
|
2635
|
-
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
|
|
2636
2623
|
}, {
|
|
2637
|
-
default:
|
|
2638
|
-
|
|
2639
|
-
value: r.formConfigMap[
|
|
2640
|
-
"form-item": r.formConfigMap[
|
|
2641
|
-
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)
|
|
2642
2629
|
}, null, 8, ["value", "form-item", "onChange"])
|
|
2643
2630
|
]),
|
|
2644
2631
|
_: 2
|
|
@@ -2648,21 +2635,21 @@ const $r = (r) => {
|
|
|
2648
2635
|
}, 8, ["class"]);
|
|
2649
2636
|
};
|
|
2650
2637
|
}
|
|
2651
|
-
}),
|
|
2652
|
-
searchParams:
|
|
2653
|
-
},
|
|
2654
|
-
$style:
|
|
2655
|
-
},
|
|
2656
|
-
|
|
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");
|
|
2657
2644
|
function qt(r) {
|
|
2658
2645
|
return Array.from(document.body.children).includes(r);
|
|
2659
2646
|
}
|
|
2660
|
-
class
|
|
2647
|
+
class go {
|
|
2661
2648
|
constructor(e = {}) {
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2649
|
+
Me(this, "currents");
|
|
2650
|
+
Me(this, "dialogs");
|
|
2651
|
+
Me(this, "staticDialogs");
|
|
2652
|
+
Me(this, "rootVm");
|
|
2666
2653
|
this.currents = [], this.dialogs = {}, this.staticDialogs = e, this.rootVm = null;
|
|
2667
2654
|
}
|
|
2668
2655
|
// 设置rootVm
|
|
@@ -2679,14 +2666,14 @@ class co {
|
|
|
2679
2666
|
}
|
|
2680
2667
|
// 打开dialog
|
|
2681
2668
|
open(e, n) {
|
|
2682
|
-
const { props: t, onCreated: a, onMounted: o } = n || {},
|
|
2683
|
-
if (!
|
|
2669
|
+
const { props: t, onCreated: a, onMounted: o } = n || {}, l = this.staticDialogs[e] || this.dialogs[e] || null;
|
|
2670
|
+
if (!l) {
|
|
2684
2671
|
console.error(`Dialog "${e}" is not existing, please register it firstly.`);
|
|
2685
2672
|
return;
|
|
2686
2673
|
}
|
|
2687
|
-
const
|
|
2688
|
-
|
|
2689
|
-
const v =
|
|
2674
|
+
const s = document.createElement("div"), d = `dialog_${Mn()}`;
|
|
2675
|
+
s.setAttribute("id", d), document.body.appendChild(s);
|
|
2676
|
+
const v = ln({
|
|
2690
2677
|
data() {
|
|
2691
2678
|
return {
|
|
2692
2679
|
open: !0
|
|
@@ -2694,30 +2681,30 @@ class co {
|
|
|
2694
2681
|
},
|
|
2695
2682
|
render() {
|
|
2696
2683
|
return X(
|
|
2697
|
-
|
|
2684
|
+
Fn,
|
|
2698
2685
|
{
|
|
2699
|
-
key:
|
|
2686
|
+
key: d,
|
|
2700
2687
|
locale: Dt
|
|
2701
2688
|
},
|
|
2702
2689
|
() => [
|
|
2703
|
-
X(
|
|
2704
|
-
key:
|
|
2690
|
+
X(l, {
|
|
2691
|
+
key: d,
|
|
2705
2692
|
destroyOnClose: !0,
|
|
2706
2693
|
...t,
|
|
2707
2694
|
open: this.open,
|
|
2708
2695
|
onCancel: () => {
|
|
2709
|
-
var
|
|
2710
|
-
this.open = !1, (
|
|
2696
|
+
var m;
|
|
2697
|
+
this.open = !1, (m = t == null ? void 0 : t.onCancel) == null || m.call(t);
|
|
2711
2698
|
}
|
|
2712
2699
|
})
|
|
2713
2700
|
]
|
|
2714
2701
|
);
|
|
2715
2702
|
}
|
|
2716
|
-
}).use(
|
|
2703
|
+
}).use(yn);
|
|
2717
2704
|
a == null || a(v);
|
|
2718
|
-
const b = v.mount(`#${
|
|
2719
|
-
return o == null || o(b), b.$watch("open", (
|
|
2720
|
-
|
|
2705
|
+
const b = v.mount(`#${d}`);
|
|
2706
|
+
return o == null || o(b), b.$watch("open", (m) => {
|
|
2707
|
+
m || this.destroy();
|
|
2721
2708
|
}), this.currents.push(v), v;
|
|
2722
2709
|
}
|
|
2723
2710
|
// 关闭dialog
|
|
@@ -2736,20 +2723,20 @@ class co {
|
|
|
2736
2723
|
}
|
|
2737
2724
|
}
|
|
2738
2725
|
}
|
|
2739
|
-
const Ae = new
|
|
2726
|
+
const Ae = new go();
|
|
2740
2727
|
function jt(r, e) {
|
|
2741
2728
|
const n = Symbol("dialog");
|
|
2742
2729
|
Ae.register(n, r);
|
|
2743
2730
|
function t() {
|
|
2744
|
-
Ae.open(n,
|
|
2731
|
+
Ae.open(n, w(e));
|
|
2745
2732
|
}
|
|
2746
2733
|
function a() {
|
|
2747
2734
|
Ae.close();
|
|
2748
2735
|
}
|
|
2749
|
-
function o(
|
|
2750
|
-
Ae.open(n,
|
|
2736
|
+
function o(l) {
|
|
2737
|
+
Ae.open(n, l);
|
|
2751
2738
|
}
|
|
2752
|
-
return
|
|
2739
|
+
return un(() => {
|
|
2753
2740
|
Ae.unregister(n);
|
|
2754
2741
|
}), {
|
|
2755
2742
|
open: t,
|
|
@@ -2757,11 +2744,11 @@ function jt(r, e) {
|
|
|
2757
2744
|
openByConfig: o
|
|
2758
2745
|
};
|
|
2759
2746
|
}
|
|
2760
|
-
const ze = 2e3,
|
|
2747
|
+
const ze = 2e3, vo = (r) => {
|
|
2761
2748
|
const { getScenes: e, setScenes: n } = r;
|
|
2762
2749
|
return {
|
|
2763
2750
|
querySceneList: async (t) => {
|
|
2764
|
-
const a = e(), o = t.type ? a.filter((
|
|
2751
|
+
const a = e(), o = t.type ? a.filter((l) => l.type === t.type) : a;
|
|
2765
2752
|
return {
|
|
2766
2753
|
code: ze,
|
|
2767
2754
|
data: o,
|
|
@@ -2777,7 +2764,7 @@ const ze = 2e3, po = (r) => {
|
|
|
2777
2764
|
};
|
|
2778
2765
|
},
|
|
2779
2766
|
updateScene: async (t) => {
|
|
2780
|
-
const a = e(), o = a.findIndex((
|
|
2767
|
+
const a = e(), o = a.findIndex((l) => l.code === t.code);
|
|
2781
2768
|
return o === -1 ? {
|
|
2782
2769
|
code: 404,
|
|
2783
2770
|
data: null,
|
|
@@ -2789,7 +2776,7 @@ const ze = 2e3, po = (r) => {
|
|
|
2789
2776
|
});
|
|
2790
2777
|
},
|
|
2791
2778
|
deleteScene: async (t) => {
|
|
2792
|
-
const o = e().filter((
|
|
2779
|
+
const o = e().filter((l) => !t.includes(l.code));
|
|
2793
2780
|
return n(o), {
|
|
2794
2781
|
code: ze,
|
|
2795
2782
|
data: null,
|
|
@@ -2797,47 +2784,7 @@ const ze = 2e3, po = (r) => {
|
|
|
2797
2784
|
};
|
|
2798
2785
|
}
|
|
2799
2786
|
};
|
|
2800
|
-
},
|
|
2801
|
-
const e = r.sceneRequestUrls ?? Vt, n = async (t, a = {}) => {
|
|
2802
|
-
try {
|
|
2803
|
-
const o = {
|
|
2804
|
-
"X-Requested-With": "XMLHttpRequest",
|
|
2805
|
-
"Content-Type": "application/json",
|
|
2806
|
-
Authorization: `Bearer ${Pt("NIST_TOKEN")}`,
|
|
2807
|
-
"Yidun-Token": Pt("Yidun-Token") || ""
|
|
2808
|
-
}, s = await fetch(t, {
|
|
2809
|
-
...a,
|
|
2810
|
-
headers: {
|
|
2811
|
-
...o,
|
|
2812
|
-
...a.headers
|
|
2813
|
-
}
|
|
2814
|
-
});
|
|
2815
|
-
if (!s.ok)
|
|
2816
|
-
throw new Error(`HTTP error! status: ${s.status}`);
|
|
2817
|
-
return await s.json();
|
|
2818
|
-
} catch (o) {
|
|
2819
|
-
throw console.error("API request failed:", o), o;
|
|
2820
|
-
}
|
|
2821
|
-
};
|
|
2822
|
-
return {
|
|
2823
|
-
querySceneList: async (t) => {
|
|
2824
|
-
const a = new URLSearchParams(t).toString();
|
|
2825
|
-
return n(`${e.query}?${a}`);
|
|
2826
|
-
},
|
|
2827
|
-
createScene: async (t) => n(e.create, {
|
|
2828
|
-
method: "POST",
|
|
2829
|
-
body: JSON.stringify(t)
|
|
2830
|
-
}),
|
|
2831
|
-
updateScene: async (t) => n(e.update, {
|
|
2832
|
-
method: "POST",
|
|
2833
|
-
body: JSON.stringify(t)
|
|
2834
|
-
}),
|
|
2835
|
-
deleteScene: async (t) => n(e.delete, {
|
|
2836
|
-
method: "POST",
|
|
2837
|
-
body: JSON.stringify(t)
|
|
2838
|
-
})
|
|
2839
|
-
};
|
|
2840
|
-
}, mo = () => {
|
|
2787
|
+
}, Lt = () => {
|
|
2841
2788
|
const r = {
|
|
2842
2789
|
code: -1,
|
|
2843
2790
|
data: [],
|
|
@@ -2849,7 +2796,7 @@ const ze = 2e3, po = (r) => {
|
|
|
2849
2796
|
updateScene: async () => r,
|
|
2850
2797
|
deleteScene: async () => r
|
|
2851
2798
|
};
|
|
2852
|
-
},
|
|
2799
|
+
}, ho = ["innerHTML"], bo = /* @__PURE__ */ ie({
|
|
2853
2800
|
__name: "SuperTable",
|
|
2854
2801
|
props: {
|
|
2855
2802
|
/**
|
|
@@ -2945,10 +2892,10 @@ const ze = 2e3, po = (r) => {
|
|
|
2945
2892
|
type: String,
|
|
2946
2893
|
default: "local"
|
|
2947
2894
|
},
|
|
2948
|
-
/**
|
|
2949
|
-
|
|
2895
|
+
/** 场景请求函数配置 */
|
|
2896
|
+
sceneRequest: {
|
|
2950
2897
|
type: Object,
|
|
2951
|
-
default:
|
|
2898
|
+
default: void 0
|
|
2952
2899
|
},
|
|
2953
2900
|
/** 开启表格设置 */
|
|
2954
2901
|
enableTableConfig: {
|
|
@@ -2958,70 +2905,71 @@ const ze = 2e3, po = (r) => {
|
|
|
2958
2905
|
},
|
|
2959
2906
|
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change"],
|
|
2960
2907
|
setup(r, { expose: e, emit: n }) {
|
|
2961
|
-
var
|
|
2962
|
-
|
|
2963
|
-
const t = r, a = n, o =
|
|
2964
|
-
var u, h,
|
|
2965
|
-
const
|
|
2966
|
-
return !!((
|
|
2967
|
-
}), s = ee(), { openByConfig:
|
|
2968
|
-
(
|
|
2908
|
+
var _t;
|
|
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),
|
|
2969
2916
|
{}
|
|
2970
|
-
),
|
|
2917
|
+
), m = Ut([location.hostname, location.pathname, t.sceneType].join("")), c = Nn(`superTable_${m}`, {
|
|
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:
|
|
2984
|
-
params:
|
|
2985
|
-
pageSize:
|
|
2986
|
-
pageNum:
|
|
2930
|
+
Y.loading = !0;
|
|
2931
|
+
const { total: i, data: u } = await t.request({
|
|
2932
|
+
params: bt(),
|
|
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, po = (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
|
-
|
|
3042
|
-
const z = Object.entries(t.customQueryParams).map(([Ye,
|
|
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;
|
|
2990
|
+
const z = Object.entries(t.customQueryParams).map(([Ye, rt]) => {
|
|
3043
2991
|
var He;
|
|
3044
2992
|
return {
|
|
3045
2993
|
name: Ye,
|
|
3046
|
-
value:
|
|
3047
|
-
type: (He =
|
|
2994
|
+
value: rt,
|
|
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, po = (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",
|
|
@@ -3128,63 +3076,55 @@ const ze = 2e3, po = (r) => {
|
|
|
3128
3076
|
x: "100%",
|
|
3129
3077
|
y: Math.max(500, window.innerWidth * 0.8),
|
|
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(
|
|
3089
|
+
return t.formatDataSource(me(Y.dataSource));
|
|
3142
3090
|
} catch {
|
|
3143
|
-
return
|
|
3091
|
+
return me(Y.dataSource);
|
|
3144
3092
|
}
|
|
3145
|
-
}), k =
|
|
3146
|
-
|
|
3147
|
-
loading: D.loading,
|
|
3148
|
-
rowKey: D.rowKey,
|
|
3149
|
-
pagination: D.pagination,
|
|
3150
|
-
tableLayout: D.tableLayout,
|
|
3151
|
-
scroll: D.scroll,
|
|
3152
|
-
rowClassName: D.rowClassName
|
|
3153
|
-
})), T = L(() => Ot(t.columns).map((l) => {
|
|
3154
|
-
const u = f.value.columnConfig[l.key];
|
|
3093
|
+
}), k = M(() => Pt(t.columns).map((i) => {
|
|
3094
|
+
const u = c.value.columnConfig[i.key];
|
|
3155
3095
|
return {
|
|
3156
|
-
...
|
|
3157
|
-
width: (u == null ? void 0 : u.width) ??
|
|
3158
|
-
visible: (u == null ? void 0 : u.visible) ??
|
|
3159
|
-
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
|
|
3160
3100
|
};
|
|
3161
|
-
})),
|
|
3162
|
-
|
|
3163
|
-
...
|
|
3164
|
-
width:
|
|
3101
|
+
})), B = (i, u) => {
|
|
3102
|
+
c.value.columnConfig[u.key] = {
|
|
3103
|
+
...c.value.columnConfig[u.key] ?? {},
|
|
3104
|
+
width: i
|
|
3165
3105
|
};
|
|
3166
|
-
}, W = (
|
|
3167
|
-
|
|
3168
|
-
(u, h,
|
|
3106
|
+
}, W = (i) => {
|
|
3107
|
+
c.value.columnConfig = i.reduce(
|
|
3108
|
+
(u, h, O) => (u[h.key] = {
|
|
3169
3109
|
...h,
|
|
3170
|
-
index:
|
|
3110
|
+
index: O
|
|
3171
3111
|
}, u),
|
|
3172
3112
|
{}
|
|
3173
3113
|
);
|
|
3174
3114
|
};
|
|
3175
|
-
|
|
3176
|
-
() => [
|
|
3115
|
+
he(
|
|
3116
|
+
() => [k.value, t.sortable],
|
|
3177
3117
|
() => {
|
|
3178
|
-
const
|
|
3118
|
+
const i = {
|
|
3179
3119
|
key: R.sort,
|
|
3180
3120
|
type: R.sort,
|
|
3181
3121
|
title: "",
|
|
3182
3122
|
fixed: !0,
|
|
3183
3123
|
width: 60
|
|
3184
3124
|
};
|
|
3185
|
-
|
|
3186
|
-
...t.sortable ? [
|
|
3187
|
-
...
|
|
3125
|
+
Y.columns = [
|
|
3126
|
+
...t.sortable ? [i] : [],
|
|
3127
|
+
...k.value.filter(({ visible: u }) => u).sort((u, h) => u.index - h.index)
|
|
3188
3128
|
];
|
|
3189
3129
|
},
|
|
3190
3130
|
{
|
|
@@ -3192,20 +3132,20 @@ const ze = 2e3, po = (r) => {
|
|
|
3192
3132
|
immediate: !0
|
|
3193
3133
|
}
|
|
3194
3134
|
);
|
|
3195
|
-
const
|
|
3135
|
+
const ne = () => new Promise((i) => {
|
|
3196
3136
|
const u = () => {
|
|
3197
|
-
var
|
|
3198
|
-
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");
|
|
3199
3139
|
if (h) {
|
|
3200
|
-
|
|
3140
|
+
i(h);
|
|
3201
3141
|
return;
|
|
3202
3142
|
}
|
|
3203
3143
|
requestAnimationFrame(u);
|
|
3204
3144
|
};
|
|
3205
3145
|
u();
|
|
3206
3146
|
}), de = async () => {
|
|
3207
|
-
const
|
|
3208
|
-
|
|
3147
|
+
const i = await ne();
|
|
3148
|
+
i && new Bn(i, {
|
|
3209
3149
|
animation: 150,
|
|
3210
3150
|
handle: ".super-table-column-draggable-handle",
|
|
3211
3151
|
setData: (u) => {
|
|
@@ -3213,33 +3153,33 @@ const ze = 2e3, po = (r) => {
|
|
|
3213
3153
|
h.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", u.setDragImage(h, 0, 0);
|
|
3214
3154
|
},
|
|
3215
3155
|
onEnd: (u) => {
|
|
3216
|
-
const { oldIndex: h, newIndex:
|
|
3217
|
-
if (h === void 0 ||
|
|
3218
|
-
const
|
|
3219
|
-
|
|
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);
|
|
3220
3160
|
}
|
|
3221
3161
|
});
|
|
3222
|
-
}, tt = (
|
|
3223
|
-
|
|
3224
|
-
},
|
|
3225
|
-
|
|
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({
|
|
3226
3166
|
props: {
|
|
3227
3167
|
ref: s,
|
|
3228
3168
|
currentScene: u,
|
|
3229
|
-
actionType:
|
|
3230
|
-
formConfigMap:
|
|
3231
|
-
onCreate:
|
|
3232
|
-
onUpdate:
|
|
3169
|
+
actionType: i,
|
|
3170
|
+
formConfigMap: f.value,
|
|
3171
|
+
onCreate: ue,
|
|
3172
|
+
onUpdate: Te,
|
|
3233
3173
|
onUpdateFormConfig: (h) => {
|
|
3234
|
-
h.forEach((
|
|
3235
|
-
|
|
3174
|
+
h.forEach((O) => {
|
|
3175
|
+
qe(f.value, O.name, O);
|
|
3236
3176
|
});
|
|
3237
3177
|
},
|
|
3238
3178
|
onSearch: (h) => {
|
|
3239
|
-
|
|
3179
|
+
S(h);
|
|
3240
3180
|
},
|
|
3241
|
-
onFormItemChange(h,
|
|
3242
|
-
a("form-item-change", h,
|
|
3181
|
+
onFormItemChange(h, O) {
|
|
3182
|
+
a("form-item-change", h, O, me(f.value[h]), nt);
|
|
3243
3183
|
},
|
|
3244
3184
|
onCancel() {
|
|
3245
3185
|
s.value = void 0;
|
|
@@ -3247,163 +3187,168 @@ const ze = 2e3, po = (r) => {
|
|
|
3247
3187
|
}
|
|
3248
3188
|
});
|
|
3249
3189
|
}, Q = () => {
|
|
3250
|
-
|
|
3190
|
+
F.value = !1, v({
|
|
3251
3191
|
props: {
|
|
3252
|
-
list:
|
|
3253
|
-
allowCreateScene:
|
|
3254
|
-
onCreate: () =>
|
|
3255
|
-
onUpdate: (
|
|
3256
|
-
onDelete: (
|
|
3257
|
-
onSort: (
|
|
3258
|
-
|
|
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));
|
|
3259
3199
|
}
|
|
3260
3200
|
}
|
|
3261
3201
|
});
|
|
3262
|
-
},
|
|
3263
|
-
await
|
|
3264
|
-
const u =
|
|
3202
|
+
}, ye = async (i) => {
|
|
3203
|
+
await mn();
|
|
3204
|
+
const u = j.list.find((h) => h.code === i);
|
|
3265
3205
|
a("scene-change", u);
|
|
3266
|
-
}, zt = ({ name:
|
|
3267
|
-
|
|
3268
|
-
},
|
|
3269
|
-
if (
|
|
3270
|
-
return
|
|
3271
|
-
if (!
|
|
3272
|
-
return
|
|
3273
|
-
if (u === "visible" &&
|
|
3274
|
-
return
|
|
3275
|
-
|
|
3276
|
-
},
|
|
3277
|
-
if (!
|
|
3278
|
-
return
|
|
3279
|
-
|
|
3280
|
-
},
|
|
3281
|
-
Object.entries(
|
|
3282
|
-
|
|
3206
|
+
}, zt = ({ name: i }) => {
|
|
3207
|
+
qe(f.value, `${i}._selected`, !1), L();
|
|
3208
|
+
}, vt = (i) => f.value[i], Gt = (i, u, h) => {
|
|
3209
|
+
if (Rt.includes(u))
|
|
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]) => {
|
|
3222
|
+
ht(u, h);
|
|
3283
3223
|
});
|
|
3284
|
-
},
|
|
3224
|
+
}, Jt = (i) => {
|
|
3285
3225
|
var u;
|
|
3286
|
-
return (u =
|
|
3287
|
-
},
|
|
3288
|
-
const u = {}, h =
|
|
3289
|
-
for (const
|
|
3290
|
-
const
|
|
3291
|
-
|
|
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));
|
|
3292
3232
|
}
|
|
3293
3233
|
return u;
|
|
3294
|
-
}
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
s.value ? s.value.
|
|
3301
|
-
},
|
|
3302
|
-
getFormValues(l) {
|
|
3303
|
-
return s.value ? s.value.getFormValues(l) : ht(l);
|
|
3234
|
+
}, Kt = () => Y.dataSource, Zt = (i) => {
|
|
3235
|
+
Y.dataSource = i;
|
|
3236
|
+
}, Xt = (i, u) => {
|
|
3237
|
+
Y.dataSource[i] = u;
|
|
3238
|
+
}, nt = {
|
|
3239
|
+
getFormItem(i) {
|
|
3240
|
+
return s.value ? s.value.getFormItem(i) : vt(i);
|
|
3304
3241
|
},
|
|
3305
|
-
|
|
3306
|
-
s.value ? s.value.
|
|
3242
|
+
setFormItem(i, u, h) {
|
|
3243
|
+
s.value ? s.value.setFormItem(i, u, h) : Gt(i, u, h);
|
|
3307
3244
|
},
|
|
3308
|
-
|
|
3309
|
-
return s.value ? s.value.
|
|
3245
|
+
getFormValues(i) {
|
|
3246
|
+
return s.value ? s.value.getFormValues(i) : bt(i);
|
|
3310
3247
|
},
|
|
3311
|
-
|
|
3312
|
-
s.value ? s.value.
|
|
3248
|
+
setFormValues(i) {
|
|
3249
|
+
s.value ? s.value.setFormValues(i) : Qt(i);
|
|
3313
3250
|
},
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
D.dataSource = l;
|
|
3251
|
+
getFormValue(i) {
|
|
3252
|
+
return s.value ? s.value.getFormValue(i) : Jt(i);
|
|
3317
3253
|
},
|
|
3318
|
-
|
|
3319
|
-
|
|
3254
|
+
setFormValue(i, u) {
|
|
3255
|
+
s.value ? s.value.setFormValue(i, u) : ht(i, u);
|
|
3256
|
+
}
|
|
3257
|
+
}, en = {
|
|
3258
|
+
...nt,
|
|
3259
|
+
...{
|
|
3260
|
+
getTableData: Kt,
|
|
3261
|
+
setTableData: Zt,
|
|
3262
|
+
setTableDataItem: Xt
|
|
3320
3263
|
},
|
|
3321
|
-
onRefresh:
|
|
3322
|
-
|
|
3264
|
+
onRefresh: L,
|
|
3265
|
+
isInitialized: o
|
|
3266
|
+
};
|
|
3267
|
+
return e(en), he(() => [...t.refreshDeps], L, {
|
|
3323
3268
|
deep: !0,
|
|
3324
3269
|
immediate: !0
|
|
3325
|
-
}),
|
|
3270
|
+
}), he(
|
|
3326
3271
|
() => t.enableScene,
|
|
3327
|
-
(
|
|
3328
|
-
|
|
3272
|
+
(i) => {
|
|
3273
|
+
i ? te() : S([]);
|
|
3329
3274
|
}
|
|
3330
|
-
),
|
|
3275
|
+
), he(
|
|
3331
3276
|
() => t.sortable,
|
|
3332
|
-
(
|
|
3333
|
-
|
|
3277
|
+
(i) => {
|
|
3278
|
+
i && de();
|
|
3334
3279
|
},
|
|
3335
3280
|
{
|
|
3336
3281
|
immediate: !0
|
|
3337
3282
|
}
|
|
3338
|
-
),
|
|
3339
|
-
t.enableScene ?
|
|
3340
|
-
}), (
|
|
3341
|
-
const h =
|
|
3342
|
-
return
|
|
3343
|
-
default:
|
|
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(() => [
|
|
3344
3289
|
J("div", {
|
|
3345
|
-
class:
|
|
3346
|
-
style:
|
|
3290
|
+
class: $([i.$style.superTable, "ants-super-table"]),
|
|
3291
|
+
style: $e(r.wrapperStyle)
|
|
3347
3292
|
}, [
|
|
3348
|
-
r.enableScene ||
|
|
3293
|
+
r.enableScene || i.$slots.extra ? (I(), U("div", {
|
|
3349
3294
|
key: 0,
|
|
3350
|
-
class:
|
|
3295
|
+
class: $(i.$style.superTableHeader)
|
|
3351
3296
|
}, [
|
|
3352
|
-
r.enableScene ? (
|
|
3297
|
+
r.enableScene ? (I(), E(rt, {
|
|
3353
3298
|
key: 0,
|
|
3354
3299
|
layout: "inline",
|
|
3355
|
-
class:
|
|
3300
|
+
class: $(i.$style.searchForm)
|
|
3356
3301
|
}, {
|
|
3357
|
-
default:
|
|
3358
|
-
|
|
3359
|
-
default:
|
|
3360
|
-
pe(
|
|
3302
|
+
default: C(() => [
|
|
3303
|
+
i.$slots.sceneAddonBefore ? (I(), E(h, { key: 0 }, {
|
|
3304
|
+
default: C(() => [
|
|
3305
|
+
pe(i.$slots, "sceneAddonBefore")
|
|
3361
3306
|
]),
|
|
3362
3307
|
_: 3
|
|
3363
3308
|
})) : N("", !0),
|
|
3364
|
-
|
|
3365
|
-
default:
|
|
3366
|
-
|
|
3367
|
-
value:
|
|
3368
|
-
"onUpdate:value": u[1] || (u[1] = (G) =>
|
|
3369
|
-
class:
|
|
3309
|
+
T(h, { label: "场景选择" }, {
|
|
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),
|
|
3370
3315
|
placeholder: "请选择",
|
|
3371
3316
|
"allow-clear": "",
|
|
3372
3317
|
"show-search": "",
|
|
3373
3318
|
"option-filter-prop": "name",
|
|
3374
|
-
options: [...V.value, ...
|
|
3319
|
+
options: [...V.value, ...j.list],
|
|
3375
3320
|
"field-names": { value: "code", label: "name" },
|
|
3376
|
-
open:
|
|
3377
|
-
loading:
|
|
3378
|
-
onChange:
|
|
3379
|
-
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)
|
|
3380
3325
|
}, {
|
|
3381
|
-
dropdownRender:
|
|
3382
|
-
|
|
3326
|
+
dropdownRender: C(({ menuNode: G }) => [
|
|
3327
|
+
T(w(Zr), { vnodes: G }, null, 8, ["vnodes"]),
|
|
3383
3328
|
J("div", {
|
|
3384
|
-
class:
|
|
3329
|
+
class: $(i.$style.sceneOpBtnWrapper)
|
|
3385
3330
|
}, [
|
|
3386
|
-
O
|
|
3331
|
+
T(O, {
|
|
3387
3332
|
type: "link",
|
|
3388
3333
|
block: "",
|
|
3389
|
-
icon: X(
|
|
3390
|
-
class:
|
|
3391
|
-
disabled: !
|
|
3392
|
-
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))
|
|
3393
3338
|
}, {
|
|
3394
|
-
default:
|
|
3339
|
+
default: C(() => u[6] || (u[6] = [
|
|
3395
3340
|
K(" 新建场景 ")
|
|
3396
3341
|
])),
|
|
3397
3342
|
_: 1
|
|
3398
3343
|
}, 8, ["icon", "class", "disabled"]),
|
|
3399
|
-
O
|
|
3344
|
+
T(O, {
|
|
3400
3345
|
type: "link",
|
|
3401
3346
|
block: "",
|
|
3402
|
-
icon: X(
|
|
3403
|
-
class:
|
|
3347
|
+
icon: X(w(Pn)),
|
|
3348
|
+
class: $(i.$style.sceneOpBtn),
|
|
3404
3349
|
onClick: Q
|
|
3405
3350
|
}, {
|
|
3406
|
-
default:
|
|
3351
|
+
default: C(() => u[7] || (u[7] = [
|
|
3407
3352
|
K(" 场景管理 ")
|
|
3408
3353
|
])),
|
|
3409
3354
|
_: 1
|
|
@@ -3415,32 +3360,32 @@ const ze = 2e3, po = (r) => {
|
|
|
3415
3360
|
]),
|
|
3416
3361
|
_: 1
|
|
3417
3362
|
}),
|
|
3418
|
-
|
|
3419
|
-
default:
|
|
3420
|
-
|
|
3421
|
-
split:
|
|
3422
|
-
|
|
3363
|
+
T(h, null, {
|
|
3364
|
+
default: C(() => [
|
|
3365
|
+
T(Ye, null, {
|
|
3366
|
+
split: C(() => [
|
|
3367
|
+
T(z, { type: "vertical" })
|
|
3423
3368
|
]),
|
|
3424
|
-
default:
|
|
3425
|
-
O
|
|
3369
|
+
default: C(() => [
|
|
3370
|
+
T(O, {
|
|
3426
3371
|
type: "primary",
|
|
3427
|
-
icon: X(
|
|
3428
|
-
onClick: u[3] || (u[3] = (G) =>
|
|
3372
|
+
icon: X(w(qn)),
|
|
3373
|
+
onClick: u[3] || (u[3] = (G) => Oe(w(ce).search))
|
|
3429
3374
|
}, {
|
|
3430
|
-
default:
|
|
3375
|
+
default: C(() => u[8] || (u[8] = [
|
|
3431
3376
|
K(" 高级筛选 ")
|
|
3432
3377
|
])),
|
|
3433
3378
|
_: 1
|
|
3434
3379
|
}, 8, ["icon"]),
|
|
3435
|
-
r.showRefreshButton ? (
|
|
3380
|
+
r.showRefreshButton ? (I(), E(O, {
|
|
3436
3381
|
key: 0,
|
|
3437
3382
|
type: "primary",
|
|
3438
3383
|
ghost: "",
|
|
3439
|
-
icon: X(
|
|
3440
|
-
loading:
|
|
3441
|
-
onClick:
|
|
3384
|
+
icon: X(w(jn)),
|
|
3385
|
+
loading: Y.loading,
|
|
3386
|
+
onClick: L
|
|
3442
3387
|
}, {
|
|
3443
|
-
default:
|
|
3388
|
+
default: C(() => u[9] || (u[9] = [
|
|
3444
3389
|
K(" 刷新 ")
|
|
3445
3390
|
])),
|
|
3446
3391
|
_: 1
|
|
@@ -3451,112 +3396,113 @@ const ze = 2e3, po = (r) => {
|
|
|
3451
3396
|
]),
|
|
3452
3397
|
_: 1
|
|
3453
3398
|
}),
|
|
3454
|
-
|
|
3455
|
-
default:
|
|
3456
|
-
pe(
|
|
3399
|
+
i.$slots.sceneAddonAfter ? (I(), E(h, { key: 1 }, {
|
|
3400
|
+
default: C(() => [
|
|
3401
|
+
pe(i.$slots, "sceneAddonAfter")
|
|
3457
3402
|
]),
|
|
3458
3403
|
_: 3
|
|
3459
3404
|
})) : N("", !0)
|
|
3460
3405
|
]),
|
|
3461
3406
|
_: 3
|
|
3462
3407
|
}, 8, ["class"])) : N("", !0),
|
|
3463
|
-
|
|
3408
|
+
i.$slots.extra ? (I(), U("div", {
|
|
3464
3409
|
key: 1,
|
|
3465
|
-
class:
|
|
3410
|
+
class: $(i.$style.superTableExtra)
|
|
3466
3411
|
}, [
|
|
3467
|
-
pe(
|
|
3412
|
+
pe(i.$slots, "extra")
|
|
3468
3413
|
], 2)) : N("", !0)
|
|
3469
3414
|
], 2)) : N("", !0),
|
|
3470
|
-
|
|
3471
|
-
"form-config-map":
|
|
3415
|
+
T(yo, {
|
|
3416
|
+
"form-config-map": f.value,
|
|
3472
3417
|
"form-item-col-span": r.formItemColSpan,
|
|
3473
3418
|
onFormItemChange: tt,
|
|
3474
3419
|
onDelete: u[4] || (u[4] = (G) => zt(G))
|
|
3475
3420
|
}, null, 8, ["form-config-map", "form-item-col-span"]),
|
|
3476
3421
|
J("div", {
|
|
3477
|
-
class:
|
|
3422
|
+
class: $(i.$style.tableWrapper)
|
|
3478
3423
|
}, [
|
|
3479
|
-
|
|
3424
|
+
i.$slots.tableHead || i.$slots.toolBar ? (I(), U("div", {
|
|
3480
3425
|
key: 0,
|
|
3481
|
-
class:
|
|
3426
|
+
class: $(i.$style.toolbar)
|
|
3482
3427
|
}, [
|
|
3483
3428
|
J("div", {
|
|
3484
|
-
class:
|
|
3429
|
+
class: $(i.$style.tableHeadWrapper)
|
|
3485
3430
|
}, [
|
|
3486
|
-
pe(
|
|
3431
|
+
pe(i.$slots, "tableHead")
|
|
3487
3432
|
], 2),
|
|
3488
|
-
|
|
3489
|
-
|
|
3433
|
+
i.$slots.toolBarExtra ? (I(), U("div", {
|
|
3434
|
+
key: 0,
|
|
3435
|
+
class: $(i.$style.actionBtns)
|
|
3490
3436
|
}, [
|
|
3491
|
-
pe(
|
|
3492
|
-
], 2)
|
|
3437
|
+
pe(i.$slots, "toolBarExtra")
|
|
3438
|
+
], 2)) : N("", !0)
|
|
3493
3439
|
], 2)) : N("", !0),
|
|
3494
3440
|
J("div", {
|
|
3495
|
-
class:
|
|
3441
|
+
class: $(i.$style.tableContent)
|
|
3496
3442
|
}, [
|
|
3497
|
-
r.enableTableConfig ? (
|
|
3443
|
+
r.enableTableConfig ? (I(), E(ma, {
|
|
3498
3444
|
key: 0,
|
|
3499
|
-
columns:
|
|
3445
|
+
columns: k.value,
|
|
3500
3446
|
onChange: W
|
|
3501
3447
|
}, null, 8, ["columns"])) : N("", !0),
|
|
3502
|
-
|
|
3448
|
+
T(nn, oe({
|
|
3503
3449
|
ref_key: "tableRef",
|
|
3504
|
-
ref:
|
|
3505
|
-
"data-source":
|
|
3506
|
-
},
|
|
3507
|
-
headerCell:
|
|
3508
|
-
G.class !== "ant-table-row-expand-icon-cell" ? (
|
|
3450
|
+
ref: Ie,
|
|
3451
|
+
"data-source": x.value
|
|
3452
|
+
}, Y, { onResizeColumn: B }), fn({
|
|
3453
|
+
headerCell: C(({ column: G }) => [
|
|
3454
|
+
G.class !== "ant-table-row-expand-icon-cell" ? (I(), U("div", {
|
|
3509
3455
|
key: 0,
|
|
3510
|
-
class:
|
|
3456
|
+
class: $(i.$style.headerCell)
|
|
3511
3457
|
}, [
|
|
3512
|
-
|
|
3458
|
+
T(He, {
|
|
3513
3459
|
ellipsis: { tooltip: G.title },
|
|
3514
3460
|
content: G.title,
|
|
3515
|
-
class:
|
|
3461
|
+
class: $(i.$style.headerCellText)
|
|
3516
3462
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
3517
|
-
G.titleTooltip ? (
|
|
3518
|
-
title:
|
|
3463
|
+
G.titleTooltip ? (I(), E(tn, { key: 0 }, {
|
|
3464
|
+
title: C(() => [
|
|
3519
3465
|
J("span", {
|
|
3520
3466
|
innerHTML: G.titleTooltip
|
|
3521
|
-
}, null, 8,
|
|
3467
|
+
}, null, 8, ho)
|
|
3522
3468
|
]),
|
|
3523
|
-
default:
|
|
3524
|
-
|
|
3525
|
-
style:
|
|
3526
|
-
class:
|
|
3469
|
+
default: C(() => [
|
|
3470
|
+
T(w(Ln), {
|
|
3471
|
+
style: $e({ color: w(we).colorTextQuaternary }),
|
|
3472
|
+
class: $(i.$style.headerCellTooltipIcon)
|
|
3527
3473
|
}, null, 8, ["style", "class"])
|
|
3528
3474
|
]),
|
|
3529
3475
|
_: 2
|
|
3530
3476
|
}, 1024)) : N("", !0)
|
|
3531
3477
|
], 2)) : N("", !0)
|
|
3532
3478
|
]),
|
|
3533
|
-
bodyCell:
|
|
3534
|
-
|
|
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, {
|
|
3535
3481
|
column: G,
|
|
3536
|
-
record:
|
|
3537
|
-
index:
|
|
3538
|
-
hasRouter:
|
|
3482
|
+
record: Ee,
|
|
3483
|
+
index: Ct,
|
|
3484
|
+
hasRouter: l.value
|
|
3539
3485
|
}, null, 8, ["column", "record", "index", "hasRouter"]), u, 5)
|
|
3540
3486
|
]),
|
|
3541
|
-
default:
|
|
3542
|
-
|
|
3487
|
+
default: C(() => [
|
|
3488
|
+
i.$slots.expandColumnTitle ? pe(i.$slots, "expandColumnTitle", { key: 0 }) : N("", !0)
|
|
3543
3489
|
]),
|
|
3544
3490
|
_: 2
|
|
3545
3491
|
}, [
|
|
3546
|
-
|
|
3492
|
+
i.$slots.expandedRowRender ? {
|
|
3547
3493
|
name: "expandedRowRender",
|
|
3548
|
-
fn:
|
|
3549
|
-
pe(
|
|
3494
|
+
fn: C(({ record: G }) => [
|
|
3495
|
+
pe(i.$slots, "expandedRowRender", { record: G })
|
|
3550
3496
|
]),
|
|
3551
3497
|
key: "0"
|
|
3552
3498
|
} : void 0
|
|
3553
3499
|
]), 1040, ["data-source"])
|
|
3554
3500
|
], 2),
|
|
3555
|
-
|
|
3501
|
+
i.$slots.tableFoot ? (I(), U("div", {
|
|
3556
3502
|
key: 1,
|
|
3557
|
-
class:
|
|
3503
|
+
class: $(i.$style.tableFootWrapper)
|
|
3558
3504
|
}, [
|
|
3559
|
-
pe(
|
|
3505
|
+
pe(i.$slots, "tableFoot")
|
|
3560
3506
|
], 2)) : N("", !0)
|
|
3561
3507
|
], 2)
|
|
3562
3508
|
], 6)
|
|
@@ -3565,29 +3511,29 @@ const ze = 2e3, po = (r) => {
|
|
|
3565
3511
|
}, 8, ["locale"]);
|
|
3566
3512
|
};
|
|
3567
3513
|
}
|
|
3568
|
-
}),
|
|
3569
|
-
superTable:
|
|
3570
|
-
superTableHeader:
|
|
3571
|
-
searchForm:
|
|
3572
|
-
sceneSelect:
|
|
3573
|
-
tableWrapper:
|
|
3574
|
-
toolbar:
|
|
3575
|
-
actionBtns:
|
|
3576
|
-
tableHeadWrapper:
|
|
3577
|
-
tableContent:
|
|
3578
|
-
headerCell:
|
|
3579
|
-
headerCellText:
|
|
3580
|
-
headerCellTooltipIcon:
|
|
3581
|
-
sceneOpBtnWrapper:
|
|
3582
|
-
sceneOpBtn:
|
|
3583
|
-
},
|
|
3584
|
-
$style:
|
|
3585
|
-
},
|
|
3586
|
-
|
|
3587
|
-
r.component("SuperTable",
|
|
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,
|
|
3526
|
+
headerCellTooltipIcon: Po,
|
|
3527
|
+
sceneOpBtnWrapper: qo,
|
|
3528
|
+
sceneOpBtn: jo
|
|
3529
|
+
}, Eo = {
|
|
3530
|
+
$style: Lo
|
|
3531
|
+
}, Et = /* @__PURE__ */ fe(bo, [["__cssModules", Eo]]);
|
|
3532
|
+
Et.install = (r) => {
|
|
3533
|
+
r.component("SuperTable", Et);
|
|
3588
3534
|
};
|
|
3589
3535
|
export {
|
|
3590
3536
|
R as SuperTableColumnTypeEnum,
|
|
3591
3537
|
H as SuperTableFormItemTypeEnum,
|
|
3592
|
-
|
|
3538
|
+
Et as default
|
|
3593
3539
|
};
|