@yidun/antd-super-table 0.1.7 → 0.1.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 +13 -12
- package/dist/SuperTable.vue.d.ts +9 -0
- package/dist/index.js +1191 -1174
- package/dist/interface.d.ts +5 -0
- package/example/index.vue +27 -1
- package/example/tableColumns.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._ellipsisElement_6fog1_1{width:100%;overflow:hidden;display:flex}._ellipsisElement_6fog1_1 ._elementItem_6fog1_6{min-width:0}._ellipsisElementHasGap_6fog1_10{gap:8px}._flexWrap_6fog1_14{flex-wrap:wrap}._ellipsisTag_6fog1_18{cursor:pointer}._imageEllipsisTag_6fog1_22{line-height:30px;min-width:32px;padding:0;text-align:center}._ellipsisList_6fog1_29{max-width:500px;display:flex;gap:8px;flex-wrap:wrap}._tableCellContent_1chn7_1 ._antTypographyEllipsis_1chn7_1{width:100%}._tableCellContent_1chn7_1 ._draggableIcon_1chn7_4{cursor:grab}._textListItem_1chn7_8{width:100%;margin-bottom:4px}._configBtn_fstz6_1{position:absolute;z-index:999;right:4px;top:8px;background:#fafafa}._tableConfig_fstz6_9{width:260px}._tableConfig_fstz6_9 ._tableConfigHead_fstz6_12{padding:8px}._tableConfig_fstz6_9 ._tableConfigActions_fstz6_15{display:flex;align-items:center;justify-content:space-between;padding:8px;border-bottom:1px solid #d9d9d9}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22{min-height:300px;max-height:60vh;overflow:auto;padding-bottom:12px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._groupTitle_fstz6_28{padding:0 8px;font-size:12px;color:#000000a6;background:#fafafa;line-height:28px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35{max-height:20vh;overflow-y:auto}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39{display:flex;align-items:center;gap:8px;min-height:28px;padding:0 8px;position:relative}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._columnItemContent_fstz6_47{flex:1;cursor:pointer}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragIcon_fstz6_51,._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._dragHandle_fstz6_54{cursor:grab}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39 ._fixedActions_fstz6_57{display:none;align-items:center;gap:4px}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._columnGroup_fstz6_28 ._columnList_fstz6_35 ._columnItem_fstz6_39:hover ._fixedActions_fstz6_57{display:flex}._tableConfig_fstz6_9 ._tableConfigContent_fstz6_22 ._emptyText_fstz6_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}._searchParamsWrapper_mo3ie_1{padding:16px;background-color:#fff;margin-bottom:0}._searchParamsWrapper_mo3ie_1._hasActions_mo3ie_6{margin-bottom:16px}._searchParams_mo3ie_1{flex:1}._searchActionsWrapper_mo3ie_14{display:flex;justify-content:flex-end;gap:8px}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1{padding:16px;display:flex;gap:16px;background-color:#fff}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7,._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7 ._sceneForm_1jyjb_7{flex:1}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneFormWrapper_1jyjb_7 ._sceneForm_1jyjb_7 ._sceneSelect_1jyjb_13{width:240px}._superTable_1jyjb_1 ._querySection_1jyjb_1 ._sceneHeader_1jyjb_1 ._sceneExtra_1jyjb_16{flex-shrink:0}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19{background:#fff;padding:16px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23{padding-bottom:12px;display:flex;align-items:flex-start;justify-content:flex-end;gap:16px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23 ._actionBtns_1jyjb_30{display:flex;align-items:center;gap:8px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._toolbar_1jyjb_23 ._tableHeadWrapper_1jyjb_35{flex:1}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._tableContent_1jyjb_38{position:relative}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41{display:flex;align-items:center;gap:4px}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41 ._headerCellText_1jyjb_46{flex:1}._superTable_1jyjb_1 ._tableWrapper_1jyjb_19 ._headerCell_1jyjb_41 ._headerCellTooltipIcon_1jyjb_49{cursor:pointer}._sceneOpBtnWrapper_1jyjb_53{border-top:1px solid #d9d9d9;padding-top:8px}._sceneOpBtnWrapper_1jyjb_53 ._sceneOpBtn_1jyjb_53{text-align:left}.antd-super-table .ant-table-body{overflow-y:auto!important}.antd-super-table .ant-table-cell{padding:12px!important}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { h as W, defineComponent as
|
|
6
|
-
import
|
|
7
|
-
import { DownOutlined as
|
|
8
|
-
import { slice as
|
|
9
|
-
import { useLocalStorage as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { v5 as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
2
|
+
var an = Object.defineProperty;
|
|
3
|
+
var sn = (t, e, o) => e in t ? an(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
4
|
+
var Be = (t, e, o) => sn(t, typeof e != "symbol" ? e + "" : e, o);
|
|
5
|
+
import { h as W, defineComponent as pe, computed as F, resolveComponent as L, createElementBlock as q, openBlock as k, normalizeClass as b, unref as y, createCommentVNode as j, Fragment as Oe, renderList as ct, normalizeStyle as ne, renderSlot as ge, createBlock as N, withCtx as C, createVNode as E, createTextVNode as J, toDisplayString as be, createElementVNode as z, withMemo as Mt, resolveDynamicComponent as Ge, normalizeProps as at, mergeProps as le, ref as oe, watchEffect as _t, watch as we, useAttrs as ln, reactive as Ke, toRaw as ye, createApp as cn, onBeforeUnmount as un, getCurrentInstance as dn, markRaw as pn, shallowRef as mn, onMounted as fn, createSlots as hn, nextTick as yn } from "vue";
|
|
6
|
+
import gn, { theme as bn, Form as vn, RangePicker as Cn, DatePicker as _n, TreeSelect as En, Cascader as Sn, Select as xn, InputNumber as wn, Input as $n, Empty as kn, ConfigProvider as In, message as st } from "ant-design-vue";
|
|
7
|
+
import { DownOutlined as Bt, HolderOutlined as Ae, EyeOutlined as On, SettingOutlined as An, VerticalAlignBottomOutlined as Et, PushpinOutlined as St, VerticalAlignTopOutlined as xt, MinusCircleOutlined as wt, PlusOutlined as Rt, UpOutlined as Pn, PlusCircleFilled as Tn, SettingFilled as Ln, FilterFilled as Dn, ReloadOutlined as Fn, InfoCircleFilled as Mn } from "@ant-design/icons-vue";
|
|
8
|
+
import { slice as $t, isFunction as $e, get as Qe, castArray as De, debounce as ft, pick as ke, omit as jt, set as Ne, cloneDeep as lt, sortBy as ut, unionBy as kt, uniqueId as Bn, merge as Rn } from "lodash-es";
|
|
9
|
+
import { useLocalStorage as jn, useStorage as Nn } from "@vueuse/core";
|
|
10
|
+
import Ue from "dayjs";
|
|
11
|
+
import Un from "sortablejs";
|
|
12
|
+
import Nt from "async-validator";
|
|
13
|
+
import { v5 as zn } from "uuid";
|
|
14
|
+
import je from "vuedraggable";
|
|
15
|
+
const Hn = {
|
|
16
16
|
// Options.jsx
|
|
17
17
|
items_per_page: "条/页",
|
|
18
18
|
jump_to: "跳至",
|
|
@@ -26,16 +26,16 @@ const jn = {
|
|
|
26
26
|
prev_3: "向前 3 页",
|
|
27
27
|
next_3: "向后 3 页"
|
|
28
28
|
};
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function Xe() {
|
|
30
|
+
return Xe = Object.assign ? Object.assign.bind() : function(t) {
|
|
31
31
|
for (var e = 1; e < arguments.length; e++) {
|
|
32
32
|
var o = arguments[e];
|
|
33
33
|
for (var n in o) ({}).hasOwnProperty.call(o, n) && (t[n] = o[n]);
|
|
34
34
|
}
|
|
35
35
|
return t;
|
|
36
|
-
},
|
|
36
|
+
}, Xe.apply(null, arguments);
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const qn = {
|
|
39
39
|
locale: "zh_CN",
|
|
40
40
|
today: "今天",
|
|
41
41
|
now: "此刻",
|
|
@@ -62,11 +62,11 @@ const Nn = {
|
|
|
62
62
|
nextDecade: "下一年代",
|
|
63
63
|
previousCentury: "上一世纪",
|
|
64
64
|
nextCentury: "下一世纪"
|
|
65
|
-
},
|
|
65
|
+
}, Ut = {
|
|
66
66
|
placeholder: "请选择时间",
|
|
67
67
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
68
68
|
}, dt = {
|
|
69
|
-
lang:
|
|
69
|
+
lang: Xe({
|
|
70
70
|
placeholder: "请选择日期",
|
|
71
71
|
yearPlaceholder: "请选择年份",
|
|
72
72
|
quarterPlaceholder: "请选择季度",
|
|
@@ -77,15 +77,15 @@ const Nn = {
|
|
|
77
77
|
rangeMonthPlaceholder: ["开始月份", "结束月份"],
|
|
78
78
|
rangeQuarterPlaceholder: ["开始季度", "结束季度"],
|
|
79
79
|
rangeWeekPlaceholder: ["开始周", "结束周"]
|
|
80
|
-
},
|
|
81
|
-
timePickerLocale:
|
|
80
|
+
}, qn),
|
|
81
|
+
timePickerLocale: Xe({}, Ut)
|
|
82
82
|
};
|
|
83
83
|
dt.lang.ok = "确定";
|
|
84
|
-
const
|
|
84
|
+
const ue = "${label}不是一个有效的${type}", zt = {
|
|
85
85
|
locale: "zh-cn",
|
|
86
|
-
Pagination:
|
|
86
|
+
Pagination: Hn,
|
|
87
87
|
DatePicker: dt,
|
|
88
|
-
TimePicker:
|
|
88
|
+
TimePicker: Ut,
|
|
89
89
|
Calendar: dt,
|
|
90
90
|
// locales for all components
|
|
91
91
|
global: {
|
|
@@ -169,19 +169,19 @@ const ce = "${label}不是一个有效的${type}", Ut = {
|
|
|
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: ue,
|
|
173
|
+
method: ue,
|
|
174
|
+
array: ue,
|
|
175
|
+
object: ue,
|
|
176
|
+
number: ue,
|
|
177
|
+
date: ue,
|
|
178
|
+
boolean: ue,
|
|
179
|
+
integer: ue,
|
|
180
|
+
float: ue,
|
|
181
|
+
regexp: ue,
|
|
182
|
+
email: ue,
|
|
183
|
+
url: ue,
|
|
184
|
+
hex: ue
|
|
185
185
|
},
|
|
186
186
|
string: {
|
|
187
187
|
len: "${label}须为${len}个字符",
|
|
@@ -215,29 +215,29 @@ const ce = "${label}不是一个有效的${type}", Ut = {
|
|
|
215
215
|
scanned: "已扫描"
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
var
|
|
219
|
-
function
|
|
220
|
-
return
|
|
218
|
+
var We = { exports: {} }, Yn = We.exports, It;
|
|
219
|
+
function Vn() {
|
|
220
|
+
return It || (It = 1, function(t, e) {
|
|
221
221
|
(function(o, n) {
|
|
222
|
-
t.exports = n(
|
|
223
|
-
})(
|
|
222
|
+
t.exports = n(Ue);
|
|
223
|
+
})(Yn, function(o) {
|
|
224
224
|
function n(l) {
|
|
225
225
|
return l && typeof l == "object" && "default" in l ? l : { default: l };
|
|
226
226
|
}
|
|
227
|
-
var r = n(o), s = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(l,
|
|
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(l,
|
|
230
|
-
var p = 100 * l +
|
|
227
|
+
var r = n(o), s = { name: "zh-cn", weekdays: "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"), weekdaysShort: "周日_周一_周二_周三_周四_周五_周六".split("_"), weekdaysMin: "日_一_二_三_四_五_六".split("_"), months: "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"), monthsShort: "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"), ordinal: function(l, c) {
|
|
228
|
+
return c === "W" ? l + "周" : l + "日";
|
|
229
|
+
}, weekStart: 1, yearStart: 4, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "YYYY/MM/DD", LL: "YYYY年M月D日", LLL: "YYYY年M月D日Ah点mm分", LLLL: "YYYY年M月D日ddddAh点mm分", l: "YYYY/M/D", ll: "YYYY年M月D日", lll: "YYYY年M月D日 HH:mm", llll: "YYYY年M月D日dddd HH:mm" }, relativeTime: { future: "%s内", past: "%s前", s: "几秒", m: "1 分钟", mm: "%d 分钟", h: "1 小时", hh: "%d 小时", d: "1 天", dd: "%d 天", M: "1 个月", MM: "%d 个月", y: "1 年", yy: "%d 年" }, meridiem: function(l, c) {
|
|
230
|
+
var p = 100 * l + c;
|
|
231
231
|
return p < 600 ? "凌晨" : p < 900 ? "早上" : p < 1100 ? "上午" : p < 1300 ? "中午" : p < 1800 ? "下午" : "晚上";
|
|
232
232
|
} };
|
|
233
233
|
return r.default.locale(s, null, !0), s;
|
|
234
234
|
});
|
|
235
|
-
}(
|
|
235
|
+
}(We)), We.exports;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
const { defaultAlgorithm:
|
|
239
|
-
var
|
|
240
|
-
const Ht = Object.values(
|
|
237
|
+
Vn();
|
|
238
|
+
const { defaultAlgorithm: Wn, defaultSeed: Gn } = bn, re = Wn(Gn);
|
|
239
|
+
var ve = /* @__PURE__ */ ((t) => (t.order = "_order", t.orderInScene = "_orderInScene", t.defaultValue = "_defaultValue", t.selected = "_selected", t))(ve || {});
|
|
240
|
+
const Ht = Object.values(ve), G = {
|
|
241
241
|
/** 文本(默认)*/
|
|
242
242
|
text: "text",
|
|
243
243
|
/** 链接 */
|
|
@@ -273,7 +273,7 @@ const Ht = Object.values(ge), G = {
|
|
|
273
273
|
rangePicker: "rangePicker",
|
|
274
274
|
/** 自定义组件 */
|
|
275
275
|
component: "component"
|
|
276
|
-
},
|
|
276
|
+
}, de = {
|
|
277
277
|
/** 新增 */
|
|
278
278
|
create: "create",
|
|
279
279
|
/** 更新 */
|
|
@@ -281,7 +281,7 @@ const Ht = Object.values(ge), G = {
|
|
|
281
281
|
/** 设置查询条件 */
|
|
282
282
|
search: "search"
|
|
283
283
|
}, pt = ["key", "index", "width", "visible", "fixed"];
|
|
284
|
-
class
|
|
284
|
+
class Kn {
|
|
285
285
|
/**
|
|
286
286
|
* @callback HookCallback
|
|
287
287
|
* @this {*|Jsep} this
|
|
@@ -324,7 +324,7 @@ class Yn {
|
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
class
|
|
327
|
+
class Qn {
|
|
328
328
|
constructor(e) {
|
|
329
329
|
this.jsep = e, this.registered = {};
|
|
330
330
|
}
|
|
@@ -351,7 +351,7 @@ class Vn {
|
|
|
351
351
|
});
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
class
|
|
354
|
+
class u {
|
|
355
355
|
/**
|
|
356
356
|
* @returns {string}
|
|
357
357
|
*/
|
|
@@ -362,7 +362,7 @@ class c {
|
|
|
362
362
|
* @returns {string}
|
|
363
363
|
*/
|
|
364
364
|
static toString() {
|
|
365
|
-
return "JavaScript Expression Parser (JSEP) v" +
|
|
365
|
+
return "JavaScript Expression Parser (JSEP) v" + u.version;
|
|
366
366
|
}
|
|
367
367
|
// ==================== CONFIG ================================
|
|
368
368
|
/**
|
|
@@ -371,7 +371,7 @@ class c {
|
|
|
371
371
|
* @returns {Jsep}
|
|
372
372
|
*/
|
|
373
373
|
static addUnaryOp(e) {
|
|
374
|
-
return
|
|
374
|
+
return u.max_unop_len = Math.max(e.length, u.max_unop_len), u.unary_ops[e] = 1, u;
|
|
375
375
|
}
|
|
376
376
|
/**
|
|
377
377
|
* @method jsep.addBinaryOp
|
|
@@ -381,7 +381,7 @@ class c {
|
|
|
381
381
|
* @returns {Jsep}
|
|
382
382
|
*/
|
|
383
383
|
static addBinaryOp(e, o, n) {
|
|
384
|
-
return
|
|
384
|
+
return u.max_binop_len = Math.max(e.length, u.max_binop_len), u.binary_ops[e] = o, n ? u.right_associative.add(e) : u.right_associative.delete(e), u;
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
* @method addIdentifierChar
|
|
@@ -389,7 +389,7 @@ class c {
|
|
|
389
389
|
* @returns {Jsep}
|
|
390
390
|
*/
|
|
391
391
|
static addIdentifierChar(e) {
|
|
392
|
-
return
|
|
392
|
+
return u.additional_identifier_chars.add(e), u;
|
|
393
393
|
}
|
|
394
394
|
/**
|
|
395
395
|
* @method addLiteral
|
|
@@ -398,7 +398,7 @@ class c {
|
|
|
398
398
|
* @returns {Jsep}
|
|
399
399
|
*/
|
|
400
400
|
static addLiteral(e, o) {
|
|
401
|
-
return
|
|
401
|
+
return u.literals[e] = o, u;
|
|
402
402
|
}
|
|
403
403
|
/**
|
|
404
404
|
* @method removeUnaryOp
|
|
@@ -406,14 +406,14 @@ class c {
|
|
|
406
406
|
* @returns {Jsep}
|
|
407
407
|
*/
|
|
408
408
|
static removeUnaryOp(e) {
|
|
409
|
-
return delete
|
|
409
|
+
return delete u.unary_ops[e], e.length === u.max_unop_len && (u.max_unop_len = u.getMaxKeyLen(u.unary_ops)), u;
|
|
410
410
|
}
|
|
411
411
|
/**
|
|
412
412
|
* @method removeAllUnaryOps
|
|
413
413
|
* @returns {Jsep}
|
|
414
414
|
*/
|
|
415
415
|
static removeAllUnaryOps() {
|
|
416
|
-
return
|
|
416
|
+
return u.unary_ops = {}, u.max_unop_len = 0, u;
|
|
417
417
|
}
|
|
418
418
|
/**
|
|
419
419
|
* @method removeIdentifierChar
|
|
@@ -421,7 +421,7 @@ class c {
|
|
|
421
421
|
* @returns {Jsep}
|
|
422
422
|
*/
|
|
423
423
|
static removeIdentifierChar(e) {
|
|
424
|
-
return
|
|
424
|
+
return u.additional_identifier_chars.delete(e), u;
|
|
425
425
|
}
|
|
426
426
|
/**
|
|
427
427
|
* @method removeBinaryOp
|
|
@@ -429,14 +429,14 @@ class c {
|
|
|
429
429
|
* @returns {Jsep}
|
|
430
430
|
*/
|
|
431
431
|
static removeBinaryOp(e) {
|
|
432
|
-
return delete
|
|
432
|
+
return delete u.binary_ops[e], e.length === u.max_binop_len && (u.max_binop_len = u.getMaxKeyLen(u.binary_ops)), u.right_associative.delete(e), u;
|
|
433
433
|
}
|
|
434
434
|
/**
|
|
435
435
|
* @method removeAllBinaryOps
|
|
436
436
|
* @returns {Jsep}
|
|
437
437
|
*/
|
|
438
438
|
static removeAllBinaryOps() {
|
|
439
|
-
return
|
|
439
|
+
return u.binary_ops = {}, u.max_binop_len = 0, u;
|
|
440
440
|
}
|
|
441
441
|
/**
|
|
442
442
|
* @method removeLiteral
|
|
@@ -444,14 +444,14 @@ class c {
|
|
|
444
444
|
* @returns {Jsep}
|
|
445
445
|
*/
|
|
446
446
|
static removeLiteral(e) {
|
|
447
|
-
return delete
|
|
447
|
+
return delete u.literals[e], u;
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
450
|
* @method removeAllLiterals
|
|
451
451
|
* @returns {Jsep}
|
|
452
452
|
*/
|
|
453
453
|
static removeAllLiterals() {
|
|
454
|
-
return
|
|
454
|
+
return u.literals = {}, u;
|
|
455
455
|
}
|
|
456
456
|
// ==================== END CONFIG ============================
|
|
457
457
|
/**
|
|
@@ -478,7 +478,7 @@ class c {
|
|
|
478
478
|
* @returns {jsep.Expression}
|
|
479
479
|
*/
|
|
480
480
|
static parse(e) {
|
|
481
|
-
return new
|
|
481
|
+
return new u(e).parse();
|
|
482
482
|
}
|
|
483
483
|
/**
|
|
484
484
|
* Get the longest key length of any object
|
|
@@ -502,7 +502,7 @@ class c {
|
|
|
502
502
|
* @returns {number}
|
|
503
503
|
*/
|
|
504
504
|
static binaryPrecedence(e) {
|
|
505
|
-
return
|
|
505
|
+
return u.binary_ops[e] || 0;
|
|
506
506
|
}
|
|
507
507
|
/**
|
|
508
508
|
* Looks for start of identifier
|
|
@@ -512,15 +512,15 @@ class c {
|
|
|
512
512
|
static isIdentifierStart(e) {
|
|
513
513
|
return e >= 65 && e <= 90 || // A...Z
|
|
514
514
|
e >= 97 && e <= 122 || // a...z
|
|
515
|
-
e >= 128 && !
|
|
516
|
-
|
|
515
|
+
e >= 128 && !u.binary_ops[String.fromCharCode(e)] || // any non-ASCII that is not an operator
|
|
516
|
+
u.additional_identifier_chars.has(String.fromCharCode(e));
|
|
517
517
|
}
|
|
518
518
|
/**
|
|
519
519
|
* @param {number} ch
|
|
520
520
|
* @returns {boolean}
|
|
521
521
|
*/
|
|
522
522
|
static isIdentifierPart(e) {
|
|
523
|
-
return
|
|
523
|
+
return u.isIdentifierStart(e) || u.isDecimalDigit(e);
|
|
524
524
|
}
|
|
525
525
|
/**
|
|
526
526
|
* throw error at index of the expression
|
|
@@ -538,12 +538,12 @@ class c {
|
|
|
538
538
|
* @returns {?jsep.Expression}
|
|
539
539
|
*/
|
|
540
540
|
runHook(e, o) {
|
|
541
|
-
if (
|
|
541
|
+
if (u.hooks[e]) {
|
|
542
542
|
const n = {
|
|
543
543
|
context: this,
|
|
544
544
|
node: o
|
|
545
545
|
};
|
|
546
|
-
return
|
|
546
|
+
return u.hooks.run(e, n), n.node;
|
|
547
547
|
}
|
|
548
548
|
return o;
|
|
549
549
|
}
|
|
@@ -553,11 +553,11 @@ class c {
|
|
|
553
553
|
* @returns {?jsep.Expression}
|
|
554
554
|
*/
|
|
555
555
|
searchHook(e) {
|
|
556
|
-
if (
|
|
556
|
+
if (u.hooks[e]) {
|
|
557
557
|
const o = {
|
|
558
558
|
context: this
|
|
559
559
|
};
|
|
560
|
-
return
|
|
560
|
+
return u.hooks[e].find(function(n) {
|
|
561
561
|
return n.call(o.context, o), o.node;
|
|
562
562
|
}), o.node;
|
|
563
563
|
}
|
|
@@ -567,7 +567,7 @@ class c {
|
|
|
567
567
|
*/
|
|
568
568
|
gobbleSpaces() {
|
|
569
569
|
let e = this.code;
|
|
570
|
-
for (; e ===
|
|
570
|
+
for (; e === u.SPACE_CODE || e === u.TAB_CODE || e === u.LF_CODE || e === u.CR_CODE; )
|
|
571
571
|
e = this.expr.charCodeAt(++this.index);
|
|
572
572
|
this.runHook("gobble-spaces");
|
|
573
573
|
}
|
|
@@ -578,7 +578,7 @@ class c {
|
|
|
578
578
|
parse() {
|
|
579
579
|
this.runHook("before-all");
|
|
580
580
|
const e = this.gobbleExpressions(), o = e.length === 1 ? e[0] : {
|
|
581
|
-
type:
|
|
581
|
+
type: u.COMPOUND,
|
|
582
582
|
body: e
|
|
583
583
|
};
|
|
584
584
|
return this.runHook("after-all", o);
|
|
@@ -591,7 +591,7 @@ class c {
|
|
|
591
591
|
gobbleExpressions(e) {
|
|
592
592
|
let o = [], n, r;
|
|
593
593
|
for (; this.index < this.expr.length; )
|
|
594
|
-
if (n = this.code, n ===
|
|
594
|
+
if (n = this.code, n === u.SEMCOL_CODE || n === u.COMMA_CODE)
|
|
595
595
|
this.index++;
|
|
596
596
|
else if (r = this.gobbleExpression())
|
|
597
597
|
o.push(r);
|
|
@@ -619,9 +619,9 @@ class c {
|
|
|
619
619
|
*/
|
|
620
620
|
gobbleBinaryOp() {
|
|
621
621
|
this.gobbleSpaces();
|
|
622
|
-
let e = this.expr.substr(this.index,
|
|
622
|
+
let e = this.expr.substr(this.index, u.max_binop_len), o = e.length;
|
|
623
623
|
for (; o > 0; ) {
|
|
624
|
-
if (
|
|
624
|
+
if (u.binary_ops.hasOwnProperty(e) && (!u.isIdentifierStart(this.code) || this.index + e.length < this.expr.length && !u.isIdentifierPart(this.expr.charCodeAt(this.index + e.length))))
|
|
625
625
|
return this.index += o, e;
|
|
626
626
|
e = e.substr(0, --o);
|
|
627
627
|
}
|
|
@@ -633,36 +633,36 @@ class c {
|
|
|
633
633
|
* @returns {?jsep.BinaryExpression}
|
|
634
634
|
*/
|
|
635
635
|
gobbleBinaryExpression() {
|
|
636
|
-
let e, o, n, r, s, l,
|
|
636
|
+
let e, o, n, r, s, l, c, p, f;
|
|
637
637
|
if (l = this.gobbleToken(), !l || (o = this.gobbleBinaryOp(), !o))
|
|
638
638
|
return l;
|
|
639
639
|
for (s = {
|
|
640
640
|
value: o,
|
|
641
|
-
prec:
|
|
642
|
-
right_a:
|
|
643
|
-
},
|
|
644
|
-
if (n =
|
|
641
|
+
prec: u.binaryPrecedence(o),
|
|
642
|
+
right_a: u.right_associative.has(o)
|
|
643
|
+
}, c = this.gobbleToken(), c || this.throwError("Expected expression after " + o), r = [l, s, c]; o = this.gobbleBinaryOp(); ) {
|
|
644
|
+
if (n = u.binaryPrecedence(o), n === 0) {
|
|
645
645
|
this.index -= o.length;
|
|
646
646
|
break;
|
|
647
647
|
}
|
|
648
648
|
s = {
|
|
649
649
|
value: o,
|
|
650
650
|
prec: n,
|
|
651
|
-
right_a:
|
|
651
|
+
right_a: u.right_associative.has(o)
|
|
652
652
|
}, f = o;
|
|
653
|
-
const v = (
|
|
653
|
+
const v = (g) => s.right_a && g.right_a ? n > g.prec : n <= g.prec;
|
|
654
654
|
for (; r.length > 2 && v(r[r.length - 2]); )
|
|
655
|
-
|
|
656
|
-
type:
|
|
655
|
+
c = r.pop(), o = r.pop().value, l = r.pop(), e = {
|
|
656
|
+
type: u.BINARY_EXP,
|
|
657
657
|
operator: o,
|
|
658
658
|
left: l,
|
|
659
|
-
right:
|
|
659
|
+
right: c
|
|
660
660
|
}, r.push(e);
|
|
661
661
|
e = this.gobbleToken(), e || this.throwError("Expected expression after " + f), r.push(s, e);
|
|
662
662
|
}
|
|
663
663
|
for (p = r.length - 1, e = r[p]; p > 1; )
|
|
664
664
|
e = {
|
|
665
|
-
type:
|
|
665
|
+
type: u.BINARY_EXP,
|
|
666
666
|
operator: r[p - 1].value,
|
|
667
667
|
left: r[p - 2],
|
|
668
668
|
right: e
|
|
@@ -678,19 +678,19 @@ class c {
|
|
|
678
678
|
let e, o, n, r;
|
|
679
679
|
if (this.gobbleSpaces(), r = this.searchHook("gobble-token"), r)
|
|
680
680
|
return this.runHook("after-token", r);
|
|
681
|
-
if (e = this.code,
|
|
681
|
+
if (e = this.code, u.isDecimalDigit(e) || e === u.PERIOD_CODE)
|
|
682
682
|
return this.gobbleNumericLiteral();
|
|
683
|
-
if (e ===
|
|
683
|
+
if (e === u.SQUOTE_CODE || e === u.DQUOTE_CODE)
|
|
684
684
|
r = this.gobbleStringLiteral();
|
|
685
|
-
else if (e ===
|
|
685
|
+
else if (e === u.OBRACK_CODE)
|
|
686
686
|
r = this.gobbleArray();
|
|
687
687
|
else {
|
|
688
|
-
for (o = this.expr.substr(this.index,
|
|
689
|
-
if (
|
|
688
|
+
for (o = this.expr.substr(this.index, u.max_unop_len), n = o.length; n > 0; ) {
|
|
689
|
+
if (u.unary_ops.hasOwnProperty(o) && (!u.isIdentifierStart(this.code) || this.index + o.length < this.expr.length && !u.isIdentifierPart(this.expr.charCodeAt(this.index + o.length)))) {
|
|
690
690
|
this.index += n;
|
|
691
691
|
const s = this.gobbleToken();
|
|
692
692
|
return s || this.throwError("missing unaryOp argument"), this.runHook("after-token", {
|
|
693
|
-
type:
|
|
693
|
+
type: u.UNARY_EXP,
|
|
694
694
|
operator: o,
|
|
695
695
|
argument: s,
|
|
696
696
|
prefix: !0
|
|
@@ -698,13 +698,13 @@ class c {
|
|
|
698
698
|
}
|
|
699
699
|
o = o.substr(0, --n);
|
|
700
700
|
}
|
|
701
|
-
|
|
702
|
-
type:
|
|
703
|
-
value:
|
|
701
|
+
u.isIdentifierStart(e) ? (r = this.gobbleIdentifier(), u.literals.hasOwnProperty(r.name) ? r = {
|
|
702
|
+
type: u.LITERAL,
|
|
703
|
+
value: u.literals[r.name],
|
|
704
704
|
raw: r.name
|
|
705
|
-
} : r.name ===
|
|
706
|
-
type:
|
|
707
|
-
})) : e ===
|
|
705
|
+
} : r.name === u.this_str && (r = {
|
|
706
|
+
type: u.THIS_EXP
|
|
707
|
+
})) : e === u.OPAREN_CODE && (r = this.gobbleGroup());
|
|
708
708
|
}
|
|
709
709
|
return r ? (r = this.gobbleTokenProperty(r), this.runHook("after-token", r)) : this.runHook("after-token", !1);
|
|
710
710
|
}
|
|
@@ -719,24 +719,24 @@ class c {
|
|
|
719
719
|
gobbleTokenProperty(e) {
|
|
720
720
|
this.gobbleSpaces();
|
|
721
721
|
let o = this.code;
|
|
722
|
-
for (; o ===
|
|
722
|
+
for (; o === u.PERIOD_CODE || o === u.OBRACK_CODE || o === u.OPAREN_CODE || o === u.QUMARK_CODE; ) {
|
|
723
723
|
let n;
|
|
724
|
-
if (o ===
|
|
725
|
-
if (this.expr.charCodeAt(this.index + 1) !==
|
|
724
|
+
if (o === u.QUMARK_CODE) {
|
|
725
|
+
if (this.expr.charCodeAt(this.index + 1) !== u.PERIOD_CODE)
|
|
726
726
|
break;
|
|
727
727
|
n = !0, this.index += 2, this.gobbleSpaces(), o = this.code;
|
|
728
728
|
}
|
|
729
|
-
this.index++, o ===
|
|
730
|
-
type:
|
|
729
|
+
this.index++, o === u.OBRACK_CODE ? (e = {
|
|
730
|
+
type: u.MEMBER_EXP,
|
|
731
731
|
computed: !0,
|
|
732
732
|
object: e,
|
|
733
733
|
property: this.gobbleExpression()
|
|
734
|
-
}, e.property || this.throwError('Unexpected "' + this.char + '"'), this.gobbleSpaces(), o = this.code, o !==
|
|
735
|
-
type:
|
|
736
|
-
arguments: this.gobbleArguments(
|
|
734
|
+
}, e.property || this.throwError('Unexpected "' + this.char + '"'), this.gobbleSpaces(), o = this.code, o !== u.CBRACK_CODE && this.throwError("Unclosed ["), this.index++) : o === u.OPAREN_CODE ? e = {
|
|
735
|
+
type: u.CALL_EXP,
|
|
736
|
+
arguments: this.gobbleArguments(u.CPAREN_CODE),
|
|
737
737
|
callee: e
|
|
738
|
-
} : (o ===
|
|
739
|
-
type:
|
|
738
|
+
} : (o === u.PERIOD_CODE || n) && (n && this.index--, this.gobbleSpaces(), e = {
|
|
739
|
+
type: u.MEMBER_EXP,
|
|
740
740
|
computed: !1,
|
|
741
741
|
object: e,
|
|
742
742
|
property: this.gobbleIdentifier()
|
|
@@ -751,18 +751,18 @@ class c {
|
|
|
751
751
|
*/
|
|
752
752
|
gobbleNumericLiteral() {
|
|
753
753
|
let e = "", o, n;
|
|
754
|
-
for (;
|
|
754
|
+
for (; u.isDecimalDigit(this.code); )
|
|
755
755
|
e += this.expr.charAt(this.index++);
|
|
756
|
-
if (this.code ===
|
|
757
|
-
for (e += this.expr.charAt(this.index++);
|
|
756
|
+
if (this.code === u.PERIOD_CODE)
|
|
757
|
+
for (e += this.expr.charAt(this.index++); u.isDecimalDigit(this.code); )
|
|
758
758
|
e += this.expr.charAt(this.index++);
|
|
759
759
|
if (o = this.char, o === "e" || o === "E") {
|
|
760
|
-
for (e += this.expr.charAt(this.index++), o = this.char, (o === "+" || o === "-") && (e += this.expr.charAt(this.index++));
|
|
760
|
+
for (e += this.expr.charAt(this.index++), o = this.char, (o === "+" || o === "-") && (e += this.expr.charAt(this.index++)); u.isDecimalDigit(this.code); )
|
|
761
761
|
e += this.expr.charAt(this.index++);
|
|
762
|
-
|
|
762
|
+
u.isDecimalDigit(this.expr.charCodeAt(this.index - 1)) || this.throwError("Expected exponent (" + e + this.char + ")");
|
|
763
763
|
}
|
|
764
|
-
return n = this.code,
|
|
765
|
-
type:
|
|
764
|
+
return n = this.code, u.isIdentifierStart(n) ? this.throwError("Variable names cannot start with a number (" + e + this.char + ")") : (n === u.PERIOD_CODE || e.length === 1 && e.charCodeAt(0) === u.PERIOD_CODE) && this.throwError("Unexpected period"), {
|
|
765
|
+
type: u.LITERAL,
|
|
766
766
|
value: parseFloat(e),
|
|
767
767
|
raw: e
|
|
768
768
|
};
|
|
@@ -809,7 +809,7 @@ class c {
|
|
|
809
809
|
e += s;
|
|
810
810
|
}
|
|
811
811
|
return r || this.throwError('Unclosed quote after "' + e + '"'), {
|
|
812
|
-
type:
|
|
812
|
+
type: u.LITERAL,
|
|
813
813
|
value: e,
|
|
814
814
|
raw: this.expr.substring(o, this.index)
|
|
815
815
|
};
|
|
@@ -823,10 +823,10 @@ class c {
|
|
|
823
823
|
*/
|
|
824
824
|
gobbleIdentifier() {
|
|
825
825
|
let e = this.code, o = this.index;
|
|
826
|
-
for (
|
|
826
|
+
for (u.isIdentifierStart(e) ? this.index++ : this.throwError("Unexpected " + this.char); this.index < this.expr.length && (e = this.code, u.isIdentifierPart(e)); )
|
|
827
827
|
this.index++;
|
|
828
828
|
return {
|
|
829
|
-
type:
|
|
829
|
+
type: u.IDENTIFIER,
|
|
830
830
|
name: this.expr.slice(o, this.index)
|
|
831
831
|
};
|
|
832
832
|
}
|
|
@@ -846,13 +846,13 @@ class c {
|
|
|
846
846
|
this.gobbleSpaces();
|
|
847
847
|
let s = this.code;
|
|
848
848
|
if (s === e) {
|
|
849
|
-
n = !0, this.index++, e ===
|
|
849
|
+
n = !0, this.index++, e === u.CPAREN_CODE && r && r >= o.length && this.throwError("Unexpected token " + String.fromCharCode(e));
|
|
850
850
|
break;
|
|
851
|
-
} else if (s ===
|
|
851
|
+
} else if (s === u.COMMA_CODE) {
|
|
852
852
|
if (this.index++, r++, r !== o.length) {
|
|
853
|
-
if (e ===
|
|
853
|
+
if (e === u.CPAREN_CODE)
|
|
854
854
|
this.throwError("Unexpected token ,");
|
|
855
|
-
else if (e ===
|
|
855
|
+
else if (e === u.CBRACK_CODE)
|
|
856
856
|
for (let l = o.length; l < r; l++)
|
|
857
857
|
o.push(null);
|
|
858
858
|
}
|
|
@@ -860,7 +860,7 @@ class c {
|
|
|
860
860
|
this.throwError("Expected comma");
|
|
861
861
|
else {
|
|
862
862
|
const l = this.gobbleExpression();
|
|
863
|
-
(!l || l.type ===
|
|
863
|
+
(!l || l.type === u.COMPOUND) && this.throwError("Expected comma"), o.push(l);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
return n || this.throwError("Expected " + String.fromCharCode(e)), o;
|
|
@@ -876,10 +876,10 @@ class c {
|
|
|
876
876
|
*/
|
|
877
877
|
gobbleGroup() {
|
|
878
878
|
this.index++;
|
|
879
|
-
let e = this.gobbleExpressions(
|
|
880
|
-
if (this.code ===
|
|
879
|
+
let e = this.gobbleExpressions(u.CPAREN_CODE);
|
|
880
|
+
if (this.code === u.CPAREN_CODE)
|
|
881
881
|
return this.index++, e.length === 1 ? e[0] : e.length ? {
|
|
882
|
-
type:
|
|
882
|
+
type: u.SEQUENCE_EXP,
|
|
883
883
|
expressions: e
|
|
884
884
|
} : !1;
|
|
885
885
|
this.throwError("Unclosed (");
|
|
@@ -892,15 +892,15 @@ class c {
|
|
|
892
892
|
*/
|
|
893
893
|
gobbleArray() {
|
|
894
894
|
return this.index++, {
|
|
895
|
-
type:
|
|
896
|
-
elements: this.gobbleArguments(
|
|
895
|
+
type: u.ARRAY_EXP,
|
|
896
|
+
elements: this.gobbleArguments(u.CBRACK_CODE)
|
|
897
897
|
};
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
|
-
const
|
|
901
|
-
Object.assign(
|
|
902
|
-
hooks:
|
|
903
|
-
plugins: new
|
|
900
|
+
const Xn = new Kn();
|
|
901
|
+
Object.assign(u, {
|
|
902
|
+
hooks: Xn,
|
|
903
|
+
plugins: new Qn(u),
|
|
904
904
|
// Node Types
|
|
905
905
|
// ----------
|
|
906
906
|
// This is the full set of types that any JSEP node can be.
|
|
@@ -994,16 +994,16 @@ Object.assign(c, {
|
|
|
994
994
|
// Except for `this`, which is special. This could be changed to something like `'self'` as well
|
|
995
995
|
this_str: "this"
|
|
996
996
|
});
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
const Ee = (t) => new
|
|
997
|
+
u.max_unop_len = u.getMaxKeyLen(u.unary_ops);
|
|
998
|
+
u.max_binop_len = u.getMaxKeyLen(u.binary_ops);
|
|
999
|
+
const Ee = (t) => new u(t).parse(), Zn = Object.getOwnPropertyNames(class {
|
|
1000
1000
|
});
|
|
1001
|
-
Object.getOwnPropertyNames(
|
|
1002
|
-
Ee[t] =
|
|
1001
|
+
Object.getOwnPropertyNames(u).filter((t) => !Zn.includes(t) && Ee[t] === void 0).forEach((t) => {
|
|
1002
|
+
Ee[t] = u[t];
|
|
1003
1003
|
});
|
|
1004
|
-
Ee.Jsep =
|
|
1005
|
-
const
|
|
1006
|
-
var
|
|
1004
|
+
Ee.Jsep = u;
|
|
1005
|
+
const Jn = "ConditionalExpression";
|
|
1006
|
+
var eo = {
|
|
1007
1007
|
name: "ternary",
|
|
1008
1008
|
init(t) {
|
|
1009
1009
|
t.hooks.add("after-expression", function(o) {
|
|
@@ -1014,7 +1014,7 @@ var Qn = {
|
|
|
1014
1014
|
this.index++;
|
|
1015
1015
|
const s = this.gobbleExpression();
|
|
1016
1016
|
if (s || this.throwError("Expected expression"), o.node = {
|
|
1017
|
-
type:
|
|
1017
|
+
type: Jn,
|
|
1018
1018
|
test: n,
|
|
1019
1019
|
consequent: r,
|
|
1020
1020
|
alternate: s
|
|
@@ -1030,17 +1030,17 @@ var Qn = {
|
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
|
-
Ee.plugins.register(
|
|
1034
|
-
const
|
|
1035
|
-
var
|
|
1033
|
+
Ee.plugins.register(eo);
|
|
1034
|
+
const Ot = 47, to = 92;
|
|
1035
|
+
var no = {
|
|
1036
1036
|
name: "regex",
|
|
1037
1037
|
init(t) {
|
|
1038
1038
|
t.hooks.add("gobble-token", function(o) {
|
|
1039
|
-
if (this.code ===
|
|
1039
|
+
if (this.code === Ot) {
|
|
1040
1040
|
const n = ++this.index;
|
|
1041
1041
|
let r = !1;
|
|
1042
1042
|
for (; this.index < this.expr.length; ) {
|
|
1043
|
-
if (this.code ===
|
|
1043
|
+
if (this.code === Ot && !r) {
|
|
1044
1044
|
const s = this.expr.slice(n, this.index);
|
|
1045
1045
|
let l = "";
|
|
1046
1046
|
for (; ++this.index < this.expr.length; ) {
|
|
@@ -1050,35 +1050,35 @@ var Zn = {
|
|
|
1050
1050
|
else
|
|
1051
1051
|
break;
|
|
1052
1052
|
}
|
|
1053
|
-
let
|
|
1053
|
+
let c;
|
|
1054
1054
|
try {
|
|
1055
|
-
|
|
1055
|
+
c = new RegExp(s, l);
|
|
1056
1056
|
} catch (p) {
|
|
1057
1057
|
this.throwError(p.message);
|
|
1058
1058
|
}
|
|
1059
1059
|
return o.node = {
|
|
1060
1060
|
type: t.LITERAL,
|
|
1061
|
-
value:
|
|
1061
|
+
value: c,
|
|
1062
1062
|
raw: this.expr.slice(n - 1, this.index)
|
|
1063
1063
|
}, o.node = this.gobbleTokenProperty(o.node), o.node;
|
|
1064
1064
|
}
|
|
1065
|
-
this.code === t.OBRACK_CODE ? r = !0 : r && this.code === t.CBRACK_CODE && (r = !1), this.index += this.code ===
|
|
1065
|
+
this.code === t.OBRACK_CODE ? r = !0 : r && this.code === t.CBRACK_CODE && (r = !1), this.index += this.code === to ? 2 : 1;
|
|
1066
1066
|
}
|
|
1067
1067
|
this.throwError("Unclosed Regex");
|
|
1068
1068
|
}
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
};
|
|
1072
|
-
const it = 43,
|
|
1072
|
+
const it = 43, oo = 45, Le = {
|
|
1073
1073
|
name: "assignment",
|
|
1074
1074
|
assignmentOperators: /* @__PURE__ */ new Set(["=", "*=", "**=", "/=", "%=", "+=", "-=", "<<=", ">>=", ">>>=", "&=", "^=", "|=", "||=", "&&=", "??="]),
|
|
1075
|
-
updateOperators: [it,
|
|
1075
|
+
updateOperators: [it, oo],
|
|
1076
1076
|
assignmentPrecedence: 0.9,
|
|
1077
1077
|
init(t) {
|
|
1078
1078
|
const e = [t.IDENTIFIER, t.MEMBER_EXP];
|
|
1079
|
-
|
|
1079
|
+
Le.assignmentOperators.forEach((n) => t.addBinaryOp(n, Le.assignmentPrecedence, !0)), t.hooks.add("gobble-token", function(r) {
|
|
1080
1080
|
const s = this.code;
|
|
1081
|
-
|
|
1081
|
+
Le.updateOperators.some((l) => l === s && l === this.expr.charCodeAt(this.index + 1)) && (this.index += 2, r.node = {
|
|
1082
1082
|
type: "UpdateExpression",
|
|
1083
1083
|
operator: s === it ? "++" : "--",
|
|
1084
1084
|
argument: this.gobbleTokenProperty(this.gobbleIdentifier()),
|
|
@@ -1087,7 +1087,7 @@ const it = 43, Jn = 45, De = {
|
|
|
1087
1087
|
}), t.hooks.add("after-token", function(r) {
|
|
1088
1088
|
if (r.node) {
|
|
1089
1089
|
const s = this.code;
|
|
1090
|
-
|
|
1090
|
+
Le.updateOperators.some((l) => l === s && l === this.expr.charCodeAt(this.index + 1)) && (e.includes(r.node.type) || this.throwError(`Unexpected ${r.node.operator}`), this.index += 2, r.node = {
|
|
1091
1091
|
type: "UpdateExpression",
|
|
1092
1092
|
operator: s === it ? "++" : "--",
|
|
1093
1093
|
argument: r.node,
|
|
@@ -1098,17 +1098,17 @@ const it = 43, Jn = 45, De = {
|
|
|
1098
1098
|
r.node && o(r.node);
|
|
1099
1099
|
});
|
|
1100
1100
|
function o(n) {
|
|
1101
|
-
|
|
1101
|
+
Le.assignmentOperators.has(n.operator) ? (n.type = "AssignmentExpression", o(n.left), o(n.right)) : n.operator || Object.values(n).forEach((r) => {
|
|
1102
1102
|
r && typeof r == "object" && o(r);
|
|
1103
1103
|
});
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
};
|
|
1107
|
-
Ee.plugins.register(
|
|
1107
|
+
Ee.plugins.register(no, Le);
|
|
1108
1108
|
Ee.addUnaryOp("typeof");
|
|
1109
1109
|
Ee.addLiteral("null", null);
|
|
1110
1110
|
Ee.addLiteral("undefined", void 0);
|
|
1111
|
-
const
|
|
1111
|
+
const ro = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter__", "__defineSetter__"]), Y = {
|
|
1112
1112
|
/**
|
|
1113
1113
|
* @param {jsep.Expression} ast
|
|
1114
1114
|
* @param {Record<string, any>} subs
|
|
@@ -1197,7 +1197,7 @@ const eo = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter_
|
|
|
1197
1197
|
), n = Y.evalAst(t.object, e);
|
|
1198
1198
|
if (n == null)
|
|
1199
1199
|
throw TypeError(`Cannot read properties of ${n} (reading '${o}')`);
|
|
1200
|
-
if (!Object.hasOwn(n, o) &&
|
|
1200
|
+
if (!Object.hasOwn(n, o) && ro.has(o))
|
|
1201
1201
|
throw TypeError(`Cannot read properties of ${n} (reading '${o}')`);
|
|
1202
1202
|
const r = n[o];
|
|
1203
1203
|
return typeof r == "function" ? r.bind(n) : r;
|
|
@@ -1226,7 +1226,7 @@ const eo = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter_
|
|
|
1226
1226
|
return e[o] = n, e[o];
|
|
1227
1227
|
}
|
|
1228
1228
|
};
|
|
1229
|
-
class
|
|
1229
|
+
class ao {
|
|
1230
1230
|
/**
|
|
1231
1231
|
* @param {string} expr Expression to evaluate
|
|
1232
1232
|
*/
|
|
@@ -1249,7 +1249,7 @@ function xe(t, e) {
|
|
|
1249
1249
|
function mt(t, e) {
|
|
1250
1250
|
return e = e.slice(), e.unshift(t), e;
|
|
1251
1251
|
}
|
|
1252
|
-
class
|
|
1252
|
+
class so extends Error {
|
|
1253
1253
|
/**
|
|
1254
1254
|
* @param {AnyResult} value The evaluated scalar value
|
|
1255
1255
|
*/
|
|
@@ -1275,16 +1275,16 @@ function U(t, e, o, n, r) {
|
|
|
1275
1275
|
path: s ? t.path : e
|
|
1276
1276
|
};
|
|
1277
1277
|
s ? "json" in t && (l.json = t.json) : l.json = o;
|
|
1278
|
-
const
|
|
1279
|
-
if (!
|
|
1280
|
-
throw new
|
|
1281
|
-
return
|
|
1278
|
+
const c = this.evaluate(l);
|
|
1279
|
+
if (!c || typeof c != "object")
|
|
1280
|
+
throw new so(c);
|
|
1281
|
+
return c;
|
|
1282
1282
|
}
|
|
1283
1283
|
}
|
|
1284
1284
|
U.prototype.evaluate = function(t, e, o, n) {
|
|
1285
1285
|
let r = this.parent, s = this.parentProperty, {
|
|
1286
1286
|
flatten: l,
|
|
1287
|
-
wrap:
|
|
1287
|
+
wrap: c
|
|
1288
1288
|
} = this;
|
|
1289
1289
|
if (this.currResultType = this.resultType, this.currEval = this.eval, this.currSandbox = this.sandbox, o = o || this.callback, this.currOtherTypeCallback = n || this.otherTypeCallback, e = e || this.json, t = t || this.path, t && typeof t == "object" && !Array.isArray(t)) {
|
|
1290
1290
|
if (!t.path && t.path !== "")
|
|
@@ -1293,7 +1293,7 @@ U.prototype.evaluate = function(t, e, o, n) {
|
|
|
1293
1293
|
throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');
|
|
1294
1294
|
({
|
|
1295
1295
|
json: e
|
|
1296
|
-
} = t), l = Object.hasOwn(t, "flatten") ? t.flatten : l, this.currResultType = Object.hasOwn(t, "resultType") ? t.resultType : this.currResultType, this.currSandbox = Object.hasOwn(t, "sandbox") ? t.sandbox : this.currSandbox,
|
|
1296
|
+
} = t), l = Object.hasOwn(t, "flatten") ? t.flatten : l, this.currResultType = Object.hasOwn(t, "resultType") ? t.resultType : this.currResultType, this.currSandbox = Object.hasOwn(t, "sandbox") ? t.sandbox : this.currSandbox, c = Object.hasOwn(t, "wrap") ? t.wrap : c, this.currEval = Object.hasOwn(t, "eval") ? t.eval : this.currEval, o = Object.hasOwn(t, "callback") ? t.callback : o, this.currOtherTypeCallback = Object.hasOwn(t, "otherTypeCallback") ? t.otherTypeCallback : this.currOtherTypeCallback, r = Object.hasOwn(t, "parent") ? t.parent : r, s = Object.hasOwn(t, "parentProperty") ? t.parentProperty : s, t = t.path;
|
|
1297
1297
|
}
|
|
1298
1298
|
if (r = r || null, s = s || null, Array.isArray(t) && (t = U.toPathString(t)), !t && t !== "" || !e)
|
|
1299
1299
|
return;
|
|
@@ -1302,10 +1302,10 @@ U.prototype.evaluate = function(t, e, o, n) {
|
|
|
1302
1302
|
const f = this._trace(p, e, ["$"], r, s, o).filter(function(v) {
|
|
1303
1303
|
return v && !v.isParentSelector;
|
|
1304
1304
|
});
|
|
1305
|
-
return f.length ? !
|
|
1306
|
-
const
|
|
1307
|
-
return l && Array.isArray(
|
|
1308
|
-
}, []) :
|
|
1305
|
+
return f.length ? !c && f.length === 1 && !f[0].hasArrExpr ? this._getPreferredOutput(f[0]) : f.reduce((v, g) => {
|
|
1306
|
+
const d = this._getPreferredOutput(g);
|
|
1307
|
+
return l && Array.isArray(d) ? v = v.concat(d) : v.push(d), v;
|
|
1308
|
+
}, []) : c ? [] : void 0;
|
|
1309
1309
|
};
|
|
1310
1310
|
U.prototype._getPreferredOutput = function(t) {
|
|
1311
1311
|
const e = this.currResultType;
|
|
@@ -1332,7 +1332,7 @@ U.prototype._handleCallback = function(t, e, o) {
|
|
|
1332
1332
|
t.path = typeof t.path == "string" ? t.path : U.toPathString(t.path), e(n, o, t);
|
|
1333
1333
|
}
|
|
1334
1334
|
};
|
|
1335
|
-
U.prototype._trace = function(t, e, o, n, r, s, l,
|
|
1335
|
+
U.prototype._trace = function(t, e, o, n, r, s, l, c) {
|
|
1336
1336
|
let p;
|
|
1337
1337
|
if (!t.length)
|
|
1338
1338
|
return p = {
|
|
@@ -1342,21 +1342,21 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1342
1342
|
parentProperty: r,
|
|
1343
1343
|
hasArrExpr: l
|
|
1344
1344
|
}, this._handleCallback(p, s, "value"), p;
|
|
1345
|
-
const f = t[0], v = t.slice(1),
|
|
1346
|
-
function
|
|
1347
|
-
Array.isArray(m) ? m.forEach((
|
|
1348
|
-
|
|
1349
|
-
}) :
|
|
1345
|
+
const f = t[0], v = t.slice(1), g = [];
|
|
1346
|
+
function d(m) {
|
|
1347
|
+
Array.isArray(m) ? m.forEach((w) => {
|
|
1348
|
+
g.push(w);
|
|
1349
|
+
}) : g.push(m);
|
|
1350
1350
|
}
|
|
1351
|
-
if ((typeof f != "string" ||
|
|
1352
|
-
|
|
1351
|
+
if ((typeof f != "string" || c) && e && Object.hasOwn(e, f))
|
|
1352
|
+
d(this._trace(v, e[f], xe(o, f), e, f, s, l));
|
|
1353
1353
|
else if (f === "*")
|
|
1354
1354
|
this._walk(e, (m) => {
|
|
1355
|
-
|
|
1355
|
+
d(this._trace(v, e[m], xe(o, m), e, m, s, !0, !0));
|
|
1356
1356
|
});
|
|
1357
1357
|
else if (f === "..")
|
|
1358
|
-
|
|
1359
|
-
typeof e[m] == "object" &&
|
|
1358
|
+
d(this._trace(v, e, o, n, r, s, l)), this._walk(e, (m) => {
|
|
1359
|
+
typeof e[m] == "object" && d(this._trace(t.slice(), e[m], xe(o, m), e, m, s, !0));
|
|
1360
1360
|
});
|
|
1361
1361
|
else {
|
|
1362
1362
|
if (f === "^")
|
|
@@ -1373,27 +1373,27 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1373
1373
|
parentProperty: null
|
|
1374
1374
|
}, this._handleCallback(p, s, "property"), p;
|
|
1375
1375
|
if (f === "$")
|
|
1376
|
-
|
|
1376
|
+
d(this._trace(v, e, o, null, null, s, l));
|
|
1377
1377
|
else if (/^(-?\d*):(-?\d*):?(\d*)$/u.test(f))
|
|
1378
|
-
|
|
1378
|
+
d(this._slice(f, v, e, o, n, r, s));
|
|
1379
1379
|
else if (f.indexOf("?(") === 0) {
|
|
1380
1380
|
if (this.currEval === !1)
|
|
1381
1381
|
throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
|
|
1382
|
-
const m = f.replace(/^\?\((.*?)\)$/u, "$1"),
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1385
|
-
this._trace(
|
|
1382
|
+
const m = f.replace(/^\?\((.*?)\)$/u, "$1"), w = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(m);
|
|
1383
|
+
w ? this._walk(e, (P) => {
|
|
1384
|
+
const x = [w[2]], M = w[1] ? e[P][w[1]] : e[P];
|
|
1385
|
+
this._trace(x, M, o, n, r, s, !0).length > 0 && d(this._trace(v, e[P], xe(o, P), e, P, s, !0));
|
|
1386
1386
|
}) : this._walk(e, (P) => {
|
|
1387
|
-
this._eval(m, e[P], P, o, n, r) &&
|
|
1387
|
+
this._eval(m, e[P], P, o, n, r) && d(this._trace(v, e[P], xe(o, P), e, P, s, !0));
|
|
1388
1388
|
});
|
|
1389
1389
|
} else if (f[0] === "(") {
|
|
1390
1390
|
if (this.currEval === !1)
|
|
1391
1391
|
throw new Error("Eval [(expr)] prevented in JSONPath expression.");
|
|
1392
|
-
|
|
1392
|
+
d(this._trace(mt(this._eval(f, e, o.at(-1), o.slice(0, -1), n, r), v), e, o, n, r, s, l));
|
|
1393
1393
|
} else if (f[0] === "@") {
|
|
1394
1394
|
let m = !1;
|
|
1395
|
-
const
|
|
1396
|
-
switch (
|
|
1395
|
+
const w = f.slice(1, -2);
|
|
1396
|
+
switch (w) {
|
|
1397
1397
|
case "scalar":
|
|
1398
1398
|
(!e || !["object", "function"].includes(typeof e)) && (m = !0);
|
|
1399
1399
|
break;
|
|
@@ -1401,7 +1401,7 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1401
1401
|
case "string":
|
|
1402
1402
|
case "undefined":
|
|
1403
1403
|
case "function":
|
|
1404
|
-
typeof e ===
|
|
1404
|
+
typeof e === w && (m = !0);
|
|
1405
1405
|
break;
|
|
1406
1406
|
case "integer":
|
|
1407
1407
|
Number.isFinite(e) && !(e % 1) && (m = !0);
|
|
@@ -1413,7 +1413,7 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1413
1413
|
typeof e == "number" && !Number.isFinite(e) && (m = !0);
|
|
1414
1414
|
break;
|
|
1415
1415
|
case "object":
|
|
1416
|
-
e && typeof e ===
|
|
1416
|
+
e && typeof e === w && (m = !0);
|
|
1417
1417
|
break;
|
|
1418
1418
|
case "array":
|
|
1419
1419
|
Array.isArray(e) && (m = !0);
|
|
@@ -1426,7 +1426,7 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1426
1426
|
break;
|
|
1427
1427
|
/* c8 ignore next 2 */
|
|
1428
1428
|
default:
|
|
1429
|
-
throw new TypeError("Unknown value type " +
|
|
1429
|
+
throw new TypeError("Unknown value type " + w);
|
|
1430
1430
|
}
|
|
1431
1431
|
if (m)
|
|
1432
1432
|
return p = {
|
|
@@ -1437,28 +1437,28 @@ U.prototype._trace = function(t, e, o, n, r, s, l, i) {
|
|
|
1437
1437
|
}, this._handleCallback(p, s, "value"), p;
|
|
1438
1438
|
} else if (f[0] === "`" && e && Object.hasOwn(e, f.slice(1))) {
|
|
1439
1439
|
const m = f.slice(1);
|
|
1440
|
-
|
|
1440
|
+
d(this._trace(v, e[m], xe(o, m), e, m, s, l, !0));
|
|
1441
1441
|
} else if (f.includes(",")) {
|
|
1442
1442
|
const m = f.split(",");
|
|
1443
|
-
for (const
|
|
1444
|
-
|
|
1445
|
-
} else !
|
|
1443
|
+
for (const w of m)
|
|
1444
|
+
d(this._trace(mt(w, v), e, o, n, r, s, !0));
|
|
1445
|
+
} else !c && e && Object.hasOwn(e, f) && d(this._trace(v, e[f], xe(o, f), e, f, s, l, !0));
|
|
1446
1446
|
}
|
|
1447
1447
|
if (this._hasParentSelector)
|
|
1448
|
-
for (let m = 0; m <
|
|
1449
|
-
const
|
|
1450
|
-
if (
|
|
1451
|
-
const P = this._trace(
|
|
1448
|
+
for (let m = 0; m < g.length; m++) {
|
|
1449
|
+
const w = g[m];
|
|
1450
|
+
if (w && w.isParentSelector) {
|
|
1451
|
+
const P = this._trace(w.expr, e, w.path, n, r, s, l);
|
|
1452
1452
|
if (Array.isArray(P)) {
|
|
1453
|
-
|
|
1454
|
-
const
|
|
1455
|
-
for (let M = 1; M <
|
|
1456
|
-
m++,
|
|
1453
|
+
g[m] = P[0];
|
|
1454
|
+
const x = P.length;
|
|
1455
|
+
for (let M = 1; M < x; M++)
|
|
1456
|
+
m++, g.splice(m, 0, P[M]);
|
|
1457
1457
|
} else
|
|
1458
|
-
|
|
1458
|
+
g[m] = P;
|
|
1459
1459
|
}
|
|
1460
1460
|
}
|
|
1461
|
-
return
|
|
1461
|
+
return g;
|
|
1462
1462
|
};
|
|
1463
1463
|
U.prototype._walk = function(t, e) {
|
|
1464
1464
|
if (Array.isArray(t)) {
|
|
@@ -1472,39 +1472,39 @@ U.prototype._walk = function(t, e) {
|
|
|
1472
1472
|
U.prototype._slice = function(t, e, o, n, r, s, l) {
|
|
1473
1473
|
if (!Array.isArray(o))
|
|
1474
1474
|
return;
|
|
1475
|
-
const
|
|
1476
|
-
let v = p[0] && Number.parseInt(p[0]) || 0,
|
|
1477
|
-
v = v < 0 ? Math.max(0, v +
|
|
1478
|
-
const
|
|
1479
|
-
for (let m = v; m <
|
|
1475
|
+
const c = o.length, p = t.split(":"), f = p[2] && Number.parseInt(p[2]) || 1;
|
|
1476
|
+
let v = p[0] && Number.parseInt(p[0]) || 0, g = p[1] && Number.parseInt(p[1]) || c;
|
|
1477
|
+
v = v < 0 ? Math.max(0, v + c) : Math.min(c, v), g = g < 0 ? Math.max(0, g + c) : Math.min(c, g);
|
|
1478
|
+
const d = [];
|
|
1479
|
+
for (let m = v; m < g; m += f)
|
|
1480
1480
|
this._trace(mt(m, e), o, n, r, s, l, !0).forEach((P) => {
|
|
1481
|
-
|
|
1481
|
+
d.push(P);
|
|
1482
1482
|
});
|
|
1483
|
-
return
|
|
1483
|
+
return d;
|
|
1484
1484
|
};
|
|
1485
1485
|
U.prototype._eval = function(t, e, o, n, r, s) {
|
|
1486
1486
|
this.currSandbox._$_parentProperty = s, this.currSandbox._$_parent = r, this.currSandbox._$_property = o, this.currSandbox._$_root = this.json, this.currSandbox._$_v = e;
|
|
1487
1487
|
const l = t.includes("@path");
|
|
1488
1488
|
l && (this.currSandbox._$_path = U.toPathString(n.concat([o])));
|
|
1489
|
-
const
|
|
1490
|
-
if (!U.cache[
|
|
1489
|
+
const c = this.currEval + "Script:" + t;
|
|
1490
|
+
if (!U.cache[c]) {
|
|
1491
1491
|
let p = t.replaceAll("@parentProperty", "_$_parentProperty").replaceAll("@parent", "_$_parent").replaceAll("@property", "_$_property").replaceAll("@root", "_$_root").replaceAll(/@([.\s)[])/gu, "_$_v$1");
|
|
1492
1492
|
if (l && (p = p.replaceAll("@path", "_$_path")), this.currEval === "safe" || this.currEval === !0 || this.currEval === void 0)
|
|
1493
|
-
U.cache[
|
|
1493
|
+
U.cache[c] = new this.safeVm.Script(p);
|
|
1494
1494
|
else if (this.currEval === "native")
|
|
1495
|
-
U.cache[
|
|
1495
|
+
U.cache[c] = new this.vm.Script(p);
|
|
1496
1496
|
else if (typeof this.currEval == "function" && this.currEval.prototype && Object.hasOwn(this.currEval.prototype, "runInNewContext")) {
|
|
1497
1497
|
const f = this.currEval;
|
|
1498
|
-
U.cache[
|
|
1498
|
+
U.cache[c] = new f(p);
|
|
1499
1499
|
} else if (typeof this.currEval == "function")
|
|
1500
|
-
U.cache[
|
|
1500
|
+
U.cache[c] = {
|
|
1501
1501
|
runInNewContext: (f) => this.currEval(p, f)
|
|
1502
1502
|
};
|
|
1503
1503
|
else
|
|
1504
1504
|
throw new TypeError(`Unknown "eval" property "${this.currEval}"`);
|
|
1505
1505
|
}
|
|
1506
1506
|
try {
|
|
1507
|
-
return U.cache[
|
|
1507
|
+
return U.cache[c].runInNewContext(this.currSandbox);
|
|
1508
1508
|
} catch (p) {
|
|
1509
1509
|
if (this.ignoreEvalErrors)
|
|
1510
1510
|
return !1;
|
|
@@ -1545,16 +1545,16 @@ U.toPathArray = function(t) {
|
|
|
1545
1545
|
return e[t] = r, e[t].concat();
|
|
1546
1546
|
};
|
|
1547
1547
|
U.prototype.safeVm = {
|
|
1548
|
-
Script:
|
|
1548
|
+
Script: ao
|
|
1549
1549
|
};
|
|
1550
|
-
const
|
|
1550
|
+
const lo = function(t, e, o) {
|
|
1551
1551
|
const n = t.length;
|
|
1552
1552
|
for (let r = 0; r < n; r++) {
|
|
1553
1553
|
const s = t[r];
|
|
1554
1554
|
o(s) && e.push(t.splice(r--, 1)[0]);
|
|
1555
1555
|
}
|
|
1556
1556
|
};
|
|
1557
|
-
class
|
|
1557
|
+
class io {
|
|
1558
1558
|
/**
|
|
1559
1559
|
* @param {string} expr Expression to evaluate
|
|
1560
1560
|
*/
|
|
@@ -1569,51 +1569,51 @@ class ro {
|
|
|
1569
1569
|
runInNewContext(e) {
|
|
1570
1570
|
let o = this.code;
|
|
1571
1571
|
const n = Object.keys(e), r = [];
|
|
1572
|
-
|
|
1572
|
+
lo(n, r, (f) => typeof e[f] == "function");
|
|
1573
1573
|
const s = n.map((f) => e[f]);
|
|
1574
1574
|
o = r.reduce((f, v) => {
|
|
1575
|
-
let
|
|
1576
|
-
return /function/u.test(
|
|
1575
|
+
let g = e[v].toString();
|
|
1576
|
+
return /function/u.test(g) || (g = "function " + g), "var " + v + "=" + g + ";" + f;
|
|
1577
1577
|
}, "") + o, !/(['"])use strict\1/u.test(o) && !n.includes("arguments") && (o = "var arguments = undefined;" + o), o = o.replace(/;\s*$/u, "");
|
|
1578
|
-
const
|
|
1578
|
+
const c = o.lastIndexOf(";"), p = c !== -1 ? o.slice(0, c + 1) + " return " + o.slice(c + 1) : " return " + o;
|
|
1579
1579
|
return new Function(...n, p)(...s);
|
|
1580
1580
|
}
|
|
1581
1581
|
}
|
|
1582
1582
|
U.prototype.vm = {
|
|
1583
|
-
Script:
|
|
1583
|
+
Script: io
|
|
1584
1584
|
};
|
|
1585
|
-
const _e = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(),
|
|
1585
|
+
const _e = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(), At = (t) => (uo(t), t.map((e, o) => ({
|
|
1586
1586
|
...e,
|
|
1587
1587
|
props: e.props ?? {},
|
|
1588
1588
|
visible: e.visible ?? !0,
|
|
1589
1589
|
_order: o,
|
|
1590
1590
|
_defaultValue: e.value
|
|
1591
|
-
}))),
|
|
1592
|
-
const { content: n, width: r = 120, visible: s = !0, resizable: l = !0, ellipsis:
|
|
1591
|
+
}))), Pt = (t) => (po(t), t.map((e, o) => {
|
|
1592
|
+
const { content: n, width: r = 120, visible: s = !0, resizable: l = !0, ellipsis: c = !0, component: p } = e;
|
|
1593
1593
|
return {
|
|
1594
1594
|
...e,
|
|
1595
1595
|
dataIndex: typeof n == "string" ? n : void 0,
|
|
1596
1596
|
width: r,
|
|
1597
1597
|
visible: s,
|
|
1598
1598
|
resizable: l,
|
|
1599
|
-
ellipsis:
|
|
1599
|
+
ellipsis: c,
|
|
1600
1600
|
component: p ? W(p) : void 0,
|
|
1601
1601
|
index: o
|
|
1602
1602
|
};
|
|
1603
|
-
})),
|
|
1604
|
-
const r =
|
|
1603
|
+
})), co = (t, e, o) => t.sort((n, r) => o.indexOf(n.code) - o.indexOf(r.code)).map((n) => {
|
|
1604
|
+
const r = fo(n.value ?? "", null);
|
|
1605
1605
|
if (r)
|
|
1606
1606
|
return {
|
|
1607
1607
|
...n,
|
|
1608
1608
|
items: r.map((s) => {
|
|
1609
|
-
var
|
|
1609
|
+
var c;
|
|
1610
1610
|
const l = e[s.name];
|
|
1611
1611
|
return l ? l.type !== s.type ? console.warn(`formItem type not match: name = ${s.name}, type = ${s.type}`) : s.type === X.datePicker && s.value ? {
|
|
1612
1612
|
...s,
|
|
1613
|
-
value: s.value ?
|
|
1614
|
-
} : s.type === X.rangePicker && ((
|
|
1613
|
+
value: s.value ? Ue(s.value) : void 0
|
|
1614
|
+
} : s.type === X.rangePicker && ((c = s.value) != null && c.length) ? {
|
|
1615
1615
|
...s,
|
|
1616
|
-
value: s.value.map(
|
|
1616
|
+
value: s.value.map(Ue)
|
|
1617
1617
|
} : s : console.warn(`formItem not exit: name = ${s.name}`);
|
|
1618
1618
|
}).filter(Boolean)
|
|
1619
1619
|
};
|
|
@@ -1621,9 +1621,9 @@ const _e = (t) => Object.prototype.toString.call(t).slice(8, -1).toLowerCase(),
|
|
|
1621
1621
|
function Ie(...t) {
|
|
1622
1622
|
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...t);
|
|
1623
1623
|
}
|
|
1624
|
-
const
|
|
1624
|
+
const uo = (t) => {
|
|
1625
1625
|
t.forEach((e) => {
|
|
1626
|
-
new
|
|
1626
|
+
new Nt({
|
|
1627
1627
|
type: [
|
|
1628
1628
|
{ required: !0 },
|
|
1629
1629
|
{
|
|
@@ -1651,9 +1651,9 @@ const ao = (t) => {
|
|
|
1651
1651
|
});
|
|
1652
1652
|
});
|
|
1653
1653
|
});
|
|
1654
|
-
},
|
|
1654
|
+
}, po = (t) => {
|
|
1655
1655
|
t.forEach((e) => {
|
|
1656
|
-
new
|
|
1656
|
+
new Nt({
|
|
1657
1657
|
key: [{ required: !0, type: "string" }],
|
|
1658
1658
|
type: [
|
|
1659
1659
|
{
|
|
@@ -1695,7 +1695,7 @@ const ao = (t) => {
|
|
|
1695
1695
|
});
|
|
1696
1696
|
});
|
|
1697
1697
|
});
|
|
1698
|
-
},
|
|
1698
|
+
}, mo = (t, e) => {
|
|
1699
1699
|
if (!t) return 0;
|
|
1700
1700
|
const n = document.createElement("canvas").getContext("2d");
|
|
1701
1701
|
return n ? (n.font = [
|
|
@@ -1703,7 +1703,7 @@ const ao = (t) => {
|
|
|
1703
1703
|
`${re.fontSize}px`,
|
|
1704
1704
|
re.fontFamily
|
|
1705
1705
|
].join(" "), Math.ceil(n.measureText(t).width)) : 0;
|
|
1706
|
-
},
|
|
1706
|
+
}, fo = (t, e) => {
|
|
1707
1707
|
if (t === "" || t === null)
|
|
1708
1708
|
return e;
|
|
1709
1709
|
try {
|
|
@@ -1714,15 +1714,15 @@ const ao = (t) => {
|
|
|
1714
1714
|
defaultVal: e
|
|
1715
1715
|
}), e;
|
|
1716
1716
|
}
|
|
1717
|
-
},
|
|
1717
|
+
}, ho = (t) => {
|
|
1718
1718
|
let e = 0;
|
|
1719
1719
|
for (let o = 0; o < t.length; o++)
|
|
1720
1720
|
e = (e << 5) - e + t.charCodeAt(o), e |= 0;
|
|
1721
1721
|
return e.toString(16);
|
|
1722
1722
|
}, qt = (t) => {
|
|
1723
|
-
const e =
|
|
1724
|
-
return
|
|
1725
|
-
},
|
|
1723
|
+
const e = ho(t);
|
|
1724
|
+
return zn(e, "1b671a64-40d5-491e-99b0-da01ff1f3341").replace(/-/g, "");
|
|
1725
|
+
}, yo = /* @__PURE__ */ pe({
|
|
1726
1726
|
__name: "EllipsisElement",
|
|
1727
1727
|
props: {
|
|
1728
1728
|
/**
|
|
@@ -1789,51 +1789,51 @@ const ao = (t) => {
|
|
|
1789
1789
|
}
|
|
1790
1790
|
},
|
|
1791
1791
|
setup(t) {
|
|
1792
|
-
const e = t, o = F(() => e.list.map((
|
|
1793
|
-
() =>
|
|
1794
|
-
), s = F(() => r.value.map(({ index:
|
|
1795
|
-
key:
|
|
1792
|
+
const e = t, o = F(() => e.list.map((c) => _e(c) === "object" ? c : { label: c }).map((c, p) => ({ ...c, index: p, __key: c.key ?? `${p}-${String(c.label)}` }))), n = F(() => $t(o.value, 0, e.maxCount)), r = F(
|
|
1793
|
+
() => $t(o.value, e.maxCount, o.value.length)
|
|
1794
|
+
), s = F(() => r.value.map(({ index: c, disabled: p, label: f, onClick: v }) => ({
|
|
1795
|
+
key: c + e.maxCount,
|
|
1796
1796
|
label: f,
|
|
1797
1797
|
disabled: p,
|
|
1798
1798
|
onClick: () => v == null ? void 0 : v(e.record)
|
|
1799
1799
|
}))), l = F(() => {
|
|
1800
|
-
const
|
|
1801
|
-
return v === G.text && (
|
|
1800
|
+
const c = {}, { maxCount: p, cellWidth: f, type: v } = e;
|
|
1801
|
+
return v === G.text && (c.flex = 1), v === G.link && n.value.length > 1 && (c.maxWidth = `${((f - 50) / f / p * 100).toFixed(2)}%`), c;
|
|
1802
1802
|
});
|
|
1803
|
-
return (
|
|
1804
|
-
const f = L("a-tag"), v = L("a-popover"),
|
|
1805
|
-
return
|
|
1803
|
+
return (c, p) => {
|
|
1804
|
+
const f = L("a-tag"), v = L("a-popover"), g = L("a-button"), d = L("a-menu"), m = L("a-dropdown");
|
|
1805
|
+
return k(), q("div", {
|
|
1806
1806
|
class: b([
|
|
1807
|
-
|
|
1807
|
+
c.$style.ellipsisElement,
|
|
1808
1808
|
{
|
|
1809
|
-
[
|
|
1809
|
+
[c.$style.ellipsisElementHasGap]: ![y(G).button, y(G).tag].includes(t.type)
|
|
1810
1810
|
}
|
|
1811
1811
|
])
|
|
1812
1812
|
}, [
|
|
1813
|
-
(
|
|
1814
|
-
key:
|
|
1815
|
-
class: b(
|
|
1813
|
+
(k(!0), q(Oe, null, ct(n.value, (w, P) => (k(), q("div", {
|
|
1814
|
+
key: w.__key,
|
|
1815
|
+
class: b(c.$style.elementItem),
|
|
1816
1816
|
style: ne(l.value)
|
|
1817
1817
|
}, [
|
|
1818
|
-
|
|
1819
|
-
item:
|
|
1818
|
+
ge(c.$slots, "default", {
|
|
1819
|
+
item: w,
|
|
1820
1820
|
index: P
|
|
1821
1821
|
})
|
|
1822
1822
|
], 6))), 128)),
|
|
1823
|
-
r.value.length ? (
|
|
1824
|
-
t.displayType === "popover" ? (
|
|
1823
|
+
r.value.length ? (k(), q(Oe, { key: 0 }, [
|
|
1824
|
+
t.displayType === "popover" ? (k(), N(v, {
|
|
1825
1825
|
key: 0,
|
|
1826
1826
|
trigger: t.trigger,
|
|
1827
1827
|
"overlay-style": { maxWidth: "500px" },
|
|
1828
1828
|
"destroy-on-close": ""
|
|
1829
1829
|
}, {
|
|
1830
1830
|
content: C(() => [
|
|
1831
|
-
|
|
1832
|
-
class: b(
|
|
1831
|
+
z("div", {
|
|
1832
|
+
class: b(c.$style.ellipsisList)
|
|
1833
1833
|
}, [
|
|
1834
|
-
(
|
|
1835
|
-
key:
|
|
1836
|
-
item:
|
|
1834
|
+
(k(!0), q(Oe, null, ct(r.value, (w, P) => ge(c.$slots, "default", {
|
|
1835
|
+
key: w.__key,
|
|
1836
|
+
item: w,
|
|
1837
1837
|
index: P + t.maxCount,
|
|
1838
1838
|
inPopover: !0
|
|
1839
1839
|
})), 128))
|
|
@@ -1844,62 +1844,62 @@ const ao = (t) => {
|
|
|
1844
1844
|
size: "mini",
|
|
1845
1845
|
type: "info",
|
|
1846
1846
|
class: b([
|
|
1847
|
-
|
|
1847
|
+
c.$style.ellipsisTag,
|
|
1848
1848
|
{
|
|
1849
|
-
[
|
|
1849
|
+
[c.$style.imageEllipsisTag]: t.type === y(G).image
|
|
1850
1850
|
}
|
|
1851
1851
|
])
|
|
1852
1852
|
}, {
|
|
1853
1853
|
default: C(() => [
|
|
1854
|
-
J(
|
|
1854
|
+
J(be(`+${r.value.length}...`), 1)
|
|
1855
1855
|
]),
|
|
1856
1856
|
_: 1
|
|
1857
1857
|
}, 8, ["class"])
|
|
1858
1858
|
]),
|
|
1859
1859
|
_: 3
|
|
1860
|
-
}, 8, ["trigger"])) :
|
|
1861
|
-
t.displayType === "dropdown" ? (
|
|
1860
|
+
}, 8, ["trigger"])) : j("", !0),
|
|
1861
|
+
t.displayType === "dropdown" ? (k(), N(m, {
|
|
1862
1862
|
key: 1,
|
|
1863
1863
|
"destroy-on-close": "",
|
|
1864
1864
|
trigger: t.trigger
|
|
1865
1865
|
}, {
|
|
1866
1866
|
overlay: C(() => [
|
|
1867
|
-
E(
|
|
1867
|
+
E(d, { items: s.value }, null, 8, ["items"])
|
|
1868
1868
|
]),
|
|
1869
1869
|
default: C(() => [
|
|
1870
|
-
E(
|
|
1870
|
+
E(g, {
|
|
1871
1871
|
type: "link",
|
|
1872
1872
|
size: "small"
|
|
1873
1873
|
}, {
|
|
1874
1874
|
default: C(() => [
|
|
1875
1875
|
p[0] || (p[0] = J(" 更多 ")),
|
|
1876
|
-
E(
|
|
1876
|
+
E(y(Bt))
|
|
1877
1877
|
]),
|
|
1878
1878
|
_: 1
|
|
1879
1879
|
})
|
|
1880
1880
|
]),
|
|
1881
1881
|
_: 1
|
|
1882
|
-
}, 8, ["trigger"])) :
|
|
1883
|
-
], 64)) :
|
|
1882
|
+
}, 8, ["trigger"])) : j("", !0)
|
|
1883
|
+
], 64)) : j("", !0)
|
|
1884
1884
|
], 2);
|
|
1885
1885
|
};
|
|
1886
1886
|
}
|
|
1887
|
-
}),
|
|
1888
|
-
ellipsisElement:
|
|
1889
|
-
elementItem:
|
|
1890
|
-
ellipsisElementHasGap:
|
|
1891
|
-
flexWrap:
|
|
1892
|
-
ellipsisTag:
|
|
1893
|
-
imageEllipsisTag:
|
|
1894
|
-
ellipsisList:
|
|
1895
|
-
},
|
|
1887
|
+
}), go = "_ellipsisElement_6fog1_1", bo = "_elementItem_6fog1_6", vo = "_ellipsisElementHasGap_6fog1_10", Co = "_flexWrap_6fog1_14", _o = "_ellipsisTag_6fog1_18", Eo = "_imageEllipsisTag_6fog1_22", So = "_ellipsisList_6fog1_29", xo = {
|
|
1888
|
+
ellipsisElement: go,
|
|
1889
|
+
elementItem: bo,
|
|
1890
|
+
ellipsisElementHasGap: vo,
|
|
1891
|
+
flexWrap: Co,
|
|
1892
|
+
ellipsisTag: _o,
|
|
1893
|
+
imageEllipsisTag: Eo,
|
|
1894
|
+
ellipsisList: So
|
|
1895
|
+
}, Ce = (t, e) => {
|
|
1896
1896
|
const o = t.__vccOpts || t;
|
|
1897
1897
|
for (const [n, r] of e)
|
|
1898
1898
|
o[n] = r;
|
|
1899
1899
|
return o;
|
|
1900
|
-
},
|
|
1901
|
-
$style:
|
|
1902
|
-
},
|
|
1900
|
+
}, wo = {
|
|
1901
|
+
$style: xo
|
|
1902
|
+
}, $o = /* @__PURE__ */ Ce(yo, [["__cssModules", wo]]), ko = { key: 1 }, Io = /* @__PURE__ */ pe({
|
|
1903
1903
|
__name: "TableCellContent",
|
|
1904
1904
|
props: {
|
|
1905
1905
|
/**
|
|
@@ -1940,138 +1940,138 @@ const ao = (t) => {
|
|
|
1940
1940
|
},
|
|
1941
1941
|
setup(t) {
|
|
1942
1942
|
const e = t, o = /* @__PURE__ */ new Map(), n = F(() => {
|
|
1943
|
-
const { index: m, record:
|
|
1944
|
-
return $e(
|
|
1943
|
+
const { index: m, record: w, column: P } = e, x = (P == null ? void 0 : P.type) ?? G.text;
|
|
1944
|
+
return $e(x) ? x(w, m) : x;
|
|
1945
1945
|
}), r = F(() => {
|
|
1946
|
-
const { index: m, record:
|
|
1947
|
-
if ($e(
|
|
1948
|
-
return
|
|
1949
|
-
if (typeof
|
|
1950
|
-
if (
|
|
1951
|
-
let M = o.get(
|
|
1952
|
-
M || (M = /* @__PURE__ */ new WeakMap(), o.set(
|
|
1953
|
-
const V = M.get(
|
|
1946
|
+
const { index: m, record: w, column: P } = e, x = P.content;
|
|
1947
|
+
if ($e(x))
|
|
1948
|
+
return x(w, m);
|
|
1949
|
+
if (typeof x == "string") {
|
|
1950
|
+
if (x.startsWith("$")) {
|
|
1951
|
+
let M = o.get(x);
|
|
1952
|
+
M || (M = /* @__PURE__ */ new WeakMap(), o.set(x, M));
|
|
1953
|
+
const V = M.get(w);
|
|
1954
1954
|
if (V !== void 0) return V;
|
|
1955
|
-
const
|
|
1956
|
-
return M.set(
|
|
1955
|
+
const H = U({ path: x, json: w });
|
|
1956
|
+
return M.set(w, H), H;
|
|
1957
1957
|
}
|
|
1958
|
-
return
|
|
1958
|
+
return Qe(w, x, "");
|
|
1959
1959
|
}
|
|
1960
1960
|
return "";
|
|
1961
|
-
}), s = F(() =>
|
|
1962
|
-
const { index: m, record:
|
|
1961
|
+
}), s = F(() => De(r.value)), l = F(() => {
|
|
1962
|
+
const { index: m, record: w, column: P } = e;
|
|
1963
1963
|
if (n.value === G.component) {
|
|
1964
|
-
const { props:
|
|
1965
|
-
return $e(
|
|
1966
|
-
...
|
|
1964
|
+
const { props: x = {} } = P;
|
|
1965
|
+
return $e(x) ? x(w, m) : {
|
|
1966
|
+
...x,
|
|
1967
1967
|
index: m,
|
|
1968
|
-
record:
|
|
1968
|
+
record: w
|
|
1969
1969
|
};
|
|
1970
1970
|
}
|
|
1971
1971
|
return {};
|
|
1972
|
-
}),
|
|
1973
|
-
const { index: m, record:
|
|
1974
|
-
if (!
|
|
1975
|
-
if ($e(
|
|
1976
|
-
return
|
|
1972
|
+
}), c = F(() => {
|
|
1973
|
+
const { index: m, record: w, column: P } = e, x = P.tooltip ?? [G.text, G.link].includes(n.value);
|
|
1974
|
+
if (!x) return "";
|
|
1975
|
+
if ($e(x))
|
|
1976
|
+
return x(w, m);
|
|
1977
1977
|
const M = s.value[0];
|
|
1978
1978
|
return (M == null ? void 0 : M.label) || M;
|
|
1979
|
-
}), p = F(() => !(["", void 0, null].includes(r.value) && ![G.component, G.sort].includes(n.value))), f = (m) => typeof m == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(m), v = (m) => e.hasRouter && !f(m),
|
|
1980
|
-
return (m,
|
|
1981
|
-
var
|
|
1982
|
-
const P = L("a-button"),
|
|
1983
|
-
return p.value ? (
|
|
1979
|
+
}), p = F(() => !(["", void 0, null].includes(r.value) && ![G.component, G.sort].includes(n.value))), f = (m) => typeof m == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(m), v = (m) => e.hasRouter && !f(m), g = (m) => v(m) ? "router-link" : "a", d = (m, w) => v(m) ? { to: m, target: w ?? "_blank" } : { href: m, target: w ?? "_blank" };
|
|
1980
|
+
return (m, w) => {
|
|
1981
|
+
var H;
|
|
1982
|
+
const P = L("a-button"), x = L("a-typography-text"), M = L("a-tag"), V = L("a-image");
|
|
1983
|
+
return p.value ? (k(), q("div", {
|
|
1984
1984
|
key: 0,
|
|
1985
1985
|
class: b(m.$style.tableCellContent)
|
|
1986
1986
|
}, [
|
|
1987
|
-
n.value ===
|
|
1987
|
+
n.value === y(G).sort ? (k(), N(P, {
|
|
1988
1988
|
key: 0,
|
|
1989
1989
|
type: "text",
|
|
1990
1990
|
size: "small",
|
|
1991
|
-
icon: W(
|
|
1991
|
+
icon: W(y(Ae)),
|
|
1992
1992
|
class: b([m.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1993
|
-
}, null, 8, ["icon", "class"])) :
|
|
1994
|
-
n.value ===
|
|
1993
|
+
}, null, 8, ["icon", "class"])) : j("", !0),
|
|
1994
|
+
n.value === y(G).component ? (k(), N(Ge(t.column.component), at(le({ key: 1 }, l.value)), null, 16)) : Mt([(H = t.column) == null ? void 0 : H.key, t.index, s.value], () => (k(), N($o, {
|
|
1995
1995
|
key: 2,
|
|
1996
1996
|
list: s.value,
|
|
1997
|
-
"max-count": n.value ===
|
|
1997
|
+
"max-count": n.value === y(G).text ? 1 : t.column.maxCount,
|
|
1998
1998
|
record: t.record,
|
|
1999
1999
|
type: n.value,
|
|
2000
2000
|
"cell-width": t.column.width,
|
|
2001
|
-
"display-type": [
|
|
2001
|
+
"display-type": [y(G).button].includes(n.value) ? "dropdown" : "popover"
|
|
2002
2002
|
}, {
|
|
2003
|
-
default: C(({ item:
|
|
2004
|
-
n.value ===
|
|
2005
|
-
_ === 0 ? (
|
|
2003
|
+
default: C(({ item: $, index: _, inPopover: T }) => [
|
|
2004
|
+
n.value === y(G).text ? (k(), q(Oe, { key: 0 }, [
|
|
2005
|
+
_ === 0 ? (k(), N(x, {
|
|
2006
2006
|
key: 0,
|
|
2007
|
-
ellipsis: { tooltip:
|
|
2008
|
-
content: String(
|
|
2007
|
+
ellipsis: { tooltip: c.value },
|
|
2008
|
+
content: String($.label),
|
|
2009
2009
|
class: b(m.$style.antTypographyEllipsis)
|
|
2010
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (
|
|
2010
|
+
}, null, 8, ["ellipsis", "content", "class"])) : (k(), q("div", {
|
|
2011
2011
|
key: 1,
|
|
2012
2012
|
class: b(m.$style.textListItem)
|
|
2013
|
-
},
|
|
2014
|
-
], 64)) :
|
|
2015
|
-
n.value ===
|
|
2013
|
+
}, be($.label), 3))
|
|
2014
|
+
], 64)) : j("", !0),
|
|
2015
|
+
n.value === y(G).link ? (k(), N(Ge(g($.to)), at(le({ key: 1 }, d($.to, $.target))), {
|
|
2016
2016
|
default: C(() => [
|
|
2017
|
-
t.column.ellipsis ? (
|
|
2017
|
+
t.column.ellipsis ? (k(), N(x, {
|
|
2018
2018
|
key: 0,
|
|
2019
|
-
ellipsis: { tooltip:
|
|
2020
|
-
content: String(
|
|
2021
|
-
style: ne({ color:
|
|
2019
|
+
ellipsis: { tooltip: $.label },
|
|
2020
|
+
content: String($.label),
|
|
2021
|
+
style: ne({ color: y(re).colorPrimary }),
|
|
2022
2022
|
class: b(m.$style.antTypographyEllipsis)
|
|
2023
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (
|
|
2023
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : (k(), q("span", ko, be($.label), 1))
|
|
2024
2024
|
]),
|
|
2025
2025
|
_: 2
|
|
2026
|
-
}, 1040)) :
|
|
2027
|
-
n.value ===
|
|
2026
|
+
}, 1040)) : j("", !0),
|
|
2027
|
+
n.value === y(G).tag ? (k(), N(M, at(le({ key: 2 }, $)), {
|
|
2028
2028
|
default: C(() => [
|
|
2029
|
-
J(
|
|
2029
|
+
J(be($.label), 1)
|
|
2030
2030
|
]),
|
|
2031
2031
|
_: 2
|
|
2032
|
-
}, 1040)) :
|
|
2033
|
-
n.value ===
|
|
2032
|
+
}, 1040)) : j("", !0),
|
|
2033
|
+
n.value === y(G).button ? (k(), N(P, le({
|
|
2034
2034
|
key: 3,
|
|
2035
2035
|
type: "link",
|
|
2036
2036
|
size: "small",
|
|
2037
|
-
disabled:
|
|
2038
|
-
},
|
|
2037
|
+
disabled: $.disabled
|
|
2038
|
+
}, $.buttonProps, {
|
|
2039
2039
|
onClick: (Z) => {
|
|
2040
2040
|
var ie;
|
|
2041
|
-
return (ie =
|
|
2041
|
+
return (ie = $.onClick) == null ? void 0 : ie.call($, t.record, t.index);
|
|
2042
2042
|
}
|
|
2043
2043
|
}), {
|
|
2044
2044
|
default: C(() => [
|
|
2045
|
-
J(
|
|
2045
|
+
J(be($.label), 1)
|
|
2046
2046
|
]),
|
|
2047
2047
|
_: 2
|
|
2048
|
-
}, 1040, ["disabled", "onClick"])) :
|
|
2049
|
-
n.value ===
|
|
2048
|
+
}, 1040, ["disabled", "onClick"])) : j("", !0),
|
|
2049
|
+
n.value === y(G).image ? (k(), N(V, {
|
|
2050
2050
|
key: 4,
|
|
2051
2051
|
width: T ? 100 : 32,
|
|
2052
2052
|
height: T ? 100 : 32,
|
|
2053
|
-
src:
|
|
2053
|
+
src: $.label,
|
|
2054
2054
|
style: { objectFit: "cover" }
|
|
2055
2055
|
}, {
|
|
2056
2056
|
previewMask: C(() => [
|
|
2057
|
-
E(
|
|
2057
|
+
E(y(On))
|
|
2058
2058
|
]),
|
|
2059
2059
|
_: 2
|
|
2060
|
-
}, 1032, ["width", "height", "src"])) :
|
|
2060
|
+
}, 1032, ["width", "height", "src"])) : j("", !0)
|
|
2061
2061
|
]),
|
|
2062
2062
|
_: 1
|
|
2063
|
-
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])),
|
|
2064
|
-
], 2)) :
|
|
2063
|
+
}, 8, ["list", "max-count", "record", "type", "cell-width", "display-type"])), w, 0)
|
|
2064
|
+
], 2)) : j("", !0);
|
|
2065
2065
|
};
|
|
2066
2066
|
}
|
|
2067
|
-
}),
|
|
2068
|
-
tableCellContent:
|
|
2069
|
-
antTypographyEllipsis:
|
|
2070
|
-
draggableIcon:
|
|
2071
|
-
textListItem:
|
|
2072
|
-
},
|
|
2073
|
-
$style:
|
|
2074
|
-
},
|
|
2067
|
+
}), Oo = "_tableCellContent_1chn7_1", Ao = "_antTypographyEllipsis_1chn7_1", Po = "_draggableIcon_1chn7_4", To = "_textListItem_1chn7_8", Lo = {
|
|
2068
|
+
tableCellContent: Oo,
|
|
2069
|
+
antTypographyEllipsis: Ao,
|
|
2070
|
+
draggableIcon: Po,
|
|
2071
|
+
textListItem: To
|
|
2072
|
+
}, Do = {
|
|
2073
|
+
$style: Lo
|
|
2074
|
+
}, Fo = /* @__PURE__ */ Ce(Io, [["__cssModules", Do]]), Mo = pe({
|
|
2075
2075
|
name: "VNodes",
|
|
2076
2076
|
props: {
|
|
2077
2077
|
vnodes: {
|
|
@@ -2082,7 +2082,7 @@ const ao = (t) => {
|
|
|
2082
2082
|
render() {
|
|
2083
2083
|
return this.vnodes;
|
|
2084
2084
|
}
|
|
2085
|
-
}),
|
|
2085
|
+
}), Bo = /* @__PURE__ */ pe({
|
|
2086
2086
|
__name: "TableConfig",
|
|
2087
2087
|
props: {
|
|
2088
2088
|
/**
|
|
@@ -2097,25 +2097,25 @@ const ao = (t) => {
|
|
|
2097
2097
|
},
|
|
2098
2098
|
emits: ["change"],
|
|
2099
2099
|
setup(t, { emit: e }) {
|
|
2100
|
-
const o = oe(!1), n = t, r = e, s = oe([]), l = oe([]),
|
|
2101
|
-
l.value = s.value.filter((_) => _.fixed === "left"),
|
|
2100
|
+
const o = oe(!1), n = t, r = e, s = oe([]), l = oe([]), c = oe([]), p = oe([]), f = oe(""), v = oe(""), g = () => {
|
|
2101
|
+
l.value = s.value.filter((_) => _.fixed === "left"), c.value = s.value.filter((_) => !_.fixed), p.value = s.value.filter((_) => _.fixed === "right");
|
|
2102
2102
|
};
|
|
2103
|
-
|
|
2104
|
-
s.value = n.columns,
|
|
2103
|
+
_t(() => {
|
|
2104
|
+
s.value = n.columns, g();
|
|
2105
2105
|
});
|
|
2106
|
-
const
|
|
2106
|
+
const d = ({ title: _ }) => {
|
|
2107
2107
|
var Z;
|
|
2108
2108
|
const T = (Z = v.value) == null ? void 0 : Z.trim();
|
|
2109
2109
|
return T ? _.toLocaleLowerCase().includes(T.toLocaleLowerCase()) : !0;
|
|
2110
|
-
}, m = F(() => s.value.every((_) => !
|
|
2110
|
+
}, m = F(() => s.value.every((_) => !d(_))), w = ft((_) => {
|
|
2111
2111
|
v.value = _.target.value;
|
|
2112
2112
|
}, 300), P = () => {
|
|
2113
2113
|
s.value = [
|
|
2114
2114
|
...l.value,
|
|
2115
|
-
...
|
|
2115
|
+
...c.value,
|
|
2116
2116
|
...p.value
|
|
2117
2117
|
];
|
|
2118
|
-
},
|
|
2118
|
+
}, x = () => {
|
|
2119
2119
|
P(), r(
|
|
2120
2120
|
"change",
|
|
2121
2121
|
s.value.map((_) => ke(_, pt))
|
|
@@ -2127,27 +2127,27 @@ const ao = (t) => {
|
|
|
2127
2127
|
set(_) {
|
|
2128
2128
|
s.value.forEach((T) => {
|
|
2129
2129
|
T.visible = _;
|
|
2130
|
-
}),
|
|
2130
|
+
}), x();
|
|
2131
2131
|
}
|
|
2132
2132
|
}), V = F(() => {
|
|
2133
2133
|
const _ = s.value.filter((T) => T.visible).length;
|
|
2134
2134
|
return _ > 0 && _ < s.value.length;
|
|
2135
|
-
}),
|
|
2135
|
+
}), H = () => {
|
|
2136
2136
|
r("change", []);
|
|
2137
|
-
},
|
|
2138
|
-
_.fixed = T,
|
|
2137
|
+
}, $ = (_, T) => {
|
|
2138
|
+
_.fixed = T, g(), P(), x();
|
|
2139
2139
|
};
|
|
2140
|
-
return
|
|
2140
|
+
return _t(() => {
|
|
2141
2141
|
o.value || (f.value = "", v.value = "");
|
|
2142
2142
|
}), (_, T) => {
|
|
2143
|
-
const Z = L("a-button"), ie = L("a-checkbox"), Pe = L("a-input"), Se = L("a-typography-text"),
|
|
2144
|
-
return
|
|
2143
|
+
const Z = L("a-button"), ie = L("a-checkbox"), Pe = L("a-input"), Se = L("a-typography-text"), fe = L("a-tooltip"), Fe = L("a-popover"), Te = L("a-config-provider");
|
|
2144
|
+
return k(), N(Te, { theme: {
|
|
2145
2145
|
token: {
|
|
2146
2146
|
borderRadius: 2
|
|
2147
2147
|
}
|
|
2148
2148
|
} }, {
|
|
2149
2149
|
default: C(() => [
|
|
2150
|
-
E(
|
|
2150
|
+
E(Fe, {
|
|
2151
2151
|
open: o.value,
|
|
2152
2152
|
"onUpdate:open": T[2] || (T[2] = (D) => o.value = D),
|
|
2153
2153
|
placement: "bottomRight",
|
|
@@ -2156,10 +2156,10 @@ const ao = (t) => {
|
|
|
2156
2156
|
"overlay-class-name": "pro-table-config-popover"
|
|
2157
2157
|
}, {
|
|
2158
2158
|
content: C(() => [
|
|
2159
|
-
|
|
2159
|
+
z("div", {
|
|
2160
2160
|
class: b(_.$style.tableConfig)
|
|
2161
2161
|
}, [
|
|
2162
|
-
|
|
2162
|
+
z("div", {
|
|
2163
2163
|
class: b(_.$style.tableConfigActions)
|
|
2164
2164
|
}, [
|
|
2165
2165
|
E(ie, {
|
|
@@ -2175,7 +2175,7 @@ const ao = (t) => {
|
|
|
2175
2175
|
E(Z, {
|
|
2176
2176
|
type: "link",
|
|
2177
2177
|
size: "small",
|
|
2178
|
-
onClick:
|
|
2178
|
+
onClick: H
|
|
2179
2179
|
}, {
|
|
2180
2180
|
default: C(() => T[4] || (T[4] = [
|
|
2181
2181
|
J(" 重置 ")
|
|
@@ -2183,253 +2183,253 @@ const ao = (t) => {
|
|
|
2183
2183
|
_: 1
|
|
2184
2184
|
})
|
|
2185
2185
|
], 2),
|
|
2186
|
-
|
|
2186
|
+
z("div", {
|
|
2187
2187
|
class: b(_.$style.tableConfigHead)
|
|
2188
2188
|
}, [
|
|
2189
2189
|
E(Pe, {
|
|
2190
2190
|
value: f.value,
|
|
2191
2191
|
"onUpdate:value": T[1] || (T[1] = (D) => f.value = D),
|
|
2192
2192
|
placeholder: "搜索标题",
|
|
2193
|
-
onChange:
|
|
2193
|
+
onChange: y(w)
|
|
2194
2194
|
}, null, 8, ["value", "onChange"])
|
|
2195
2195
|
], 2),
|
|
2196
|
-
|
|
2196
|
+
z("div", {
|
|
2197
2197
|
class: b(_.$style.tableConfigContent)
|
|
2198
2198
|
}, [
|
|
2199
|
-
l.value.some((D) =>
|
|
2199
|
+
l.value.some((D) => d(D)) ? (k(), q("div", {
|
|
2200
2200
|
key: 0,
|
|
2201
2201
|
class: b(_.$style.columnGroup)
|
|
2202
2202
|
}, [
|
|
2203
|
-
|
|
2203
|
+
z("div", {
|
|
2204
2204
|
class: b(_.$style.groupTitle)
|
|
2205
2205
|
}, "固定在左侧", 2),
|
|
2206
|
-
E(
|
|
2206
|
+
E(y(je), {
|
|
2207
2207
|
list: l.value,
|
|
2208
2208
|
"item-key": "key",
|
|
2209
2209
|
class: b(_.$style.columnList),
|
|
2210
2210
|
handle: ".table-column-draggable-handle",
|
|
2211
2211
|
disabled: l.value.length <= 1,
|
|
2212
|
-
onEnd:
|
|
2212
|
+
onEnd: x
|
|
2213
2213
|
}, {
|
|
2214
2214
|
item: C(({ element: D }) => [
|
|
2215
|
-
|
|
2215
|
+
d(D) ? (k(), q("div", {
|
|
2216
2216
|
key: 0,
|
|
2217
2217
|
class: b(_.$style.columnItem),
|
|
2218
|
-
style: ne({ background:
|
|
2218
|
+
style: ne({ background: y(re).colorBgContainer })
|
|
2219
2219
|
}, [
|
|
2220
2220
|
E(Z, {
|
|
2221
2221
|
type: "text",
|
|
2222
2222
|
size: "small",
|
|
2223
|
-
icon: W(
|
|
2224
|
-
style: ne({ color:
|
|
2223
|
+
icon: W(y(Ae)),
|
|
2224
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2225
2225
|
class: b(["table-column-draggable-handle", _.$style.dragIcon])
|
|
2226
2226
|
}, null, 8, ["icon", "style", "class"]),
|
|
2227
2227
|
E(ie, {
|
|
2228
2228
|
checked: D.visible,
|
|
2229
|
-
"onUpdate:checked": (
|
|
2230
|
-
onChange:
|
|
2229
|
+
"onUpdate:checked": (ae) => D.visible = ae,
|
|
2230
|
+
onChange: x
|
|
2231
2231
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2232
2232
|
E(Se, {
|
|
2233
2233
|
ellipsis: { tooltip: D.title },
|
|
2234
2234
|
content: D.title,
|
|
2235
2235
|
class: b([_.$style.columnItemContent, _.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2236
2236
|
onClick: () => {
|
|
2237
|
-
D.visible = !D.visible,
|
|
2237
|
+
D.visible = !D.visible, x();
|
|
2238
2238
|
}
|
|
2239
2239
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2240
|
-
|
|
2240
|
+
z("div", {
|
|
2241
2241
|
class: b(_.$style.fixedActions)
|
|
2242
2242
|
}, [
|
|
2243
|
-
E(
|
|
2243
|
+
E(fe, { title: "固定在右侧" }, {
|
|
2244
2244
|
default: C(() => [
|
|
2245
2245
|
E(Z, {
|
|
2246
2246
|
type: "text",
|
|
2247
2247
|
size: "small",
|
|
2248
|
-
icon: W(
|
|
2249
|
-
style: ne({ color:
|
|
2250
|
-
onClick: (
|
|
2248
|
+
icon: W(y(Et)),
|
|
2249
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2250
|
+
onClick: (ae) => $(D, "right")
|
|
2251
2251
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2252
2252
|
]),
|
|
2253
2253
|
_: 2
|
|
2254
2254
|
}, 1024),
|
|
2255
|
-
E(
|
|
2255
|
+
E(fe, { title: "取消固定" }, {
|
|
2256
2256
|
default: C(() => [
|
|
2257
2257
|
E(Z, {
|
|
2258
2258
|
type: "text",
|
|
2259
2259
|
size: "small",
|
|
2260
|
-
icon: W(
|
|
2261
|
-
style: ne({ color:
|
|
2262
|
-
onClick: (
|
|
2260
|
+
icon: W(y(St)),
|
|
2261
|
+
style: ne({ color: y(re).colorPrimary }),
|
|
2262
|
+
onClick: (ae) => $(D, !1)
|
|
2263
2263
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2264
2264
|
]),
|
|
2265
2265
|
_: 2
|
|
2266
2266
|
}, 1024)
|
|
2267
2267
|
], 2)
|
|
2268
|
-
], 6)) :
|
|
2268
|
+
], 6)) : j("", !0)
|
|
2269
2269
|
]),
|
|
2270
2270
|
_: 1
|
|
2271
2271
|
}, 8, ["list", "class", "disabled"])
|
|
2272
|
-
], 2)) :
|
|
2273
|
-
|
|
2272
|
+
], 2)) : j("", !0),
|
|
2273
|
+
c.value.some((D) => d(D)) ? (k(), q("div", {
|
|
2274
2274
|
key: 1,
|
|
2275
2275
|
class: b(_.$style.columnGroup)
|
|
2276
2276
|
}, [
|
|
2277
|
-
|
|
2277
|
+
z("div", {
|
|
2278
2278
|
class: b(_.$style.groupTitle)
|
|
2279
2279
|
}, "不固定", 2),
|
|
2280
|
-
E(
|
|
2281
|
-
list:
|
|
2280
|
+
E(y(je), {
|
|
2281
|
+
list: c.value,
|
|
2282
2282
|
"item-key": "key",
|
|
2283
2283
|
class: b(_.$style.columnList),
|
|
2284
2284
|
handle: ".table-column-draggable-handle",
|
|
2285
|
-
disabled:
|
|
2286
|
-
onEnd:
|
|
2285
|
+
disabled: c.value.length <= 1,
|
|
2286
|
+
onEnd: x
|
|
2287
2287
|
}, {
|
|
2288
2288
|
item: C(({ element: D }) => [
|
|
2289
|
-
|
|
2289
|
+
d(D) ? (k(), q("div", {
|
|
2290
2290
|
key: 0,
|
|
2291
2291
|
class: b(_.$style.columnItem),
|
|
2292
|
-
style: ne({ background:
|
|
2292
|
+
style: ne({ background: y(re).colorBgContainer })
|
|
2293
2293
|
}, [
|
|
2294
2294
|
E(Z, {
|
|
2295
2295
|
type: "text",
|
|
2296
2296
|
size: "small",
|
|
2297
|
-
icon: W(
|
|
2298
|
-
style: ne({ color:
|
|
2297
|
+
icon: W(y(Ae)),
|
|
2298
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2299
2299
|
class: b(["table-column-draggable-handle", _.$style.dragIcon])
|
|
2300
2300
|
}, null, 8, ["icon", "style", "class"]),
|
|
2301
2301
|
E(ie, {
|
|
2302
2302
|
checked: D.visible,
|
|
2303
|
-
"onUpdate:checked": (
|
|
2304
|
-
onChange:
|
|
2303
|
+
"onUpdate:checked": (ae) => D.visible = ae,
|
|
2304
|
+
onChange: x
|
|
2305
2305
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2306
2306
|
E(Se, {
|
|
2307
2307
|
ellipsis: { tooltip: D.title },
|
|
2308
2308
|
content: D.title,
|
|
2309
2309
|
class: b([_.$style.columnItemContent, _.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2310
2310
|
onClick: () => {
|
|
2311
|
-
D.visible = !D.visible,
|
|
2311
|
+
D.visible = !D.visible, x();
|
|
2312
2312
|
}
|
|
2313
2313
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2314
|
-
|
|
2314
|
+
z("div", {
|
|
2315
2315
|
class: b(_.$style.fixedActions)
|
|
2316
2316
|
}, [
|
|
2317
|
-
E(
|
|
2317
|
+
E(fe, { title: "固定在左侧" }, {
|
|
2318
2318
|
default: C(() => [
|
|
2319
2319
|
E(Z, {
|
|
2320
2320
|
type: "text",
|
|
2321
2321
|
size: "small",
|
|
2322
|
-
icon: W(
|
|
2323
|
-
style: ne({ color:
|
|
2324
|
-
onClick: (
|
|
2322
|
+
icon: W(y(xt)),
|
|
2323
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2324
|
+
onClick: (ae) => $(D, "left")
|
|
2325
2325
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2326
2326
|
]),
|
|
2327
2327
|
_: 2
|
|
2328
2328
|
}, 1024),
|
|
2329
|
-
E(
|
|
2329
|
+
E(fe, { title: "固定在右侧" }, {
|
|
2330
2330
|
default: C(() => [
|
|
2331
2331
|
E(Z, {
|
|
2332
2332
|
type: "text",
|
|
2333
2333
|
size: "small",
|
|
2334
|
-
icon: W(
|
|
2335
|
-
style: ne({ color:
|
|
2336
|
-
onClick: (
|
|
2334
|
+
icon: W(y(Et)),
|
|
2335
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2336
|
+
onClick: (ae) => $(D, "right")
|
|
2337
2337
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2338
2338
|
]),
|
|
2339
2339
|
_: 2
|
|
2340
2340
|
}, 1024)
|
|
2341
2341
|
], 2)
|
|
2342
|
-
], 6)) :
|
|
2342
|
+
], 6)) : j("", !0)
|
|
2343
2343
|
]),
|
|
2344
2344
|
_: 1
|
|
2345
2345
|
}, 8, ["list", "class", "disabled"])
|
|
2346
|
-
], 2)) :
|
|
2347
|
-
p.value.some((D) =>
|
|
2346
|
+
], 2)) : j("", !0),
|
|
2347
|
+
p.value.some((D) => d(D)) ? (k(), q("div", {
|
|
2348
2348
|
key: 2,
|
|
2349
2349
|
class: b(_.$style.columnGroup)
|
|
2350
2350
|
}, [
|
|
2351
|
-
|
|
2351
|
+
z("div", {
|
|
2352
2352
|
class: b(_.$style.groupTitle)
|
|
2353
2353
|
}, "固定在右侧", 2),
|
|
2354
|
-
E(
|
|
2354
|
+
E(y(je), {
|
|
2355
2355
|
list: p.value,
|
|
2356
2356
|
"item-key": "key",
|
|
2357
2357
|
class: b(_.$style.columnList),
|
|
2358
2358
|
handle: ".table-column-draggable-handle",
|
|
2359
2359
|
disabled: p.value.length <= 1,
|
|
2360
|
-
onEnd:
|
|
2360
|
+
onEnd: x
|
|
2361
2361
|
}, {
|
|
2362
2362
|
item: C(({ element: D }) => [
|
|
2363
|
-
|
|
2363
|
+
d(D) ? (k(), q("div", {
|
|
2364
2364
|
key: 0,
|
|
2365
2365
|
class: b(_.$style.columnItem),
|
|
2366
|
-
style: ne({ background:
|
|
2366
|
+
style: ne({ background: y(re).colorBgContainer })
|
|
2367
2367
|
}, [
|
|
2368
2368
|
E(Z, {
|
|
2369
2369
|
type: "text",
|
|
2370
2370
|
size: "small",
|
|
2371
|
-
icon: W(
|
|
2372
|
-
style: ne({ color:
|
|
2371
|
+
icon: W(y(Ae)),
|
|
2372
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2373
2373
|
class: b(["table-column-draggable-handle", _.$style.dragIcon])
|
|
2374
2374
|
}, null, 8, ["icon", "style", "class"]),
|
|
2375
2375
|
E(ie, {
|
|
2376
2376
|
checked: D.visible,
|
|
2377
|
-
"onUpdate:checked": (
|
|
2378
|
-
onChange:
|
|
2377
|
+
"onUpdate:checked": (ae) => D.visible = ae,
|
|
2378
|
+
onChange: x
|
|
2379
2379
|
}, null, 8, ["checked", "onUpdate:checked"]),
|
|
2380
2380
|
E(Se, {
|
|
2381
2381
|
ellipsis: { tooltip: D.title },
|
|
2382
2382
|
content: D.title,
|
|
2383
2383
|
class: b([_.$style.columnItemContent, _.$style.dragHandle, "table-column-draggable-handle"]),
|
|
2384
2384
|
onClick: () => {
|
|
2385
|
-
D.visible = !D.visible,
|
|
2385
|
+
D.visible = !D.visible, x();
|
|
2386
2386
|
}
|
|
2387
2387
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
2388
|
-
|
|
2388
|
+
z("div", {
|
|
2389
2389
|
class: b(_.$style.fixedActions)
|
|
2390
2390
|
}, [
|
|
2391
|
-
E(
|
|
2391
|
+
E(fe, { title: "固定在左侧" }, {
|
|
2392
2392
|
default: C(() => [
|
|
2393
2393
|
E(Z, {
|
|
2394
2394
|
type: "text",
|
|
2395
2395
|
size: "small",
|
|
2396
|
-
icon: W(
|
|
2397
|
-
style: ne({ color:
|
|
2398
|
-
onClick: (
|
|
2396
|
+
icon: W(y(xt)),
|
|
2397
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
2398
|
+
onClick: (ae) => $(D, "left")
|
|
2399
2399
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2400
2400
|
]),
|
|
2401
2401
|
_: 2
|
|
2402
2402
|
}, 1024),
|
|
2403
|
-
E(
|
|
2403
|
+
E(fe, { title: "取消固定" }, {
|
|
2404
2404
|
default: C(() => [
|
|
2405
2405
|
E(Z, {
|
|
2406
2406
|
type: "text",
|
|
2407
2407
|
size: "small",
|
|
2408
|
-
icon: W(
|
|
2409
|
-
style: ne({ color:
|
|
2410
|
-
onClick: (
|
|
2408
|
+
icon: W(y(St)),
|
|
2409
|
+
style: ne({ color: y(re).colorPrimary }),
|
|
2410
|
+
onClick: (ae) => $(D, !1)
|
|
2411
2411
|
}, null, 8, ["icon", "style", "onClick"])
|
|
2412
2412
|
]),
|
|
2413
2413
|
_: 2
|
|
2414
2414
|
}, 1024)
|
|
2415
2415
|
], 2)
|
|
2416
|
-
], 6)) :
|
|
2416
|
+
], 6)) : j("", !0)
|
|
2417
2417
|
]),
|
|
2418
2418
|
_: 1
|
|
2419
2419
|
}, 8, ["list", "class", "disabled"])
|
|
2420
|
-
], 2)) :
|
|
2421
|
-
m.value ? (
|
|
2420
|
+
], 2)) : j("", !0),
|
|
2421
|
+
m.value ? (k(), q("div", {
|
|
2422
2422
|
key: 3,
|
|
2423
2423
|
class: b(_.$style.emptyText),
|
|
2424
|
-
style: ne({ color:
|
|
2425
|
-
}, " 未找到相关查询项 ", 6)) :
|
|
2424
|
+
style: ne({ color: y(re).colorTextSecondary })
|
|
2425
|
+
}, " 未找到相关查询项 ", 6)) : j("", !0)
|
|
2426
2426
|
], 2)
|
|
2427
2427
|
], 2)
|
|
2428
2428
|
]),
|
|
2429
2429
|
default: C(() => [
|
|
2430
2430
|
E(Z, {
|
|
2431
2431
|
type: "text",
|
|
2432
|
-
icon: W(
|
|
2432
|
+
icon: W(y(An)),
|
|
2433
2433
|
class: b(_.$style.configBtn)
|
|
2434
2434
|
}, null, 8, ["icon", "class"])
|
|
2435
2435
|
]),
|
|
@@ -2440,24 +2440,24 @@ const ao = (t) => {
|
|
|
2440
2440
|
});
|
|
2441
2441
|
};
|
|
2442
2442
|
}
|
|
2443
|
-
}),
|
|
2444
|
-
configBtn:
|
|
2445
|
-
tableConfig:
|
|
2446
|
-
tableConfigHead:
|
|
2447
|
-
tableConfigActions:
|
|
2448
|
-
tableConfigContent:
|
|
2449
|
-
columnGroup:
|
|
2450
|
-
groupTitle:
|
|
2451
|
-
columnList:
|
|
2452
|
-
columnItem:
|
|
2453
|
-
columnItemContent:
|
|
2454
|
-
dragIcon:
|
|
2455
|
-
dragHandle:
|
|
2456
|
-
fixedActions:
|
|
2457
|
-
emptyText:
|
|
2458
|
-
},
|
|
2459
|
-
$style:
|
|
2460
|
-
},
|
|
2443
|
+
}), Ro = "_configBtn_fstz6_1", jo = "_tableConfig_fstz6_9", No = "_tableConfigHead_fstz6_12", Uo = "_tableConfigActions_fstz6_15", zo = "_tableConfigContent_fstz6_22", Ho = "_columnGroup_fstz6_28", qo = "_groupTitle_fstz6_28", Yo = "_columnList_fstz6_35", Vo = "_columnItem_fstz6_39", Wo = "_columnItemContent_fstz6_47", Go = "_dragIcon_fstz6_51", Ko = "_dragHandle_fstz6_54", Qo = "_fixedActions_fstz6_57", Xo = "_emptyText_fstz6_65", Zo = {
|
|
2444
|
+
configBtn: Ro,
|
|
2445
|
+
tableConfig: jo,
|
|
2446
|
+
tableConfigHead: No,
|
|
2447
|
+
tableConfigActions: Uo,
|
|
2448
|
+
tableConfigContent: zo,
|
|
2449
|
+
columnGroup: Ho,
|
|
2450
|
+
groupTitle: qo,
|
|
2451
|
+
columnList: Yo,
|
|
2452
|
+
columnItem: Vo,
|
|
2453
|
+
columnItemContent: Wo,
|
|
2454
|
+
dragIcon: Go,
|
|
2455
|
+
dragHandle: Ko,
|
|
2456
|
+
fixedActions: Qo,
|
|
2457
|
+
emptyText: Xo
|
|
2458
|
+
}, Jo = {
|
|
2459
|
+
$style: Zo
|
|
2460
|
+
}, er = /* @__PURE__ */ Ce(Bo, [["__cssModules", Jo]]), tr = /* @__PURE__ */ pe({
|
|
2461
2461
|
__name: "DynamicList",
|
|
2462
2462
|
props: {
|
|
2463
2463
|
/**
|
|
@@ -2515,7 +2515,7 @@ const ao = (t) => {
|
|
|
2515
2515
|
deleteButtonProps: {
|
|
2516
2516
|
type: [Object, Function],
|
|
2517
2517
|
default: () => ({
|
|
2518
|
-
icon: W(
|
|
2518
|
+
icon: W(wt)
|
|
2519
2519
|
})
|
|
2520
2520
|
},
|
|
2521
2521
|
/**
|
|
@@ -2565,17 +2565,17 @@ const ao = (t) => {
|
|
|
2565
2565
|
},
|
|
2566
2566
|
emits: ["update:value", "add", "remove", "change"],
|
|
2567
2567
|
setup(t, { emit: e }) {
|
|
2568
|
-
const o = t, n = e, r =
|
|
2568
|
+
const o = t, n = e, r = vn.useInjectFormItemContext(), s = oe(o.value), l = () => {
|
|
2569
2569
|
const f = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
2570
2570
|
return Array.from({ length: 16 }).map(() => f[Math.floor(Math.random() * f.length)]).join("");
|
|
2571
|
-
},
|
|
2571
|
+
}, c = (f) => {
|
|
2572
2572
|
var v;
|
|
2573
2573
|
if (s.value.length < o.maxLength) {
|
|
2574
|
-
const
|
|
2574
|
+
const g = {
|
|
2575
2575
|
id: l(),
|
|
2576
2576
|
...((v = o.getNewItemData) == null ? void 0 : v.call(o)) ?? {}
|
|
2577
2577
|
};
|
|
2578
|
-
s.value.splice(f + 1, 0,
|
|
2578
|
+
s.value.splice(f + 1, 0, g), n("add", g, f + 1);
|
|
2579
2579
|
}
|
|
2580
2580
|
}, p = (f) => {
|
|
2581
2581
|
s.value.splice(f, 1), n("remove", f);
|
|
@@ -2583,7 +2583,7 @@ const ao = (t) => {
|
|
|
2583
2583
|
return we(
|
|
2584
2584
|
() => s.value,
|
|
2585
2585
|
() => {
|
|
2586
|
-
n("update:value",
|
|
2586
|
+
n("update:value", y(s.value)), n("change", y(s.value)), r.onFieldChange();
|
|
2587
2587
|
},
|
|
2588
2588
|
{
|
|
2589
2589
|
deep: !0,
|
|
@@ -2592,88 +2592,88 @@ const ao = (t) => {
|
|
|
2592
2592
|
), we(
|
|
2593
2593
|
() => o.value,
|
|
2594
2594
|
() => {
|
|
2595
|
-
s.value =
|
|
2595
|
+
s.value = y(o.value);
|
|
2596
2596
|
},
|
|
2597
2597
|
{
|
|
2598
2598
|
deep: !0,
|
|
2599
2599
|
immediate: !0
|
|
2600
2600
|
}
|
|
2601
2601
|
), (f, v) => {
|
|
2602
|
-
const
|
|
2603
|
-
return
|
|
2604
|
-
E(
|
|
2602
|
+
const g = L("a-button");
|
|
2603
|
+
return k(), q(Oe, null, [
|
|
2604
|
+
E(y(je), {
|
|
2605
2605
|
list: s.value,
|
|
2606
2606
|
"item-key": t.itemKey,
|
|
2607
2607
|
disabled: !t.sortable,
|
|
2608
2608
|
handle: ".draggable-icon",
|
|
2609
2609
|
class: b([f.$style.dynamicList, t.className])
|
|
2610
2610
|
}, {
|
|
2611
|
-
item: C(({ element:
|
|
2612
|
-
|
|
2611
|
+
item: C(({ element: d, index: m }) => [
|
|
2612
|
+
z("div", {
|
|
2613
2613
|
class: b([f.$style.dynamicListItem, t.itemClassName])
|
|
2614
2614
|
}, [
|
|
2615
|
-
|
|
2615
|
+
z("div", {
|
|
2616
2616
|
class: b(f.$style.dynamicListItemContent)
|
|
2617
2617
|
}, [
|
|
2618
|
-
|
|
2619
|
-
item:
|
|
2618
|
+
ge(f.$slots, "default", {
|
|
2619
|
+
item: d,
|
|
2620
2620
|
index: m
|
|
2621
2621
|
})
|
|
2622
2622
|
], 2),
|
|
2623
|
-
|
|
2623
|
+
z("div", {
|
|
2624
2624
|
class: b(f.$style.actionsIcons)
|
|
2625
2625
|
}, [
|
|
2626
|
-
E(
|
|
2626
|
+
E(g, le({
|
|
2627
2627
|
type: "link",
|
|
2628
2628
|
danger: "",
|
|
2629
2629
|
size: "small",
|
|
2630
|
-
icon: W(
|
|
2631
|
-
},
|
|
2632
|
-
onClick: (
|
|
2630
|
+
icon: W(y(wt))
|
|
2631
|
+
}, y($e)(t.deleteButtonProps) ? t.deleteButtonProps(d, m) : t.deleteButtonProps, {
|
|
2632
|
+
onClick: (w) => p(m)
|
|
2633
2633
|
}), {
|
|
2634
2634
|
default: C(() => [
|
|
2635
|
-
J(
|
|
2635
|
+
J(be(t.deleteButtonText), 1)
|
|
2636
2636
|
]),
|
|
2637
2637
|
_: 2
|
|
2638
2638
|
}, 1040, ["icon", "onClick"]),
|
|
2639
|
-
t.sortable ? (
|
|
2639
|
+
t.sortable ? (k(), N(g, le({
|
|
2640
2640
|
key: 0,
|
|
2641
2641
|
class: ["draggable-icon", f.$style.dragIcon],
|
|
2642
2642
|
size: "small",
|
|
2643
2643
|
type: "text",
|
|
2644
|
-
icon: W(
|
|
2645
|
-
},
|
|
2644
|
+
icon: W(y(Ae))
|
|
2645
|
+
}, y($e)(t.sortButtonProps) ? t.sortButtonProps(d, m) : t.sortButtonProps), null, 16, ["class", "icon"])) : j("", !0)
|
|
2646
2646
|
], 2)
|
|
2647
2647
|
], 2)
|
|
2648
2648
|
]),
|
|
2649
2649
|
_: 3
|
|
2650
2650
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
2651
|
-
|
|
2652
|
-
s.value.length < t.maxLength ? (
|
|
2651
|
+
z("div", null, [
|
|
2652
|
+
s.value.length < t.maxLength ? (k(), N(g, le({
|
|
2653
2653
|
key: 0,
|
|
2654
2654
|
type: "link",
|
|
2655
|
-
icon: W(
|
|
2656
|
-
},
|
|
2657
|
-
onClick: v[0] || (v[0] = (
|
|
2655
|
+
icon: W(y(Rt))
|
|
2656
|
+
}, y($e)(t.addButtonProps) ? t.addButtonProps() : t.addButtonProps, {
|
|
2657
|
+
onClick: v[0] || (v[0] = (d) => c(s.value.length - 1))
|
|
2658
2658
|
}), {
|
|
2659
2659
|
default: C(() => [
|
|
2660
|
-
J(
|
|
2660
|
+
J(be(t.addButtonText), 1)
|
|
2661
2661
|
]),
|
|
2662
2662
|
_: 1
|
|
2663
|
-
}, 16, ["icon"])) :
|
|
2663
|
+
}, 16, ["icon"])) : j("", !0)
|
|
2664
2664
|
])
|
|
2665
2665
|
], 64);
|
|
2666
2666
|
};
|
|
2667
2667
|
}
|
|
2668
|
-
}),
|
|
2669
|
-
dynamicList:
|
|
2670
|
-
dynamicListItem:
|
|
2671
|
-
dynamicListItemContent:
|
|
2672
|
-
actionsIcons:
|
|
2673
|
-
dragIcon:
|
|
2674
|
-
},
|
|
2675
|
-
$style:
|
|
2676
|
-
},
|
|
2668
|
+
}), nr = "_dynamicList_1woe5_1", or = "_dynamicListItem_1woe5_6", rr = "_dynamicListItemContent_1woe5_13", ar = "_actionsIcons_1woe5_17", sr = "_dragIcon_1woe5_21", lr = {
|
|
2669
|
+
dynamicList: nr,
|
|
2670
|
+
dynamicListItem: or,
|
|
2671
|
+
dynamicListItemContent: rr,
|
|
2672
|
+
actionsIcons: ar,
|
|
2673
|
+
dragIcon: sr
|
|
2674
|
+
}, ir = {
|
|
2675
|
+
$style: lr
|
|
2676
|
+
}, cr = /* @__PURE__ */ Ce(tr, [["__cssModules", ir]]), ur = /* @__PURE__ */ pe({
|
|
2677
2677
|
__name: "InputGroup",
|
|
2678
2678
|
props: {
|
|
2679
2679
|
/**
|
|
@@ -2711,43 +2711,43 @@ const ao = (t) => {
|
|
|
2711
2711
|
n("update:value", l), n("change", l);
|
|
2712
2712
|
}
|
|
2713
2713
|
}), s = F(() => {
|
|
2714
|
-
var
|
|
2714
|
+
var c, p;
|
|
2715
2715
|
const l = o.inModal ? "30%" : "50%";
|
|
2716
|
-
return ((p = (
|
|
2716
|
+
return ((p = (c = o.formItem.addonSelectProps) == null ? void 0 : c.style) == null ? void 0 : p.width) ?? l;
|
|
2717
2717
|
});
|
|
2718
|
-
return (l,
|
|
2718
|
+
return (l, c) => {
|
|
2719
2719
|
const p = L("a-select"), f = L("a-input"), v = L("a-input-group");
|
|
2720
|
-
return
|
|
2720
|
+
return k(), N(v, {
|
|
2721
2721
|
compact: "",
|
|
2722
2722
|
class: b(l.$style.inputGroup)
|
|
2723
2723
|
}, {
|
|
2724
2724
|
default: C(() => [
|
|
2725
2725
|
E(p, le({
|
|
2726
2726
|
value: r.value.select,
|
|
2727
|
-
"onUpdate:value":
|
|
2727
|
+
"onUpdate:value": c[0] || (c[0] = (g) => r.value.select = g),
|
|
2728
2728
|
style: {
|
|
2729
|
-
...
|
|
2729
|
+
...y(Qe)(t.formItem, "addonBeforeProps.style", {}),
|
|
2730
2730
|
width: s.value
|
|
2731
2731
|
}
|
|
2732
|
-
},
|
|
2732
|
+
}, y(jt)(t.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
2733
2733
|
E(f, le({
|
|
2734
2734
|
value: r.value.value,
|
|
2735
|
-
"onUpdate:value":
|
|
2735
|
+
"onUpdate:value": c[1] || (c[1] = (g) => r.value.value = g),
|
|
2736
2736
|
style: {
|
|
2737
|
-
...
|
|
2737
|
+
...y(Qe)(t.formItem, "props.style", {}),
|
|
2738
2738
|
width: `calc(100% - ${s.value})`
|
|
2739
2739
|
}
|
|
2740
|
-
},
|
|
2740
|
+
}, y(ke)(t.formItem, ["props"])), null, 16, ["value", "style"])
|
|
2741
2741
|
]),
|
|
2742
2742
|
_: 1
|
|
2743
2743
|
}, 8, ["class"]);
|
|
2744
2744
|
};
|
|
2745
2745
|
}
|
|
2746
|
-
}),
|
|
2747
|
-
inputGroup:
|
|
2748
|
-
},
|
|
2749
|
-
$style:
|
|
2750
|
-
},
|
|
2746
|
+
}), dr = "_inputGroup_eukv3_1", pr = {
|
|
2747
|
+
inputGroup: dr
|
|
2748
|
+
}, mr = {
|
|
2749
|
+
$style: pr
|
|
2750
|
+
}, fr = /* @__PURE__ */ Ce(ur, [["__cssModules", mr]]), Ye = null, hr = /* @__PURE__ */ pe({
|
|
2751
2751
|
__name: "InputNumberRange",
|
|
2752
2752
|
props: {
|
|
2753
2753
|
/**
|
|
@@ -2771,61 +2771,61 @@ const ao = (t) => {
|
|
|
2771
2771
|
setup(t, { emit: e }) {
|
|
2772
2772
|
const o = t, n = e, r = F({
|
|
2773
2773
|
get() {
|
|
2774
|
-
var
|
|
2775
|
-
return ((
|
|
2774
|
+
var c;
|
|
2775
|
+
return ((c = o.value) == null ? void 0 : c[0]) ?? Ye;
|
|
2776
2776
|
},
|
|
2777
|
-
set(
|
|
2777
|
+
set(c) {
|
|
2778
2778
|
var p;
|
|
2779
|
-
n("update:value", [
|
|
2779
|
+
n("update:value", [c, ((p = o.value) == null ? void 0 : p[1]) ?? Ye]);
|
|
2780
2780
|
}
|
|
2781
2781
|
}), s = F({
|
|
2782
2782
|
get() {
|
|
2783
|
-
var
|
|
2784
|
-
return ((
|
|
2783
|
+
var c;
|
|
2784
|
+
return ((c = o.value) == null ? void 0 : c[1]) ?? Ye;
|
|
2785
2785
|
},
|
|
2786
|
-
set(
|
|
2786
|
+
set(c) {
|
|
2787
2787
|
var p;
|
|
2788
|
-
n("update:value", [((p = o.value) == null ? void 0 : p[0]) ??
|
|
2788
|
+
n("update:value", [((p = o.value) == null ? void 0 : p[0]) ?? Ye, c]);
|
|
2789
2789
|
}
|
|
2790
|
-
}), l = F(() =>
|
|
2791
|
-
return (
|
|
2792
|
-
var v,
|
|
2790
|
+
}), l = F(() => jt(o.formItem.props, ["placeholder"]));
|
|
2791
|
+
return (c, p) => {
|
|
2792
|
+
var v, g, d, m;
|
|
2793
2793
|
const f = L("a-input-number");
|
|
2794
|
-
return
|
|
2795
|
-
class: b([
|
|
2794
|
+
return k(), q("div", {
|
|
2795
|
+
class: b([c.$style.inputNumberGroup, "input-number-group"])
|
|
2796
2796
|
}, [
|
|
2797
|
-
|
|
2798
|
-
class: b(
|
|
2797
|
+
z("div", {
|
|
2798
|
+
class: b(c.$style.inputNumberGroupContent)
|
|
2799
2799
|
}, [
|
|
2800
2800
|
E(f, le(l.value, {
|
|
2801
2801
|
value: r.value,
|
|
2802
|
-
"onUpdate:value": p[0] || (p[0] = (
|
|
2803
|
-
class: [
|
|
2804
|
-
placeholder: ((
|
|
2802
|
+
"onUpdate:value": p[0] || (p[0] = (w) => r.value = w),
|
|
2803
|
+
class: [c.$style.inputNumber, c.$style.startInputNumber],
|
|
2804
|
+
placeholder: ((g = y(De)((v = o.formItem.props) == null ? void 0 : v.placeholder)) == null ? void 0 : g[0]) ?? "请输入"
|
|
2805
2805
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
2806
|
-
|
|
2807
|
-
class: b(
|
|
2806
|
+
z("span", {
|
|
2807
|
+
class: b(c.$style.divider)
|
|
2808
2808
|
}, "~", 2),
|
|
2809
2809
|
E(f, le(l.value, {
|
|
2810
2810
|
value: s.value,
|
|
2811
|
-
"onUpdate:value": p[1] || (p[1] = (
|
|
2812
|
-
class: [
|
|
2813
|
-
placeholder: ((m =
|
|
2811
|
+
"onUpdate:value": p[1] || (p[1] = (w) => s.value = w),
|
|
2812
|
+
class: [c.$style.inputNumber, c.$style.endInputNumber],
|
|
2813
|
+
placeholder: ((m = y(De)((d = o.formItem.props) == null ? void 0 : d.placeholder)) == null ? void 0 : m[1]) ?? "请输入"
|
|
2814
2814
|
}), null, 16, ["value", "class", "placeholder"])
|
|
2815
2815
|
], 2)
|
|
2816
2816
|
], 2);
|
|
2817
2817
|
};
|
|
2818
2818
|
}
|
|
2819
|
-
}),
|
|
2820
|
-
inputNumberGroup:
|
|
2821
|
-
inputNumberGroupContent:
|
|
2822
|
-
inputNumber:
|
|
2823
|
-
startInputNumber:
|
|
2824
|
-
endInputNumber:
|
|
2825
|
-
divider:
|
|
2826
|
-
},
|
|
2827
|
-
$style:
|
|
2828
|
-
},
|
|
2819
|
+
}), yr = "_inputNumberGroup_149g6_1", gr = "_inputNumberGroupContent_149g6_4", br = "_inputNumber_149g6_1", vr = "_startInputNumber_149g6_13", Cr = "_endInputNumber_149g6_21", _r = "_divider_149g6_29", Er = {
|
|
2820
|
+
inputNumberGroup: yr,
|
|
2821
|
+
inputNumberGroupContent: gr,
|
|
2822
|
+
inputNumber: br,
|
|
2823
|
+
startInputNumber: vr,
|
|
2824
|
+
endInputNumber: Cr,
|
|
2825
|
+
divider: _r
|
|
2826
|
+
}, Sr = {
|
|
2827
|
+
$style: Er
|
|
2828
|
+
}, xr = /* @__PURE__ */ Ce(hr, [["__cssModules", Sr]]), wr = 8, $r = /* @__PURE__ */ pe({
|
|
2829
2829
|
__name: "FormFieldItem",
|
|
2830
2830
|
props: {
|
|
2831
2831
|
/**
|
|
@@ -2868,31 +2868,31 @@ const ao = (t) => {
|
|
|
2868
2868
|
emits: ["update:value", "change"],
|
|
2869
2869
|
setup(t, { emit: e }) {
|
|
2870
2870
|
const o = {
|
|
2871
|
-
[X.input]:
|
|
2872
|
-
[X.inputGroup]:
|
|
2873
|
-
[X.inputNumber]:
|
|
2874
|
-
[X.inputNumberRange]:
|
|
2875
|
-
[X.select]:
|
|
2876
|
-
[X.cascader]:
|
|
2877
|
-
[X.treeSelect]:
|
|
2878
|
-
[X.datePicker]:
|
|
2879
|
-
[X.rangePicker]:
|
|
2880
|
-
}, n = t, r = e, s =
|
|
2871
|
+
[X.input]: $n,
|
|
2872
|
+
[X.inputGroup]: fr,
|
|
2873
|
+
[X.inputNumber]: wn,
|
|
2874
|
+
[X.inputNumberRange]: xr,
|
|
2875
|
+
[X.select]: xn,
|
|
2876
|
+
[X.cascader]: Sn,
|
|
2877
|
+
[X.treeSelect]: En,
|
|
2878
|
+
[X.datePicker]: _n,
|
|
2879
|
+
[X.rangePicker]: Cn
|
|
2880
|
+
}, n = t, r = e, s = ln(), l = F({
|
|
2881
2881
|
get() {
|
|
2882
2882
|
return n.value;
|
|
2883
2883
|
},
|
|
2884
|
-
set(
|
|
2885
|
-
r("update:value",
|
|
2884
|
+
set(d) {
|
|
2885
|
+
r("update:value", d), r("change", d);
|
|
2886
2886
|
}
|
|
2887
|
-
}),
|
|
2888
|
-
const
|
|
2889
|
-
return Math.max(
|
|
2887
|
+
}), c = F(() => !n.inModal && n.formItem.showLabel !== !1), p = F(() => {
|
|
2888
|
+
const d = mo(n.formItem.label);
|
|
2889
|
+
return Math.max(d, 20) + wr * 2 + 2;
|
|
2890
2890
|
}), f = F(() => {
|
|
2891
|
-
const { type:
|
|
2892
|
-
return
|
|
2891
|
+
const { type: d, component: m } = n.formItem;
|
|
2892
|
+
return d === "component" ? m : o[d];
|
|
2893
2893
|
}), v = F(() => {
|
|
2894
2894
|
var P;
|
|
2895
|
-
const
|
|
2895
|
+
const d = n.formItem, m = {
|
|
2896
2896
|
[X.input]: {
|
|
2897
2897
|
placeholder: "请输入",
|
|
2898
2898
|
clearable: !0
|
|
@@ -2900,13 +2900,13 @@ const ao = (t) => {
|
|
|
2900
2900
|
[X.inputGroup]: {
|
|
2901
2901
|
placeholder: "请输入",
|
|
2902
2902
|
clearable: !0,
|
|
2903
|
-
formItem:
|
|
2903
|
+
formItem: d
|
|
2904
2904
|
},
|
|
2905
2905
|
[X.inputNumber]: {
|
|
2906
2906
|
placeholder: "请输入"
|
|
2907
2907
|
},
|
|
2908
2908
|
[X.inputNumberRange]: {
|
|
2909
|
-
formItem:
|
|
2909
|
+
formItem: d
|
|
2910
2910
|
},
|
|
2911
2911
|
[X.select]: {
|
|
2912
2912
|
placeholder: "请选择",
|
|
@@ -2917,67 +2917,67 @@ const ao = (t) => {
|
|
|
2917
2917
|
maxTagTextLength: 40,
|
|
2918
2918
|
maxTagCount: "responsive"
|
|
2919
2919
|
}
|
|
2920
|
-
},
|
|
2920
|
+
}, w = {
|
|
2921
2921
|
...s,
|
|
2922
|
-
...m[
|
|
2923
|
-
...
|
|
2922
|
+
...m[d.type] ?? {},
|
|
2923
|
+
...d.props ?? {},
|
|
2924
2924
|
style: {
|
|
2925
|
-
...((P =
|
|
2926
|
-
width:
|
|
2925
|
+
...((P = d.props) == null ? void 0 : P.style) ?? {},
|
|
2926
|
+
width: d.type !== X.component ? "100%" : void 0
|
|
2927
2927
|
},
|
|
2928
2928
|
inModal: n.inModal
|
|
2929
2929
|
};
|
|
2930
|
-
return n.inModal || (
|
|
2931
|
-
}),
|
|
2932
|
-
return (
|
|
2933
|
-
const
|
|
2934
|
-
return
|
|
2935
|
-
class: b(
|
|
2930
|
+
return n.inModal || (c.value && Ne(w, "style.width", `calc(100% - ${p.value}px)`), d.type === X.select && Ne(w, "maxTagCount", "responsive")), w;
|
|
2931
|
+
}), g = F(() => n.formItem.modelPropName ?? "value");
|
|
2932
|
+
return (d, m) => {
|
|
2933
|
+
const w = L("a-input"), P = L("a-input-group");
|
|
2934
|
+
return k(), q("div", {
|
|
2935
|
+
class: b(d.$style.formFieldItem)
|
|
2936
2936
|
}, [
|
|
2937
|
-
|
|
2937
|
+
c.value ? (k(), N(P, {
|
|
2938
2938
|
key: 0,
|
|
2939
2939
|
compact: "",
|
|
2940
|
-
class: b([
|
|
2940
|
+
class: b([d.$style.inputGroup, "super-table-input-group"])
|
|
2941
2941
|
}, {
|
|
2942
2942
|
default: C(() => [
|
|
2943
|
-
t.inModal ?
|
|
2943
|
+
t.inModal ? j("", !0) : (k(), N(w, {
|
|
2944
2944
|
key: 0,
|
|
2945
2945
|
value: t.formItem.label,
|
|
2946
2946
|
disabled: "",
|
|
2947
2947
|
style: ne({
|
|
2948
|
-
color:
|
|
2948
|
+
color: y(re).colorText,
|
|
2949
2949
|
width: `${p.value}px`
|
|
2950
2950
|
}),
|
|
2951
|
-
class: b([
|
|
2951
|
+
class: b([d.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
2952
2952
|
}, null, 8, ["value", "style", "class"])),
|
|
2953
|
-
f.value ? (
|
|
2953
|
+
f.value ? (k(), N(Ge(f.value), le({
|
|
2954
2954
|
key: 1,
|
|
2955
|
-
[
|
|
2956
|
-
["onUpdate:" +
|
|
2957
|
-
}, v.value), null, 16)) :
|
|
2955
|
+
[g.value]: l.value,
|
|
2956
|
+
["onUpdate:" + g.value]: m[0] || (m[0] = (x) => l.value = x)
|
|
2957
|
+
}, v.value), null, 16)) : j("", !0)
|
|
2958
2958
|
]),
|
|
2959
2959
|
_: 1
|
|
2960
|
-
}, 8, ["class"])) : (
|
|
2961
|
-
t.formItem.type ===
|
|
2960
|
+
}, 8, ["class"])) : (k(), q(Oe, { key: 1 }, [
|
|
2961
|
+
t.formItem.type === y(X).component && t.formItem.showLabel ? (k(), q("span", {
|
|
2962
2962
|
key: 0,
|
|
2963
|
-
class: b(
|
|
2964
|
-
},
|
|
2965
|
-
(
|
|
2966
|
-
[
|
|
2967
|
-
["onUpdate:" +
|
|
2963
|
+
class: b(d.$style.customItemLabel)
|
|
2964
|
+
}, be(t.formItem.label), 3)) : j("", !0),
|
|
2965
|
+
(k(), N(Ge(f.value), le({
|
|
2966
|
+
[g.value]: l.value,
|
|
2967
|
+
["onUpdate:" + g.value]: m[1] || (m[1] = (x) => l.value = x)
|
|
2968
2968
|
}, v.value), null, 16))
|
|
2969
2969
|
], 64))
|
|
2970
2970
|
], 2);
|
|
2971
2971
|
};
|
|
2972
2972
|
}
|
|
2973
|
-
}),
|
|
2974
|
-
formFieldItem:
|
|
2975
|
-
inputGroup:
|
|
2976
|
-
formFieldItemLabel:
|
|
2977
|
-
customItemLabel:
|
|
2978
|
-
},
|
|
2979
|
-
$style:
|
|
2980
|
-
},
|
|
2973
|
+
}), kr = "_formFieldItem_1imun_1", Ir = "_inputGroup_1imun_7", Or = "_formFieldItemLabel_1imun_11", Ar = "_customItemLabel_1imun_20", Pr = {
|
|
2974
|
+
formFieldItem: kr,
|
|
2975
|
+
inputGroup: Ir,
|
|
2976
|
+
formFieldItemLabel: Or,
|
|
2977
|
+
customItemLabel: Ar
|
|
2978
|
+
}, Tr = {
|
|
2979
|
+
$style: Pr
|
|
2980
|
+
}, Yt = /* @__PURE__ */ Ce($r, [["__cssModules", Tr]]), Lr = /* @__PURE__ */ pe({
|
|
2981
2981
|
__name: "SceneConfigModal",
|
|
2982
2982
|
props: {
|
|
2983
2983
|
// 当前编辑的场景
|
|
@@ -2999,7 +2999,7 @@ const ao = (t) => {
|
|
|
2999
2999
|
// 弹窗操作类型 新增、更新、设置查询条件
|
|
3000
3000
|
actionType: {
|
|
3001
3001
|
type: String,
|
|
3002
|
-
default:
|
|
3002
|
+
default: de.create
|
|
3003
3003
|
},
|
|
3004
3004
|
// 是否允许新增
|
|
3005
3005
|
allowCreateScene: {
|
|
@@ -3019,30 +3019,30 @@ const ao = (t) => {
|
|
|
3019
3019
|
},
|
|
3020
3020
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
3021
3021
|
setup(t, { expose: e, emit: o }) {
|
|
3022
|
-
var
|
|
3022
|
+
var ze, He;
|
|
3023
3023
|
const n = t, r = o, s = oe(lt(n.formConfigMap)), l = F(() => ut(
|
|
3024
3024
|
Object.values(s.value).filter(({ visible: O }) => O !== !1),
|
|
3025
|
-
|
|
3026
|
-
)),
|
|
3027
|
-
name: ((
|
|
3028
|
-
items: n.actionType ===
|
|
3025
|
+
ve.order
|
|
3026
|
+
)), c = ["name", "value", "type"], p = l.value.filter((O) => O._selected).map((O) => ke(O, c)), f = oe(!0), v = oe(!1), g = oe(), d = Ke({
|
|
3027
|
+
name: ((ze = n.currentScene) == null ? void 0 : ze.name) ?? "",
|
|
3028
|
+
items: n.actionType === de.search ? p : lt(((He = n.currentScene) == null ? void 0 : He.items) ?? [])
|
|
3029
3029
|
}), m = F({
|
|
3030
3030
|
get() {
|
|
3031
3031
|
const O = l.value.filter((I) => !I.fixed);
|
|
3032
|
-
return O.length === 0 ? !1 : O.every((I) =>
|
|
3032
|
+
return O.length === 0 ? !1 : O.every((I) => d.items.some((B) => B.name === I.name));
|
|
3033
3033
|
},
|
|
3034
3034
|
set(O) {
|
|
3035
3035
|
if (O) {
|
|
3036
|
-
const I = l.value.map((B) => ke(B,
|
|
3037
|
-
|
|
3036
|
+
const I = l.value.map((B) => ke(B, c));
|
|
3037
|
+
d.items = kt(d.items, I, "name");
|
|
3038
3038
|
} else {
|
|
3039
3039
|
const I = l.value.filter((B) => B.fixed).map((B) => B.name);
|
|
3040
|
-
|
|
3040
|
+
d.items = d.items.filter((B) => I.includes(B.name));
|
|
3041
3041
|
}
|
|
3042
3042
|
}
|
|
3043
|
-
}),
|
|
3044
|
-
(O) =>
|
|
3045
|
-
).length), P = F(() =>
|
|
3043
|
+
}), w = F(() => l.value.filter(
|
|
3044
|
+
(O) => d.items.some((I) => I.name === O.name)
|
|
3045
|
+
).length), P = F(() => w.value > 0 && w.value < l.value.length), x = Ke({
|
|
3046
3046
|
name: [
|
|
3047
3047
|
{
|
|
3048
3048
|
required: !0,
|
|
@@ -3061,22 +3061,22 @@ const ao = (t) => {
|
|
|
3061
3061
|
type: "array"
|
|
3062
3062
|
}
|
|
3063
3063
|
]
|
|
3064
|
-
}), M = F(() =>
|
|
3064
|
+
}), M = F(() => d.items.map(({ name: O }) => O)), V = () => {
|
|
3065
3065
|
const O = l.value.find((I) => !M.value.includes(I.name));
|
|
3066
|
-
return O ? ke(lt(O),
|
|
3067
|
-
},
|
|
3068
|
-
[
|
|
3069
|
-
[
|
|
3070
|
-
[
|
|
3071
|
-
})[n.actionType]),
|
|
3066
|
+
return O ? ke(lt(O), c) : {};
|
|
3067
|
+
}, H = F(() => ({
|
|
3068
|
+
[de.create]: "新建场景",
|
|
3069
|
+
[de.update]: "更新场景",
|
|
3070
|
+
[de.search]: "高级筛选"
|
|
3071
|
+
})[n.actionType]), $ = (O, I) => {
|
|
3072
3072
|
const B = n.formConfigMap[I.name];
|
|
3073
3073
|
B && (I.type = B.type, I.value = B.value, I.label = B.label, T(I.name, I.value));
|
|
3074
3074
|
}, _ = (O) => {
|
|
3075
|
-
const I = n.formConfigMap[O], B =
|
|
3075
|
+
const I = n.formConfigMap[O], B = d.items.map((se) => se.name), ee = l.value.filter((se) => !B.includes(se.name));
|
|
3076
3076
|
return [I, ...ee];
|
|
3077
3077
|
}, T = (O, I) => {
|
|
3078
|
-
const B =
|
|
3079
|
-
(ee,
|
|
3078
|
+
const B = d.items.reduce(
|
|
3079
|
+
(ee, se) => (ee[se.name] = se.value, ee),
|
|
3080
3080
|
{}
|
|
3081
3081
|
);
|
|
3082
3082
|
r("form-item-change", O, I, B);
|
|
@@ -3084,80 +3084,80 @@ const ao = (t) => {
|
|
|
3084
3084
|
T(O, I);
|
|
3085
3085
|
}, ie = async () => {
|
|
3086
3086
|
var B;
|
|
3087
|
-
const O =
|
|
3088
|
-
const
|
|
3089
|
-
return
|
|
3087
|
+
const O = d.items.map((ee, se) => {
|
|
3088
|
+
const he = s.value[ee.name];
|
|
3089
|
+
return he && (he.value = ee.value, he[ve.orderInScene] = se, he[ve.selected] = !0), he;
|
|
3090
3090
|
}).filter(Boolean);
|
|
3091
|
-
if (n.actionType ===
|
|
3092
|
-
r("update-form-config", O), r("search",
|
|
3091
|
+
if (n.actionType === de.search && !v.value) {
|
|
3092
|
+
r("update-form-config", O), r("search", d.items, O), r("cancel");
|
|
3093
3093
|
return;
|
|
3094
3094
|
}
|
|
3095
|
-
await ((B =
|
|
3096
|
-
const I =
|
|
3095
|
+
await ((B = g.value) == null ? void 0 : B.validateFields());
|
|
3096
|
+
const I = ye(d);
|
|
3097
3097
|
n.currentScene ? await n.onUpdate({
|
|
3098
3098
|
...n.currentScene,
|
|
3099
3099
|
...I
|
|
3100
3100
|
}) : await n.onCreate(I), r("update-form-config", O), r("cancel");
|
|
3101
3101
|
};
|
|
3102
3102
|
(() => {
|
|
3103
|
-
if (
|
|
3104
|
-
const O =
|
|
3103
|
+
if (d.items.length) return;
|
|
3104
|
+
const O = kt(
|
|
3105
3105
|
l.value.filter(({ fixed: B, selected: ee }) => B || ee),
|
|
3106
3106
|
"name"
|
|
3107
3107
|
);
|
|
3108
3108
|
if (O.length) {
|
|
3109
|
-
|
|
3109
|
+
d.items = ut(O, "_order").map((B) => ke(B, c));
|
|
3110
3110
|
return;
|
|
3111
3111
|
}
|
|
3112
3112
|
const I = V();
|
|
3113
|
-
I &&
|
|
3113
|
+
I && d.items.push(I);
|
|
3114
3114
|
})();
|
|
3115
3115
|
const Se = (O) => {
|
|
3116
3116
|
var I;
|
|
3117
3117
|
return {
|
|
3118
3118
|
disabled: (I = s.value[O.name]) == null ? void 0 : I.fixed
|
|
3119
3119
|
};
|
|
3120
|
-
},
|
|
3120
|
+
}, fe = (O) => s.value[O], Fe = (O, I, B) => {
|
|
3121
3121
|
if (Ht.includes(I))
|
|
3122
3122
|
return Ie("setFormItem error,", `form item with prop "${O}" is readonly`);
|
|
3123
|
-
if (!
|
|
3123
|
+
if (!fe(O))
|
|
3124
3124
|
return Ie("setFormItem error,", `Cannot find form item with name "${O}"`);
|
|
3125
3125
|
if (I === "visible" && s.value[O].fixed)
|
|
3126
3126
|
return Ie("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
3127
|
-
|
|
3127
|
+
Ne(s.value, `${O}.${I}`, B), s.value[O].visible || (d.items = d.items.filter((ee) => ee.name !== O));
|
|
3128
3128
|
}, Te = (O) => {
|
|
3129
3129
|
var I;
|
|
3130
|
-
return (I =
|
|
3130
|
+
return (I = d.items.find((B) => B.name === O)) == null ? void 0 : I.value;
|
|
3131
3131
|
}, D = (O, I) => {
|
|
3132
|
-
const B =
|
|
3132
|
+
const B = d.items.find((ee) => ee.name === O);
|
|
3133
3133
|
B && (B.value = I);
|
|
3134
|
-
},
|
|
3134
|
+
}, ae = (O) => {
|
|
3135
3135
|
Object.entries(O).forEach(([I, B]) => {
|
|
3136
3136
|
D(I, B);
|
|
3137
3137
|
});
|
|
3138
3138
|
};
|
|
3139
3139
|
function K(O) {
|
|
3140
|
-
return (O ?
|
|
3140
|
+
return (O ? De(O) : d.items.map((B) => B.name)).reduce(
|
|
3141
3141
|
(B, ee) => {
|
|
3142
|
-
const
|
|
3143
|
-
return
|
|
3142
|
+
const se = d.items.find((he) => he.name === ee);
|
|
3143
|
+
return se && (B[ee] = se.value), B;
|
|
3144
3144
|
},
|
|
3145
3145
|
{}
|
|
3146
3146
|
);
|
|
3147
3147
|
}
|
|
3148
3148
|
return e({
|
|
3149
|
-
getFormItem:
|
|
3150
|
-
setFormItem:
|
|
3149
|
+
getFormItem: fe,
|
|
3150
|
+
setFormItem: Fe,
|
|
3151
3151
|
getFormValues: K,
|
|
3152
|
-
setFormValues:
|
|
3152
|
+
setFormValues: ae,
|
|
3153
3153
|
getFormValue: Te,
|
|
3154
3154
|
setFormValue: D
|
|
3155
3155
|
}), (O, I) => {
|
|
3156
|
-
const B = L("a-input"), ee = L("a-form-item"),
|
|
3157
|
-
return
|
|
3156
|
+
const B = L("a-input"), ee = L("a-form-item"), se = L("a-checkbox"), he = L("a-space"), Ze = L("a-select"), Je = L("a-form"), et = L("a-modal");
|
|
3157
|
+
return k(), N(et, {
|
|
3158
3158
|
open: f.value,
|
|
3159
3159
|
"onUpdate:open": I[4] || (I[4] = (Q) => f.value = Q),
|
|
3160
|
-
title:
|
|
3160
|
+
title: H.value,
|
|
3161
3161
|
width: 720,
|
|
3162
3162
|
"body-style": {
|
|
3163
3163
|
maxHeight: "70vh",
|
|
@@ -3167,15 +3167,15 @@ const ao = (t) => {
|
|
|
3167
3167
|
onCancel: I[5] || (I[5] = (Q) => r("cancel"))
|
|
3168
3168
|
}, {
|
|
3169
3169
|
default: C(() => [
|
|
3170
|
-
E(
|
|
3170
|
+
E(Je, {
|
|
3171
3171
|
ref_key: "formRef",
|
|
3172
|
-
ref:
|
|
3173
|
-
model:
|
|
3174
|
-
rules:
|
|
3172
|
+
ref: g,
|
|
3173
|
+
model: d,
|
|
3174
|
+
rules: x,
|
|
3175
3175
|
class: b(O.$style.sceneForm)
|
|
3176
3176
|
}, {
|
|
3177
3177
|
default: C(() => [
|
|
3178
|
-
t.actionType !==
|
|
3178
|
+
t.actionType !== y(de).search || v.value ? (k(), N(ee, {
|
|
3179
3179
|
key: 0,
|
|
3180
3180
|
label: "场景名称",
|
|
3181
3181
|
name: "name",
|
|
@@ -3184,29 +3184,29 @@ const ao = (t) => {
|
|
|
3184
3184
|
}, {
|
|
3185
3185
|
default: C(() => [
|
|
3186
3186
|
E(B, {
|
|
3187
|
-
value:
|
|
3188
|
-
"onUpdate:value": I[0] || (I[0] = (Q) =>
|
|
3187
|
+
value: d.name,
|
|
3188
|
+
"onUpdate:value": I[0] || (I[0] = (Q) => d.name = Q),
|
|
3189
3189
|
placeholder: "请输入"
|
|
3190
3190
|
}, null, 8, ["value"])
|
|
3191
3191
|
]),
|
|
3192
3192
|
_: 1
|
|
3193
|
-
})) :
|
|
3193
|
+
})) : j("", !0),
|
|
3194
3194
|
E(ee, {
|
|
3195
3195
|
name: "items",
|
|
3196
3196
|
"label-col": { span: 24 },
|
|
3197
3197
|
"wrapper-col": { span: 24 }
|
|
3198
3198
|
}, {
|
|
3199
3199
|
label: C(() => [
|
|
3200
|
-
E(
|
|
3200
|
+
E(he, null, {
|
|
3201
3201
|
default: C(() => [
|
|
3202
|
-
I[6] || (I[6] =
|
|
3203
|
-
E(
|
|
3202
|
+
I[6] || (I[6] = z("span", null, "筛选条件", -1)),
|
|
3203
|
+
E(se, {
|
|
3204
3204
|
checked: m.value,
|
|
3205
3205
|
"onUpdate:checked": I[1] || (I[1] = (Q) => m.value = Q),
|
|
3206
3206
|
indeterminate: P.value
|
|
3207
3207
|
}, {
|
|
3208
3208
|
default: C(() => [
|
|
3209
|
-
J(" 全选 (" +
|
|
3209
|
+
J(" 全选 (" + be(w.value) + "/" + be(l.value.length) + ") ", 1)
|
|
3210
3210
|
]),
|
|
3211
3211
|
_: 1
|
|
3212
3212
|
}, 8, ["checked", "indeterminate"])
|
|
@@ -3215,9 +3215,9 @@ const ao = (t) => {
|
|
|
3215
3215
|
})
|
|
3216
3216
|
]),
|
|
3217
3217
|
default: C(() => [
|
|
3218
|
-
E(
|
|
3219
|
-
value:
|
|
3220
|
-
"onUpdate:value": I[2] || (I[2] = (Q) =>
|
|
3218
|
+
E(cr, {
|
|
3219
|
+
value: d.items,
|
|
3220
|
+
"onUpdate:value": I[2] || (I[2] = (Q) => d.items = Q),
|
|
3221
3221
|
"add-button-text": "添加筛选条件",
|
|
3222
3222
|
"get-new-item-data": V,
|
|
3223
3223
|
"max-length": l.value.length,
|
|
@@ -3226,34 +3226,34 @@ const ao = (t) => {
|
|
|
3226
3226
|
onAdd: Z
|
|
3227
3227
|
}, {
|
|
3228
3228
|
default: C(({ item: Q }) => {
|
|
3229
|
-
var
|
|
3229
|
+
var Me;
|
|
3230
3230
|
return [
|
|
3231
|
-
|
|
3231
|
+
z("div", {
|
|
3232
3232
|
class: b(O.$style.queryFieldItem)
|
|
3233
3233
|
}, [
|
|
3234
|
-
E(
|
|
3234
|
+
E(Ze, {
|
|
3235
3235
|
value: Q.name,
|
|
3236
|
-
"onUpdate:value": (
|
|
3236
|
+
"onUpdate:value": (me) => Q.name = me,
|
|
3237
3237
|
"show-search": "",
|
|
3238
3238
|
options: _(Q.name),
|
|
3239
3239
|
"field-names": { value: "name" },
|
|
3240
3240
|
"option-filter-prop": "label",
|
|
3241
3241
|
placeholder: "请选择要筛选的字段名",
|
|
3242
|
-
disabled: (
|
|
3242
|
+
disabled: (Me = s.value[Q.name]) == null ? void 0 : Me.fixed,
|
|
3243
3243
|
class: b(O.$style.fieldSelect),
|
|
3244
|
-
onChange: (
|
|
3244
|
+
onChange: (me) => $(me, Q)
|
|
3245
3245
|
}, null, 8, ["value", "onUpdate:value", "options", "disabled", "class", "onChange"]),
|
|
3246
|
-
|
|
3246
|
+
z("div", {
|
|
3247
3247
|
class: b(O.$style.fieldComponent)
|
|
3248
3248
|
}, [
|
|
3249
|
-
Q.name ? (
|
|
3249
|
+
Q.name ? (k(), N(Yt, {
|
|
3250
3250
|
key: 0,
|
|
3251
3251
|
value: Q.value,
|
|
3252
|
-
"onUpdate:value": (
|
|
3252
|
+
"onUpdate:value": (me) => Q.value = me,
|
|
3253
3253
|
"in-modal": "",
|
|
3254
3254
|
"form-item": s.value[Q.name],
|
|
3255
|
-
onChange: (
|
|
3256
|
-
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) :
|
|
3255
|
+
onChange: (me) => T(Q.name, me)
|
|
3256
|
+
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : j("", !0)
|
|
3257
3257
|
], 2)
|
|
3258
3258
|
], 2)
|
|
3259
3259
|
];
|
|
@@ -3266,7 +3266,7 @@ const ao = (t) => {
|
|
|
3266
3266
|
]),
|
|
3267
3267
|
_: 1
|
|
3268
3268
|
}, 8, ["model", "rules", "class"]),
|
|
3269
|
-
t.actionType ===
|
|
3269
|
+
t.actionType === y(de).search && t.allowCreateScene ? (k(), N(se, {
|
|
3270
3270
|
key: 0,
|
|
3271
3271
|
checked: v.value,
|
|
3272
3272
|
"onUpdate:checked": I[3] || (I[3] = (Q) => v.value = Q)
|
|
@@ -3275,20 +3275,20 @@ const ao = (t) => {
|
|
|
3275
3275
|
J(" 保存为场景 ")
|
|
3276
3276
|
])),
|
|
3277
3277
|
_: 1
|
|
3278
|
-
}, 8, ["checked"])) :
|
|
3278
|
+
}, 8, ["checked"])) : j("", !0)
|
|
3279
3279
|
]),
|
|
3280
3280
|
_: 1
|
|
3281
3281
|
}, 8, ["open", "title"]);
|
|
3282
3282
|
};
|
|
3283
3283
|
}
|
|
3284
|
-
}),
|
|
3285
|
-
sceneForm:
|
|
3286
|
-
queryFieldItem:
|
|
3287
|
-
fieldSelect:
|
|
3288
|
-
fieldComponent:
|
|
3289
|
-
},
|
|
3290
|
-
$style:
|
|
3291
|
-
},
|
|
3284
|
+
}), Dr = "_sceneForm_njdgy_1", Fr = "_queryFieldItem_njdgy_1", Mr = "_fieldSelect_njdgy_7", Br = "_fieldComponent_njdgy_10", Rr = {
|
|
3285
|
+
sceneForm: Dr,
|
|
3286
|
+
queryFieldItem: Fr,
|
|
3287
|
+
fieldSelect: Mr,
|
|
3288
|
+
fieldComponent: Br
|
|
3289
|
+
}, jr = {
|
|
3290
|
+
$style: Rr
|
|
3291
|
+
}, Nr = /* @__PURE__ */ Ce(Lr, [["__cssModules", jr]]), Ur = /* @__PURE__ */ pe({
|
|
3292
3292
|
__name: "SceneListModal",
|
|
3293
3293
|
props: {
|
|
3294
3294
|
/**
|
|
@@ -3329,50 +3329,50 @@ const ao = (t) => {
|
|
|
3329
3329
|
},
|
|
3330
3330
|
emits: ["cancel", "create", "update", "delete", "sort"],
|
|
3331
3331
|
setup(t, { emit: e }) {
|
|
3332
|
-
const o = t, n = e, r = oe(o.list), s = oe(!0), l = () => n("cancel"),
|
|
3333
|
-
await o.onDelete(
|
|
3332
|
+
const o = t, n = e, r = oe(o.list), s = oe(!0), l = () => n("cancel"), c = async (g) => {
|
|
3333
|
+
await o.onDelete(g), r.value = r.value.filter((d) => d.code !== g);
|
|
3334
3334
|
}, p = () => {
|
|
3335
3335
|
l(), n("create");
|
|
3336
|
-
}, f = (
|
|
3337
|
-
l(), n("update",
|
|
3336
|
+
}, f = (g) => {
|
|
3337
|
+
l(), n("update", g);
|
|
3338
3338
|
}, v = () => {
|
|
3339
3339
|
n(
|
|
3340
3340
|
"sort",
|
|
3341
|
-
r.value.map(({ code:
|
|
3341
|
+
r.value.map(({ code: g }) => g)
|
|
3342
3342
|
);
|
|
3343
3343
|
};
|
|
3344
|
-
return (
|
|
3345
|
-
const m = L("a-col"),
|
|
3346
|
-
return
|
|
3344
|
+
return (g, d) => {
|
|
3345
|
+
const m = L("a-col"), w = L("a-row"), P = L("a-typography-text"), x = L("a-button"), M = L("a-popconfirm"), V = L("a-empty"), H = L("a-modal");
|
|
3346
|
+
return k(), N(H, {
|
|
3347
3347
|
open: s.value,
|
|
3348
|
-
"onUpdate:open":
|
|
3348
|
+
"onUpdate:open": d[0] || (d[0] = ($) => s.value = $),
|
|
3349
3349
|
title: "场景管理",
|
|
3350
3350
|
width: 720,
|
|
3351
3351
|
footer: null,
|
|
3352
3352
|
onCancel: l
|
|
3353
3353
|
}, {
|
|
3354
3354
|
default: C(() => [
|
|
3355
|
-
|
|
3356
|
-
class: b(
|
|
3355
|
+
z("div", {
|
|
3356
|
+
class: b(g.$style.sceneList)
|
|
3357
3357
|
}, [
|
|
3358
|
-
E(
|
|
3359
|
-
class: b(
|
|
3358
|
+
E(w, {
|
|
3359
|
+
class: b(g.$style.sceneListHead)
|
|
3360
3360
|
}, {
|
|
3361
3361
|
default: C(() => [
|
|
3362
3362
|
E(m, {
|
|
3363
3363
|
span: 16,
|
|
3364
|
-
class: b(
|
|
3364
|
+
class: b(g.$style.col)
|
|
3365
3365
|
}, {
|
|
3366
|
-
default: C(() =>
|
|
3366
|
+
default: C(() => d[1] || (d[1] = [
|
|
3367
3367
|
J(" 场景名称 ")
|
|
3368
3368
|
])),
|
|
3369
3369
|
_: 1
|
|
3370
3370
|
}, 8, ["class"]),
|
|
3371
3371
|
E(m, {
|
|
3372
3372
|
span: 8,
|
|
3373
|
-
class: b(
|
|
3373
|
+
class: b(g.$style.col)
|
|
3374
3374
|
}, {
|
|
3375
|
-
default: C(() =>
|
|
3375
|
+
default: C(() => d[2] || (d[2] = [
|
|
3376
3376
|
J(" 操作 ")
|
|
3377
3377
|
])),
|
|
3378
3378
|
_: 1
|
|
@@ -3380,56 +3380,56 @@ const ao = (t) => {
|
|
|
3380
3380
|
]),
|
|
3381
3381
|
_: 1
|
|
3382
3382
|
}, 8, ["class"]),
|
|
3383
|
-
r.value.length ? (
|
|
3383
|
+
r.value.length ? (k(), N(y(je), {
|
|
3384
3384
|
key: 0,
|
|
3385
3385
|
list: r.value,
|
|
3386
3386
|
"item-key": "id",
|
|
3387
3387
|
handle: ".table-column-draggable-icon",
|
|
3388
3388
|
onChange: v
|
|
3389
3389
|
}, {
|
|
3390
|
-
item: C(({ element:
|
|
3391
|
-
E(
|
|
3392
|
-
class: b(
|
|
3390
|
+
item: C(({ element: $ }) => [
|
|
3391
|
+
E(w, {
|
|
3392
|
+
class: b(g.$style.sceneListItem)
|
|
3393
3393
|
}, {
|
|
3394
3394
|
default: C(() => [
|
|
3395
3395
|
E(m, {
|
|
3396
3396
|
span: 16,
|
|
3397
|
-
class: b(
|
|
3397
|
+
class: b(g.$style.col)
|
|
3398
3398
|
}, {
|
|
3399
3399
|
default: C(() => [
|
|
3400
3400
|
E(P, {
|
|
3401
|
-
ellipsis: { tooltip:
|
|
3402
|
-
content:
|
|
3401
|
+
ellipsis: { tooltip: $.name },
|
|
3402
|
+
content: $.name
|
|
3403
3403
|
}, null, 8, ["ellipsis", "content"])
|
|
3404
3404
|
]),
|
|
3405
3405
|
_: 2
|
|
3406
3406
|
}, 1032, ["class"]),
|
|
3407
3407
|
E(m, {
|
|
3408
3408
|
span: 8,
|
|
3409
|
-
class: b(
|
|
3409
|
+
class: b(g.$style.col)
|
|
3410
3410
|
}, {
|
|
3411
3411
|
default: C(() => [
|
|
3412
|
-
E(
|
|
3412
|
+
E(x, {
|
|
3413
3413
|
type: "link",
|
|
3414
3414
|
size: "small",
|
|
3415
|
-
onClick: (_) => f(
|
|
3415
|
+
onClick: (_) => f($)
|
|
3416
3416
|
}, {
|
|
3417
|
-
default: C(() =>
|
|
3417
|
+
default: C(() => d[3] || (d[3] = [
|
|
3418
3418
|
J(" 编辑 ")
|
|
3419
3419
|
])),
|
|
3420
3420
|
_: 2
|
|
3421
3421
|
}, 1032, ["onClick"]),
|
|
3422
3422
|
E(M, {
|
|
3423
3423
|
title: "确定删除?",
|
|
3424
|
-
onConfirm: (_) =>
|
|
3424
|
+
onConfirm: (_) => c($.code)
|
|
3425
3425
|
}, {
|
|
3426
3426
|
default: C(() => [
|
|
3427
|
-
E(
|
|
3427
|
+
E(x, {
|
|
3428
3428
|
type: "link",
|
|
3429
3429
|
size: "small",
|
|
3430
3430
|
danger: ""
|
|
3431
3431
|
}, {
|
|
3432
|
-
default: C(() =>
|
|
3432
|
+
default: C(() => d[4] || (d[4] = [
|
|
3433
3433
|
J(" 删除 ")
|
|
3434
3434
|
])),
|
|
3435
3435
|
_: 1
|
|
@@ -3437,11 +3437,11 @@ const ao = (t) => {
|
|
|
3437
3437
|
]),
|
|
3438
3438
|
_: 2
|
|
3439
3439
|
}, 1032, ["onConfirm"]),
|
|
3440
|
-
E(
|
|
3440
|
+
E(x, {
|
|
3441
3441
|
type: "text",
|
|
3442
3442
|
size: "small",
|
|
3443
|
-
icon: W(
|
|
3444
|
-
class: b(["table-column-draggable-icon",
|
|
3443
|
+
icon: W(y(Ae)),
|
|
3444
|
+
class: b(["table-column-draggable-icon", g.$style.dragIcon])
|
|
3445
3445
|
}, null, 8, ["icon", "class"])
|
|
3446
3446
|
]),
|
|
3447
3447
|
_: 2
|
|
@@ -3451,36 +3451,36 @@ const ao = (t) => {
|
|
|
3451
3451
|
}, 1032, ["class"])
|
|
3452
3452
|
]),
|
|
3453
3453
|
_: 1
|
|
3454
|
-
}, 8, ["list"])) : (
|
|
3454
|
+
}, 8, ["list"])) : (k(), N(V, {
|
|
3455
3455
|
key: 1,
|
|
3456
|
-
image:
|
|
3456
|
+
image: y(kn).PRESENTED_IMAGE_SIMPLE
|
|
3457
3457
|
}, null, 8, ["image"]))
|
|
3458
3458
|
], 2),
|
|
3459
|
-
t.allowCreateScene ? (
|
|
3459
|
+
t.allowCreateScene ? (k(), N(x, {
|
|
3460
3460
|
key: 0,
|
|
3461
3461
|
type: "link",
|
|
3462
|
-
icon: W(
|
|
3462
|
+
icon: W(y(Rt)),
|
|
3463
3463
|
onClick: p
|
|
3464
3464
|
}, {
|
|
3465
|
-
default: C(() =>
|
|
3465
|
+
default: C(() => d[5] || (d[5] = [
|
|
3466
3466
|
J(" 新建场景 ")
|
|
3467
3467
|
])),
|
|
3468
3468
|
_: 1
|
|
3469
|
-
}, 8, ["icon"])) :
|
|
3469
|
+
}, 8, ["icon"])) : j("", !0)
|
|
3470
3470
|
]),
|
|
3471
3471
|
_: 1
|
|
3472
3472
|
}, 8, ["open"]);
|
|
3473
3473
|
};
|
|
3474
3474
|
}
|
|
3475
|
-
}),
|
|
3476
|
-
sceneList:
|
|
3477
|
-
sceneListHead:
|
|
3478
|
-
sceneListItem:
|
|
3479
|
-
col:
|
|
3480
|
-
dragIcon:
|
|
3481
|
-
},
|
|
3482
|
-
$style:
|
|
3483
|
-
},
|
|
3475
|
+
}), zr = "_sceneList_3nrgr_1", Hr = "_sceneListHead_3nrgr_5", qr = "_sceneListItem_3nrgr_8", Yr = "_col_3nrgr_16", Vr = "_dragIcon_3nrgr_20", Wr = {
|
|
3476
|
+
sceneList: zr,
|
|
3477
|
+
sceneListHead: Hr,
|
|
3478
|
+
sceneListItem: qr,
|
|
3479
|
+
col: Yr,
|
|
3480
|
+
dragIcon: Vr
|
|
3481
|
+
}, Gr = {
|
|
3482
|
+
$style: Wr
|
|
3483
|
+
}, Kr = /* @__PURE__ */ Ce(Ur, [["__cssModules", Gr]]), Qr = /* @__PURE__ */ pe({
|
|
3484
3484
|
__name: "FormSearchParams",
|
|
3485
3485
|
props: {
|
|
3486
3486
|
/**
|
|
@@ -3526,90 +3526,90 @@ const ao = (t) => {
|
|
|
3526
3526
|
},
|
|
3527
3527
|
emits: ["form-item-change", "search", "reset"],
|
|
3528
3528
|
setup(t, { emit: e }) {
|
|
3529
|
-
const o = t, n = e, r =
|
|
3529
|
+
const o = t, n = e, r = jn(
|
|
3530
3530
|
`superTable_formSearch_expanded_${o.superTableID}`,
|
|
3531
3531
|
!0
|
|
3532
3532
|
), s = F(() => ut(
|
|
3533
|
-
Object.values(o.formConfigMap).filter((
|
|
3534
|
-
|
|
3533
|
+
Object.values(o.formConfigMap).filter((x) => x[ve.selected]),
|
|
3534
|
+
ve.orderInScene
|
|
3535
3535
|
)), l = F(() => {
|
|
3536
|
-
const
|
|
3536
|
+
const x = [];
|
|
3537
3537
|
let M = 0;
|
|
3538
3538
|
for (const V of s.value) {
|
|
3539
|
-
const
|
|
3540
|
-
if (M +
|
|
3539
|
+
const H = (o.formConfigMap[V.name].span ?? 1) * o.formItemColSpan;
|
|
3540
|
+
if (M + H > 24)
|
|
3541
3541
|
break;
|
|
3542
|
-
|
|
3542
|
+
x.push(V), M += H;
|
|
3543
3543
|
}
|
|
3544
|
-
return
|
|
3545
|
-
}),
|
|
3544
|
+
return x;
|
|
3545
|
+
}), c = F(() => r.value ? s.value : l.value), p = F(() => o.showExpandButton && s.value.length > l.value.length), f = F(() => {
|
|
3546
3546
|
if (!(!o.enableScene || o.showResetButton || p.value)) return 0;
|
|
3547
|
-
const V = 24 -
|
|
3548
|
-
return V >=
|
|
3549
|
-
}), v = (
|
|
3550
|
-
n("form-item-change",
|
|
3551
|
-
},
|
|
3547
|
+
const V = 24 - c.value.reduce(($, _) => $ + (o.formConfigMap[_.name].span ?? 1) * o.formItemColSpan, 0) % 24, H = o.formItemColSpan;
|
|
3548
|
+
return V >= H ? V : 24;
|
|
3549
|
+
}), v = (x, M) => {
|
|
3550
|
+
n("form-item-change", x, M);
|
|
3551
|
+
}, g = ft(v, 500), d = (x, M) => {
|
|
3552
3552
|
[
|
|
3553
3553
|
X.input,
|
|
3554
3554
|
X.inputNumber,
|
|
3555
3555
|
X.inputGroup,
|
|
3556
3556
|
X.inputNumberRange
|
|
3557
|
-
].includes(o.formConfigMap[
|
|
3557
|
+
].includes(o.formConfigMap[x].type) ? g(x, M) : v(x, M);
|
|
3558
3558
|
}, m = () => {
|
|
3559
3559
|
n("search");
|
|
3560
|
-
},
|
|
3560
|
+
}, w = () => {
|
|
3561
3561
|
n("reset");
|
|
3562
3562
|
}, P = () => {
|
|
3563
3563
|
r.value = !r.value;
|
|
3564
3564
|
};
|
|
3565
|
-
return (
|
|
3566
|
-
const V = L("a-col"),
|
|
3567
|
-
return
|
|
3565
|
+
return (x, M) => {
|
|
3566
|
+
const V = L("a-col"), H = L("a-button"), $ = L("a-row");
|
|
3567
|
+
return c.value.length ? (k(), q("div", {
|
|
3568
3568
|
key: 0,
|
|
3569
3569
|
class: b([
|
|
3570
|
-
|
|
3570
|
+
x.$style.searchParamsWrapper,
|
|
3571
3571
|
{
|
|
3572
|
-
[
|
|
3572
|
+
[x.$style.hasActions]: !t.enableScene || t.showResetButton || p.value
|
|
3573
3573
|
}
|
|
3574
3574
|
])
|
|
3575
3575
|
}, [
|
|
3576
|
-
E(
|
|
3576
|
+
E($, {
|
|
3577
3577
|
gutter: [8, 8],
|
|
3578
|
-
class: b(
|
|
3578
|
+
class: b(x.$style.searchParams)
|
|
3579
3579
|
}, {
|
|
3580
3580
|
default: C(() => [
|
|
3581
|
-
(
|
|
3581
|
+
(k(!0), q(Oe, null, ct(c.value, (_) => (k(), N(V, {
|
|
3582
3582
|
key: _.name,
|
|
3583
3583
|
span: (t.formConfigMap[_.name].span ?? 1) * t.formItemColSpan
|
|
3584
3584
|
}, {
|
|
3585
3585
|
default: C(() => [
|
|
3586
|
-
E(
|
|
3586
|
+
E(Yt, {
|
|
3587
3587
|
value: t.formConfigMap[_.name].value,
|
|
3588
3588
|
"form-item": t.formConfigMap[_.name],
|
|
3589
|
-
onChange: (T) =>
|
|
3589
|
+
onChange: (T) => d(_.name, T)
|
|
3590
3590
|
}, null, 8, ["value", "form-item", "onChange"])
|
|
3591
3591
|
]),
|
|
3592
3592
|
_: 2
|
|
3593
3593
|
}, 1032, ["span"]))), 128)),
|
|
3594
|
-
!t.enableScene || t.showResetButton || p.value ? (
|
|
3594
|
+
!t.enableScene || t.showResetButton || p.value ? (k(), N(V, {
|
|
3595
3595
|
key: 0,
|
|
3596
3596
|
span: f.value,
|
|
3597
|
-
class: b(
|
|
3597
|
+
class: b(x.$style.searchActions)
|
|
3598
3598
|
}, {
|
|
3599
3599
|
default: C(() => [
|
|
3600
|
-
|
|
3601
|
-
class: b(
|
|
3600
|
+
z("div", {
|
|
3601
|
+
class: b(x.$style.searchActionsWrapper)
|
|
3602
3602
|
}, [
|
|
3603
|
-
!t.enableScene && t.showResetButton ? (
|
|
3603
|
+
!t.enableScene && t.showResetButton ? (k(), N(H, {
|
|
3604
3604
|
key: 0,
|
|
3605
|
-
onClick:
|
|
3605
|
+
onClick: w
|
|
3606
3606
|
}, {
|
|
3607
3607
|
default: C(() => M[0] || (M[0] = [
|
|
3608
3608
|
J(" 重置 ")
|
|
3609
3609
|
])),
|
|
3610
3610
|
_: 1
|
|
3611
|
-
})) :
|
|
3612
|
-
t.enableScene ?
|
|
3611
|
+
})) : j("", !0),
|
|
3612
|
+
t.enableScene ? j("", !0) : (k(), N(H, {
|
|
3613
3613
|
key: 1,
|
|
3614
3614
|
type: "primary",
|
|
3615
3615
|
loading: t.loading,
|
|
@@ -3620,45 +3620,45 @@ const ao = (t) => {
|
|
|
3620
3620
|
])),
|
|
3621
3621
|
_: 1
|
|
3622
3622
|
}, 8, ["loading"])),
|
|
3623
|
-
p.value ? (
|
|
3623
|
+
p.value ? (k(), N(H, {
|
|
3624
3624
|
key: 2,
|
|
3625
3625
|
type: "link",
|
|
3626
|
-
icon:
|
|
3626
|
+
icon: y(r) ? W(y(Pn)) : W(y(Bt)),
|
|
3627
3627
|
onClick: P
|
|
3628
3628
|
}, {
|
|
3629
3629
|
default: C(() => [
|
|
3630
|
-
J(
|
|
3630
|
+
J(be(y(r) ? "收起" : "展开"), 1)
|
|
3631
3631
|
]),
|
|
3632
3632
|
_: 1
|
|
3633
|
-
}, 8, ["icon"])) :
|
|
3633
|
+
}, 8, ["icon"])) : j("", !0)
|
|
3634
3634
|
], 2)
|
|
3635
3635
|
]),
|
|
3636
3636
|
_: 1
|
|
3637
|
-
}, 8, ["span", "class"])) :
|
|
3637
|
+
}, 8, ["span", "class"])) : j("", !0)
|
|
3638
3638
|
]),
|
|
3639
3639
|
_: 1
|
|
3640
3640
|
}, 8, ["class"])
|
|
3641
|
-
], 2)) :
|
|
3641
|
+
], 2)) : j("", !0);
|
|
3642
3642
|
};
|
|
3643
3643
|
}
|
|
3644
|
-
}),
|
|
3645
|
-
searchParamsWrapper:
|
|
3646
|
-
hasActions:
|
|
3647
|
-
searchParams:
|
|
3648
|
-
searchActionsWrapper:
|
|
3649
|
-
},
|
|
3650
|
-
$style:
|
|
3651
|
-
},
|
|
3652
|
-
|
|
3653
|
-
function
|
|
3644
|
+
}), Xr = "_searchParamsWrapper_mo3ie_1", Zr = "_hasActions_mo3ie_6", Jr = "_searchParams_mo3ie_1", ea = "_searchActionsWrapper_mo3ie_14", ta = {
|
|
3645
|
+
searchParamsWrapper: Xr,
|
|
3646
|
+
hasActions: Zr,
|
|
3647
|
+
searchParams: Jr,
|
|
3648
|
+
searchActionsWrapper: ea
|
|
3649
|
+
}, na = {
|
|
3650
|
+
$style: ta
|
|
3651
|
+
}, oa = /* @__PURE__ */ Ce(Qr, [["__cssModules", na]]);
|
|
3652
|
+
Ue.locale("zh-cn");
|
|
3653
|
+
function Tt(t) {
|
|
3654
3654
|
return Array.from(document.body.children).includes(t);
|
|
3655
3655
|
}
|
|
3656
|
-
class
|
|
3656
|
+
class ra {
|
|
3657
3657
|
constructor(e = {}) {
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3658
|
+
Be(this, "currents");
|
|
3659
|
+
Be(this, "dialogs");
|
|
3660
|
+
Be(this, "staticDialogs");
|
|
3661
|
+
Be(this, "rootVm");
|
|
3662
3662
|
this.currents = [], this.dialogs = {}, this.staticDialogs = e, this.rootVm = null;
|
|
3663
3663
|
}
|
|
3664
3664
|
// 设置rootVm
|
|
@@ -3667,7 +3667,7 @@ class es {
|
|
|
3667
3667
|
}
|
|
3668
3668
|
// 注册dialog
|
|
3669
3669
|
register(e, o) {
|
|
3670
|
-
this.dialogs[e] || (this.dialogs[e] =
|
|
3670
|
+
this.dialogs[e] || (this.dialogs[e] = pe(o));
|
|
3671
3671
|
}
|
|
3672
3672
|
// 注销dialog
|
|
3673
3673
|
unregister(e) {
|
|
@@ -3680,9 +3680,9 @@ class es {
|
|
|
3680
3680
|
console.error(`Dialog "${e}" is not existing, please register it firstly.`);
|
|
3681
3681
|
return;
|
|
3682
3682
|
}
|
|
3683
|
-
const
|
|
3684
|
-
|
|
3685
|
-
const f =
|
|
3683
|
+
const c = document.createElement("div"), p = `dialog_${Bn()}`;
|
|
3684
|
+
c.setAttribute("id", p), document.body.appendChild(c);
|
|
3685
|
+
const f = cn({
|
|
3686
3686
|
data() {
|
|
3687
3687
|
return {
|
|
3688
3688
|
open: !0
|
|
@@ -3690,10 +3690,10 @@ class es {
|
|
|
3690
3690
|
},
|
|
3691
3691
|
render() {
|
|
3692
3692
|
return W(
|
|
3693
|
-
|
|
3693
|
+
In,
|
|
3694
3694
|
{
|
|
3695
3695
|
key: p,
|
|
3696
|
-
locale:
|
|
3696
|
+
locale: zt
|
|
3697
3697
|
},
|
|
3698
3698
|
() => [
|
|
3699
3699
|
W(l, {
|
|
@@ -3702,18 +3702,18 @@ class es {
|
|
|
3702
3702
|
...n,
|
|
3703
3703
|
open: this.open,
|
|
3704
3704
|
onCancel: () => {
|
|
3705
|
-
var
|
|
3706
|
-
this.open = !1, (
|
|
3705
|
+
var g;
|
|
3706
|
+
this.open = !1, (g = n == null ? void 0 : n.onCancel) == null || g.call(n);
|
|
3707
3707
|
}
|
|
3708
3708
|
})
|
|
3709
3709
|
]
|
|
3710
3710
|
);
|
|
3711
3711
|
}
|
|
3712
|
-
}).use(
|
|
3712
|
+
}).use(gn);
|
|
3713
3713
|
r == null || r(f);
|
|
3714
3714
|
const v = f.mount(`#${p}`);
|
|
3715
|
-
return s == null || s(v), v.$watch("open", (
|
|
3716
|
-
|
|
3715
|
+
return s == null || s(v), v.$watch("open", (g) => {
|
|
3716
|
+
g || this.destroy();
|
|
3717
3717
|
}), this.currents.push(f), f;
|
|
3718
3718
|
}
|
|
3719
3719
|
// 关闭dialog
|
|
@@ -3727,39 +3727,39 @@ class es {
|
|
|
3727
3727
|
var o, n, r;
|
|
3728
3728
|
const e = this.currents.pop();
|
|
3729
3729
|
if (e) {
|
|
3730
|
-
const s =
|
|
3731
|
-
|
|
3730
|
+
const s = Tt((o = e._instance) == null ? void 0 : o.vnode.el) ? (n = e._instance) == null ? void 0 : n.vnode.el : (r = e._instance) == null ? void 0 : r.vnode.el.parentElement;
|
|
3731
|
+
Tt(s) && document.body.removeChild(s), e.unmount();
|
|
3732
3732
|
}
|
|
3733
3733
|
}
|
|
3734
3734
|
}
|
|
3735
|
-
const
|
|
3736
|
-
function
|
|
3735
|
+
const Re = new ra();
|
|
3736
|
+
function Lt(t, e) {
|
|
3737
3737
|
const o = Symbol("dialog");
|
|
3738
|
-
|
|
3738
|
+
Re.register(o, t);
|
|
3739
3739
|
function n() {
|
|
3740
|
-
|
|
3740
|
+
Re.open(o, y(e));
|
|
3741
3741
|
}
|
|
3742
3742
|
function r() {
|
|
3743
|
-
|
|
3743
|
+
Re.close();
|
|
3744
3744
|
}
|
|
3745
3745
|
function s(l) {
|
|
3746
|
-
|
|
3746
|
+
Re.open(o, l);
|
|
3747
3747
|
}
|
|
3748
|
-
return
|
|
3749
|
-
|
|
3748
|
+
return un(() => {
|
|
3749
|
+
Re.unregister(o);
|
|
3750
3750
|
}), {
|
|
3751
3751
|
open: n,
|
|
3752
3752
|
close: r,
|
|
3753
3753
|
openByConfig: s
|
|
3754
3754
|
};
|
|
3755
3755
|
}
|
|
3756
|
-
const
|
|
3756
|
+
const Ve = 2e3, aa = (t) => {
|
|
3757
3757
|
const { getScenes: e, setScenes: o } = t;
|
|
3758
3758
|
return {
|
|
3759
3759
|
querySceneList: async (n) => {
|
|
3760
3760
|
const r = e(), s = n.type ? r.filter((l) => l.type === n.type) : r;
|
|
3761
3761
|
return {
|
|
3762
|
-
code:
|
|
3762
|
+
code: Ve,
|
|
3763
3763
|
data: s,
|
|
3764
3764
|
msg: "success"
|
|
3765
3765
|
};
|
|
@@ -3767,7 +3767,7 @@ const We = 2e3, ts = (t) => {
|
|
|
3767
3767
|
createScene: async (n) => {
|
|
3768
3768
|
const r = e(), s = qt(Math.random().toString());
|
|
3769
3769
|
return r.push({ ...n, code: s }), o(r), {
|
|
3770
|
-
code:
|
|
3770
|
+
code: Ve,
|
|
3771
3771
|
data: s,
|
|
3772
3772
|
msg: "success"
|
|
3773
3773
|
};
|
|
@@ -3779,7 +3779,7 @@ const We = 2e3, ts = (t) => {
|
|
|
3779
3779
|
data: null,
|
|
3780
3780
|
msg: "Scene not found"
|
|
3781
3781
|
} : (r[s] = { ...r[s], ...n }, o(r), {
|
|
3782
|
-
code:
|
|
3782
|
+
code: Ve,
|
|
3783
3783
|
data: r[s],
|
|
3784
3784
|
msg: "success"
|
|
3785
3785
|
});
|
|
@@ -3787,13 +3787,13 @@ const We = 2e3, ts = (t) => {
|
|
|
3787
3787
|
deleteScene: async (n) => {
|
|
3788
3788
|
const s = e().filter((l) => !n.includes(l.code));
|
|
3789
3789
|
return o(s), {
|
|
3790
|
-
code:
|
|
3790
|
+
code: Ve,
|
|
3791
3791
|
data: null,
|
|
3792
3792
|
msg: "success"
|
|
3793
3793
|
};
|
|
3794
3794
|
}
|
|
3795
3795
|
};
|
|
3796
|
-
},
|
|
3796
|
+
}, Dt = () => {
|
|
3797
3797
|
const t = {
|
|
3798
3798
|
code: -1,
|
|
3799
3799
|
data: [],
|
|
@@ -3805,7 +3805,7 @@ const We = 2e3, ts = (t) => {
|
|
|
3805
3805
|
updateScene: async () => t,
|
|
3806
3806
|
deleteScene: async () => t
|
|
3807
3807
|
};
|
|
3808
|
-
},
|
|
3808
|
+
}, sa = ["innerHTML"], la = /* @__PURE__ */ pe({
|
|
3809
3809
|
__name: "SuperTable",
|
|
3810
3810
|
props: {
|
|
3811
3811
|
/**
|
|
@@ -3935,84 +3935,84 @@ const We = 2e3, ts = (t) => {
|
|
|
3935
3935
|
default: !0
|
|
3936
3936
|
}
|
|
3937
3937
|
},
|
|
3938
|
-
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change"],
|
|
3938
|
+
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change", "change", "expand", "expandedRowsChange", "resize-column"],
|
|
3939
3939
|
setup(t, { expose: e, emit: o }) {
|
|
3940
|
-
var
|
|
3941
|
-
|
|
3940
|
+
var bt, vt;
|
|
3941
|
+
Ue.locale("zh-cn");
|
|
3942
3942
|
const n = t, r = o, s = oe(!1), l = F(() => {
|
|
3943
|
-
var
|
|
3944
|
-
const a = (
|
|
3945
|
-
return !!((
|
|
3946
|
-
}),
|
|
3947
|
-
(a,
|
|
3943
|
+
var i, h, S;
|
|
3944
|
+
const a = (i = dn()) == null ? void 0 : i.appContext.app;
|
|
3945
|
+
return !!((S = (h = a == null ? void 0 : a.config) == null ? void 0 : h.globalProperties) != null && S.$router);
|
|
3946
|
+
}), c = oe(), { openByConfig: p } = Lt(Nr), { openByConfig: f } = Lt(Kr), v = Pt(n.columns).reduce(
|
|
3947
|
+
(a, i) => (a[i.key] = ke(i, pt), a),
|
|
3948
3948
|
{}
|
|
3949
|
-
),
|
|
3949
|
+
), g = qt([location.hostname, location.pathname, n.sceneType].join("")), d = Nn(`superTable_${g}`, {
|
|
3950
3950
|
pathname: location.pathname,
|
|
3951
3951
|
sceneCode: null,
|
|
3952
3952
|
sceneSort: [],
|
|
3953
3953
|
sceneList: [],
|
|
3954
3954
|
columnConfig: v
|
|
3955
|
-
}), m = F(() => n.enableScene ? n.sceneStorageType === "api" ? n.sceneRequest ? n.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'),
|
|
3956
|
-
getScenes: () =>
|
|
3955
|
+
}), m = F(() => n.enableScene ? n.sceneStorageType === "api" ? n.sceneRequest ? n.sceneRequest : (console.error('SuperTable: sceneStorageType 为 "api" 时,必须提供 sceneRequest 配置'), Dt()) : aa({
|
|
3956
|
+
getScenes: () => d.value.sceneList,
|
|
3957
3957
|
setScenes: (a) => {
|
|
3958
|
-
|
|
3958
|
+
d.value.sceneList = a;
|
|
3959
3959
|
}
|
|
3960
|
-
}) :
|
|
3960
|
+
}) : Dt()), w = oe(!1), P = F(() => Object.keys(n.customQueryParams).length > 0), x = oe(!1), M = F(() => {
|
|
3961
3961
|
var a;
|
|
3962
3962
|
return ((a = n.tableProps) == null ? void 0 : a.pagination) === !1;
|
|
3963
3963
|
}), V = ft(async () => {
|
|
3964
3964
|
try {
|
|
3965
3965
|
K.loading = !0;
|
|
3966
|
-
const { total: a, data:
|
|
3967
|
-
params:
|
|
3966
|
+
const { total: a, data: i } = await n.request({
|
|
3967
|
+
params: gt(),
|
|
3968
3968
|
...M.value ? {} : {
|
|
3969
3969
|
pageSize: K.pagination.pageSize,
|
|
3970
3970
|
pageNum: K.pagination.current
|
|
3971
3971
|
}
|
|
3972
3972
|
});
|
|
3973
|
-
K.dataSource =
|
|
3973
|
+
K.dataSource = i, M.value || (K.pagination.total = a);
|
|
3974
3974
|
} catch (a) {
|
|
3975
3975
|
K.dataSource = [], console.error(a);
|
|
3976
3976
|
} finally {
|
|
3977
3977
|
K.loading = !1;
|
|
3978
3978
|
}
|
|
3979
|
-
}, n.debounceWait),
|
|
3979
|
+
}, n.debounceWait), H = () => {
|
|
3980
3980
|
n.enableScene && !T.loaded || (M.value || (K.pagination.current = 1), V());
|
|
3981
|
-
},
|
|
3982
|
-
for (const
|
|
3983
|
-
const
|
|
3984
|
-
|
|
3981
|
+
}, $ = oe({}), _ = (a = []) => {
|
|
3982
|
+
for (const i in $.value) {
|
|
3983
|
+
const h = $.value[i], S = a.find((A) => A.name === i);
|
|
3984
|
+
h.value = S ? S.value : h._defaultValue, h[ve.selected] = !!S, h[ve.orderInScene] = S ? a.findIndex((A) => A.name === (S == null ? void 0 : S.name)) : void 0;
|
|
3985
3985
|
}
|
|
3986
|
-
|
|
3987
|
-
}, T =
|
|
3986
|
+
H();
|
|
3987
|
+
}, T = Ke({
|
|
3988
3988
|
list: [],
|
|
3989
3989
|
loading: !1,
|
|
3990
3990
|
submiting: !1,
|
|
3991
3991
|
loaded: !1
|
|
3992
|
-
}), Z = F(() =>
|
|
3993
|
-
name:
|
|
3994
|
-
code:
|
|
3992
|
+
}), Z = F(() => De(ye(n.defaultScene)).filter(Boolean).map(({ name: i = "默认场景", code: h = "default_scene", items: S }) => ({
|
|
3993
|
+
name: i,
|
|
3994
|
+
code: h,
|
|
3995
3995
|
isCustom: !0,
|
|
3996
|
-
items:
|
|
3997
|
-
var
|
|
3996
|
+
items: S.filter((A) => !!$.value[A.name]).map((A) => {
|
|
3997
|
+
var R;
|
|
3998
3998
|
return {
|
|
3999
3999
|
name: A.name,
|
|
4000
|
-
value: A.value ??
|
|
4001
|
-
type: (
|
|
4000
|
+
value: A.value ?? $.value[A.name]._defaultValue,
|
|
4001
|
+
type: (R = $.value[A.name]) == null ? void 0 : R.type
|
|
4002
4002
|
};
|
|
4003
4003
|
})
|
|
4004
4004
|
})));
|
|
4005
4005
|
we(
|
|
4006
4006
|
() => n.formItems,
|
|
4007
4007
|
() => {
|
|
4008
|
-
const a =
|
|
4009
|
-
Object.keys(
|
|
4010
|
-
|
|
4011
|
-
}), a.forEach((
|
|
4012
|
-
const
|
|
4013
|
-
|
|
4014
|
-
...
|
|
4015
|
-
[
|
|
4008
|
+
const a = At(ye(n.formItems)), i = new Set(a.map((h) => h.name));
|
|
4009
|
+
Object.keys($.value).forEach((h) => {
|
|
4010
|
+
i.has(h) || ($.value[h][ve.selected] = !1);
|
|
4011
|
+
}), a.forEach((h) => {
|
|
4012
|
+
const S = { ...h };
|
|
4013
|
+
S.component && (S.component = pn(S.component)), $.value[h.name] ? $.value[h.name] = Rn(ye($.value[h.name]), S) : $.value[h.name] = {
|
|
4014
|
+
...S,
|
|
4015
|
+
[ve.selected]: !n.enableScene && S.visible !== !1
|
|
4016
4016
|
};
|
|
4017
4017
|
});
|
|
4018
4018
|
},
|
|
@@ -4024,99 +4024,99 @@ const We = 2e3, ts = (t) => {
|
|
|
4024
4024
|
const ie = async () => {
|
|
4025
4025
|
try {
|
|
4026
4026
|
T.loading = !0;
|
|
4027
|
-
const { code: a, data:
|
|
4027
|
+
const { code: a, data: i = [], msg: h } = await m.value.querySceneList({ type: g });
|
|
4028
4028
|
if (a === 2e3) {
|
|
4029
|
-
const
|
|
4030
|
-
if (T.list =
|
|
4031
|
-
const
|
|
4032
|
-
|
|
4029
|
+
const S = T.list.find((R) => R.code === d.value.sceneCode);
|
|
4030
|
+
if (T.list = co(i, $.value, d.value.sceneSort), !T.loaded && !d.value.sceneCode && Z.value.length > 0) {
|
|
4031
|
+
const R = Z.value[0];
|
|
4032
|
+
d.value.sceneCode = R.code, _(R.items), T.loaded = !0, V();
|
|
4033
4033
|
return;
|
|
4034
4034
|
}
|
|
4035
|
-
const A = T.list.find((
|
|
4035
|
+
const A = T.list.find((R) => R.code === d.value.sceneCode);
|
|
4036
4036
|
if (!T.loaded && P.value) {
|
|
4037
|
-
|
|
4038
|
-
const
|
|
4039
|
-
var
|
|
4037
|
+
d.value.sceneCode = null, T.loaded = !0;
|
|
4038
|
+
const R = Object.entries(n.customQueryParams).map(([ce, ot]) => {
|
|
4039
|
+
var qe;
|
|
4040
4040
|
return {
|
|
4041
|
-
name:
|
|
4041
|
+
name: ce,
|
|
4042
4042
|
value: ot,
|
|
4043
|
-
type: (
|
|
4043
|
+
type: (qe = $.value[ce]) == null ? void 0 : qe.type
|
|
4044
4044
|
};
|
|
4045
4045
|
});
|
|
4046
|
-
_(
|
|
4046
|
+
_(R);
|
|
4047
4047
|
return;
|
|
4048
4048
|
}
|
|
4049
|
-
(!T.loaded ||
|
|
4049
|
+
(!T.loaded || S && S.value !== (A == null ? void 0 : A.value)) && _(A == null ? void 0 : A.items), T.loaded = !0;
|
|
4050
4050
|
} else
|
|
4051
|
-
|
|
4051
|
+
st.error(h);
|
|
4052
4052
|
} finally {
|
|
4053
4053
|
T.loading = !1;
|
|
4054
4054
|
}
|
|
4055
|
-
}, Pe = ({ code: a, msg:
|
|
4055
|
+
}, Pe = ({ code: a, msg: i }) => a === 2e3 ? (st.success("操作成功"), ie(), Promise.resolve(i)) : (st.error(i), Promise.reject(i)), Se = async ({ name: a, items: i }) => {
|
|
4056
4056
|
try {
|
|
4057
|
-
const
|
|
4058
|
-
type:
|
|
4057
|
+
const h = await m.value.createScene({
|
|
4058
|
+
type: g,
|
|
4059
4059
|
name: a,
|
|
4060
|
-
value: JSON.stringify(
|
|
4060
|
+
value: JSON.stringify(i),
|
|
4061
4061
|
asPrivate: !0
|
|
4062
4062
|
});
|
|
4063
|
-
|
|
4064
|
-
} catch (
|
|
4065
|
-
return Promise.reject(
|
|
4063
|
+
d.value.sceneCode = h == null ? void 0 : h.data, Pe(h);
|
|
4064
|
+
} catch (h) {
|
|
4065
|
+
return Promise.reject(h);
|
|
4066
4066
|
}
|
|
4067
|
-
},
|
|
4067
|
+
}, fe = async (a) => {
|
|
4068
4068
|
try {
|
|
4069
|
-
const
|
|
4069
|
+
const i = await m.value.updateScene({
|
|
4070
4070
|
code: a.code,
|
|
4071
4071
|
name: a.name,
|
|
4072
4072
|
value: JSON.stringify(a.items)
|
|
4073
4073
|
});
|
|
4074
|
-
return Pe(
|
|
4075
|
-
} catch (
|
|
4076
|
-
return Promise.reject(
|
|
4074
|
+
return Pe(i);
|
|
4075
|
+
} catch (i) {
|
|
4076
|
+
return Promise.reject(i);
|
|
4077
4077
|
}
|
|
4078
|
-
},
|
|
4078
|
+
}, Fe = async (a) => {
|
|
4079
4079
|
try {
|
|
4080
|
-
const
|
|
4081
|
-
|
|
4082
|
-
} catch (
|
|
4083
|
-
return Promise.reject(
|
|
4080
|
+
const i = await m.value.deleteScene([a]);
|
|
4081
|
+
i.code === 2e3 && (d.value.sceneCode = null, a === d.value.sceneCode && (_([]), d.value.sceneCode = void 0)), Pe(i);
|
|
4082
|
+
} catch (i) {
|
|
4083
|
+
return Promise.reject(i);
|
|
4084
4084
|
}
|
|
4085
4085
|
}, Te = F(() => T.list.length < n.maxSceneCount);
|
|
4086
4086
|
we(
|
|
4087
|
-
() => [
|
|
4087
|
+
() => [d.value.sceneCode, T.list],
|
|
4088
4088
|
() => {
|
|
4089
|
-
if (P.value && !
|
|
4090
|
-
|
|
4089
|
+
if (P.value && !x.value) {
|
|
4090
|
+
x.value = !0;
|
|
4091
4091
|
return;
|
|
4092
4092
|
}
|
|
4093
4093
|
const a = [...Z.value, ...T.list].find(
|
|
4094
|
-
(
|
|
4094
|
+
(i) => i.code === d.value.sceneCode
|
|
4095
4095
|
);
|
|
4096
4096
|
_((a == null ? void 0 : a.items) ?? []);
|
|
4097
4097
|
}
|
|
4098
4098
|
);
|
|
4099
|
-
const D = F(() => `super_table_row_${
|
|
4099
|
+
const D = F(() => `super_table_row_${g}`), ae = mn(), K = Ke({
|
|
4100
4100
|
...n.tableProps,
|
|
4101
4101
|
dataSource: [],
|
|
4102
4102
|
columns: [],
|
|
4103
4103
|
loading: !1,
|
|
4104
4104
|
rowKey: "id",
|
|
4105
|
-
pagination: typeof ((
|
|
4105
|
+
pagination: typeof ((bt = n.tableProps) == null ? void 0 : bt.pagination) == "boolean" ? n.tableProps.pagination : {
|
|
4106
4106
|
total: 0,
|
|
4107
4107
|
pageSize: 20,
|
|
4108
4108
|
current: 1,
|
|
4109
4109
|
showQuickJumper: !0,
|
|
4110
4110
|
showSizeChanger: !0,
|
|
4111
4111
|
showTotal: (a) => `共${a}条数据`,
|
|
4112
|
-
...
|
|
4113
|
-
onShowSizeChange: (a,
|
|
4114
|
-
var
|
|
4115
|
-
((
|
|
4112
|
+
...Qe(n.tableProps, "pagination", {}),
|
|
4113
|
+
onShowSizeChange: (a, i) => {
|
|
4114
|
+
var h, S, A, R;
|
|
4115
|
+
((h = n.tableProps) == null ? void 0 : h.pagination) !== !1 && ((R = (A = (S = n.tableProps) == null ? void 0 : S.pagination) == null ? void 0 : A.onShowSizeChange) == null || R.call(A, 1, i));
|
|
4116
4116
|
},
|
|
4117
|
-
onChange: (a,
|
|
4118
|
-
var
|
|
4119
|
-
K.pagination.current =
|
|
4117
|
+
onChange: (a, i) => {
|
|
4118
|
+
var h, S, A, R;
|
|
4119
|
+
K.pagination.current = i !== K.pagination.pageSize ? 1 : a, K.pagination.pageSize = i, ((h = n.tableProps) == null ? void 0 : h.pagination) !== !1 && ((R = (A = (S = n.tableProps) == null ? void 0 : S.pagination) == null ? void 0 : A.onChange) == null || R.call(A, a, i)), V();
|
|
4120
4120
|
}
|
|
4121
4121
|
},
|
|
4122
4122
|
tableLayout: "fixed",
|
|
@@ -4124,42 +4124,55 @@ const We = 2e3, ts = (t) => {
|
|
|
4124
4124
|
x: "100%",
|
|
4125
4125
|
y: Math.max(500, window.innerWidth * 0.8),
|
|
4126
4126
|
scrollToFirstRowOnChange: !0,
|
|
4127
|
-
...((
|
|
4127
|
+
...((vt = n.tableProps) == null ? void 0 : vt.scroll) ?? {}
|
|
4128
4128
|
},
|
|
4129
|
-
rowClassName: (a,
|
|
4130
|
-
var
|
|
4131
|
-
let
|
|
4132
|
-
const A = (
|
|
4133
|
-
return $e(A) ?
|
|
4129
|
+
rowClassName: (a, i, h) => {
|
|
4130
|
+
var R;
|
|
4131
|
+
let S = "";
|
|
4132
|
+
const A = (R = n.tableProps) == null ? void 0 : R.rowClassName;
|
|
4133
|
+
return $e(A) ? S = A(a, i, h) : typeof A == "string" && (S = A), [S, D.value].join(" ");
|
|
4134
4134
|
}
|
|
4135
|
-
}),
|
|
4135
|
+
}), ze = F(() => {
|
|
4136
4136
|
try {
|
|
4137
|
-
return n.formatDataSource(
|
|
4137
|
+
return n.formatDataSource(ye(K.dataSource));
|
|
4138
4138
|
} catch {
|
|
4139
|
-
return
|
|
4139
|
+
return ye(K.dataSource);
|
|
4140
4140
|
}
|
|
4141
|
-
}),
|
|
4142
|
-
const
|
|
4143
|
-
if (typeof
|
|
4144
|
-
return a == null ? void 0 : a[
|
|
4145
|
-
if (typeof
|
|
4146
|
-
return
|
|
4147
|
-
}, O = F(() =>
|
|
4148
|
-
const
|
|
4149
|
-
return pt.forEach((
|
|
4150
|
-
|
|
4151
|
-
}),
|
|
4152
|
-
})), I = (a,
|
|
4153
|
-
|
|
4154
|
-
|
|
4141
|
+
}), He = (a) => {
|
|
4142
|
+
const i = K.rowKey;
|
|
4143
|
+
if (typeof i == "string")
|
|
4144
|
+
return a == null ? void 0 : a[i];
|
|
4145
|
+
if (typeof i == "function")
|
|
4146
|
+
return i(a);
|
|
4147
|
+
}, O = F(() => Pt(n.columns).map((a) => {
|
|
4148
|
+
const i = d.value.columnConfig[a.key], h = { ...a };
|
|
4149
|
+
return pt.forEach((S) => {
|
|
4150
|
+
S !== "key" && (i == null ? void 0 : i[S]) !== void 0 && (h[S] = i[S]);
|
|
4151
|
+
}), h;
|
|
4152
|
+
})), I = (a, i) => {
|
|
4153
|
+
var S;
|
|
4154
|
+
d.value.columnConfig[i.key] = {
|
|
4155
|
+
...d.value.columnConfig[i.key] ?? {},
|
|
4155
4156
|
width: a
|
|
4156
|
-
};
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4157
|
+
}, r("resize-column", a, i);
|
|
4158
|
+
const h = n.tableProps;
|
|
4159
|
+
(S = h == null ? void 0 : h.onResizeColumn) == null || S.call(h, a, i);
|
|
4160
|
+
}, B = (a) => Array.isArray(a) ? a.map((i) => (i == null ? void 0 : i.field) == null && (i == null ? void 0 : i.columnKey) != null ? { ...i, field: i.columnKey } : i) : (a == null ? void 0 : a.field) == null && (a == null ? void 0 : a.columnKey) != null ? { ...a, field: a.columnKey } : a, ee = (a, i, h, S) => {
|
|
4161
|
+
var R, ce;
|
|
4162
|
+
const A = B(h);
|
|
4163
|
+
r("change", a, i, A, S), (ce = (R = n.tableProps) == null ? void 0 : R.onChange) == null || ce.call(R, a, i, A, S);
|
|
4164
|
+
}, se = (a, i) => {
|
|
4165
|
+
var h, S;
|
|
4166
|
+
r("expand", a, i), (S = (h = n.tableProps) == null ? void 0 : h.onExpand) == null || S.call(h, a, i);
|
|
4167
|
+
}, he = (a) => {
|
|
4168
|
+
var i, h;
|
|
4169
|
+
r("expandedRowsChange", a), (h = (i = n.tableProps) == null ? void 0 : i.onExpandedRowsChange) == null || h.call(i, a);
|
|
4170
|
+
}, Ze = (a) => {
|
|
4171
|
+
a.length === 0 ? d.value.columnConfig = {} : d.value.columnConfig = a.reduce(
|
|
4172
|
+
(i, h, S) => (i[h.key] = {
|
|
4173
|
+
...h,
|
|
4174
|
+
index: S
|
|
4175
|
+
}, i),
|
|
4163
4176
|
{}
|
|
4164
4177
|
);
|
|
4165
4178
|
};
|
|
@@ -4172,11 +4185,11 @@ const We = 2e3, ts = (t) => {
|
|
|
4172
4185
|
title: "",
|
|
4173
4186
|
fixed: "left",
|
|
4174
4187
|
width: 60
|
|
4175
|
-
},
|
|
4188
|
+
}, i = O.value.filter(({ visible: R }) => R), h = i.filter((R) => R.fixed === "left").sort((R, ce) => R.index - ce.index), S = i.filter((R) => !R.fixed).sort((R, ce) => R.index - ce.index), A = i.filter((R) => R.fixed === "right").sort((R, ce) => R.index - ce.index);
|
|
4176
4189
|
K.columns = [
|
|
4177
4190
|
...n.sortable ? [a] : [],
|
|
4178
|
-
...
|
|
4179
|
-
...
|
|
4191
|
+
...h,
|
|
4192
|
+
...S,
|
|
4180
4193
|
...A
|
|
4181
4194
|
];
|
|
4182
4195
|
},
|
|
@@ -4185,144 +4198,145 @@ const We = 2e3, ts = (t) => {
|
|
|
4185
4198
|
immediate: !0
|
|
4186
4199
|
}
|
|
4187
4200
|
);
|
|
4188
|
-
const
|
|
4189
|
-
const
|
|
4190
|
-
var
|
|
4191
|
-
const
|
|
4192
|
-
if (
|
|
4193
|
-
a(
|
|
4201
|
+
const Je = () => new Promise((a) => {
|
|
4202
|
+
const i = () => {
|
|
4203
|
+
var S, A;
|
|
4204
|
+
const h = (A = (S = ae.value) == null ? void 0 : S.$el) == null ? void 0 : A.querySelector(".ant-table-tbody");
|
|
4205
|
+
if (h) {
|
|
4206
|
+
a(h);
|
|
4194
4207
|
return;
|
|
4195
4208
|
}
|
|
4196
|
-
requestAnimationFrame(
|
|
4209
|
+
requestAnimationFrame(i);
|
|
4197
4210
|
};
|
|
4198
|
-
|
|
4199
|
-
}),
|
|
4200
|
-
const a = await
|
|
4201
|
-
a && new
|
|
4211
|
+
i();
|
|
4212
|
+
}), et = async () => {
|
|
4213
|
+
const a = await Je();
|
|
4214
|
+
a && new Un(a, {
|
|
4202
4215
|
animation: 150,
|
|
4203
4216
|
handle: ".super-table-column-draggable-handle",
|
|
4204
|
-
setData: (
|
|
4205
|
-
const
|
|
4206
|
-
|
|
4217
|
+
setData: (i) => {
|
|
4218
|
+
const h = new Image();
|
|
4219
|
+
h.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", i.setDragImage(h, 0, 0);
|
|
4207
4220
|
},
|
|
4208
|
-
onEnd: (
|
|
4209
|
-
const { oldIndex:
|
|
4210
|
-
if (
|
|
4211
|
-
const A =
|
|
4212
|
-
A.splice(
|
|
4221
|
+
onEnd: (i) => {
|
|
4222
|
+
const { oldIndex: h, newIndex: S } = i;
|
|
4223
|
+
if (h === void 0 || S === void 0) return;
|
|
4224
|
+
const A = ye(K.dataSource), [R] = A.splice(h, 1);
|
|
4225
|
+
A.splice(S, 0, R), r("row-sort-end", A);
|
|
4213
4226
|
}
|
|
4214
4227
|
});
|
|
4215
|
-
},
|
|
4216
|
-
|
|
4217
|
-
},
|
|
4218
|
-
for (const a in
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
},
|
|
4222
|
-
|
|
4223
|
-
let
|
|
4224
|
-
a ===
|
|
4228
|
+
}, Q = (a, i) => {
|
|
4229
|
+
$.value[a].value = i, r("form-item-change", a, i, ye($.value[a]), tt, nt), $.value[a].quiet !== !0 && n.enableScene && H();
|
|
4230
|
+
}, Me = () => {
|
|
4231
|
+
for (const a in $.value)
|
|
4232
|
+
$.value[a].value = $.value[a]._defaultValue;
|
|
4233
|
+
H();
|
|
4234
|
+
}, me = (a, i) => {
|
|
4235
|
+
w.value = !1;
|
|
4236
|
+
let h = ye($.value);
|
|
4237
|
+
a === de.create && (h = At(n.formItems).reduce((S, A) => (S[A.name] = A, S), {})), p({
|
|
4225
4238
|
props: {
|
|
4226
|
-
ref:
|
|
4227
|
-
currentScene:
|
|
4239
|
+
ref: c,
|
|
4240
|
+
currentScene: i,
|
|
4228
4241
|
actionType: a,
|
|
4229
|
-
formConfigMap:
|
|
4242
|
+
formConfigMap: h,
|
|
4230
4243
|
onCreate: Se,
|
|
4231
|
-
onUpdate:
|
|
4232
|
-
onUpdateFormConfig: (
|
|
4233
|
-
|
|
4234
|
-
|
|
4244
|
+
onUpdate: fe,
|
|
4245
|
+
onUpdateFormConfig: (S) => {
|
|
4246
|
+
S.forEach((A) => {
|
|
4247
|
+
Ne($.value, A.name, A);
|
|
4235
4248
|
});
|
|
4236
4249
|
},
|
|
4237
|
-
onSearch: (
|
|
4238
|
-
_(
|
|
4250
|
+
onSearch: (S) => {
|
|
4251
|
+
_(S);
|
|
4239
4252
|
},
|
|
4240
|
-
onFormItemChange(
|
|
4241
|
-
r("form-item-change",
|
|
4253
|
+
onFormItemChange(S, A) {
|
|
4254
|
+
r("form-item-change", S, A, ye($.value[S]), tt, nt);
|
|
4242
4255
|
},
|
|
4243
4256
|
onCancel() {
|
|
4244
|
-
|
|
4257
|
+
c.value = void 0;
|
|
4245
4258
|
}
|
|
4246
4259
|
}
|
|
4247
4260
|
});
|
|
4248
|
-
},
|
|
4249
|
-
|
|
4261
|
+
}, Vt = () => {
|
|
4262
|
+
w.value = !1, f({
|
|
4250
4263
|
props: {
|
|
4251
4264
|
list: T.list,
|
|
4252
|
-
allowCreateScene:
|
|
4253
|
-
onCreate: () =>
|
|
4254
|
-
onUpdate: (a) =>
|
|
4255
|
-
onDelete: (a) =>
|
|
4265
|
+
allowCreateScene: y(Te),
|
|
4266
|
+
onCreate: () => me(de.create),
|
|
4267
|
+
onUpdate: (a) => me(de.update, a),
|
|
4268
|
+
onDelete: (a) => Fe(a),
|
|
4256
4269
|
onSort: (a) => {
|
|
4257
|
-
|
|
4270
|
+
d.value.sceneSort = a, T.list = T.list.sort((i, h) => a.indexOf(i.code) - a.indexOf(h.code));
|
|
4258
4271
|
}
|
|
4259
4272
|
}
|
|
4260
4273
|
});
|
|
4261
|
-
},
|
|
4262
|
-
await
|
|
4263
|
-
const
|
|
4264
|
-
r("scene-change",
|
|
4265
|
-
},
|
|
4266
|
-
if (Ht.includes(
|
|
4274
|
+
}, Wt = async (a) => {
|
|
4275
|
+
await yn();
|
|
4276
|
+
const i = T.list.find((h) => h.code === a);
|
|
4277
|
+
r("scene-change", i);
|
|
4278
|
+
}, ht = (a) => $.value[a], Gt = (a, i, h) => {
|
|
4279
|
+
if (Ht.includes(i))
|
|
4267
4280
|
return Ie("setFormItem error,", `form item with prop "${a}" is readonly`);
|
|
4268
|
-
if (!
|
|
4281
|
+
if (!ht(a))
|
|
4269
4282
|
return Ie("setFormItem error,", `Cannot find form item with name "${a}"`);
|
|
4270
|
-
if (
|
|
4283
|
+
if (i === "visible" && $.value[a].fixed)
|
|
4271
4284
|
return Ie("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
4272
|
-
|
|
4273
|
-
},
|
|
4274
|
-
if (
|
|
4285
|
+
Ne($.value, `${a}.${i}`, h);
|
|
4286
|
+
}, yt = (a, i) => {
|
|
4287
|
+
if (!$.value[a])
|
|
4275
4288
|
return Ie("setFormValue error,", `Cannot find form item with name "${a}"`);
|
|
4276
|
-
|
|
4277
|
-
},
|
|
4278
|
-
Object.entries(a).forEach(([
|
|
4279
|
-
|
|
4289
|
+
$.value[a].value = i;
|
|
4290
|
+
}, Kt = (a) => {
|
|
4291
|
+
Object.entries(a).forEach(([i, h]) => {
|
|
4292
|
+
yt(i, h);
|
|
4280
4293
|
});
|
|
4281
|
-
},
|
|
4282
|
-
var
|
|
4283
|
-
return (
|
|
4284
|
-
},
|
|
4285
|
-
const
|
|
4286
|
-
for (const
|
|
4287
|
-
const A =
|
|
4288
|
-
A._selected && (
|
|
4294
|
+
}, Qt = (a) => {
|
|
4295
|
+
var i;
|
|
4296
|
+
return (i = $.value[a]) == null ? void 0 : i.value;
|
|
4297
|
+
}, gt = (a) => {
|
|
4298
|
+
const i = {}, h = a ? ke($.value, De(a)) : $.value;
|
|
4299
|
+
for (const S in h) {
|
|
4300
|
+
const A = h[S];
|
|
4301
|
+
A._selected && (i[S] = ye(A.value));
|
|
4289
4302
|
}
|
|
4290
|
-
return
|
|
4291
|
-
},
|
|
4303
|
+
return i;
|
|
4304
|
+
}, Xt = () => K.dataSource, Zt = (a) => {
|
|
4292
4305
|
K.dataSource = a;
|
|
4293
|
-
},
|
|
4294
|
-
K.dataSource[a] =
|
|
4306
|
+
}, Jt = (a, i) => {
|
|
4307
|
+
K.dataSource[a] = i;
|
|
4295
4308
|
}, tt = {
|
|
4296
4309
|
getFormItem(a) {
|
|
4297
|
-
return
|
|
4310
|
+
return c.value ? c.value.getFormItem(a) : ht(a);
|
|
4298
4311
|
},
|
|
4299
|
-
setFormItem(a,
|
|
4300
|
-
|
|
4312
|
+
setFormItem(a, i, h) {
|
|
4313
|
+
c.value ? c.value.setFormItem(a, i, h) : Gt(a, i, h);
|
|
4301
4314
|
},
|
|
4302
4315
|
getFormValues(a) {
|
|
4303
|
-
return
|
|
4316
|
+
return c.value ? c.value.getFormValues(a) : gt(a);
|
|
4304
4317
|
},
|
|
4305
4318
|
setFormValues(a) {
|
|
4306
|
-
|
|
4319
|
+
c.value ? c.value.setFormValues(a) : Kt(a);
|
|
4307
4320
|
},
|
|
4308
4321
|
getFormValue(a) {
|
|
4309
|
-
return
|
|
4322
|
+
return c.value ? c.value.getFormValue(a) : Qt(a);
|
|
4310
4323
|
},
|
|
4311
|
-
setFormValue(a,
|
|
4312
|
-
|
|
4324
|
+
setFormValue(a, i) {
|
|
4325
|
+
c.value ? c.value.setFormValue(a, i) : yt(a, i);
|
|
4313
4326
|
}
|
|
4314
4327
|
}, nt = {
|
|
4315
|
-
getTableData:
|
|
4316
|
-
setTableData:
|
|
4317
|
-
setTableDataItem:
|
|
4318
|
-
onRefresh:
|
|
4319
|
-
},
|
|
4328
|
+
getTableData: Xt,
|
|
4329
|
+
setTableData: Zt,
|
|
4330
|
+
setTableDataItem: Jt,
|
|
4331
|
+
onRefresh: H
|
|
4332
|
+
}, en = {
|
|
4320
4333
|
...tt,
|
|
4321
4334
|
...nt,
|
|
4322
|
-
onRefresh:
|
|
4335
|
+
onRefresh: H,
|
|
4336
|
+
onResetForm: Me,
|
|
4323
4337
|
isInitialized: s
|
|
4324
4338
|
};
|
|
4325
|
-
e(
|
|
4339
|
+
e(en), we(() => [...n.refreshDeps], H, {
|
|
4326
4340
|
deep: !0,
|
|
4327
4341
|
immediate: !0
|
|
4328
4342
|
}), we(
|
|
@@ -4331,12 +4345,12 @@ const We = 2e3, ts = (t) => {
|
|
|
4331
4345
|
if (a)
|
|
4332
4346
|
ie();
|
|
4333
4347
|
else {
|
|
4334
|
-
const
|
|
4335
|
-
name:
|
|
4336
|
-
value:
|
|
4337
|
-
type:
|
|
4348
|
+
const i = Object.values($.value).filter((h) => h.visible !== !1).map((h) => ({
|
|
4349
|
+
name: h.name,
|
|
4350
|
+
value: h.value ?? h._defaultValue,
|
|
4351
|
+
type: h.type
|
|
4338
4352
|
}));
|
|
4339
|
-
_(
|
|
4353
|
+
_(i);
|
|
4340
4354
|
}
|
|
4341
4355
|
},
|
|
4342
4356
|
{
|
|
@@ -4345,38 +4359,38 @@ const We = 2e3, ts = (t) => {
|
|
|
4345
4359
|
), we(
|
|
4346
4360
|
() => n.sortable,
|
|
4347
4361
|
(a) => {
|
|
4348
|
-
a &&
|
|
4362
|
+
a && et();
|
|
4349
4363
|
},
|
|
4350
4364
|
{
|
|
4351
4365
|
immediate: !0
|
|
4352
4366
|
}
|
|
4353
|
-
),
|
|
4367
|
+
), fn(async () => {
|
|
4354
4368
|
n.enableScene ? await ie() : V(), s.value = !0;
|
|
4355
4369
|
});
|
|
4356
|
-
const
|
|
4370
|
+
const tn = {
|
|
4357
4371
|
token: {
|
|
4358
4372
|
borderRadius: 2
|
|
4359
4373
|
}
|
|
4360
4374
|
};
|
|
4361
|
-
return (a,
|
|
4362
|
-
const
|
|
4363
|
-
return
|
|
4364
|
-
locale:
|
|
4365
|
-
theme:
|
|
4375
|
+
return (a, i) => {
|
|
4376
|
+
const h = L("a-form-item"), S = L("a-button"), A = L("a-select"), R = L("a-divider"), ce = L("a-space"), ot = L("a-form"), qe = L("a-typography-text"), nn = L("a-tooltip"), on = L("a-table"), rn = L("a-config-provider");
|
|
4377
|
+
return k(), N(rn, {
|
|
4378
|
+
locale: y(zt),
|
|
4379
|
+
theme: tn
|
|
4366
4380
|
}, {
|
|
4367
4381
|
default: C(() => [
|
|
4368
|
-
|
|
4382
|
+
z("div", {
|
|
4369
4383
|
class: b([a.$style.superTable, "antd-super-table"]),
|
|
4370
4384
|
style: ne(t.wrapperStyle)
|
|
4371
4385
|
}, [
|
|
4372
|
-
|
|
4386
|
+
z("div", {
|
|
4373
4387
|
class: b(a.$style.querySection)
|
|
4374
4388
|
}, [
|
|
4375
|
-
t.enableScene ? (
|
|
4389
|
+
t.enableScene ? (k(), q("div", {
|
|
4376
4390
|
key: 0,
|
|
4377
4391
|
class: b(a.$style.sceneHeader)
|
|
4378
4392
|
}, [
|
|
4379
|
-
|
|
4393
|
+
z("div", {
|
|
4380
4394
|
class: b(a.$style.sceneFormWrapper)
|
|
4381
4395
|
}, [
|
|
4382
4396
|
E(ot, {
|
|
@@ -4384,17 +4398,17 @@ const We = 2e3, ts = (t) => {
|
|
|
4384
4398
|
class: b(a.$style.sceneForm)
|
|
4385
4399
|
}, {
|
|
4386
4400
|
default: C(() => [
|
|
4387
|
-
a.$slots.sceneAddonBefore ? (
|
|
4401
|
+
a.$slots.sceneAddonBefore ? (k(), N(h, { key: 0 }, {
|
|
4388
4402
|
default: C(() => [
|
|
4389
|
-
|
|
4403
|
+
ge(a.$slots, "sceneAddonBefore")
|
|
4390
4404
|
]),
|
|
4391
4405
|
_: 3
|
|
4392
|
-
})) :
|
|
4393
|
-
E(
|
|
4406
|
+
})) : j("", !0),
|
|
4407
|
+
E(h, { label: "场景选择" }, {
|
|
4394
4408
|
default: C(() => [
|
|
4395
4409
|
E(A, {
|
|
4396
|
-
value:
|
|
4397
|
-
"onUpdate:value":
|
|
4410
|
+
value: y(d).sceneCode,
|
|
4411
|
+
"onUpdate:value": i[1] || (i[1] = (te) => y(d).sceneCode = te),
|
|
4398
4412
|
class: b(a.$style.sceneSelect),
|
|
4399
4413
|
placeholder: "请选择",
|
|
4400
4414
|
"allow-clear": "",
|
|
@@ -4402,37 +4416,37 @@ const We = 2e3, ts = (t) => {
|
|
|
4402
4416
|
"option-filter-prop": "name",
|
|
4403
4417
|
options: [...Z.value, ...T.list],
|
|
4404
4418
|
"field-names": { value: "code", label: "name" },
|
|
4405
|
-
open:
|
|
4419
|
+
open: w.value,
|
|
4406
4420
|
loading: T.loading,
|
|
4407
|
-
onChange:
|
|
4408
|
-
onDropdownVisibleChange:
|
|
4421
|
+
onChange: Wt,
|
|
4422
|
+
onDropdownVisibleChange: i[2] || (i[2] = (te) => w.value = te)
|
|
4409
4423
|
}, {
|
|
4410
4424
|
dropdownRender: C(({ menuNode: te }) => [
|
|
4411
|
-
E(
|
|
4412
|
-
|
|
4425
|
+
E(y(Mo), { vnodes: te }, null, 8, ["vnodes"]),
|
|
4426
|
+
z("div", {
|
|
4413
4427
|
class: b(a.$style.sceneOpBtnWrapper)
|
|
4414
4428
|
}, [
|
|
4415
|
-
E(
|
|
4429
|
+
E(S, {
|
|
4416
4430
|
type: "link",
|
|
4417
4431
|
block: "",
|
|
4418
|
-
icon: W(
|
|
4432
|
+
icon: W(y(Tn)),
|
|
4419
4433
|
class: b(a.$style.sceneOpBtn),
|
|
4420
4434
|
disabled: !Te.value,
|
|
4421
|
-
onClick:
|
|
4435
|
+
onClick: i[0] || (i[0] = (rt) => me(y(de).create))
|
|
4422
4436
|
}, {
|
|
4423
|
-
default: C(() =>
|
|
4437
|
+
default: C(() => i[5] || (i[5] = [
|
|
4424
4438
|
J(" 新建场景 ")
|
|
4425
4439
|
])),
|
|
4426
4440
|
_: 1
|
|
4427
4441
|
}, 8, ["icon", "class", "disabled"]),
|
|
4428
|
-
E(
|
|
4442
|
+
E(S, {
|
|
4429
4443
|
type: "link",
|
|
4430
4444
|
block: "",
|
|
4431
|
-
icon: W(
|
|
4445
|
+
icon: W(y(Ln)),
|
|
4432
4446
|
class: b(a.$style.sceneOpBtn),
|
|
4433
|
-
onClick:
|
|
4447
|
+
onClick: Vt
|
|
4434
4448
|
}, {
|
|
4435
|
-
default: C(() =>
|
|
4449
|
+
default: C(() => i[6] || (i[6] = [
|
|
4436
4450
|
J(" 场景管理 ")
|
|
4437
4451
|
])),
|
|
4438
4452
|
_: 1
|
|
@@ -4444,161 +4458,164 @@ const We = 2e3, ts = (t) => {
|
|
|
4444
4458
|
]),
|
|
4445
4459
|
_: 1
|
|
4446
4460
|
}),
|
|
4447
|
-
E(
|
|
4461
|
+
E(h, null, {
|
|
4448
4462
|
default: C(() => [
|
|
4449
|
-
E(
|
|
4463
|
+
E(ce, null, {
|
|
4450
4464
|
split: C(() => [
|
|
4451
|
-
E(
|
|
4465
|
+
E(R, { type: "vertical" })
|
|
4452
4466
|
]),
|
|
4453
4467
|
default: C(() => [
|
|
4454
|
-
E(
|
|
4468
|
+
E(S, {
|
|
4455
4469
|
type: "primary",
|
|
4456
|
-
icon: W(
|
|
4457
|
-
onClick:
|
|
4470
|
+
icon: W(y(Dn)),
|
|
4471
|
+
onClick: i[3] || (i[3] = (te) => me(y(de).search))
|
|
4458
4472
|
}, {
|
|
4459
|
-
default: C(() =>
|
|
4473
|
+
default: C(() => i[7] || (i[7] = [
|
|
4460
4474
|
J(" 高级筛选 ")
|
|
4461
4475
|
])),
|
|
4462
4476
|
_: 1
|
|
4463
4477
|
}, 8, ["icon"]),
|
|
4464
|
-
t.showRefreshButton ? (
|
|
4478
|
+
t.showRefreshButton ? (k(), N(S, {
|
|
4465
4479
|
key: 0,
|
|
4466
4480
|
type: "primary",
|
|
4467
4481
|
ghost: "",
|
|
4468
|
-
icon: W(
|
|
4482
|
+
icon: W(y(Fn)),
|
|
4469
4483
|
loading: K.loading,
|
|
4470
|
-
onClick:
|
|
4484
|
+
onClick: H
|
|
4471
4485
|
}, {
|
|
4472
|
-
default: C(() =>
|
|
4486
|
+
default: C(() => i[8] || (i[8] = [
|
|
4473
4487
|
J(" 刷新 ")
|
|
4474
4488
|
])),
|
|
4475
4489
|
_: 1
|
|
4476
|
-
}, 8, ["icon", "loading"])) :
|
|
4490
|
+
}, 8, ["icon", "loading"])) : j("", !0)
|
|
4477
4491
|
]),
|
|
4478
4492
|
_: 1
|
|
4479
4493
|
})
|
|
4480
4494
|
]),
|
|
4481
4495
|
_: 1
|
|
4482
4496
|
}),
|
|
4483
|
-
a.$slots.sceneAddonAfter ? (
|
|
4497
|
+
a.$slots.sceneAddonAfter ? (k(), N(h, { key: 1 }, {
|
|
4484
4498
|
default: C(() => [
|
|
4485
|
-
|
|
4499
|
+
ge(a.$slots, "sceneAddonAfter")
|
|
4486
4500
|
]),
|
|
4487
4501
|
_: 3
|
|
4488
|
-
})) :
|
|
4502
|
+
})) : j("", !0)
|
|
4489
4503
|
]),
|
|
4490
4504
|
_: 3
|
|
4491
4505
|
}, 8, ["class"])
|
|
4492
4506
|
], 2),
|
|
4493
|
-
a.$slots.extra ? (
|
|
4507
|
+
a.$slots.extra ? (k(), q("div", {
|
|
4494
4508
|
key: 0,
|
|
4495
4509
|
class: b(a.$style.sceneExtra)
|
|
4496
4510
|
}, [
|
|
4497
|
-
|
|
4498
|
-
], 2)) :
|
|
4499
|
-
], 2)) :
|
|
4500
|
-
E(
|
|
4501
|
-
"form-config-map":
|
|
4511
|
+
ge(a.$slots, "extra")
|
|
4512
|
+
], 2)) : j("", !0)
|
|
4513
|
+
], 2)) : j("", !0),
|
|
4514
|
+
E(oa, {
|
|
4515
|
+
"form-config-map": $.value,
|
|
4502
4516
|
"form-item-col-span": t.formItemColSpan,
|
|
4503
4517
|
"enable-scene": t.enableScene,
|
|
4504
4518
|
"show-reset-button": t.showResetButton && !t.enableScene,
|
|
4505
4519
|
"show-expand-button": t.showExpandButton,
|
|
4506
4520
|
loading: !!K.loading,
|
|
4507
|
-
"super-table-i-d":
|
|
4508
|
-
onFormItemChange:
|
|
4509
|
-
onSearch:
|
|
4510
|
-
onReset:
|
|
4521
|
+
"super-table-i-d": y(g),
|
|
4522
|
+
onFormItemChange: Q,
|
|
4523
|
+
onSearch: H,
|
|
4524
|
+
onReset: Me
|
|
4511
4525
|
}, null, 8, ["form-config-map", "form-item-col-span", "enable-scene", "show-reset-button", "show-expand-button", "loading", "super-table-i-d"])
|
|
4512
4526
|
], 2),
|
|
4513
|
-
|
|
4527
|
+
z("div", {
|
|
4514
4528
|
class: b(a.$style.tableWrapper),
|
|
4515
4529
|
style: ne(t.tableWrapperStyle)
|
|
4516
4530
|
}, [
|
|
4517
|
-
a.$slots.tableHead || a.$slots.toolBarExtra ? (
|
|
4531
|
+
a.$slots.tableHead || a.$slots.toolBarExtra ? (k(), q("div", {
|
|
4518
4532
|
key: 0,
|
|
4519
4533
|
class: b(a.$style.toolbar)
|
|
4520
4534
|
}, [
|
|
4521
|
-
|
|
4535
|
+
z("div", {
|
|
4522
4536
|
class: b(a.$style.tableHeadWrapper)
|
|
4523
4537
|
}, [
|
|
4524
|
-
|
|
4538
|
+
ge(a.$slots, "tableHead")
|
|
4525
4539
|
], 2),
|
|
4526
|
-
a.$slots.toolBarExtra ? (
|
|
4540
|
+
a.$slots.toolBarExtra ? (k(), q("div", {
|
|
4527
4541
|
key: 0,
|
|
4528
4542
|
class: b(a.$style.actionBtns)
|
|
4529
4543
|
}, [
|
|
4530
|
-
|
|
4531
|
-
], 2)) :
|
|
4532
|
-
], 2)) :
|
|
4533
|
-
|
|
4544
|
+
ge(a.$slots, "toolBarExtra")
|
|
4545
|
+
], 2)) : j("", !0)
|
|
4546
|
+
], 2)) : j("", !0),
|
|
4547
|
+
z("div", {
|
|
4534
4548
|
class: b(a.$style.tableContent)
|
|
4535
4549
|
}, [
|
|
4536
|
-
t.enableTableConfig ? (
|
|
4550
|
+
t.enableTableConfig ? (k(), N(er, {
|
|
4537
4551
|
key: 0,
|
|
4538
4552
|
columns: O.value,
|
|
4539
|
-
onChange:
|
|
4540
|
-
}, null, 8, ["columns"])) :
|
|
4541
|
-
E(
|
|
4553
|
+
onChange: Ze
|
|
4554
|
+
}, null, 8, ["columns"])) : j("", !0),
|
|
4555
|
+
E(on, le({
|
|
4542
4556
|
ref_key: "tableRef",
|
|
4543
|
-
ref:
|
|
4557
|
+
ref: ae
|
|
4544
4558
|
}, {
|
|
4545
4559
|
...K,
|
|
4546
|
-
dataSource:
|
|
4547
|
-
|
|
4560
|
+
dataSource: ze.value,
|
|
4561
|
+
onChange: ee,
|
|
4562
|
+
onExpand: se,
|
|
4563
|
+
onExpandedRowsChange: he
|
|
4564
|
+
}, { onResizeColumn: I }), hn({
|
|
4548
4565
|
headerCell: C(({ column: te }) => [
|
|
4549
|
-
te.class !== "ant-table-row-expand-icon-cell" ? (
|
|
4566
|
+
te.class !== "ant-table-row-expand-icon-cell" ? (k(), q("div", {
|
|
4550
4567
|
key: 0,
|
|
4551
4568
|
class: b(a.$style.headerCell)
|
|
4552
4569
|
}, [
|
|
4553
|
-
E(
|
|
4570
|
+
E(qe, {
|
|
4554
4571
|
ellipsis: { tooltip: te.title },
|
|
4555
4572
|
content: te.title,
|
|
4556
4573
|
class: b(a.$style.headerCellText)
|
|
4557
4574
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
4558
|
-
te.titleTooltip ? (
|
|
4575
|
+
te.titleTooltip ? (k(), N(nn, { key: 0 }, {
|
|
4559
4576
|
title: C(() => [
|
|
4560
|
-
|
|
4577
|
+
z("span", {
|
|
4561
4578
|
innerHTML: te.titleTooltip
|
|
4562
|
-
}, null, 8,
|
|
4579
|
+
}, null, 8, sa)
|
|
4563
4580
|
]),
|
|
4564
4581
|
default: C(() => [
|
|
4565
|
-
E(
|
|
4566
|
-
style: ne({ color:
|
|
4582
|
+
E(y(Mn), {
|
|
4583
|
+
style: ne({ color: y(re).colorTextQuaternary }),
|
|
4567
4584
|
class: b(a.$style.headerCellTooltipIcon)
|
|
4568
4585
|
}, null, 8, ["style", "class"])
|
|
4569
4586
|
]),
|
|
4570
4587
|
_: 2
|
|
4571
|
-
}, 1024)) :
|
|
4572
|
-
], 2)) :
|
|
4588
|
+
}, 1024)) : j("", !0)
|
|
4589
|
+
], 2)) : j("", !0)
|
|
4573
4590
|
]),
|
|
4574
|
-
bodyCell: C(({ column: te, record: rt, index:
|
|
4575
|
-
|
|
4591
|
+
bodyCell: C(({ column: te, record: rt, index: Ct }) => [
|
|
4592
|
+
Mt([He(rt), te == null ? void 0 : te.key, Ct], () => E(Fo, {
|
|
4576
4593
|
column: te,
|
|
4577
4594
|
record: rt,
|
|
4578
|
-
index:
|
|
4595
|
+
index: Ct,
|
|
4579
4596
|
hasRouter: l.value
|
|
4580
|
-
}, null, 8, ["column", "record", "index", "hasRouter"]),
|
|
4597
|
+
}, null, 8, ["column", "record", "index", "hasRouter"]), i, 4)
|
|
4581
4598
|
]),
|
|
4582
4599
|
default: C(() => [
|
|
4583
|
-
a.$slots.expandColumnTitle ?
|
|
4600
|
+
a.$slots.expandColumnTitle ? ge(a.$slots, "expandColumnTitle", { key: 0 }) : j("", !0)
|
|
4584
4601
|
]),
|
|
4585
4602
|
_: 2
|
|
4586
4603
|
}, [
|
|
4587
4604
|
a.$slots.expandedRowRender ? {
|
|
4588
4605
|
name: "expandedRowRender",
|
|
4589
4606
|
fn: C(({ record: te }) => [
|
|
4590
|
-
|
|
4607
|
+
ge(a.$slots, "expandedRowRender", { record: te })
|
|
4591
4608
|
]),
|
|
4592
4609
|
key: "0"
|
|
4593
4610
|
} : void 0
|
|
4594
4611
|
]), 1040)
|
|
4595
4612
|
], 2),
|
|
4596
|
-
a.$slots.tableFoot ? (
|
|
4613
|
+
a.$slots.tableFoot ? (k(), q("div", {
|
|
4597
4614
|
key: 1,
|
|
4598
4615
|
class: b(a.$style.tableFootWrapper)
|
|
4599
4616
|
}, [
|
|
4600
|
-
|
|
4601
|
-
], 2)) :
|
|
4617
|
+
ge(a.$slots, "tableFoot")
|
|
4618
|
+
], 2)) : j("", !0)
|
|
4602
4619
|
], 6)
|
|
4603
4620
|
], 6)
|
|
4604
4621
|
]),
|
|
@@ -4606,33 +4623,33 @@ const We = 2e3, ts = (t) => {
|
|
|
4606
4623
|
}, 8, ["locale"]);
|
|
4607
4624
|
};
|
|
4608
4625
|
}
|
|
4609
|
-
}),
|
|
4610
|
-
superTable:
|
|
4611
|
-
querySection:
|
|
4612
|
-
sceneHeader:
|
|
4613
|
-
sceneFormWrapper:
|
|
4614
|
-
sceneForm:
|
|
4615
|
-
sceneSelect:
|
|
4616
|
-
sceneExtra:
|
|
4617
|
-
tableWrapper:
|
|
4618
|
-
toolbar:
|
|
4619
|
-
actionBtns:
|
|
4620
|
-
tableHeadWrapper:
|
|
4621
|
-
tableContent:
|
|
4622
|
-
headerCell:
|
|
4623
|
-
headerCellText:
|
|
4624
|
-
headerCellTooltipIcon:
|
|
4625
|
-
sceneOpBtnWrapper:
|
|
4626
|
-
sceneOpBtn:
|
|
4627
|
-
},
|
|
4628
|
-
$style:
|
|
4629
|
-
},
|
|
4630
|
-
|
|
4631
|
-
t.component("SuperTable",
|
|
4626
|
+
}), ia = "_superTable_1jyjb_1", ca = "_querySection_1jyjb_1", ua = "_sceneHeader_1jyjb_1", da = "_sceneFormWrapper_1jyjb_7", pa = "_sceneForm_1jyjb_7", ma = "_sceneSelect_1jyjb_13", fa = "_sceneExtra_1jyjb_16", ha = "_tableWrapper_1jyjb_19", ya = "_toolbar_1jyjb_23", ga = "_actionBtns_1jyjb_30", ba = "_tableHeadWrapper_1jyjb_35", va = "_tableContent_1jyjb_38", Ca = "_headerCell_1jyjb_41", _a = "_headerCellText_1jyjb_46", Ea = "_headerCellTooltipIcon_1jyjb_49", Sa = "_sceneOpBtnWrapper_1jyjb_53", xa = "_sceneOpBtn_1jyjb_53", wa = {
|
|
4627
|
+
superTable: ia,
|
|
4628
|
+
querySection: ca,
|
|
4629
|
+
sceneHeader: ua,
|
|
4630
|
+
sceneFormWrapper: da,
|
|
4631
|
+
sceneForm: pa,
|
|
4632
|
+
sceneSelect: ma,
|
|
4633
|
+
sceneExtra: fa,
|
|
4634
|
+
tableWrapper: ha,
|
|
4635
|
+
toolbar: ya,
|
|
4636
|
+
actionBtns: ga,
|
|
4637
|
+
tableHeadWrapper: ba,
|
|
4638
|
+
tableContent: va,
|
|
4639
|
+
headerCell: Ca,
|
|
4640
|
+
headerCellText: _a,
|
|
4641
|
+
headerCellTooltipIcon: Ea,
|
|
4642
|
+
sceneOpBtnWrapper: Sa,
|
|
4643
|
+
sceneOpBtn: xa
|
|
4644
|
+
}, $a = {
|
|
4645
|
+
$style: wa
|
|
4646
|
+
}, Ft = /* @__PURE__ */ Ce(la, [["__cssModules", $a]]);
|
|
4647
|
+
Ft.install = (t) => {
|
|
4648
|
+
t.component("SuperTable", Ft);
|
|
4632
4649
|
};
|
|
4633
4650
|
export {
|
|
4634
|
-
|
|
4651
|
+
cr as DynamicList,
|
|
4635
4652
|
G as SuperTableColumnTypeEnum,
|
|
4636
4653
|
X as SuperTableFormItemTypeEnum,
|
|
4637
|
-
|
|
4654
|
+
Ft as default
|
|
4638
4655
|
};
|