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