@yidun/antd-super-table 0.0.8 → 0.1.0
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 +11 -1
- package/dist/example/tableColumns.d.ts +30 -0
- package/dist/index.js +556 -551
- package/dist/src/config.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/utils/index.d.ts +1 -1
- package/dist/src/utils/service.d.ts +1 -1
- package/example/formItems.ts +133 -0
- package/example/index.vue +315 -0
- package/example/main.ts +5 -0
- package/example/tableColumns.ts +183 -0
- package/package.json +4 -3
- package/dist/src/typings.d.ts +0 -358
- /package/dist/{typings.ts → types.d.ts} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._ellipsisElement_6fog1_1{width:100%;overflow:hidden;display:flex}._ellipsisElement_6fog1_1 ._elementItem_6fog1_6{min-width:0}._ellipsisElementHasGap_6fog1_10{gap:8px}._flexWrap_6fog1_14{flex-wrap:wrap}._ellipsisTag_6fog1_18{cursor:pointer}._imageEllipsisTag_6fog1_22{line-height:30px;min-width:32px;padding:0;text-align:center}._ellipsisList_6fog1_29{max-width:500px;display:flex;gap:8px;flex-wrap:wrap}._tableCellContent_1chn7_1 ._antTypographyEllipsis_1chn7_1{width:100%}._tableCellContent_1chn7_1 ._draggableIcon_1chn7_4{cursor:grab}._textListItem_1chn7_8{width:100%;margin-bottom:4px}.
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
import { h as
|
|
6
|
-
import wn, { theme as Sn, Form as kn, RangePicker as In, DatePicker as Fn, TreeSelect as xn, Cascader as Tn, Select as Pn, InputNumber as On, Input as qn, Empty as An, ConfigProvider as En, message as
|
|
7
|
-
import { DownOutlined as Ln, HolderOutlined as
|
|
8
|
-
import { slice as qt, isFunction as
|
|
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}._searchParams_1vdwi_1{flex:1;margin:12px 0}._superTable_1j2zk_1{background-color:#fff;padding:20px 24px}._superTable_1j2zk_1 ._superTableHeader_1j2zk_5{display:flex;gap:16px;border-bottom:1px solid #d9d9d9}._superTable_1j2zk_1 ._superTableHeader_1j2zk_5 ._searchFormWrapper_1j2zk_10{flex:1}._superTable_1j2zk_1 ._superTableHeader_1j2zk_5 ._searchFormWrapper_1j2zk_10 ._searchForm_1j2zk_10{flex:1;padding-bottom:12px}._superTable_1j2zk_1 ._superTableHeader_1j2zk_5 ._searchFormWrapper_1j2zk_10 ._searchForm_1j2zk_10 ._sceneSelect_1j2zk_17{width:240px}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._toolbar_1j2zk_20{padding-bottom:12px;display:flex;align-items:flex-start;justify-content:flex-end;gap:16px}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._toolbar_1j2zk_20 ._actionBtns_1j2zk_27{display:flex;align-items:center;gap:8px}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._toolbar_1j2zk_20 ._tableHeadWrapper_1j2zk_32{flex:1}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._tableContent_1j2zk_35{position:relative}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._headerCell_1j2zk_38{display:flex;align-items:center;gap:4px}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._headerCell_1j2zk_38 ._headerCellText_1j2zk_43{flex:1}._superTable_1j2zk_1 ._tableWrapper_1j2zk_20 ._headerCell_1j2zk_38 ._headerCellTooltipIcon_1j2zk_46{cursor:pointer}._sceneOpBtnWrapper_1j2zk_50{border-top:1px solid #d9d9d9;padding-top:8px}._sceneOpBtnWrapper_1j2zk_50 ._sceneOpBtn_1j2zk_50{text-align:left}.antd-super-table .ant-table-body{overflow-y:auto!important}.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 fn = Object.defineProperty;
|
|
3
|
+
var pn = (a, e, n) => e in a ? fn(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n;
|
|
4
|
+
var Be = (a, e, n) => pn(a, typeof e != "symbol" ? e + "" : e, n);
|
|
5
|
+
import { h as W, defineComponent as pe, computed as j, resolveComponent as E, createElementBlock as U, openBlock as x, normalizeClass as m, unref as p, createCommentVNode as N, Fragment as Pe, renderList as mt, normalizeStyle as re, renderSlot as ve, createBlock as B, withCtx as _, createVNode as v, createTextVNode as ne, toDisplayString as Ce, createElementVNode as H, withMemo as Ut, resolveDynamicComponent as et, normalizeProps as ct, mergeProps as ue, ref as te, watchEffect as Ft, watch as ke, useAttrs as mn, reactive as tt, toRaw as ge, createApp as yn, onBeforeUnmount as gn, getCurrentInstance as vn, markRaw as hn, shallowRef as bn, onMounted as _n, createSlots as Cn, nextTick as $n } from "vue";
|
|
6
|
+
import wn, { theme as Sn, Form as kn, RangePicker as In, DatePicker as Fn, TreeSelect as xn, Cascader as Tn, Select as Pn, InputNumber as On, Input as qn, Empty as An, ConfigProvider as En, message as dt } from "ant-design-vue";
|
|
7
|
+
import { DownOutlined as Ln, HolderOutlined as Oe, EyeOutlined as Mn, SettingOutlined as jn, VerticalAlignBottomOutlined as xt, PushpinOutlined as Tt, VerticalAlignTopOutlined as Pt, MinusCircleOutlined as Ot, PlusOutlined as Gt, PlusCircleFilled as Nn, SettingFilled as Bn, FilterFilled as Dn, ReloadOutlined as Rn, InfoCircleFilled as zn } from "@ant-design/icons-vue";
|
|
8
|
+
import { slice as qt, isFunction as Ie, get as nt, castArray as Le, debounce as wt, pick as Fe, omit as Wt, set as Ee, cloneDeep as ft, sortBy as yt, unionBy as At, uniqueId as Vn, merge as Yn } from "lodash-es";
|
|
9
9
|
import { useStorage as Hn } from "@vueuse/core";
|
|
10
|
-
import
|
|
10
|
+
import Ye from "dayjs";
|
|
11
11
|
import Un from "sortablejs";
|
|
12
12
|
import { JSONPath as Gn } from "jsonpath-plus";
|
|
13
13
|
import { v5 as Wn } from "uuid";
|
|
14
|
-
import
|
|
14
|
+
import ze from "vuedraggable";
|
|
15
15
|
const Qn = {
|
|
16
16
|
// Options.jsx
|
|
17
17
|
items_per_page: "条/页",
|
|
@@ -65,7 +65,7 @@ const Jn = {
|
|
|
65
65
|
}, Qt = {
|
|
66
66
|
placeholder: "请选择时间",
|
|
67
67
|
rangePlaceholder: ["开始时间", "结束时间"]
|
|
68
|
-
},
|
|
68
|
+
}, gt = {
|
|
69
69
|
lang: at({
|
|
70
70
|
placeholder: "请选择日期",
|
|
71
71
|
yearPlaceholder: "请选择年份",
|
|
@@ -80,13 +80,13 @@ const Jn = {
|
|
|
80
80
|
}, Jn),
|
|
81
81
|
timePickerLocale: at({}, Qt)
|
|
82
82
|
};
|
|
83
|
-
|
|
83
|
+
gt.lang.ok = "确定";
|
|
84
84
|
const ce = "${label}不是一个有效的${type}", Jt = {
|
|
85
85
|
locale: "zh-cn",
|
|
86
86
|
Pagination: Qn,
|
|
87
|
-
DatePicker:
|
|
87
|
+
DatePicker: gt,
|
|
88
88
|
TimePicker: Qt,
|
|
89
|
-
Calendar:
|
|
89
|
+
Calendar: gt,
|
|
90
90
|
// locales for all components
|
|
91
91
|
global: {
|
|
92
92
|
placeholder: "请选择"
|
|
@@ -219,7 +219,7 @@ var Ze = { exports: {} }, Kn = Ze.exports, Et;
|
|
|
219
219
|
function Zn() {
|
|
220
220
|
return Et || (Et = 1, function(a, e) {
|
|
221
221
|
(function(n, t) {
|
|
222
|
-
a.exports = t(
|
|
222
|
+
a.exports = t(Ye);
|
|
223
223
|
})(Kn, function(n) {
|
|
224
224
|
function t(s) {
|
|
225
225
|
return s && typeof s == "object" && "default" in s ? s : { default: s };
|
|
@@ -236,8 +236,8 @@ function Zn() {
|
|
|
236
236
|
}
|
|
237
237
|
Zn();
|
|
238
238
|
const { defaultAlgorithm: Xn, defaultSeed: ea } = Sn, oe = Xn(ea);
|
|
239
|
-
var
|
|
240
|
-
const Kt = Object.values(
|
|
239
|
+
var Se = /* @__PURE__ */ ((a) => (a.order = "_order", a.orderInScene = "_orderInScene", a.defaultValue = "_defaultValue", a.selected = "_selected", a))(Se || {});
|
|
240
|
+
const Kt = Object.values(Se), G = {
|
|
241
241
|
/** 文本(默认)*/
|
|
242
242
|
text: "text",
|
|
243
243
|
/** 链接 */
|
|
@@ -252,7 +252,7 @@ const Kt = Object.values(we), U = {
|
|
|
252
252
|
component: "component",
|
|
253
253
|
/** 排序 */
|
|
254
254
|
sort: "sort"
|
|
255
|
-
},
|
|
255
|
+
}, K = {
|
|
256
256
|
/** 输入框 */
|
|
257
257
|
input: "input",
|
|
258
258
|
/** 组合输入框 */
|
|
@@ -280,29 +280,29 @@ const Kt = Object.values(we), U = {
|
|
|
280
280
|
update: "update",
|
|
281
281
|
/** 设置查询条件 */
|
|
282
282
|
search: "search"
|
|
283
|
-
},
|
|
284
|
-
function
|
|
285
|
-
return
|
|
283
|
+
}, vt = ["key", "index", "width", "visible", "fixed"];
|
|
284
|
+
function Te() {
|
|
285
|
+
return Te = Object.assign ? Object.assign.bind() : function(a) {
|
|
286
286
|
for (var e = 1; e < arguments.length; e++) {
|
|
287
287
|
var n = arguments[e];
|
|
288
288
|
for (var t in n)
|
|
289
289
|
Object.prototype.hasOwnProperty.call(n, t) && (a[t] = n[t]);
|
|
290
290
|
}
|
|
291
291
|
return a;
|
|
292
|
-
},
|
|
292
|
+
}, Te.apply(this, arguments);
|
|
293
293
|
}
|
|
294
294
|
function ta(a, e) {
|
|
295
|
-
a.prototype = Object.create(e.prototype), a.prototype.constructor = a,
|
|
295
|
+
a.prototype = Object.create(e.prototype), a.prototype.constructor = a, He(a, e);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
return
|
|
297
|
+
function ht(a) {
|
|
298
|
+
return ht = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(n) {
|
|
299
299
|
return n.__proto__ || Object.getPrototypeOf(n);
|
|
300
|
-
},
|
|
300
|
+
}, ht(a);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
return
|
|
302
|
+
function He(a, e) {
|
|
303
|
+
return He = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, r) {
|
|
304
304
|
return t.__proto__ = r, t;
|
|
305
|
-
},
|
|
305
|
+
}, He(a, e);
|
|
306
306
|
}
|
|
307
307
|
function na() {
|
|
308
308
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
@@ -319,15 +319,15 @@ function Xe(a, e, n) {
|
|
|
319
319
|
var l = [null];
|
|
320
320
|
l.push.apply(l, o);
|
|
321
321
|
var d = Function.bind.apply(r, l), C = new d();
|
|
322
|
-
return s &&
|
|
322
|
+
return s && He(C, s.prototype), C;
|
|
323
323
|
}, Xe.apply(null, arguments);
|
|
324
324
|
}
|
|
325
325
|
function aa(a) {
|
|
326
326
|
return Function.toString.call(a).indexOf("[native code]") !== -1;
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function bt(a) {
|
|
329
329
|
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
330
|
-
return
|
|
330
|
+
return bt = function(t) {
|
|
331
331
|
if (t === null || !aa(t)) return t;
|
|
332
332
|
if (typeof t != "function")
|
|
333
333
|
throw new TypeError("Super expression must either be null or a function");
|
|
@@ -336,7 +336,7 @@ function ht(a) {
|
|
|
336
336
|
e.set(t, r);
|
|
337
337
|
}
|
|
338
338
|
function r() {
|
|
339
|
-
return Xe(t, arguments,
|
|
339
|
+
return Xe(t, arguments, ht(this).constructor);
|
|
340
340
|
}
|
|
341
341
|
return r.prototype = Object.create(t.prototype, {
|
|
342
342
|
constructor: {
|
|
@@ -345,8 +345,8 @@ function ht(a) {
|
|
|
345
345
|
writable: !0,
|
|
346
346
|
configurable: !0
|
|
347
347
|
}
|
|
348
|
-
}),
|
|
349
|
-
},
|
|
348
|
+
}), He(r, t);
|
|
349
|
+
}, bt(a);
|
|
350
350
|
}
|
|
351
351
|
var ra = /%[sdj%]/g, Zt = function() {
|
|
352
352
|
};
|
|
@@ -355,7 +355,7 @@ typeof process < "u" && process.env && process.env.NODE_ENV !== "production" &&
|
|
|
355
355
|
return typeof t == "string";
|
|
356
356
|
}) && console.warn(e, n);
|
|
357
357
|
});
|
|
358
|
-
function
|
|
358
|
+
function _t(a) {
|
|
359
359
|
if (!a || !a.length) return null;
|
|
360
360
|
var e = {};
|
|
361
361
|
return a.forEach(function(n) {
|
|
@@ -363,7 +363,7 @@ function bt(a) {
|
|
|
363
363
|
e[t] = e[t] || [], e[t].push(n);
|
|
364
364
|
}), e;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function fe(a) {
|
|
367
367
|
for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), t = 1; t < e; t++)
|
|
368
368
|
n[t - 1] = arguments[t];
|
|
369
369
|
var r = 0, o = n.length;
|
|
@@ -435,12 +435,12 @@ var Mt = /* @__PURE__ */ function(a) {
|
|
|
435
435
|
return r = a.call(this, "Async Validation Error") || this, r.errors = n, r.fields = t, r;
|
|
436
436
|
}
|
|
437
437
|
return e;
|
|
438
|
-
}(/* @__PURE__ */
|
|
438
|
+
}(/* @__PURE__ */ bt(Error));
|
|
439
439
|
function ia(a, e, n, t, r) {
|
|
440
440
|
if (e.first) {
|
|
441
441
|
var o = new Promise(function(u, h) {
|
|
442
442
|
var T = function(g) {
|
|
443
|
-
return t(g), g.length ? h(new Mt(g,
|
|
443
|
+
return t(g), g.length ? h(new Mt(g, _t(g))) : u(r);
|
|
444
444
|
}, $ = sa(a);
|
|
445
445
|
Lt($, n, T);
|
|
446
446
|
});
|
|
@@ -451,7 +451,7 @@ function ia(a, e, n, t, r) {
|
|
|
451
451
|
var s = e.firstFields === !0 ? Object.keys(a) : e.firstFields || [], l = Object.keys(a), d = l.length, C = 0, k = [], y = new Promise(function(u, h) {
|
|
452
452
|
var T = function(w) {
|
|
453
453
|
if (k.push.apply(k, w), C++, C === d)
|
|
454
|
-
return t(k), k.length ? h(new Mt(k,
|
|
454
|
+
return t(k), k.length ? h(new Mt(k, _t(k))) : u(r);
|
|
455
455
|
};
|
|
456
456
|
l.length || (t(k), u(r)), l.forEach(function($) {
|
|
457
457
|
var w = a[$];
|
|
@@ -488,16 +488,16 @@ function Nt(a, e) {
|
|
|
488
488
|
for (var n in e)
|
|
489
489
|
if (e.hasOwnProperty(n)) {
|
|
490
490
|
var t = e[n];
|
|
491
|
-
typeof t == "object" && typeof a[n] == "object" ? a[n] =
|
|
491
|
+
typeof t == "object" && typeof a[n] == "object" ? a[n] = Te({}, a[n], t) : a[n] = t;
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
return a;
|
|
495
495
|
}
|
|
496
496
|
var Xt = function(e, n, t, r, o, s) {
|
|
497
|
-
e.required && (!t.hasOwnProperty(e.field) || ae(n, s || e.type)) && r.push(
|
|
497
|
+
e.required && (!t.hasOwnProperty(e.field) || ae(n, s || e.type)) && r.push(fe(o.messages.required, e.fullField));
|
|
498
498
|
}, da = function(e, n, t, r, o) {
|
|
499
|
-
(/^\s+$/.test(n) || n === "") && r.push(
|
|
500
|
-
}, Qe,
|
|
499
|
+
(/^\s+$/.test(n) || n === "") && r.push(fe(o.messages.whitespace, e.fullField));
|
|
500
|
+
}, Qe, fa = function() {
|
|
501
501
|
if (Qe)
|
|
502
502
|
return Qe;
|
|
503
503
|
var a = "[a-fA-F\\d:]", e = function(I) {
|
|
@@ -531,12 +531,12 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
531
531
|
// 'i',
|
|
532
532
|
// ),
|
|
533
533
|
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
534
|
-
},
|
|
534
|
+
}, Re = {
|
|
535
535
|
integer: function(e) {
|
|
536
|
-
return
|
|
536
|
+
return Re.number(e) && parseInt(e, 10) === e;
|
|
537
537
|
},
|
|
538
538
|
float: function(e) {
|
|
539
|
-
return
|
|
539
|
+
return Re.number(e) && !Re.integer(e);
|
|
540
540
|
},
|
|
541
541
|
array: function(e) {
|
|
542
542
|
return Array.isArray(e);
|
|
@@ -557,7 +557,7 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
557
557
|
return isNaN(e) ? !1 : typeof e == "number";
|
|
558
558
|
},
|
|
559
559
|
object: function(e) {
|
|
560
|
-
return typeof e == "object" && !
|
|
560
|
+
return typeof e == "object" && !Re.array(e);
|
|
561
561
|
},
|
|
562
562
|
method: function(e) {
|
|
563
563
|
return typeof e == "function";
|
|
@@ -566,38 +566,38 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
566
566
|
return typeof e == "string" && e.length <= 320 && !!e.match(Bt.email);
|
|
567
567
|
},
|
|
568
568
|
url: function(e) {
|
|
569
|
-
return typeof e == "string" && e.length <= 2048 && !!e.match(
|
|
569
|
+
return typeof e == "string" && e.length <= 2048 && !!e.match(fa());
|
|
570
570
|
},
|
|
571
571
|
hex: function(e) {
|
|
572
572
|
return typeof e == "string" && !!e.match(Bt.hex);
|
|
573
573
|
}
|
|
574
|
-
},
|
|
574
|
+
}, pa = function(e, n, t, r, o) {
|
|
575
575
|
if (e.required && n === void 0) {
|
|
576
576
|
Xt(e, n, t, r, o);
|
|
577
577
|
return;
|
|
578
578
|
}
|
|
579
579
|
var s = ["integer", "float", "array", "regexp", "object", "method", "email", "number", "date", "url", "hex"], l = e.type;
|
|
580
|
-
s.indexOf(l) > -1 ?
|
|
580
|
+
s.indexOf(l) > -1 ? Re[l](n) || r.push(fe(o.messages.types[l], e.fullField, e.type)) : l && typeof n !== e.type && r.push(fe(o.messages.types[l], e.fullField, e.type));
|
|
581
581
|
}, ma = function(e, n, t, r, o) {
|
|
582
582
|
var s = typeof e.len == "number", l = typeof e.min == "number", d = typeof e.max == "number", C = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, k = n, y = null, u = typeof n == "number", h = typeof n == "string", T = Array.isArray(n);
|
|
583
583
|
if (u ? y = "number" : h ? y = "string" : T && (y = "array"), !y)
|
|
584
584
|
return !1;
|
|
585
|
-
T && (k = n.length), h && (k = n.replace(C, "_").length), s ? k !== e.len && r.push(
|
|
586
|
-
},
|
|
587
|
-
e[
|
|
585
|
+
T && (k = n.length), h && (k = n.replace(C, "_").length), s ? k !== e.len && r.push(fe(o.messages[y].len, e.fullField, e.len)) : l && !d && k < e.min ? r.push(fe(o.messages[y].min, e.fullField, e.min)) : d && !l && k > e.max ? r.push(fe(o.messages[y].max, e.fullField, e.max)) : l && d && (k < e.min || k > e.max) && r.push(fe(o.messages[y].range, e.fullField, e.min, e.max));
|
|
586
|
+
}, Ae = "enum", ya = function(e, n, t, r, o) {
|
|
587
|
+
e[Ae] = Array.isArray(e[Ae]) ? e[Ae] : [], e[Ae].indexOf(n) === -1 && r.push(fe(o.messages[Ae], e.fullField, e[Ae].join(", ")));
|
|
588
588
|
}, ga = function(e, n, t, r, o) {
|
|
589
589
|
if (e.pattern) {
|
|
590
590
|
if (e.pattern instanceof RegExp)
|
|
591
|
-
e.pattern.lastIndex = 0, e.pattern.test(n) || r.push(
|
|
591
|
+
e.pattern.lastIndex = 0, e.pattern.test(n) || r.push(fe(o.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
592
592
|
else if (typeof e.pattern == "string") {
|
|
593
593
|
var s = new RegExp(e.pattern);
|
|
594
|
-
s.test(n) || r.push(
|
|
594
|
+
s.test(n) || r.push(fe(o.messages.pattern.mismatch, e.fullField, n, e.pattern));
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
597
|
}, D = {
|
|
598
598
|
required: Xt,
|
|
599
599
|
whitespace: da,
|
|
600
|
-
type:
|
|
600
|
+
type: pa,
|
|
601
601
|
range: ma,
|
|
602
602
|
enum: ya,
|
|
603
603
|
pattern: ga
|
|
@@ -738,7 +738,7 @@ var Xt = function(e, n, t, r, o, s) {
|
|
|
738
738
|
required: Pa,
|
|
739
739
|
any: Oa
|
|
740
740
|
};
|
|
741
|
-
function
|
|
741
|
+
function Ct() {
|
|
742
742
|
return {
|
|
743
743
|
default: "Validation error on field %s",
|
|
744
744
|
required: "%s is required",
|
|
@@ -791,9 +791,9 @@ function _t() {
|
|
|
791
791
|
}
|
|
792
792
|
};
|
|
793
793
|
}
|
|
794
|
-
var
|
|
794
|
+
var $t = Ct(), Me = /* @__PURE__ */ function() {
|
|
795
795
|
function a(n) {
|
|
796
|
-
this.rules = null, this._messages =
|
|
796
|
+
this.rules = null, this._messages = $t, this.define(n);
|
|
797
797
|
}
|
|
798
798
|
var e = a.prototype;
|
|
799
799
|
return e.define = function(t) {
|
|
@@ -807,7 +807,7 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
807
807
|
r.rules[o] = Array.isArray(s) ? s : [s];
|
|
808
808
|
});
|
|
809
809
|
}, e.messages = function(t) {
|
|
810
|
-
return t && (this._messages = Nt(
|
|
810
|
+
return t && (this._messages = Nt(Ct(), t)), this._messages;
|
|
811
811
|
}, e.validate = function(t, r, o) {
|
|
812
812
|
var s = this;
|
|
813
813
|
r === void 0 && (r = {}), o === void 0 && (o = function() {
|
|
@@ -819,18 +819,18 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
819
819
|
var w = [], g = {};
|
|
820
820
|
function V(I) {
|
|
821
821
|
if (Array.isArray(I)) {
|
|
822
|
-
var
|
|
823
|
-
w = (
|
|
822
|
+
var f;
|
|
823
|
+
w = (f = w).concat.apply(f, I);
|
|
824
824
|
} else
|
|
825
825
|
w.push(I);
|
|
826
826
|
}
|
|
827
827
|
for (var b = 0; b < $.length; b++)
|
|
828
828
|
V($[b]);
|
|
829
|
-
w.length ? (g =
|
|
829
|
+
w.length ? (g = _t(w), C(w, g)) : C(null, l);
|
|
830
830
|
}
|
|
831
831
|
if (d.messages) {
|
|
832
832
|
var y = this.messages();
|
|
833
|
-
y ===
|
|
833
|
+
y === $t && (y = Ct()), Nt(y, d.messages), d.messages = y;
|
|
834
834
|
} else
|
|
835
835
|
d.messages = this.messages();
|
|
836
836
|
var u = {}, h = d.keys || Object.keys(this.rules);
|
|
@@ -838,9 +838,9 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
838
838
|
var w = s.rules[$], g = l[$];
|
|
839
839
|
w.forEach(function(V) {
|
|
840
840
|
var b = V;
|
|
841
|
-
typeof b.transform == "function" && (l === t && (l =
|
|
841
|
+
typeof b.transform == "function" && (l === t && (l = Te({}, l)), g = l[$] = b.transform(g)), typeof b == "function" ? b = {
|
|
842
842
|
validator: b
|
|
843
|
-
} : b =
|
|
843
|
+
} : b = Te({}, b), b.validator = s.getValidationMethod(b), b.validator && (b.field = $, b.fullField = b.fullField || $, b.type = s.getType(b), u[$] = u[$] || [], u[$].push({
|
|
844
844
|
rule: b,
|
|
845
845
|
value: g,
|
|
846
846
|
source: l,
|
|
@@ -852,28 +852,28 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
852
852
|
return ia(u, d, function($, w) {
|
|
853
853
|
var g = $.rule, V = (g.type === "object" || g.type === "array") && (typeof g.fields == "object" || typeof g.defaultField == "object");
|
|
854
854
|
V = V && (g.required || !g.required && $.value), g.field = $.field;
|
|
855
|
-
function b(L,
|
|
856
|
-
return
|
|
855
|
+
function b(L, Y) {
|
|
856
|
+
return Te({}, Y, {
|
|
857
857
|
fullField: g.fullField + "." + L,
|
|
858
858
|
fullFields: g.fullFields ? [].concat(g.fullFields, [L]) : [L]
|
|
859
859
|
});
|
|
860
860
|
}
|
|
861
861
|
function I(L) {
|
|
862
862
|
L === void 0 && (L = []);
|
|
863
|
-
var
|
|
864
|
-
!d.suppressWarning &&
|
|
865
|
-
var
|
|
866
|
-
if (d.first &&
|
|
867
|
-
return T[g.field] = 1, w(
|
|
863
|
+
var Y = Array.isArray(L) ? L : [L];
|
|
864
|
+
!d.suppressWarning && Y.length && a.warning("async-validator:", Y), Y.length && g.message !== void 0 && (Y = [].concat(g.message));
|
|
865
|
+
var Q = Y.map(jt(g, l));
|
|
866
|
+
if (d.first && Q.length)
|
|
867
|
+
return T[g.field] = 1, w(Q);
|
|
868
868
|
if (!V)
|
|
869
|
-
w(
|
|
869
|
+
w(Q);
|
|
870
870
|
else {
|
|
871
871
|
if (g.required && !$.value)
|
|
872
|
-
return g.message !== void 0 ?
|
|
872
|
+
return g.message !== void 0 ? Q = [].concat(g.message).map(jt(g, l)) : d.error && (Q = [d.error(g, fe(d.messages.required, g.field))]), w(Q);
|
|
873
873
|
var be = {};
|
|
874
874
|
g.defaultField && Object.keys($.value).map(function(le) {
|
|
875
875
|
be[le] = g.defaultField;
|
|
876
|
-
}), be =
|
|
876
|
+
}), be = Te({}, be, $.rule.fields);
|
|
877
877
|
var me = {};
|
|
878
878
|
Object.keys(be).forEach(function(le) {
|
|
879
879
|
var se = be[le], A = Array.isArray(se) ? se : [se];
|
|
@@ -882,24 +882,24 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
882
882
|
var ie = new a(me);
|
|
883
883
|
ie.messages(d.messages), $.rule.options && ($.rule.options.messages = d.messages, $.rule.options.error = d.error), ie.validate($.value, $.rule.options || d, function(le) {
|
|
884
884
|
var se = [];
|
|
885
|
-
|
|
885
|
+
Q && Q.length && se.push.apply(se, Q), le && le.length && se.push.apply(se, le), w(se.length ? se : null);
|
|
886
886
|
});
|
|
887
887
|
}
|
|
888
888
|
}
|
|
889
|
-
var
|
|
889
|
+
var f;
|
|
890
890
|
if (g.asyncValidator)
|
|
891
|
-
|
|
891
|
+
f = g.asyncValidator(g, $.value, I, $.source, d);
|
|
892
892
|
else if (g.validator) {
|
|
893
893
|
try {
|
|
894
|
-
|
|
894
|
+
f = g.validator(g, $.value, I, $.source, d);
|
|
895
895
|
} catch (L) {
|
|
896
896
|
console.error == null || console.error(L), d.suppressValidatorError || setTimeout(function() {
|
|
897
897
|
throw L;
|
|
898
898
|
}, 0), I(L.message);
|
|
899
899
|
}
|
|
900
|
-
|
|
900
|
+
f === !0 ? I() : f === !1 ? I(typeof g.message == "function" ? g.message(g.fullField || g.field) : g.message || (g.fullField || g.field) + " fails") : f instanceof Array ? I(f) : f instanceof Error && I(f.message);
|
|
901
901
|
}
|
|
902
|
-
|
|
902
|
+
f && f.then && f.then(function() {
|
|
903
903
|
return I();
|
|
904
904
|
}, function(L) {
|
|
905
905
|
return I(L);
|
|
@@ -909,7 +909,7 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
909
909
|
}, l);
|
|
910
910
|
}, e.getType = function(t) {
|
|
911
911
|
if (t.type === void 0 && t.pattern instanceof RegExp && (t.type = "pattern"), typeof t.validator != "function" && t.type && !Ve.hasOwnProperty(t.type))
|
|
912
|
-
throw new Error(
|
|
912
|
+
throw new Error(fe("Unknown rule type %s", t.type));
|
|
913
913
|
return t.type || "string";
|
|
914
914
|
}, e.getValidationMethod = function(t) {
|
|
915
915
|
if (typeof t.validator == "function")
|
|
@@ -918,15 +918,15 @@ var Ct = _t(), Le = /* @__PURE__ */ function() {
|
|
|
918
918
|
return o !== -1 && r.splice(o, 1), r.length === 1 && r[0] === "required" ? Ve.required : Ve[this.getType(t)] || void 0;
|
|
919
919
|
}, a;
|
|
920
920
|
}();
|
|
921
|
-
|
|
921
|
+
Me.register = function(e, n) {
|
|
922
922
|
if (typeof n != "function")
|
|
923
923
|
throw new Error("Cannot register a validator by type, validator is not a function");
|
|
924
924
|
Ve[e] = n;
|
|
925
925
|
};
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
const
|
|
926
|
+
Me.warning = Zt;
|
|
927
|
+
Me.messages = $t;
|
|
928
|
+
Me.validators = Ve;
|
|
929
|
+
const we = (a) => Object.prototype.toString.call(a).slice(8, -1).toLowerCase(), Dt = (a) => (Aa(a), a.map((e, n) => ({
|
|
930
930
|
...e,
|
|
931
931
|
props: e.props ?? {},
|
|
932
932
|
visible: e.visible ?? !0,
|
|
@@ -941,7 +941,7 @@ const $e = (a) => Object.prototype.toString.call(a).slice(8, -1).toLowerCase(),
|
|
|
941
941
|
visible: o,
|
|
942
942
|
resizable: s,
|
|
943
943
|
ellipsis: l,
|
|
944
|
-
component: d ?
|
|
944
|
+
component: d ? W(d) : void 0,
|
|
945
945
|
index: n
|
|
946
946
|
};
|
|
947
947
|
})), qa = (a, e, n) => a.sort((t, r) => n.indexOf(t.code) - n.indexOf(r.code)).map((t) => {
|
|
@@ -952,27 +952,27 @@ const $e = (a) => Object.prototype.toString.call(a).slice(8, -1).toLowerCase(),
|
|
|
952
952
|
items: r.map((o) => {
|
|
953
953
|
var l;
|
|
954
954
|
const s = e[o.name];
|
|
955
|
-
return s ? s.type !== o.type ? console.warn(`formItem type not match: name = ${o.name}, type = ${o.type}`) : o.type ===
|
|
955
|
+
return s ? s.type !== o.type ? console.warn(`formItem type not match: name = ${o.name}, type = ${o.type}`) : o.type === K.datePicker && o.value ? {
|
|
956
956
|
...o,
|
|
957
|
-
value: o.value ?
|
|
958
|
-
} : o.type ===
|
|
957
|
+
value: o.value ? Ye(o.value) : void 0
|
|
958
|
+
} : o.type === K.rangePicker && ((l = o.value) != null && l.length) ? {
|
|
959
959
|
...o,
|
|
960
|
-
value: o.value.map(
|
|
960
|
+
value: o.value.map(Ye)
|
|
961
961
|
} : o : console.warn(`formItem not exit: name = ${o.name}`);
|
|
962
962
|
}).filter(Boolean)
|
|
963
963
|
};
|
|
964
964
|
}).filter(Boolean);
|
|
965
|
-
function
|
|
965
|
+
function xe(...a) {
|
|
966
966
|
console.log("%c[pro-table]:", "color: #f00; padding: 2px 4px; font-weight: bold; font-size: 14px;", ...a);
|
|
967
967
|
}
|
|
968
968
|
const Aa = (a) => {
|
|
969
969
|
a.forEach((e) => {
|
|
970
|
-
new
|
|
970
|
+
new Me({
|
|
971
971
|
type: [
|
|
972
972
|
{ required: !0 },
|
|
973
973
|
{
|
|
974
974
|
validator(t, r, o) {
|
|
975
|
-
return ["string", "function"].includes(
|
|
975
|
+
return ["string", "function"].includes(we(r)) ? o() : o(new Error("type must be string or function"));
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
],
|
|
@@ -986,7 +986,7 @@ const Aa = (a) => {
|
|
|
986
986
|
required: e.type === "component"
|
|
987
987
|
},
|
|
988
988
|
props: {
|
|
989
|
-
validator: (t, r, o) => r && !["object", "function"].includes(
|
|
989
|
+
validator: (t, r, o) => r && !["object", "function"].includes(we(r)) ? o(new Error("props must be object or function")) : o()
|
|
990
990
|
}
|
|
991
991
|
}).validate(e, (t) => {
|
|
992
992
|
t && console.error(`[pro-table]: defineFormItems error, [${t[0].message}]`, {
|
|
@@ -997,39 +997,39 @@ const Aa = (a) => {
|
|
|
997
997
|
});
|
|
998
998
|
}, Ea = (a) => {
|
|
999
999
|
a.forEach((e) => {
|
|
1000
|
-
new
|
|
1000
|
+
new Me({
|
|
1001
1001
|
key: [{ required: !0, type: "string" }],
|
|
1002
1002
|
type: [
|
|
1003
1003
|
{
|
|
1004
1004
|
validator(t, r, o) {
|
|
1005
|
-
return r ? ["string", "function"].includes(
|
|
1005
|
+
return r ? ["string", "function"].includes(we(r)) ? we(r) === "string" && !Object.keys(G).includes(r) ? o(new Error(`type must be one of ${Object.keys(G).join(", ")}`)) : o() : o(new Error("type must be string or function")) : o();
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
],
|
|
1009
1009
|
title: [{ required: !0 }, { type: "string" }],
|
|
1010
1010
|
titleTooltip: {
|
|
1011
1011
|
validator(t, r, o) {
|
|
1012
|
-
return r && !["string", "function"].includes(
|
|
1012
|
+
return r && !["string", "function"].includes(we(r)) ? o(new Error("titleTooltip must be string or function")) : o();
|
|
1013
1013
|
}
|
|
1014
1014
|
},
|
|
1015
1015
|
content: {
|
|
1016
1016
|
validator(t, r, o) {
|
|
1017
|
-
return r && !["string", "function"].includes(
|
|
1017
|
+
return r && !["string", "function"].includes(we(r)) ? o(new Error("content must be string or function")) : o();
|
|
1018
1018
|
}
|
|
1019
1019
|
},
|
|
1020
1020
|
tooltip: {
|
|
1021
1021
|
validator(t, r, o) {
|
|
1022
|
-
return r && !["string", "boolean", "function"].includes(
|
|
1022
|
+
return r && !["string", "boolean", "function"].includes(we(r)) ? o(new Error("tooltip must be string, boolean, or function")) : o();
|
|
1023
1023
|
}
|
|
1024
1024
|
},
|
|
1025
1025
|
component: {
|
|
1026
|
-
required: e.type ===
|
|
1026
|
+
required: e.type === G.component
|
|
1027
1027
|
},
|
|
1028
1028
|
copyable: { type: "boolean" },
|
|
1029
1029
|
ellipsis: { type: "boolean" },
|
|
1030
1030
|
props: {
|
|
1031
1031
|
validator(t, r, o) {
|
|
1032
|
-
return r && !["object", "function"].includes(
|
|
1032
|
+
return r && !["object", "function"].includes(we(r)) ? o(new Error("props must be object or function")) : o();
|
|
1033
1033
|
}
|
|
1034
1034
|
}
|
|
1035
1035
|
}).validate(e, (t) => {
|
|
@@ -1053,7 +1053,7 @@ const Aa = (a) => {
|
|
|
1053
1053
|
try {
|
|
1054
1054
|
return JSON.parse(a);
|
|
1055
1055
|
} catch (n) {
|
|
1056
|
-
return
|
|
1056
|
+
return xe(`[pro-table]: parseJsonSafe error, ${n}`, {
|
|
1057
1057
|
jsonString: a,
|
|
1058
1058
|
defaultVal: e
|
|
1059
1059
|
}), e;
|
|
@@ -1066,7 +1066,7 @@ const Aa = (a) => {
|
|
|
1066
1066
|
}, en = (a) => {
|
|
1067
1067
|
const e = ja(a);
|
|
1068
1068
|
return Wn(e, "1b671a64-40d5-491e-99b0-da01ff1f3341").replace(/-/g, "");
|
|
1069
|
-
}, Na = /* @__PURE__ */
|
|
1069
|
+
}, Na = /* @__PURE__ */ pe({
|
|
1070
1070
|
__name: "EllipsisElement",
|
|
1071
1071
|
props: {
|
|
1072
1072
|
/**
|
|
@@ -1084,7 +1084,7 @@ const Aa = (a) => {
|
|
|
1084
1084
|
*/
|
|
1085
1085
|
type: {
|
|
1086
1086
|
type: String,
|
|
1087
|
-
default:
|
|
1087
|
+
default: G.text
|
|
1088
1088
|
},
|
|
1089
1089
|
/**
|
|
1090
1090
|
* 单元格宽度
|
|
@@ -1133,7 +1133,7 @@ const Aa = (a) => {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
},
|
|
1135
1135
|
setup(a) {
|
|
1136
|
-
const e = a, n = j(() => e.list.map((l) =>
|
|
1136
|
+
const e = a, n = j(() => e.list.map((l) => we(l) === "object" ? l : { label: l }).map((l, d) => ({ ...l, index: d, __key: l.key ?? `${d}-${String(l.label)}` }))), t = j(() => qt(n.value, 0, e.maxCount)), r = j(
|
|
1137
1137
|
() => qt(n.value, e.maxCount, n.value.length)
|
|
1138
1138
|
), o = j(() => r.value.map(({ index: l, disabled: d, label: C, onClick: k }) => ({
|
|
1139
1139
|
key: l + e.maxCount,
|
|
@@ -1142,19 +1142,19 @@ const Aa = (a) => {
|
|
|
1142
1142
|
onClick: () => k == null ? void 0 : k(e.record)
|
|
1143
1143
|
}))), s = j(() => {
|
|
1144
1144
|
const l = {}, { maxCount: d, cellWidth: C, type: k } = e;
|
|
1145
|
-
return k ===
|
|
1145
|
+
return k === G.text && (l.flex = 1), k === G.link && t.value.length > 1 && (l.maxWidth = `${((C - 50) / C / d * 100).toFixed(2)}%`), l;
|
|
1146
1146
|
});
|
|
1147
1147
|
return (l, d) => {
|
|
1148
1148
|
const C = E("a-tag"), k = E("a-popover"), y = E("a-button"), u = E("a-menu"), h = E("a-dropdown");
|
|
1149
|
-
return x(),
|
|
1149
|
+
return x(), U("div", {
|
|
1150
1150
|
class: m([
|
|
1151
1151
|
l.$style.ellipsisElement,
|
|
1152
1152
|
{
|
|
1153
|
-
[l.$style.ellipsisElementHasGap]: ![
|
|
1153
|
+
[l.$style.ellipsisElementHasGap]: ![p(G).button, p(G).tag].includes(a.type)
|
|
1154
1154
|
}
|
|
1155
1155
|
])
|
|
1156
1156
|
}, [
|
|
1157
|
-
(x(!0),
|
|
1157
|
+
(x(!0), U(Pe, null, mt(t.value, (T, $) => (x(), U("div", {
|
|
1158
1158
|
key: T.__key,
|
|
1159
1159
|
class: m(l.$style.elementItem),
|
|
1160
1160
|
style: re(s.value)
|
|
@@ -1164,7 +1164,7 @@ const Aa = (a) => {
|
|
|
1164
1164
|
index: $
|
|
1165
1165
|
})
|
|
1166
1166
|
], 6))), 128)),
|
|
1167
|
-
r.value.length ? (x(),
|
|
1167
|
+
r.value.length ? (x(), U(Pe, { key: 0 }, [
|
|
1168
1168
|
a.displayType === "popover" ? (x(), B(k, {
|
|
1169
1169
|
key: 0,
|
|
1170
1170
|
trigger: a.trigger,
|
|
@@ -1172,10 +1172,10 @@ const Aa = (a) => {
|
|
|
1172
1172
|
"destroy-on-close": ""
|
|
1173
1173
|
}, {
|
|
1174
1174
|
content: _(() => [
|
|
1175
|
-
|
|
1175
|
+
H("div", {
|
|
1176
1176
|
class: m(l.$style.ellipsisList)
|
|
1177
1177
|
}, [
|
|
1178
|
-
(x(!0),
|
|
1178
|
+
(x(!0), U(Pe, null, mt(r.value, (T, $) => ve(l.$slots, "default", {
|
|
1179
1179
|
key: T.__key,
|
|
1180
1180
|
item: T,
|
|
1181
1181
|
index: $ + a.maxCount,
|
|
@@ -1190,12 +1190,12 @@ const Aa = (a) => {
|
|
|
1190
1190
|
class: m([
|
|
1191
1191
|
l.$style.ellipsisTag,
|
|
1192
1192
|
{
|
|
1193
|
-
[l.$style.imageEllipsisTag]: a.type ===
|
|
1193
|
+
[l.$style.imageEllipsisTag]: a.type === p(G).image
|
|
1194
1194
|
}
|
|
1195
1195
|
])
|
|
1196
1196
|
}, {
|
|
1197
1197
|
default: _(() => [
|
|
1198
|
-
ne(
|
|
1198
|
+
ne(Ce(`+${r.value.length}...`), 1)
|
|
1199
1199
|
]),
|
|
1200
1200
|
_: 1
|
|
1201
1201
|
}, 8, ["class"])
|
|
@@ -1217,7 +1217,7 @@ const Aa = (a) => {
|
|
|
1217
1217
|
}, {
|
|
1218
1218
|
default: _(() => [
|
|
1219
1219
|
d[0] || (d[0] = ne(" 更多 ")),
|
|
1220
|
-
v(
|
|
1220
|
+
v(p(Ln))
|
|
1221
1221
|
]),
|
|
1222
1222
|
_: 1
|
|
1223
1223
|
})
|
|
@@ -1228,12 +1228,12 @@ const Aa = (a) => {
|
|
|
1228
1228
|
], 2);
|
|
1229
1229
|
};
|
|
1230
1230
|
}
|
|
1231
|
-
}), Ba = "_ellipsisElement_6fog1_1", Da = "_elementItem_6fog1_6", Ra = "_ellipsisElementHasGap_6fog1_10",
|
|
1231
|
+
}), Ba = "_ellipsisElement_6fog1_1", Da = "_elementItem_6fog1_6", Ra = "_ellipsisElementHasGap_6fog1_10", za = "_flexWrap_6fog1_14", Va = "_ellipsisTag_6fog1_18", Ya = "_imageEllipsisTag_6fog1_22", Ha = "_ellipsisList_6fog1_29", Ua = {
|
|
1232
1232
|
ellipsisElement: Ba,
|
|
1233
1233
|
elementItem: Da,
|
|
1234
1234
|
ellipsisElementHasGap: Ra,
|
|
1235
|
-
flexWrap:
|
|
1236
|
-
ellipsisTag:
|
|
1235
|
+
flexWrap: za,
|
|
1236
|
+
ellipsisTag: Va,
|
|
1237
1237
|
imageEllipsisTag: Ya,
|
|
1238
1238
|
ellipsisList: Ha
|
|
1239
1239
|
}, he = (a, e) => {
|
|
@@ -1243,7 +1243,7 @@ const Aa = (a) => {
|
|
|
1243
1243
|
return n;
|
|
1244
1244
|
}, Ga = {
|
|
1245
1245
|
$style: Ua
|
|
1246
|
-
}, Wa = /* @__PURE__ */ he(Na, [["__cssModules", Ga]]), Qa = { key: 1 }, Ja = /* @__PURE__ */
|
|
1246
|
+
}, Wa = /* @__PURE__ */ he(Na, [["__cssModules", Ga]]), Qa = { key: 1 }, Ja = /* @__PURE__ */ pe({
|
|
1247
1247
|
__name: "TableCellContent",
|
|
1248
1248
|
props: {
|
|
1249
1249
|
/**
|
|
@@ -1284,11 +1284,11 @@ const Aa = (a) => {
|
|
|
1284
1284
|
},
|
|
1285
1285
|
setup(a) {
|
|
1286
1286
|
const e = a, n = /* @__PURE__ */ new Map(), t = j(() => {
|
|
1287
|
-
const { index: h, record: T, column: $ } = e, w = ($ == null ? void 0 : $.type) ??
|
|
1288
|
-
return
|
|
1287
|
+
const { index: h, record: T, column: $ } = e, w = ($ == null ? void 0 : $.type) ?? G.text;
|
|
1288
|
+
return Ie(w) ? w(T, h) : w;
|
|
1289
1289
|
}), r = j(() => {
|
|
1290
1290
|
const { index: h, record: T, column: $ } = e, w = $.content;
|
|
1291
|
-
if (
|
|
1291
|
+
if (Ie(w))
|
|
1292
1292
|
return w(T, h);
|
|
1293
1293
|
if (typeof w == "string") {
|
|
1294
1294
|
if (w.startsWith("$")) {
|
|
@@ -1302,11 +1302,11 @@ const Aa = (a) => {
|
|
|
1302
1302
|
return nt(T, w, "");
|
|
1303
1303
|
}
|
|
1304
1304
|
return "";
|
|
1305
|
-
}), o = j(() =>
|
|
1305
|
+
}), o = j(() => Le(r.value)), s = j(() => {
|
|
1306
1306
|
const { index: h, record: T, column: $ } = e;
|
|
1307
|
-
if (t.value ===
|
|
1307
|
+
if (t.value === G.component) {
|
|
1308
1308
|
const { props: w = {} } = $;
|
|
1309
|
-
return
|
|
1309
|
+
return Ie(w) ? w(T, h) : {
|
|
1310
1310
|
...w,
|
|
1311
1311
|
index: h,
|
|
1312
1312
|
record: T
|
|
@@ -1314,83 +1314,83 @@ const Aa = (a) => {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
return {};
|
|
1316
1316
|
}), l = j(() => {
|
|
1317
|
-
const { index: h, record: T, column: $ } = e, w = $.tooltip ?? [
|
|
1317
|
+
const { index: h, record: T, column: $ } = e, w = $.tooltip ?? [G.text, G.link].includes(t.value);
|
|
1318
1318
|
if (!w) return "";
|
|
1319
|
-
if (
|
|
1319
|
+
if (Ie(w))
|
|
1320
1320
|
return w(T, h);
|
|
1321
1321
|
const g = o.value[0];
|
|
1322
1322
|
return (g == null ? void 0 : g.label) || g;
|
|
1323
|
-
}), d = j(() => !(["", void 0, null].includes(r.value) && ![
|
|
1323
|
+
}), d = j(() => !(["", void 0, null].includes(r.value) && ![G.component, G.sort].includes(t.value))), C = (h) => typeof h == "string" && /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i.test(h), k = (h) => e.hasRouter && !C(h), y = (h) => k(h) ? "router-link" : "a", u = (h, T) => k(h) ? { to: h, target: T ?? "_blank" } : { href: h, target: T ?? "_blank" };
|
|
1324
1324
|
return (h, T) => {
|
|
1325
1325
|
var b;
|
|
1326
1326
|
const $ = E("a-button"), w = E("a-typography-text"), g = E("a-tag"), V = E("a-image");
|
|
1327
|
-
return d.value ? (x(),
|
|
1327
|
+
return d.value ? (x(), U("div", {
|
|
1328
1328
|
key: 0,
|
|
1329
1329
|
class: m(h.$style.tableCellContent)
|
|
1330
1330
|
}, [
|
|
1331
|
-
t.value ===
|
|
1331
|
+
t.value === p(G).sort ? (x(), B($, {
|
|
1332
1332
|
key: 0,
|
|
1333
1333
|
type: "text",
|
|
1334
1334
|
size: "small",
|
|
1335
|
-
icon:
|
|
1335
|
+
icon: W(p(Oe)),
|
|
1336
1336
|
class: m([h.$style.draggableIcon, "super-table-column-draggable-handle"])
|
|
1337
1337
|
}, null, 8, ["icon", "class"])) : N("", !0),
|
|
1338
|
-
t.value ===
|
|
1338
|
+
t.value === p(G).component ? (x(), B(et(a.column.component), ct(ue({ key: 1 }, s.value)), null, 16)) : Ut([(b = a.column) == null ? void 0 : b.key, a.index, o.value], () => (x(), B(Wa, {
|
|
1339
1339
|
key: 2,
|
|
1340
1340
|
list: o.value,
|
|
1341
|
-
"max-count": t.value ===
|
|
1341
|
+
"max-count": t.value === p(G).text ? 1 : a.column.maxCount,
|
|
1342
1342
|
record: a.record,
|
|
1343
1343
|
type: t.value,
|
|
1344
1344
|
"cell-width": a.column.width,
|
|
1345
|
-
"display-type": [
|
|
1345
|
+
"display-type": [p(G).button].includes(t.value) ? "dropdown" : "popover"
|
|
1346
1346
|
}, {
|
|
1347
|
-
default: _(({ item: I, index:
|
|
1348
|
-
t.value ===
|
|
1349
|
-
|
|
1347
|
+
default: _(({ item: I, index: f, inPopover: L }) => [
|
|
1348
|
+
t.value === p(G).text ? (x(), U(Pe, { key: 0 }, [
|
|
1349
|
+
f === 0 ? (x(), B(w, {
|
|
1350
1350
|
key: 0,
|
|
1351
1351
|
ellipsis: { tooltip: l.value },
|
|
1352
1352
|
content: String(I.label),
|
|
1353
1353
|
class: m(h.$style.antTypographyEllipsis)
|
|
1354
|
-
}, null, 8, ["ellipsis", "content", "class"])) : (x(),
|
|
1354
|
+
}, null, 8, ["ellipsis", "content", "class"])) : (x(), U("div", {
|
|
1355
1355
|
key: 1,
|
|
1356
1356
|
class: m(h.$style.textListItem)
|
|
1357
|
-
},
|
|
1357
|
+
}, Ce(I.label), 3))
|
|
1358
1358
|
], 64)) : N("", !0),
|
|
1359
|
-
t.value ===
|
|
1359
|
+
t.value === p(G).link ? (x(), B(et(y(I.to)), ct(ue({ key: 1 }, u(I.to, I.target))), {
|
|
1360
1360
|
default: _(() => [
|
|
1361
1361
|
a.column.ellipsis ? (x(), B(w, {
|
|
1362
1362
|
key: 0,
|
|
1363
1363
|
ellipsis: { tooltip: I.label },
|
|
1364
1364
|
content: String(I.label),
|
|
1365
|
-
style: re({ color:
|
|
1365
|
+
style: re({ color: p(oe).colorPrimary }),
|
|
1366
1366
|
class: m(h.$style.antTypographyEllipsis)
|
|
1367
|
-
}, null, 8, ["ellipsis", "content", "style", "class"])) : (x(),
|
|
1367
|
+
}, null, 8, ["ellipsis", "content", "style", "class"])) : (x(), U("span", Qa, Ce(I.label), 1))
|
|
1368
1368
|
]),
|
|
1369
1369
|
_: 2
|
|
1370
1370
|
}, 1040)) : N("", !0),
|
|
1371
|
-
t.value ===
|
|
1371
|
+
t.value === p(G).tag ? (x(), B(g, ct(ue({ key: 2 }, I)), {
|
|
1372
1372
|
default: _(() => [
|
|
1373
|
-
ne(
|
|
1373
|
+
ne(Ce(I.label), 1)
|
|
1374
1374
|
]),
|
|
1375
1375
|
_: 2
|
|
1376
1376
|
}, 1040)) : N("", !0),
|
|
1377
|
-
t.value ===
|
|
1377
|
+
t.value === p(G).button ? (x(), B($, ue({
|
|
1378
1378
|
key: 3,
|
|
1379
1379
|
type: "link",
|
|
1380
1380
|
size: "small",
|
|
1381
1381
|
disabled: I.disabled
|
|
1382
1382
|
}, I.buttonProps, {
|
|
1383
|
-
onClick: (
|
|
1384
|
-
var
|
|
1385
|
-
return (
|
|
1383
|
+
onClick: (Y) => {
|
|
1384
|
+
var Q;
|
|
1385
|
+
return (Q = I.onClick) == null ? void 0 : Q.call(I, a.record, a.index);
|
|
1386
1386
|
}
|
|
1387
1387
|
}), {
|
|
1388
1388
|
default: _(() => [
|
|
1389
|
-
ne(
|
|
1389
|
+
ne(Ce(I.label), 1)
|
|
1390
1390
|
]),
|
|
1391
1391
|
_: 2
|
|
1392
1392
|
}, 1040, ["disabled", "onClick"])) : N("", !0),
|
|
1393
|
-
t.value ===
|
|
1393
|
+
t.value === p(G).image ? (x(), B(V, {
|
|
1394
1394
|
key: 4,
|
|
1395
1395
|
width: L ? 100 : 32,
|
|
1396
1396
|
height: L ? 100 : 32,
|
|
@@ -1398,7 +1398,7 @@ const Aa = (a) => {
|
|
|
1398
1398
|
style: { objectFit: "cover" }
|
|
1399
1399
|
}, {
|
|
1400
1400
|
previewMask: _(() => [
|
|
1401
|
-
v(
|
|
1401
|
+
v(p(Mn))
|
|
1402
1402
|
]),
|
|
1403
1403
|
_: 2
|
|
1404
1404
|
}, 1032, ["width", "height", "src"])) : N("", !0)
|
|
@@ -1415,7 +1415,7 @@ const Aa = (a) => {
|
|
|
1415
1415
|
textListItem: er
|
|
1416
1416
|
}, nr = {
|
|
1417
1417
|
$style: tr
|
|
1418
|
-
}, ar = /* @__PURE__ */ he(Ja, [["__cssModules", nr]]), rr =
|
|
1418
|
+
}, ar = /* @__PURE__ */ he(Ja, [["__cssModules", nr]]), rr = pe({
|
|
1419
1419
|
name: "VNodes",
|
|
1420
1420
|
props: {
|
|
1421
1421
|
vnodes: {
|
|
@@ -1426,7 +1426,7 @@ const Aa = (a) => {
|
|
|
1426
1426
|
render() {
|
|
1427
1427
|
return this.vnodes;
|
|
1428
1428
|
}
|
|
1429
|
-
}), or = /* @__PURE__ */
|
|
1429
|
+
}), or = /* @__PURE__ */ pe({
|
|
1430
1430
|
__name: "TableConfig",
|
|
1431
1431
|
props: {
|
|
1432
1432
|
/**
|
|
@@ -1442,17 +1442,17 @@ const Aa = (a) => {
|
|
|
1442
1442
|
emits: ["change"],
|
|
1443
1443
|
setup(a, { emit: e }) {
|
|
1444
1444
|
const n = te(!1), t = a, r = e, o = te([]), s = te([]), l = te([]), d = te([]), C = te(""), k = te(""), y = () => {
|
|
1445
|
-
s.value = o.value.filter((
|
|
1445
|
+
s.value = o.value.filter((f) => f.fixed === "left"), l.value = o.value.filter((f) => !f.fixed), d.value = o.value.filter((f) => f.fixed === "right");
|
|
1446
1446
|
};
|
|
1447
1447
|
Ft(() => {
|
|
1448
1448
|
o.value = t.columns, y();
|
|
1449
1449
|
});
|
|
1450
|
-
const u = ({ title:
|
|
1451
|
-
var
|
|
1452
|
-
const L = (
|
|
1453
|
-
return L ?
|
|
1454
|
-
}, h = j(() => o.value.every((
|
|
1455
|
-
k.value =
|
|
1450
|
+
const u = ({ title: f }) => {
|
|
1451
|
+
var Y;
|
|
1452
|
+
const L = (Y = k.value) == null ? void 0 : Y.trim();
|
|
1453
|
+
return L ? f.toLocaleLowerCase().includes(L.toLocaleLowerCase()) : !0;
|
|
1454
|
+
}, h = j(() => o.value.every((f) => !u(f))), T = wt((f) => {
|
|
1455
|
+
k.value = f.target.value;
|
|
1456
1456
|
}, 300), $ = () => {
|
|
1457
1457
|
o.value = [
|
|
1458
1458
|
...s.value,
|
|
@@ -1462,29 +1462,29 @@ const Aa = (a) => {
|
|
|
1462
1462
|
}, w = () => {
|
|
1463
1463
|
$(), r(
|
|
1464
1464
|
"change",
|
|
1465
|
-
o.value.map((
|
|
1465
|
+
o.value.map((f) => Fe(f, vt))
|
|
1466
1466
|
);
|
|
1467
1467
|
}, g = j({
|
|
1468
1468
|
get() {
|
|
1469
|
-
return o.value.every((
|
|
1469
|
+
return o.value.every((f) => f.visible);
|
|
1470
1470
|
},
|
|
1471
|
-
set(
|
|
1471
|
+
set(f) {
|
|
1472
1472
|
o.value.forEach((L) => {
|
|
1473
|
-
L.visible =
|
|
1473
|
+
L.visible = f;
|
|
1474
1474
|
}), w();
|
|
1475
1475
|
}
|
|
1476
1476
|
}), V = j(() => {
|
|
1477
|
-
const
|
|
1478
|
-
return
|
|
1477
|
+
const f = o.value.filter((L) => L.visible).length;
|
|
1478
|
+
return f > 0 && f < o.value.length;
|
|
1479
1479
|
}), b = () => {
|
|
1480
1480
|
r("change", []);
|
|
1481
|
-
}, I = (
|
|
1482
|
-
|
|
1481
|
+
}, I = (f, L) => {
|
|
1482
|
+
f.fixed = L, y(), $(), w();
|
|
1483
1483
|
};
|
|
1484
1484
|
return Ft(() => {
|
|
1485
1485
|
n.value || (C.value = "", k.value = "");
|
|
1486
|
-
}), (
|
|
1487
|
-
const
|
|
1486
|
+
}), (f, L) => {
|
|
1487
|
+
const Y = E("a-button"), Q = E("a-checkbox"), be = E("a-input"), me = E("a-typography-text"), ie = E("a-tooltip"), le = E("a-popover"), se = E("a-config-provider");
|
|
1488
1488
|
return x(), B(se, { theme: {
|
|
1489
1489
|
token: {
|
|
1490
1490
|
borderRadius: 2
|
|
@@ -1500,13 +1500,13 @@ const Aa = (a) => {
|
|
|
1500
1500
|
"overlay-class-name": "pro-table-config-popover"
|
|
1501
1501
|
}, {
|
|
1502
1502
|
content: _(() => [
|
|
1503
|
-
|
|
1504
|
-
class: m(
|
|
1503
|
+
H("div", {
|
|
1504
|
+
class: m(f.$style.tableConfig)
|
|
1505
1505
|
}, [
|
|
1506
|
-
|
|
1507
|
-
class: m(
|
|
1506
|
+
H("div", {
|
|
1507
|
+
class: m(f.$style.tableConfigActions)
|
|
1508
1508
|
}, [
|
|
1509
|
-
v(
|
|
1509
|
+
v(Q, {
|
|
1510
1510
|
checked: g.value,
|
|
1511
1511
|
"onUpdate:checked": L[0] || (L[0] = (A) => g.value = A),
|
|
1512
1512
|
indeterminate: V.value
|
|
@@ -1516,7 +1516,7 @@ const Aa = (a) => {
|
|
|
1516
1516
|
])),
|
|
1517
1517
|
_: 1
|
|
1518
1518
|
}, 8, ["checked", "indeterminate"]),
|
|
1519
|
-
v(
|
|
1519
|
+
v(Y, {
|
|
1520
1520
|
type: "link",
|
|
1521
1521
|
size: "small",
|
|
1522
1522
|
onClick: b
|
|
@@ -1527,47 +1527,48 @@ const Aa = (a) => {
|
|
|
1527
1527
|
_: 1
|
|
1528
1528
|
})
|
|
1529
1529
|
], 2),
|
|
1530
|
-
|
|
1531
|
-
class: m(
|
|
1530
|
+
H("div", {
|
|
1531
|
+
class: m(f.$style.tableConfigHead)
|
|
1532
1532
|
}, [
|
|
1533
1533
|
v(be, {
|
|
1534
1534
|
value: C.value,
|
|
1535
1535
|
"onUpdate:value": L[1] || (L[1] = (A) => C.value = A),
|
|
1536
1536
|
placeholder: "搜索标题",
|
|
1537
|
-
onChange:
|
|
1537
|
+
onChange: p(T)
|
|
1538
1538
|
}, null, 8, ["value", "onChange"])
|
|
1539
1539
|
], 2),
|
|
1540
|
-
|
|
1541
|
-
class: m(
|
|
1540
|
+
H("div", {
|
|
1541
|
+
class: m(f.$style.tableConfigContent)
|
|
1542
1542
|
}, [
|
|
1543
|
-
s.value.some((A) => u(A)) ? (x(),
|
|
1543
|
+
s.value.some((A) => u(A)) ? (x(), U("div", {
|
|
1544
1544
|
key: 0,
|
|
1545
|
-
class: m(
|
|
1545
|
+
class: m(f.$style.columnGroup)
|
|
1546
1546
|
}, [
|
|
1547
|
-
|
|
1548
|
-
class: m(
|
|
1547
|
+
H("div", {
|
|
1548
|
+
class: m(f.$style.groupTitle)
|
|
1549
1549
|
}, "固定在左侧", 2),
|
|
1550
|
-
v(
|
|
1550
|
+
v(p(ze), {
|
|
1551
1551
|
list: s.value,
|
|
1552
1552
|
"item-key": "key",
|
|
1553
|
-
class: m(
|
|
1553
|
+
class: m(f.$style.columnList),
|
|
1554
1554
|
handle: ".table-column-draggable-handle",
|
|
1555
|
+
disabled: s.value.length <= 1,
|
|
1555
1556
|
onEnd: w
|
|
1556
1557
|
}, {
|
|
1557
1558
|
item: _(({ element: A }) => [
|
|
1558
|
-
u(A) ? (x(),
|
|
1559
|
+
u(A) ? (x(), U("div", {
|
|
1559
1560
|
key: 0,
|
|
1560
|
-
class: m(
|
|
1561
|
-
style: re({ background:
|
|
1561
|
+
class: m(f.$style.columnItem),
|
|
1562
|
+
style: re({ background: p(oe).colorBgContainer })
|
|
1562
1563
|
}, [
|
|
1563
|
-
v(
|
|
1564
|
+
v(Y, {
|
|
1564
1565
|
type: "text",
|
|
1565
1566
|
size: "small",
|
|
1566
|
-
icon:
|
|
1567
|
-
style: re({ color:
|
|
1568
|
-
class: m(["table-column-draggable-handle",
|
|
1567
|
+
icon: W(p(Oe)),
|
|
1568
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1569
|
+
class: m(["table-column-draggable-handle", f.$style.dragIcon])
|
|
1569
1570
|
}, null, 8, ["icon", "style", "class"]),
|
|
1570
|
-
v(
|
|
1571
|
+
v(Q, {
|
|
1571
1572
|
checked: A.visible,
|
|
1572
1573
|
"onUpdate:checked": (R) => A.visible = R,
|
|
1573
1574
|
onChange: w
|
|
@@ -1575,21 +1576,21 @@ const Aa = (a) => {
|
|
|
1575
1576
|
v(me, {
|
|
1576
1577
|
ellipsis: { tooltip: A.title },
|
|
1577
1578
|
content: A.title,
|
|
1578
|
-
class: m([
|
|
1579
|
+
class: m([f.$style.columnItemContent, f.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1579
1580
|
onClick: () => {
|
|
1580
1581
|
A.visible = !A.visible, w();
|
|
1581
1582
|
}
|
|
1582
1583
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1583
|
-
|
|
1584
|
-
class: m(
|
|
1584
|
+
H("div", {
|
|
1585
|
+
class: m(f.$style.fixedActions)
|
|
1585
1586
|
}, [
|
|
1586
1587
|
v(ie, { title: "固定在右侧" }, {
|
|
1587
1588
|
default: _(() => [
|
|
1588
|
-
v(
|
|
1589
|
+
v(Y, {
|
|
1589
1590
|
type: "text",
|
|
1590
1591
|
size: "small",
|
|
1591
|
-
icon:
|
|
1592
|
-
style: re({ color:
|
|
1592
|
+
icon: W(p(xt)),
|
|
1593
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1593
1594
|
onClick: (R) => I(A, "right")
|
|
1594
1595
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1595
1596
|
]),
|
|
@@ -1597,11 +1598,11 @@ const Aa = (a) => {
|
|
|
1597
1598
|
}, 1024),
|
|
1598
1599
|
v(ie, { title: "取消固定" }, {
|
|
1599
1600
|
default: _(() => [
|
|
1600
|
-
v(
|
|
1601
|
+
v(Y, {
|
|
1601
1602
|
type: "text",
|
|
1602
1603
|
size: "small",
|
|
1603
|
-
icon:
|
|
1604
|
-
style: re({ color:
|
|
1604
|
+
icon: W(p(Tt)),
|
|
1605
|
+
style: re({ color: p(oe).colorPrimary }),
|
|
1605
1606
|
onClick: (R) => I(A, !1)
|
|
1606
1607
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1607
1608
|
]),
|
|
@@ -1611,36 +1612,37 @@ const Aa = (a) => {
|
|
|
1611
1612
|
], 6)) : N("", !0)
|
|
1612
1613
|
]),
|
|
1613
1614
|
_: 1
|
|
1614
|
-
}, 8, ["list", "class"])
|
|
1615
|
+
}, 8, ["list", "class", "disabled"])
|
|
1615
1616
|
], 2)) : N("", !0),
|
|
1616
|
-
l.value.some((A) => u(A)) ? (x(),
|
|
1617
|
+
l.value.some((A) => u(A)) ? (x(), U("div", {
|
|
1617
1618
|
key: 1,
|
|
1618
|
-
class: m(
|
|
1619
|
+
class: m(f.$style.columnGroup)
|
|
1619
1620
|
}, [
|
|
1620
|
-
|
|
1621
|
-
class: m(
|
|
1621
|
+
H("div", {
|
|
1622
|
+
class: m(f.$style.groupTitle)
|
|
1622
1623
|
}, "不固定", 2),
|
|
1623
|
-
v(
|
|
1624
|
+
v(p(ze), {
|
|
1624
1625
|
list: l.value,
|
|
1625
1626
|
"item-key": "key",
|
|
1626
|
-
class: m(
|
|
1627
|
+
class: m(f.$style.columnList),
|
|
1627
1628
|
handle: ".table-column-draggable-handle",
|
|
1629
|
+
disabled: l.value.length <= 1,
|
|
1628
1630
|
onEnd: w
|
|
1629
1631
|
}, {
|
|
1630
1632
|
item: _(({ element: A }) => [
|
|
1631
|
-
u(A) ? (x(),
|
|
1633
|
+
u(A) ? (x(), U("div", {
|
|
1632
1634
|
key: 0,
|
|
1633
|
-
class: m(
|
|
1634
|
-
style: re({ background:
|
|
1635
|
+
class: m(f.$style.columnItem),
|
|
1636
|
+
style: re({ background: p(oe).colorBgContainer })
|
|
1635
1637
|
}, [
|
|
1636
|
-
v(
|
|
1638
|
+
v(Y, {
|
|
1637
1639
|
type: "text",
|
|
1638
1640
|
size: "small",
|
|
1639
|
-
icon:
|
|
1640
|
-
style: re({ color:
|
|
1641
|
-
class: m(["table-column-draggable-handle",
|
|
1641
|
+
icon: W(p(Oe)),
|
|
1642
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1643
|
+
class: m(["table-column-draggable-handle", f.$style.dragIcon])
|
|
1642
1644
|
}, null, 8, ["icon", "style", "class"]),
|
|
1643
|
-
v(
|
|
1645
|
+
v(Q, {
|
|
1644
1646
|
checked: A.visible,
|
|
1645
1647
|
"onUpdate:checked": (R) => A.visible = R,
|
|
1646
1648
|
onChange: w
|
|
@@ -1648,21 +1650,21 @@ const Aa = (a) => {
|
|
|
1648
1650
|
v(me, {
|
|
1649
1651
|
ellipsis: { tooltip: A.title },
|
|
1650
1652
|
content: A.title,
|
|
1651
|
-
class: m([
|
|
1653
|
+
class: m([f.$style.columnItemContent, f.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1652
1654
|
onClick: () => {
|
|
1653
1655
|
A.visible = !A.visible, w();
|
|
1654
1656
|
}
|
|
1655
1657
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1656
|
-
|
|
1657
|
-
class: m(
|
|
1658
|
+
H("div", {
|
|
1659
|
+
class: m(f.$style.fixedActions)
|
|
1658
1660
|
}, [
|
|
1659
1661
|
v(ie, { title: "固定在左侧" }, {
|
|
1660
1662
|
default: _(() => [
|
|
1661
|
-
v(
|
|
1663
|
+
v(Y, {
|
|
1662
1664
|
type: "text",
|
|
1663
1665
|
size: "small",
|
|
1664
|
-
icon:
|
|
1665
|
-
style: re({ color:
|
|
1666
|
+
icon: W(p(Pt)),
|
|
1667
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1666
1668
|
onClick: (R) => I(A, "left")
|
|
1667
1669
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1668
1670
|
]),
|
|
@@ -1670,11 +1672,11 @@ const Aa = (a) => {
|
|
|
1670
1672
|
}, 1024),
|
|
1671
1673
|
v(ie, { title: "固定在右侧" }, {
|
|
1672
1674
|
default: _(() => [
|
|
1673
|
-
v(
|
|
1675
|
+
v(Y, {
|
|
1674
1676
|
type: "text",
|
|
1675
1677
|
size: "small",
|
|
1676
|
-
icon:
|
|
1677
|
-
style: re({ color:
|
|
1678
|
+
icon: W(p(xt)),
|
|
1679
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1678
1680
|
onClick: (R) => I(A, "right")
|
|
1679
1681
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1680
1682
|
]),
|
|
@@ -1684,36 +1686,37 @@ const Aa = (a) => {
|
|
|
1684
1686
|
], 6)) : N("", !0)
|
|
1685
1687
|
]),
|
|
1686
1688
|
_: 1
|
|
1687
|
-
}, 8, ["list", "class"])
|
|
1689
|
+
}, 8, ["list", "class", "disabled"])
|
|
1688
1690
|
], 2)) : N("", !0),
|
|
1689
|
-
d.value.some((A) => u(A)) ? (x(),
|
|
1691
|
+
d.value.some((A) => u(A)) ? (x(), U("div", {
|
|
1690
1692
|
key: 2,
|
|
1691
|
-
class: m(
|
|
1693
|
+
class: m(f.$style.columnGroup)
|
|
1692
1694
|
}, [
|
|
1693
|
-
|
|
1694
|
-
class: m(
|
|
1695
|
+
H("div", {
|
|
1696
|
+
class: m(f.$style.groupTitle)
|
|
1695
1697
|
}, "固定在右侧", 2),
|
|
1696
|
-
v(
|
|
1698
|
+
v(p(ze), {
|
|
1697
1699
|
list: d.value,
|
|
1698
1700
|
"item-key": "key",
|
|
1699
|
-
class: m(
|
|
1701
|
+
class: m(f.$style.columnList),
|
|
1700
1702
|
handle: ".table-column-draggable-handle",
|
|
1703
|
+
disabled: d.value.length <= 1,
|
|
1701
1704
|
onEnd: w
|
|
1702
1705
|
}, {
|
|
1703
1706
|
item: _(({ element: A }) => [
|
|
1704
|
-
u(A) ? (x(),
|
|
1707
|
+
u(A) ? (x(), U("div", {
|
|
1705
1708
|
key: 0,
|
|
1706
|
-
class: m(
|
|
1707
|
-
style: re({ background:
|
|
1709
|
+
class: m(f.$style.columnItem),
|
|
1710
|
+
style: re({ background: p(oe).colorBgContainer })
|
|
1708
1711
|
}, [
|
|
1709
|
-
v(
|
|
1712
|
+
v(Y, {
|
|
1710
1713
|
type: "text",
|
|
1711
1714
|
size: "small",
|
|
1712
|
-
icon:
|
|
1713
|
-
style: re({ color:
|
|
1714
|
-
class: m(["table-column-draggable-handle",
|
|
1715
|
+
icon: W(p(Oe)),
|
|
1716
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1717
|
+
class: m(["table-column-draggable-handle", f.$style.dragIcon])
|
|
1715
1718
|
}, null, 8, ["icon", "style", "class"]),
|
|
1716
|
-
v(
|
|
1719
|
+
v(Q, {
|
|
1717
1720
|
checked: A.visible,
|
|
1718
1721
|
"onUpdate:checked": (R) => A.visible = R,
|
|
1719
1722
|
onChange: w
|
|
@@ -1721,21 +1724,21 @@ const Aa = (a) => {
|
|
|
1721
1724
|
v(me, {
|
|
1722
1725
|
ellipsis: { tooltip: A.title },
|
|
1723
1726
|
content: A.title,
|
|
1724
|
-
class: m([
|
|
1727
|
+
class: m([f.$style.columnItemContent, f.$style.dragHandle, "table-column-draggable-handle"]),
|
|
1725
1728
|
onClick: () => {
|
|
1726
1729
|
A.visible = !A.visible, w();
|
|
1727
1730
|
}
|
|
1728
1731
|
}, null, 8, ["ellipsis", "content", "class", "onClick"]),
|
|
1729
|
-
|
|
1730
|
-
class: m(
|
|
1732
|
+
H("div", {
|
|
1733
|
+
class: m(f.$style.fixedActions)
|
|
1731
1734
|
}, [
|
|
1732
1735
|
v(ie, { title: "固定在左侧" }, {
|
|
1733
1736
|
default: _(() => [
|
|
1734
|
-
v(
|
|
1737
|
+
v(Y, {
|
|
1735
1738
|
type: "text",
|
|
1736
1739
|
size: "small",
|
|
1737
|
-
icon:
|
|
1738
|
-
style: re({ color:
|
|
1740
|
+
icon: W(p(Pt)),
|
|
1741
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
1739
1742
|
onClick: (R) => I(A, "left")
|
|
1740
1743
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1741
1744
|
]),
|
|
@@ -1743,11 +1746,11 @@ const Aa = (a) => {
|
|
|
1743
1746
|
}, 1024),
|
|
1744
1747
|
v(ie, { title: "取消固定" }, {
|
|
1745
1748
|
default: _(() => [
|
|
1746
|
-
v(
|
|
1749
|
+
v(Y, {
|
|
1747
1750
|
type: "text",
|
|
1748
1751
|
size: "small",
|
|
1749
|
-
icon:
|
|
1750
|
-
style: re({ color:
|
|
1752
|
+
icon: W(p(Tt)),
|
|
1753
|
+
style: re({ color: p(oe).colorPrimary }),
|
|
1751
1754
|
onClick: (R) => I(A, !1)
|
|
1752
1755
|
}, null, 8, ["icon", "style", "onClick"])
|
|
1753
1756
|
]),
|
|
@@ -1757,21 +1760,21 @@ const Aa = (a) => {
|
|
|
1757
1760
|
], 6)) : N("", !0)
|
|
1758
1761
|
]),
|
|
1759
1762
|
_: 1
|
|
1760
|
-
}, 8, ["list", "class"])
|
|
1763
|
+
}, 8, ["list", "class", "disabled"])
|
|
1761
1764
|
], 2)) : N("", !0),
|
|
1762
|
-
h.value ? (x(),
|
|
1765
|
+
h.value ? (x(), U("div", {
|
|
1763
1766
|
key: 3,
|
|
1764
|
-
class: m(
|
|
1765
|
-
style: re({ color:
|
|
1767
|
+
class: m(f.$style.emptyText),
|
|
1768
|
+
style: re({ color: p(oe).colorTextSecondary })
|
|
1766
1769
|
}, " 未找到相关查询项 ", 6)) : N("", !0)
|
|
1767
1770
|
], 2)
|
|
1768
1771
|
], 2)
|
|
1769
1772
|
]),
|
|
1770
1773
|
default: _(() => [
|
|
1771
|
-
v(
|
|
1774
|
+
v(Y, {
|
|
1772
1775
|
type: "text",
|
|
1773
|
-
icon:
|
|
1774
|
-
class: m(
|
|
1776
|
+
icon: W(p(jn)),
|
|
1777
|
+
class: m(f.$style.configBtn)
|
|
1775
1778
|
}, null, 8, ["icon", "class"])
|
|
1776
1779
|
]),
|
|
1777
1780
|
_: 1
|
|
@@ -1781,15 +1784,15 @@ const Aa = (a) => {
|
|
|
1781
1784
|
});
|
|
1782
1785
|
};
|
|
1783
1786
|
}
|
|
1784
|
-
}), lr = "
|
|
1787
|
+
}), lr = "_configBtn_fstz6_1", sr = "_tableConfig_fstz6_9", ir = "_tableConfigHead_fstz6_12", ur = "_tableConfigActions_fstz6_15", cr = "_tableConfigContent_fstz6_22", dr = "_columnGroup_fstz6_28", fr = "_groupTitle_fstz6_28", pr = "_columnList_fstz6_35", mr = "_columnItem_fstz6_39", yr = "_columnItemContent_fstz6_47", gr = "_dragIcon_fstz6_51", vr = "_dragHandle_fstz6_54", hr = "_fixedActions_fstz6_57", br = "_emptyText_fstz6_65", _r = {
|
|
1785
1788
|
configBtn: lr,
|
|
1786
1789
|
tableConfig: sr,
|
|
1787
1790
|
tableConfigHead: ir,
|
|
1788
1791
|
tableConfigActions: ur,
|
|
1789
1792
|
tableConfigContent: cr,
|
|
1790
1793
|
columnGroup: dr,
|
|
1791
|
-
groupTitle:
|
|
1792
|
-
columnList:
|
|
1794
|
+
groupTitle: fr,
|
|
1795
|
+
columnList: pr,
|
|
1793
1796
|
columnItem: mr,
|
|
1794
1797
|
columnItemContent: yr,
|
|
1795
1798
|
dragIcon: gr,
|
|
@@ -1798,7 +1801,7 @@ const Aa = (a) => {
|
|
|
1798
1801
|
emptyText: br
|
|
1799
1802
|
}, Cr = {
|
|
1800
1803
|
$style: _r
|
|
1801
|
-
}, $r = /* @__PURE__ */ he(or, [["__cssModules", Cr]]), wr = /* @__PURE__ */
|
|
1804
|
+
}, $r = /* @__PURE__ */ he(or, [["__cssModules", Cr]]), wr = /* @__PURE__ */ pe({
|
|
1802
1805
|
__name: "DynamicList",
|
|
1803
1806
|
props: {
|
|
1804
1807
|
/**
|
|
@@ -1856,7 +1859,7 @@ const Aa = (a) => {
|
|
|
1856
1859
|
deleteButtonProps: {
|
|
1857
1860
|
type: [Object, Function],
|
|
1858
1861
|
default: () => ({
|
|
1859
|
-
icon:
|
|
1862
|
+
icon: W(Ot)
|
|
1860
1863
|
})
|
|
1861
1864
|
},
|
|
1862
1865
|
/**
|
|
@@ -1874,7 +1877,7 @@ const Aa = (a) => {
|
|
|
1874
1877
|
sortButtonProps: {
|
|
1875
1878
|
type: [Object, Function],
|
|
1876
1879
|
default: () => ({
|
|
1877
|
-
icon:
|
|
1880
|
+
icon: W(Oe)
|
|
1878
1881
|
})
|
|
1879
1882
|
},
|
|
1880
1883
|
/**
|
|
@@ -1921,19 +1924,19 @@ const Aa = (a) => {
|
|
|
1921
1924
|
}, d = (C) => {
|
|
1922
1925
|
o.value.splice(C, 1), t("remove", C);
|
|
1923
1926
|
};
|
|
1924
|
-
return
|
|
1927
|
+
return ke(
|
|
1925
1928
|
() => o.value,
|
|
1926
1929
|
() => {
|
|
1927
|
-
t("update:value",
|
|
1930
|
+
t("update:value", p(o.value)), t("change", p(o.value)), r.onFieldChange();
|
|
1928
1931
|
},
|
|
1929
1932
|
{
|
|
1930
1933
|
deep: !0,
|
|
1931
1934
|
immediate: !0
|
|
1932
1935
|
}
|
|
1933
|
-
),
|
|
1936
|
+
), ke(
|
|
1934
1937
|
() => n.value,
|
|
1935
1938
|
() => {
|
|
1936
|
-
o.value =
|
|
1939
|
+
o.value = p(n.value);
|
|
1937
1940
|
},
|
|
1938
1941
|
{
|
|
1939
1942
|
deep: !0,
|
|
@@ -1941,8 +1944,8 @@ const Aa = (a) => {
|
|
|
1941
1944
|
}
|
|
1942
1945
|
), (C, k) => {
|
|
1943
1946
|
const y = E("a-button");
|
|
1944
|
-
return x(),
|
|
1945
|
-
v(
|
|
1947
|
+
return x(), U(Pe, null, [
|
|
1948
|
+
v(p(ze), {
|
|
1946
1949
|
list: o.value,
|
|
1947
1950
|
"item-key": a.itemKey,
|
|
1948
1951
|
disabled: !a.sortable,
|
|
@@ -1950,10 +1953,10 @@ const Aa = (a) => {
|
|
|
1950
1953
|
class: m([C.$style.dynamicList, a.className])
|
|
1951
1954
|
}, {
|
|
1952
1955
|
item: _(({ element: u, index: h }) => [
|
|
1953
|
-
|
|
1956
|
+
H("div", {
|
|
1954
1957
|
class: m([C.$style.dynamicListItem, a.itemClassName])
|
|
1955
1958
|
}, [
|
|
1956
|
-
|
|
1959
|
+
H("div", {
|
|
1957
1960
|
class: m(C.$style.dynamicListItemContent)
|
|
1958
1961
|
}, [
|
|
1959
1962
|
ve(C.$slots, "default", {
|
|
@@ -1961,19 +1964,19 @@ const Aa = (a) => {
|
|
|
1961
1964
|
index: h
|
|
1962
1965
|
})
|
|
1963
1966
|
], 2),
|
|
1964
|
-
|
|
1967
|
+
H("div", {
|
|
1965
1968
|
class: m(C.$style.actionsIcons)
|
|
1966
1969
|
}, [
|
|
1967
1970
|
v(y, ue({
|
|
1968
1971
|
type: "link",
|
|
1969
1972
|
danger: "",
|
|
1970
1973
|
size: "small",
|
|
1971
|
-
icon:
|
|
1972
|
-
},
|
|
1974
|
+
icon: W(p(Ot))
|
|
1975
|
+
}, p(Ie)(a.deleteButtonProps) ? a.deleteButtonProps(u, h) : a.deleteButtonProps, {
|
|
1973
1976
|
onClick: (T) => d(h)
|
|
1974
1977
|
}), {
|
|
1975
1978
|
default: _(() => [
|
|
1976
|
-
ne(
|
|
1979
|
+
ne(Ce(a.deleteButtonText), 1)
|
|
1977
1980
|
]),
|
|
1978
1981
|
_: 2
|
|
1979
1982
|
}, 1040, ["icon", "onClick"]),
|
|
@@ -1982,23 +1985,23 @@ const Aa = (a) => {
|
|
|
1982
1985
|
class: ["draggable-icon", C.$style.dragIcon],
|
|
1983
1986
|
size: "small",
|
|
1984
1987
|
type: "text",
|
|
1985
|
-
icon:
|
|
1986
|
-
},
|
|
1988
|
+
icon: W(p(Oe))
|
|
1989
|
+
}, p(Ie)(a.sortButtonProps) ? a.sortButtonProps(u, h) : a.sortButtonProps), null, 16, ["class", "icon"])) : N("", !0)
|
|
1987
1990
|
], 2)
|
|
1988
1991
|
], 2)
|
|
1989
1992
|
]),
|
|
1990
1993
|
_: 3
|
|
1991
1994
|
}, 8, ["list", "item-key", "disabled", "class"]),
|
|
1992
|
-
|
|
1995
|
+
H("div", null, [
|
|
1993
1996
|
o.value.length < a.maxLength ? (x(), B(y, ue({
|
|
1994
1997
|
key: 0,
|
|
1995
1998
|
type: "link",
|
|
1996
|
-
icon:
|
|
1997
|
-
},
|
|
1999
|
+
icon: W(p(Gt))
|
|
2000
|
+
}, p(Ie)(a.addButtonProps) ? a.addButtonProps() : a.addButtonProps, {
|
|
1998
2001
|
onClick: k[0] || (k[0] = (u) => l(o.value.length - 1))
|
|
1999
2002
|
}), {
|
|
2000
2003
|
default: _(() => [
|
|
2001
|
-
ne(
|
|
2004
|
+
ne(Ce(a.addButtonText), 1)
|
|
2002
2005
|
]),
|
|
2003
2006
|
_: 1
|
|
2004
2007
|
}, 16, ["icon"])) : N("", !0)
|
|
@@ -2014,7 +2017,7 @@ const Aa = (a) => {
|
|
|
2014
2017
|
dragIcon: xr
|
|
2015
2018
|
}, Pr = {
|
|
2016
2019
|
$style: Tr
|
|
2017
|
-
}, Or = /* @__PURE__ */ he(wr, [["__cssModules", Pr]]), qr = /* @__PURE__ */
|
|
2020
|
+
}, Or = /* @__PURE__ */ he(wr, [["__cssModules", Pr]]), qr = /* @__PURE__ */ pe({
|
|
2018
2021
|
__name: "InputGroup",
|
|
2019
2022
|
props: {
|
|
2020
2023
|
/**
|
|
@@ -2067,18 +2070,18 @@ const Aa = (a) => {
|
|
|
2067
2070
|
value: r.value.select,
|
|
2068
2071
|
"onUpdate:value": l[0] || (l[0] = (y) => r.value.select = y),
|
|
2069
2072
|
style: {
|
|
2070
|
-
...
|
|
2073
|
+
...p(nt)(a.formItem, "addonBeforeProps.style", {}),
|
|
2071
2074
|
width: o.value
|
|
2072
2075
|
}
|
|
2073
|
-
},
|
|
2076
|
+
}, p(Wt)(a.formItem.addonBeforeProps, ["style"])), null, 16, ["value", "style"]),
|
|
2074
2077
|
v(C, ue({
|
|
2075
2078
|
value: r.value.value,
|
|
2076
2079
|
"onUpdate:value": l[1] || (l[1] = (y) => r.value.value = y),
|
|
2077
2080
|
style: {
|
|
2078
|
-
...
|
|
2081
|
+
...p(nt)(a.formItem, "props.style", {}),
|
|
2079
2082
|
width: `calc(100% - ${o.value})`
|
|
2080
2083
|
}
|
|
2081
|
-
},
|
|
2084
|
+
}, p(Fe)(a.formItem, ["props"])), null, 16, ["value", "style"])
|
|
2082
2085
|
]),
|
|
2083
2086
|
_: 1
|
|
2084
2087
|
}, 8, ["class"]);
|
|
@@ -2088,7 +2091,7 @@ const Aa = (a) => {
|
|
|
2088
2091
|
inputGroup: Ar
|
|
2089
2092
|
}, Lr = {
|
|
2090
2093
|
$style: Er
|
|
2091
|
-
}, Mr = /* @__PURE__ */ he(qr, [["__cssModules", Lr]]), Je = null, jr = /* @__PURE__ */
|
|
2094
|
+
}, Mr = /* @__PURE__ */ he(qr, [["__cssModules", Lr]]), Je = null, jr = /* @__PURE__ */ pe({
|
|
2092
2095
|
__name: "InputNumberRange",
|
|
2093
2096
|
props: {
|
|
2094
2097
|
/**
|
|
@@ -2132,41 +2135,41 @@ const Aa = (a) => {
|
|
|
2132
2135
|
return (l, d) => {
|
|
2133
2136
|
var k, y, u, h;
|
|
2134
2137
|
const C = E("a-input-number");
|
|
2135
|
-
return x(),
|
|
2138
|
+
return x(), U("div", {
|
|
2136
2139
|
class: m([l.$style.inputNumberGroup, "input-number-group"])
|
|
2137
2140
|
}, [
|
|
2138
|
-
|
|
2141
|
+
H("div", {
|
|
2139
2142
|
class: m(l.$style.inputNumberGroupContent)
|
|
2140
2143
|
}, [
|
|
2141
2144
|
v(C, ue(s.value, {
|
|
2142
2145
|
value: r.value,
|
|
2143
2146
|
"onUpdate:value": d[0] || (d[0] = (T) => r.value = T),
|
|
2144
2147
|
class: [l.$style.inputNumber, l.$style.startInputNumber],
|
|
2145
|
-
placeholder: ((y =
|
|
2148
|
+
placeholder: ((y = p(Le)((k = n.formItem.props) == null ? void 0 : k.placeholder)) == null ? void 0 : y[0]) ?? "请输入"
|
|
2146
2149
|
}), null, 16, ["value", "class", "placeholder"]),
|
|
2147
|
-
|
|
2150
|
+
H("span", {
|
|
2148
2151
|
class: m(l.$style.divider)
|
|
2149
2152
|
}, "~", 2),
|
|
2150
2153
|
v(C, ue(s.value, {
|
|
2151
2154
|
value: o.value,
|
|
2152
2155
|
"onUpdate:value": d[1] || (d[1] = (T) => o.value = T),
|
|
2153
2156
|
class: [l.$style.inputNumber, l.$style.endInputNumber],
|
|
2154
|
-
placeholder: ((h =
|
|
2157
|
+
placeholder: ((h = p(Le)((u = n.formItem.props) == null ? void 0 : u.placeholder)) == null ? void 0 : h[1]) ?? "请输入"
|
|
2155
2158
|
}), null, 16, ["value", "class", "placeholder"])
|
|
2156
2159
|
], 2)
|
|
2157
2160
|
], 2);
|
|
2158
2161
|
};
|
|
2159
2162
|
}
|
|
2160
|
-
}), Nr = "_inputNumberGroup_149g6_1", Br = "_inputNumberGroupContent_149g6_4", Dr = "_inputNumber_149g6_1", Rr = "_startInputNumber_149g6_13",
|
|
2163
|
+
}), Nr = "_inputNumberGroup_149g6_1", Br = "_inputNumberGroupContent_149g6_4", Dr = "_inputNumber_149g6_1", Rr = "_startInputNumber_149g6_13", zr = "_endInputNumber_149g6_21", Vr = "_divider_149g6_29", Yr = {
|
|
2161
2164
|
inputNumberGroup: Nr,
|
|
2162
2165
|
inputNumberGroupContent: Br,
|
|
2163
2166
|
inputNumber: Dr,
|
|
2164
2167
|
startInputNumber: Rr,
|
|
2165
|
-
endInputNumber:
|
|
2166
|
-
divider:
|
|
2168
|
+
endInputNumber: zr,
|
|
2169
|
+
divider: Vr
|
|
2167
2170
|
}, Hr = {
|
|
2168
2171
|
$style: Yr
|
|
2169
|
-
}, Ur = /* @__PURE__ */ he(jr, [["__cssModules", Hr]]), Gr = 8, Wr = /* @__PURE__ */
|
|
2172
|
+
}, Ur = /* @__PURE__ */ he(jr, [["__cssModules", Hr]]), Gr = 8, Wr = /* @__PURE__ */ pe({
|
|
2170
2173
|
__name: "FormFieldItem",
|
|
2171
2174
|
props: {
|
|
2172
2175
|
/**
|
|
@@ -2209,15 +2212,15 @@ const Aa = (a) => {
|
|
|
2209
2212
|
emits: ["update:value", "change"],
|
|
2210
2213
|
setup(a, { emit: e }) {
|
|
2211
2214
|
const n = {
|
|
2212
|
-
[
|
|
2213
|
-
[
|
|
2214
|
-
[
|
|
2215
|
-
[
|
|
2216
|
-
[
|
|
2217
|
-
[
|
|
2218
|
-
[
|
|
2219
|
-
[
|
|
2220
|
-
[
|
|
2215
|
+
[K.input]: qn,
|
|
2216
|
+
[K.inputGroup]: Mr,
|
|
2217
|
+
[K.inputNumber]: On,
|
|
2218
|
+
[K.inputNumberRange]: Ur,
|
|
2219
|
+
[K.select]: Pn,
|
|
2220
|
+
[K.cascader]: Tn,
|
|
2221
|
+
[K.treeSelect]: xn,
|
|
2222
|
+
[K.datePicker]: Fn,
|
|
2223
|
+
[K.rangePicker]: In
|
|
2221
2224
|
}, t = a, r = e, o = mn(), s = j({
|
|
2222
2225
|
get() {
|
|
2223
2226
|
return t.value;
|
|
@@ -2234,22 +2237,22 @@ const Aa = (a) => {
|
|
|
2234
2237
|
}), k = j(() => {
|
|
2235
2238
|
var $;
|
|
2236
2239
|
const u = t.formItem, h = {
|
|
2237
|
-
[
|
|
2240
|
+
[K.input]: {
|
|
2238
2241
|
placeholder: "请输入",
|
|
2239
2242
|
clearable: !0
|
|
2240
2243
|
},
|
|
2241
|
-
[
|
|
2244
|
+
[K.inputGroup]: {
|
|
2242
2245
|
placeholder: "请输入",
|
|
2243
2246
|
clearable: !0,
|
|
2244
2247
|
formItem: u
|
|
2245
2248
|
},
|
|
2246
|
-
[
|
|
2249
|
+
[K.inputNumber]: {
|
|
2247
2250
|
placeholder: "请输入"
|
|
2248
2251
|
},
|
|
2249
|
-
[
|
|
2252
|
+
[K.inputNumberRange]: {
|
|
2250
2253
|
formItem: u
|
|
2251
2254
|
},
|
|
2252
|
-
[
|
|
2255
|
+
[K.select]: {
|
|
2253
2256
|
placeholder: "请选择",
|
|
2254
2257
|
optionFilterProp: "label",
|
|
2255
2258
|
destroyedOnClose: !0,
|
|
@@ -2264,15 +2267,15 @@ const Aa = (a) => {
|
|
|
2264
2267
|
...u.props ?? {},
|
|
2265
2268
|
style: {
|
|
2266
2269
|
...(($ = u.props) == null ? void 0 : $.style) ?? {},
|
|
2267
|
-
width: u.type !==
|
|
2270
|
+
width: u.type !== K.component ? "100%" : void 0
|
|
2268
2271
|
},
|
|
2269
2272
|
inModal: t.inModal
|
|
2270
2273
|
};
|
|
2271
|
-
return t.inModal || (l.value &&
|
|
2274
|
+
return t.inModal || (l.value && Ee(T, "style.width", `calc(100% - ${d.value}px)`), u.type === K.select && Ee(T, "maxTagCount", "responsive")), T;
|
|
2272
2275
|
}), y = j(() => t.formItem.modelPropName ?? "value");
|
|
2273
2276
|
return (u, h) => {
|
|
2274
2277
|
const T = E("a-input"), $ = E("a-input-group");
|
|
2275
|
-
return x(),
|
|
2278
|
+
return x(), U("div", {
|
|
2276
2279
|
class: m(u.$style.formFieldItem)
|
|
2277
2280
|
}, [
|
|
2278
2281
|
l.value ? (x(), B($, {
|
|
@@ -2286,7 +2289,7 @@ const Aa = (a) => {
|
|
|
2286
2289
|
value: a.formItem.label,
|
|
2287
2290
|
disabled: "",
|
|
2288
2291
|
style: re({
|
|
2289
|
-
color:
|
|
2292
|
+
color: p(oe).colorText,
|
|
2290
2293
|
width: `${d.value}px`
|
|
2291
2294
|
}),
|
|
2292
2295
|
class: m([u.$style.formFieldItemLabel, "super-table-filter-form-item-label"])
|
|
@@ -2298,11 +2301,11 @@ const Aa = (a) => {
|
|
|
2298
2301
|
}, k.value), null, 16)) : N("", !0)
|
|
2299
2302
|
]),
|
|
2300
2303
|
_: 1
|
|
2301
|
-
}, 8, ["class"])) : (x(),
|
|
2302
|
-
a.formItem.type ===
|
|
2304
|
+
}, 8, ["class"])) : (x(), U(Pe, { key: 1 }, [
|
|
2305
|
+
a.formItem.type === p(K).component && a.formItem.showLabel ? (x(), U("span", {
|
|
2303
2306
|
key: 0,
|
|
2304
2307
|
class: m(u.$style.customItemLabel)
|
|
2305
|
-
},
|
|
2308
|
+
}, Ce(a.formItem.label), 3)) : N("", !0),
|
|
2306
2309
|
(x(), B(et(C.value), ue({
|
|
2307
2310
|
[y.value]: s.value,
|
|
2308
2311
|
["onUpdate:" + y.value]: h[1] || (h[1] = (w) => s.value = w)
|
|
@@ -2318,7 +2321,7 @@ const Aa = (a) => {
|
|
|
2318
2321
|
customItemLabel: Zr
|
|
2319
2322
|
}, eo = {
|
|
2320
2323
|
$style: Xr
|
|
2321
|
-
}, tn = /* @__PURE__ */ he(Wr, [["__cssModules", eo]]), to = /* @__PURE__ */
|
|
2324
|
+
}, tn = /* @__PURE__ */ he(Wr, [["__cssModules", eo]]), to = /* @__PURE__ */ pe({
|
|
2322
2325
|
__name: "SceneConfigModal",
|
|
2323
2326
|
props: {
|
|
2324
2327
|
// 当前编辑的场景
|
|
@@ -2360,13 +2363,13 @@ const Aa = (a) => {
|
|
|
2360
2363
|
},
|
|
2361
2364
|
emits: ["cancel", "search", "form-item-change", "update-form-config"],
|
|
2362
2365
|
setup(a, { expose: e, emit: n }) {
|
|
2363
|
-
var
|
|
2364
|
-
const t = a, r = n, o = te(
|
|
2366
|
+
var qe, Ue;
|
|
2367
|
+
const t = a, r = n, o = te(ft(t.formConfigMap)), s = j(() => yt(
|
|
2365
2368
|
Object.values(o.value).filter(({ visible: P }) => P !== !1),
|
|
2366
|
-
|
|
2367
|
-
)), l = ["name", "value", "type"], d = s.value.filter((P) => P._selected).map((P) =>
|
|
2368
|
-
name: ((
|
|
2369
|
-
items: t.actionType === de.search ? d :
|
|
2369
|
+
Se.order
|
|
2370
|
+
)), l = ["name", "value", "type"], d = s.value.filter((P) => P._selected).map((P) => Fe(P, l)), C = te(!0), k = te(!1), y = te(), u = tt({
|
|
2371
|
+
name: ((qe = t.currentScene) == null ? void 0 : qe.name) ?? "",
|
|
2372
|
+
items: t.actionType === de.search ? d : ft(((Ue = t.currentScene) == null ? void 0 : Ue.items) ?? [])
|
|
2370
2373
|
}), h = j({
|
|
2371
2374
|
get() {
|
|
2372
2375
|
const P = s.value.filter((F) => !F.fixed);
|
|
@@ -2374,7 +2377,7 @@ const Aa = (a) => {
|
|
|
2374
2377
|
},
|
|
2375
2378
|
set(P) {
|
|
2376
2379
|
if (P) {
|
|
2377
|
-
const F = s.value.map((M) =>
|
|
2380
|
+
const F = s.value.map((M) => Fe(M, l));
|
|
2378
2381
|
u.items = At(u.items, F, "name");
|
|
2379
2382
|
} else {
|
|
2380
2383
|
const F = s.value.filter((M) => M.fixed).map((M) => M.name);
|
|
@@ -2404,7 +2407,7 @@ const Aa = (a) => {
|
|
|
2404
2407
|
]
|
|
2405
2408
|
}), g = j(() => u.items.map(({ name: P }) => P)), V = () => {
|
|
2406
2409
|
const P = s.value.find((F) => !g.value.includes(F.name));
|
|
2407
|
-
return P ?
|
|
2410
|
+
return P ? Fe(ft(P), l) : {};
|
|
2408
2411
|
}, b = j(() => ({
|
|
2409
2412
|
[de.create]: "新建场景",
|
|
2410
2413
|
[de.update]: "更新场景",
|
|
@@ -2412,22 +2415,22 @@ const Aa = (a) => {
|
|
|
2412
2415
|
})[t.actionType]), I = (P, F) => {
|
|
2413
2416
|
const M = t.formConfigMap[F.name];
|
|
2414
2417
|
M && (F.type = M.type, F.value = M.value, F.label = M.label, L(F.name, F.value));
|
|
2415
|
-
},
|
|
2416
|
-
const F = t.formConfigMap[P], M = u.items.map((ee) => ee.name),
|
|
2417
|
-
return [F, ...
|
|
2418
|
+
}, f = (P) => {
|
|
2419
|
+
const F = t.formConfigMap[P], M = u.items.map((ee) => ee.name), Z = s.value.filter((ee) => !M.includes(ee.name));
|
|
2420
|
+
return [F, ...Z];
|
|
2418
2421
|
}, L = (P, F) => {
|
|
2419
2422
|
const M = u.items.reduce(
|
|
2420
|
-
(
|
|
2423
|
+
(Z, ee) => (Z[ee.name] = ee.value, Z),
|
|
2421
2424
|
{}
|
|
2422
2425
|
);
|
|
2423
2426
|
r("form-item-change", P, F, M);
|
|
2424
|
-
},
|
|
2427
|
+
}, Y = ({ name: P, value: F }) => {
|
|
2425
2428
|
L(P, F);
|
|
2426
|
-
},
|
|
2429
|
+
}, Q = async () => {
|
|
2427
2430
|
var M;
|
|
2428
|
-
const P = u.items.map((
|
|
2429
|
-
const ye = o.value[
|
|
2430
|
-
return ye && (ye.value =
|
|
2431
|
+
const P = u.items.map((Z, ee) => {
|
|
2432
|
+
const ye = o.value[Z.name];
|
|
2433
|
+
return ye && (ye.value = Z.value, ye[Se.orderInScene] = ee, ye[Se.selected] = !0), ye;
|
|
2431
2434
|
}).filter(Boolean);
|
|
2432
2435
|
if (t.actionType === de.search && !k.value) {
|
|
2433
2436
|
r("update-form-config", P), r("search", u.items, P), r("cancel");
|
|
@@ -2443,11 +2446,11 @@ const Aa = (a) => {
|
|
|
2443
2446
|
(() => {
|
|
2444
2447
|
if (u.items.length) return;
|
|
2445
2448
|
const P = At(
|
|
2446
|
-
s.value.filter(({ fixed: M, selected:
|
|
2449
|
+
s.value.filter(({ fixed: M, selected: Z }) => M || Z),
|
|
2447
2450
|
"name"
|
|
2448
2451
|
);
|
|
2449
2452
|
if (P.length) {
|
|
2450
|
-
u.items =
|
|
2453
|
+
u.items = yt(P, "_order").map((M) => Fe(M, l));
|
|
2451
2454
|
return;
|
|
2452
2455
|
}
|
|
2453
2456
|
const F = V();
|
|
@@ -2460,17 +2463,17 @@ const Aa = (a) => {
|
|
|
2460
2463
|
};
|
|
2461
2464
|
}, ie = (P) => o.value[P], le = (P, F, M) => {
|
|
2462
2465
|
if (Kt.includes(F))
|
|
2463
|
-
return
|
|
2466
|
+
return xe("setFormItem error,", `form item with prop "${P}" is readonly`);
|
|
2464
2467
|
if (!ie(P))
|
|
2465
|
-
return
|
|
2468
|
+
return xe("setFormItem error,", `Cannot find form item with name "${P}"`);
|
|
2466
2469
|
if (F === "visible" && o.value[P].fixed)
|
|
2467
|
-
return
|
|
2468
|
-
|
|
2470
|
+
return xe("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
2471
|
+
Ee(o.value, `${P}.${F}`, M), o.value[P].visible || (u.items = u.items.filter((Z) => Z.name !== P));
|
|
2469
2472
|
}, se = (P) => {
|
|
2470
2473
|
var F;
|
|
2471
2474
|
return (F = u.items.find((M) => M.name === P)) == null ? void 0 : F.value;
|
|
2472
2475
|
}, A = (P, F) => {
|
|
2473
|
-
const M = u.items.find((
|
|
2476
|
+
const M = u.items.find((Z) => Z.name === P);
|
|
2474
2477
|
M && (M.value = F);
|
|
2475
2478
|
}, R = (P) => {
|
|
2476
2479
|
Object.entries(P).forEach(([F, M]) => {
|
|
@@ -2478,10 +2481,10 @@ const Aa = (a) => {
|
|
|
2478
2481
|
});
|
|
2479
2482
|
};
|
|
2480
2483
|
function rt(P) {
|
|
2481
|
-
return (P ?
|
|
2482
|
-
(M,
|
|
2483
|
-
const ee = u.items.find((ye) => ye.name ===
|
|
2484
|
-
return ee && (M[
|
|
2484
|
+
return (P ? Le(P) : u.items.map((M) => M.name)).reduce(
|
|
2485
|
+
(M, Z) => {
|
|
2486
|
+
const ee = u.items.find((ye) => ye.name === Z);
|
|
2487
|
+
return ee && (M[Z] = ee.value), M;
|
|
2485
2488
|
},
|
|
2486
2489
|
{}
|
|
2487
2490
|
);
|
|
@@ -2494,18 +2497,18 @@ const Aa = (a) => {
|
|
|
2494
2497
|
getFormValue: se,
|
|
2495
2498
|
setFormValue: A
|
|
2496
2499
|
}), (P, F) => {
|
|
2497
|
-
const M = E("a-input"),
|
|
2498
|
-
return x(), B(
|
|
2500
|
+
const M = E("a-input"), Z = E("a-form-item"), ee = E("a-checkbox"), ye = E("a-space"), ot = E("a-select"), lt = E("a-form"), Ge = E("a-modal");
|
|
2501
|
+
return x(), B(Ge, {
|
|
2499
2502
|
open: C.value,
|
|
2500
|
-
"onUpdate:open": F[4] || (F[4] = (
|
|
2503
|
+
"onUpdate:open": F[4] || (F[4] = (J) => C.value = J),
|
|
2501
2504
|
title: b.value,
|
|
2502
2505
|
width: 720,
|
|
2503
2506
|
"body-style": {
|
|
2504
2507
|
maxHeight: "70vh",
|
|
2505
2508
|
overflow: "auto"
|
|
2506
2509
|
},
|
|
2507
|
-
onOk:
|
|
2508
|
-
onCancel: F[5] || (F[5] = (
|
|
2510
|
+
onOk: Q,
|
|
2511
|
+
onCancel: F[5] || (F[5] = (J) => r("cancel"))
|
|
2509
2512
|
}, {
|
|
2510
2513
|
default: _(() => [
|
|
2511
2514
|
v(lt, {
|
|
@@ -2516,7 +2519,7 @@ const Aa = (a) => {
|
|
|
2516
2519
|
class: m(P.$style.sceneForm)
|
|
2517
2520
|
}, {
|
|
2518
2521
|
default: _(() => [
|
|
2519
|
-
a.actionType !==
|
|
2522
|
+
a.actionType !== p(de).search || k.value ? (x(), B(Z, {
|
|
2520
2523
|
key: 0,
|
|
2521
2524
|
label: "场景名称",
|
|
2522
2525
|
name: "name",
|
|
@@ -2526,13 +2529,13 @@ const Aa = (a) => {
|
|
|
2526
2529
|
default: _(() => [
|
|
2527
2530
|
v(M, {
|
|
2528
2531
|
value: u.name,
|
|
2529
|
-
"onUpdate:value": F[0] || (F[0] = (
|
|
2532
|
+
"onUpdate:value": F[0] || (F[0] = (J) => u.name = J),
|
|
2530
2533
|
placeholder: "请输入"
|
|
2531
2534
|
}, null, 8, ["value"])
|
|
2532
2535
|
]),
|
|
2533
2536
|
_: 1
|
|
2534
2537
|
})) : N("", !0),
|
|
2535
|
-
v(
|
|
2538
|
+
v(Z, {
|
|
2536
2539
|
name: "items",
|
|
2537
2540
|
"label-col": { span: 24 },
|
|
2538
2541
|
"wrapper-col": { span: 24 }
|
|
@@ -2540,14 +2543,14 @@ const Aa = (a) => {
|
|
|
2540
2543
|
label: _(() => [
|
|
2541
2544
|
v(ye, null, {
|
|
2542
2545
|
default: _(() => [
|
|
2543
|
-
F[6] || (F[6] =
|
|
2546
|
+
F[6] || (F[6] = H("span", null, "筛选条件", -1)),
|
|
2544
2547
|
v(ee, {
|
|
2545
2548
|
checked: h.value,
|
|
2546
|
-
"onUpdate:checked": F[1] || (F[1] = (
|
|
2549
|
+
"onUpdate:checked": F[1] || (F[1] = (J) => h.value = J),
|
|
2547
2550
|
indeterminate: $.value
|
|
2548
2551
|
}, {
|
|
2549
2552
|
default: _(() => [
|
|
2550
|
-
ne(" 全选 (" +
|
|
2553
|
+
ne(" 全选 (" + Ce(T.value) + "/" + Ce(s.value.length) + ") ", 1)
|
|
2551
2554
|
]),
|
|
2552
2555
|
_: 1
|
|
2553
2556
|
}, 8, ["checked", "indeterminate"])
|
|
@@ -2558,42 +2561,42 @@ const Aa = (a) => {
|
|
|
2558
2561
|
default: _(() => [
|
|
2559
2562
|
v(Or, {
|
|
2560
2563
|
value: u.items,
|
|
2561
|
-
"onUpdate:value": F[2] || (F[2] = (
|
|
2564
|
+
"onUpdate:value": F[2] || (F[2] = (J) => u.items = J),
|
|
2562
2565
|
"add-button-text": "添加筛选条件",
|
|
2563
2566
|
"get-new-item-data": V,
|
|
2564
2567
|
"max-length": s.value.length,
|
|
2565
2568
|
"delete-button-props": me,
|
|
2566
2569
|
sortButtonProps: me,
|
|
2567
|
-
onAdd:
|
|
2570
|
+
onAdd: Y
|
|
2568
2571
|
}, {
|
|
2569
|
-
default: _(({ item:
|
|
2570
|
-
var
|
|
2572
|
+
default: _(({ item: J }) => {
|
|
2573
|
+
var je;
|
|
2571
2574
|
return [
|
|
2572
|
-
|
|
2575
|
+
H("div", {
|
|
2573
2576
|
class: m(P.$style.queryFieldItem)
|
|
2574
2577
|
}, [
|
|
2575
2578
|
v(ot, {
|
|
2576
|
-
value:
|
|
2577
|
-
"onUpdate:value": (
|
|
2579
|
+
value: J.name,
|
|
2580
|
+
"onUpdate:value": ($e) => J.name = $e,
|
|
2578
2581
|
"show-search": "",
|
|
2579
|
-
options:
|
|
2582
|
+
options: f(J.name),
|
|
2580
2583
|
"field-names": { value: "name" },
|
|
2581
2584
|
"option-filter-prop": "label",
|
|
2582
2585
|
placeholder: "请选择要筛选的字段名",
|
|
2583
|
-
disabled: (
|
|
2586
|
+
disabled: (je = o.value[J.name]) == null ? void 0 : je.fixed,
|
|
2584
2587
|
class: m(P.$style.fieldSelect),
|
|
2585
|
-
onChange: (
|
|
2588
|
+
onChange: ($e) => I($e, J)
|
|
2586
2589
|
}, null, 8, ["value", "onUpdate:value", "options", "disabled", "class", "onChange"]),
|
|
2587
|
-
|
|
2590
|
+
H("div", {
|
|
2588
2591
|
class: m(P.$style.fieldComponent)
|
|
2589
2592
|
}, [
|
|
2590
|
-
|
|
2593
|
+
J.name ? (x(), B(tn, {
|
|
2591
2594
|
key: 0,
|
|
2592
|
-
value:
|
|
2593
|
-
"onUpdate:value": (
|
|
2595
|
+
value: J.value,
|
|
2596
|
+
"onUpdate:value": ($e) => J.value = $e,
|
|
2594
2597
|
"in-modal": "",
|
|
2595
|
-
"form-item": o.value[
|
|
2596
|
-
onChange: (
|
|
2598
|
+
"form-item": o.value[J.name],
|
|
2599
|
+
onChange: ($e) => L(J.name, $e)
|
|
2597
2600
|
}, null, 8, ["value", "onUpdate:value", "form-item", "onChange"])) : N("", !0)
|
|
2598
2601
|
], 2)
|
|
2599
2602
|
], 2)
|
|
@@ -2607,10 +2610,10 @@ const Aa = (a) => {
|
|
|
2607
2610
|
]),
|
|
2608
2611
|
_: 1
|
|
2609
2612
|
}, 8, ["model", "rules", "class"]),
|
|
2610
|
-
a.actionType ===
|
|
2613
|
+
a.actionType === p(de).search && a.allowCreateScene ? (x(), B(ee, {
|
|
2611
2614
|
key: 0,
|
|
2612
2615
|
checked: k.value,
|
|
2613
|
-
"onUpdate:checked": F[3] || (F[3] = (
|
|
2616
|
+
"onUpdate:checked": F[3] || (F[3] = (J) => k.value = J)
|
|
2614
2617
|
}, {
|
|
2615
2618
|
default: _(() => F[7] || (F[7] = [
|
|
2616
2619
|
ne(" 保存为场景 ")
|
|
@@ -2629,7 +2632,7 @@ const Aa = (a) => {
|
|
|
2629
2632
|
fieldComponent: oo
|
|
2630
2633
|
}, so = {
|
|
2631
2634
|
$style: lo
|
|
2632
|
-
}, io = /* @__PURE__ */ he(to, [["__cssModules", so]]), uo = /* @__PURE__ */
|
|
2635
|
+
}, io = /* @__PURE__ */ he(to, [["__cssModules", so]]), uo = /* @__PURE__ */ pe({
|
|
2633
2636
|
__name: "SceneListModal",
|
|
2634
2637
|
props: {
|
|
2635
2638
|
/**
|
|
@@ -2693,7 +2696,7 @@ const Aa = (a) => {
|
|
|
2693
2696
|
onCancel: s
|
|
2694
2697
|
}, {
|
|
2695
2698
|
default: _(() => [
|
|
2696
|
-
|
|
2699
|
+
H("div", {
|
|
2697
2700
|
class: m(y.$style.sceneList)
|
|
2698
2701
|
}, [
|
|
2699
2702
|
v(T, {
|
|
@@ -2721,7 +2724,7 @@ const Aa = (a) => {
|
|
|
2721
2724
|
]),
|
|
2722
2725
|
_: 1
|
|
2723
2726
|
}, 8, ["class"]),
|
|
2724
|
-
r.value.length ? (x(), B(
|
|
2727
|
+
r.value.length ? (x(), B(p(ze), {
|
|
2725
2728
|
key: 0,
|
|
2726
2729
|
list: r.value,
|
|
2727
2730
|
"item-key": "id",
|
|
@@ -2753,7 +2756,7 @@ const Aa = (a) => {
|
|
|
2753
2756
|
v(w, {
|
|
2754
2757
|
type: "link",
|
|
2755
2758
|
size: "small",
|
|
2756
|
-
onClick: (
|
|
2759
|
+
onClick: (f) => C(I)
|
|
2757
2760
|
}, {
|
|
2758
2761
|
default: _(() => u[3] || (u[3] = [
|
|
2759
2762
|
ne(" 编辑 ")
|
|
@@ -2762,7 +2765,7 @@ const Aa = (a) => {
|
|
|
2762
2765
|
}, 1032, ["onClick"]),
|
|
2763
2766
|
v(g, {
|
|
2764
2767
|
title: "确定删除?",
|
|
2765
|
-
onConfirm: (
|
|
2768
|
+
onConfirm: (f) => l(I.code)
|
|
2766
2769
|
}, {
|
|
2767
2770
|
default: _(() => [
|
|
2768
2771
|
v(w, {
|
|
@@ -2781,7 +2784,7 @@ const Aa = (a) => {
|
|
|
2781
2784
|
v(w, {
|
|
2782
2785
|
type: "text",
|
|
2783
2786
|
size: "small",
|
|
2784
|
-
icon:
|
|
2787
|
+
icon: W(p(Oe)),
|
|
2785
2788
|
class: m(["table-column-draggable-icon", y.$style.dragIcon])
|
|
2786
2789
|
}, null, 8, ["icon", "class"])
|
|
2787
2790
|
]),
|
|
@@ -2794,13 +2797,13 @@ const Aa = (a) => {
|
|
|
2794
2797
|
_: 1
|
|
2795
2798
|
}, 8, ["list"])) : (x(), B(V, {
|
|
2796
2799
|
key: 1,
|
|
2797
|
-
image:
|
|
2800
|
+
image: p(An).PRESENTED_IMAGE_SIMPLE
|
|
2798
2801
|
}, null, 8, ["image"]))
|
|
2799
2802
|
], 2),
|
|
2800
2803
|
a.allowCreateScene ? (x(), B(w, {
|
|
2801
2804
|
key: 0,
|
|
2802
2805
|
type: "link",
|
|
2803
|
-
icon:
|
|
2806
|
+
icon: W(p(Gt)),
|
|
2804
2807
|
onClick: d
|
|
2805
2808
|
}, {
|
|
2806
2809
|
default: _(() => u[5] || (u[5] = [
|
|
@@ -2813,15 +2816,15 @@ const Aa = (a) => {
|
|
|
2813
2816
|
}, 8, ["open"]);
|
|
2814
2817
|
};
|
|
2815
2818
|
}
|
|
2816
|
-
}), co = "_sceneList_3nrgr_1",
|
|
2819
|
+
}), co = "_sceneList_3nrgr_1", fo = "_sceneListHead_3nrgr_5", po = "_sceneListItem_3nrgr_8", mo = "_col_3nrgr_16", yo = "_dragIcon_3nrgr_20", go = {
|
|
2817
2820
|
sceneList: co,
|
|
2818
|
-
sceneListHead:
|
|
2819
|
-
sceneListItem:
|
|
2821
|
+
sceneListHead: fo,
|
|
2822
|
+
sceneListItem: po,
|
|
2820
2823
|
col: mo,
|
|
2821
2824
|
dragIcon: yo
|
|
2822
2825
|
}, vo = {
|
|
2823
2826
|
$style: go
|
|
2824
|
-
}, ho = /* @__PURE__ */ he(uo, [["__cssModules", vo]]), bo = /* @__PURE__ */
|
|
2827
|
+
}, ho = /* @__PURE__ */ he(uo, [["__cssModules", vo]]), bo = /* @__PURE__ */ pe({
|
|
2825
2828
|
__name: "FormSearchParams",
|
|
2826
2829
|
props: {
|
|
2827
2830
|
/**
|
|
@@ -2842,17 +2845,17 @@ const Aa = (a) => {
|
|
|
2842
2845
|
},
|
|
2843
2846
|
emits: ["form-item-change"],
|
|
2844
2847
|
setup(a, { emit: e }) {
|
|
2845
|
-
const n = a, t = e, r = j(() =>
|
|
2846
|
-
Object.values(n.formConfigMap).filter((d) => d[
|
|
2847
|
-
|
|
2848
|
+
const n = a, t = e, r = j(() => yt(
|
|
2849
|
+
Object.values(n.formConfigMap).filter((d) => d[Se.selected]),
|
|
2850
|
+
Se.orderInScene
|
|
2848
2851
|
)), o = (d, C) => {
|
|
2849
2852
|
t("form-item-change", d, C);
|
|
2850
|
-
}, s =
|
|
2853
|
+
}, s = wt(o, 500), l = (d, C) => {
|
|
2851
2854
|
[
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2855
|
+
K.input,
|
|
2856
|
+
K.inputNumber,
|
|
2857
|
+
K.inputGroup,
|
|
2858
|
+
K.inputNumberRange
|
|
2856
2859
|
].includes(n.formConfigMap[d].type) ? s(d, C) : o(d, C);
|
|
2857
2860
|
};
|
|
2858
2861
|
return (d, C) => {
|
|
@@ -2862,7 +2865,7 @@ const Aa = (a) => {
|
|
|
2862
2865
|
class: m(d.$style.searchParams)
|
|
2863
2866
|
}, {
|
|
2864
2867
|
default: _(() => [
|
|
2865
|
-
(x(!0),
|
|
2868
|
+
(x(!0), U(Pe, null, mt(r.value, (u) => (x(), B(k, {
|
|
2866
2869
|
key: u.name,
|
|
2867
2870
|
span: (a.formConfigMap[u.name].span ?? 1) * a.formItemColSpan
|
|
2868
2871
|
}, {
|
|
@@ -2885,16 +2888,16 @@ const Aa = (a) => {
|
|
|
2885
2888
|
}, $o = {
|
|
2886
2889
|
$style: Co
|
|
2887
2890
|
}, wo = /* @__PURE__ */ he(bo, [["__cssModules", $o]]);
|
|
2888
|
-
|
|
2889
|
-
function
|
|
2891
|
+
Ye.locale("zh-cn");
|
|
2892
|
+
function zt(a) {
|
|
2890
2893
|
return Array.from(document.body.children).includes(a);
|
|
2891
2894
|
}
|
|
2892
2895
|
class So {
|
|
2893
2896
|
constructor(e = {}) {
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2897
|
+
Be(this, "currents");
|
|
2898
|
+
Be(this, "dialogs");
|
|
2899
|
+
Be(this, "staticDialogs");
|
|
2900
|
+
Be(this, "rootVm");
|
|
2898
2901
|
this.currents = [], this.dialogs = {}, this.staticDialogs = e, this.rootVm = null;
|
|
2899
2902
|
}
|
|
2900
2903
|
// 设置rootVm
|
|
@@ -2903,7 +2906,7 @@ class So {
|
|
|
2903
2906
|
}
|
|
2904
2907
|
// 注册dialog
|
|
2905
2908
|
register(e, n) {
|
|
2906
|
-
this.dialogs[e] || (this.dialogs[e] =
|
|
2909
|
+
this.dialogs[e] || (this.dialogs[e] = pe(n));
|
|
2907
2910
|
}
|
|
2908
2911
|
// 注销dialog
|
|
2909
2912
|
unregister(e) {
|
|
@@ -2916,7 +2919,7 @@ class So {
|
|
|
2916
2919
|
console.error(`Dialog "${e}" is not existing, please register it firstly.`);
|
|
2917
2920
|
return;
|
|
2918
2921
|
}
|
|
2919
|
-
const l = document.createElement("div"), d = `dialog_${
|
|
2922
|
+
const l = document.createElement("div"), d = `dialog_${Vn()}`;
|
|
2920
2923
|
l.setAttribute("id", d), document.body.appendChild(l);
|
|
2921
2924
|
const C = yn({
|
|
2922
2925
|
data() {
|
|
@@ -2925,14 +2928,14 @@ class So {
|
|
|
2925
2928
|
};
|
|
2926
2929
|
},
|
|
2927
2930
|
render() {
|
|
2928
|
-
return
|
|
2931
|
+
return W(
|
|
2929
2932
|
En,
|
|
2930
2933
|
{
|
|
2931
2934
|
key: d,
|
|
2932
2935
|
locale: Jt
|
|
2933
2936
|
},
|
|
2934
2937
|
() => [
|
|
2935
|
-
|
|
2938
|
+
W(s, {
|
|
2936
2939
|
key: d,
|
|
2937
2940
|
destroyOnClose: !0,
|
|
2938
2941
|
...t,
|
|
@@ -2963,26 +2966,26 @@ class So {
|
|
|
2963
2966
|
var n, t, r;
|
|
2964
2967
|
const e = this.currents.pop();
|
|
2965
2968
|
if (e) {
|
|
2966
|
-
const o =
|
|
2967
|
-
|
|
2969
|
+
const o = zt((n = e._instance) == null ? void 0 : n.vnode.el) ? (t = e._instance) == null ? void 0 : t.vnode.el : (r = e._instance) == null ? void 0 : r.vnode.el.parentElement;
|
|
2970
|
+
zt(o) && document.body.removeChild(o), e.unmount();
|
|
2968
2971
|
}
|
|
2969
2972
|
}
|
|
2970
2973
|
}
|
|
2971
|
-
const
|
|
2972
|
-
function
|
|
2974
|
+
const De = new So();
|
|
2975
|
+
function Vt(a, e) {
|
|
2973
2976
|
const n = Symbol("dialog");
|
|
2974
|
-
|
|
2977
|
+
De.register(n, a);
|
|
2975
2978
|
function t() {
|
|
2976
|
-
|
|
2979
|
+
De.open(n, p(e));
|
|
2977
2980
|
}
|
|
2978
2981
|
function r() {
|
|
2979
|
-
|
|
2982
|
+
De.close();
|
|
2980
2983
|
}
|
|
2981
2984
|
function o(s) {
|
|
2982
|
-
|
|
2985
|
+
De.open(n, s);
|
|
2983
2986
|
}
|
|
2984
2987
|
return gn(() => {
|
|
2985
|
-
|
|
2988
|
+
De.unregister(n);
|
|
2986
2989
|
}), {
|
|
2987
2990
|
open: t,
|
|
2988
2991
|
close: r,
|
|
@@ -3041,7 +3044,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3041
3044
|
updateScene: async () => a,
|
|
3042
3045
|
deleteScene: async () => a
|
|
3043
3046
|
};
|
|
3044
|
-
}, Io = ["innerHTML"], Fo = /* @__PURE__ */
|
|
3047
|
+
}, Io = ["innerHTML"], Fo = /* @__PURE__ */ pe({
|
|
3045
3048
|
__name: "SuperTable",
|
|
3046
3049
|
props: {
|
|
3047
3050
|
/**
|
|
@@ -3151,13 +3154,13 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3151
3154
|
emits: ["sort-change", "row-sort-end", "form-item-change", "scene-change"],
|
|
3152
3155
|
setup(a, { expose: e, emit: n }) {
|
|
3153
3156
|
var kt;
|
|
3154
|
-
|
|
3157
|
+
Ye.locale("zh-cn");
|
|
3155
3158
|
const t = a, r = n, o = te(!1), s = j(() => {
|
|
3156
3159
|
var c, S, O;
|
|
3157
3160
|
const i = (c = vn()) == null ? void 0 : c.appContext.app;
|
|
3158
3161
|
return !!((O = (S = i == null ? void 0 : i.config) == null ? void 0 : S.globalProperties) != null && O.$router);
|
|
3159
|
-
}), l = te(), { openByConfig: d } =
|
|
3160
|
-
(i, c) => (i[c.key] =
|
|
3162
|
+
}), l = te(), { openByConfig: d } = Vt(io), { openByConfig: C } = Vt(ho), k = Rt(t.columns).reduce(
|
|
3163
|
+
(i, c) => (i[c.key] = Fe(c, vt), i),
|
|
3161
3164
|
{}
|
|
3162
3165
|
), y = en([location.hostname, location.pathname, t.sceneType].join("")), u = Hn(`superTable_${y}`, {
|
|
3163
3166
|
pathname: location.pathname,
|
|
@@ -3170,11 +3173,11 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3170
3173
|
setScenes: (i) => {
|
|
3171
3174
|
u.value.sceneList = i;
|
|
3172
3175
|
}
|
|
3173
|
-
}) : Yt()), T = te(!1), $ = j(() => Object.keys(t.customQueryParams).length > 0), w = te(!1), g =
|
|
3176
|
+
}) : Yt()), T = te(!1), $ = j(() => Object.keys(t.customQueryParams).length > 0), w = te(!1), g = wt(async () => {
|
|
3174
3177
|
try {
|
|
3175
3178
|
R.loading = !0;
|
|
3176
3179
|
const { total: i, data: c } = await t.request({
|
|
3177
|
-
params:
|
|
3180
|
+
params: St(),
|
|
3178
3181
|
pageSize: R.pagination.pageSize,
|
|
3179
3182
|
pageNum: R.pagination.current
|
|
3180
3183
|
});
|
|
@@ -3185,32 +3188,32 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3185
3188
|
R.loading = !1;
|
|
3186
3189
|
}
|
|
3187
3190
|
}, t.debounceWait), V = () => {
|
|
3188
|
-
t.enableScene && !
|
|
3191
|
+
t.enableScene && !f.loaded || (R.pagination.current = 1, g());
|
|
3189
3192
|
}, b = te({}), I = (i = []) => {
|
|
3190
3193
|
for (const c in b.value) {
|
|
3191
3194
|
const S = b.value[c], O = i.find((q) => q.name === c);
|
|
3192
|
-
S.value = O ? O.value : S._defaultValue, S[
|
|
3195
|
+
S.value = O ? O.value : S._defaultValue, S[Se.selected] = !!O, S[Se.orderInScene] = O ? i.findIndex((q) => q.name === (O == null ? void 0 : O.name)) : void 0;
|
|
3193
3196
|
}
|
|
3194
3197
|
V();
|
|
3195
|
-
},
|
|
3198
|
+
}, f = tt({
|
|
3196
3199
|
list: [],
|
|
3197
3200
|
loading: !1,
|
|
3198
3201
|
submiting: !1,
|
|
3199
3202
|
loaded: !1
|
|
3200
|
-
}), L = j(() =>
|
|
3203
|
+
}), L = j(() => Le(ge(t.defaultScene)).filter(Boolean).map(({ name: c = "默认场景", code: S = "default_scene", items: O }) => ({
|
|
3201
3204
|
name: c,
|
|
3202
3205
|
code: S,
|
|
3203
3206
|
isCustom: !0,
|
|
3204
3207
|
items: O.filter((q) => !!b.value[q.name]).map((q) => {
|
|
3205
|
-
var
|
|
3208
|
+
var z;
|
|
3206
3209
|
return {
|
|
3207
3210
|
name: q.name,
|
|
3208
3211
|
value: q.value ?? b.value[q.name]._defaultValue,
|
|
3209
|
-
type: (
|
|
3212
|
+
type: (z = b.value[q.name]) == null ? void 0 : z.type
|
|
3210
3213
|
};
|
|
3211
3214
|
})
|
|
3212
3215
|
})));
|
|
3213
|
-
|
|
3216
|
+
ke(
|
|
3214
3217
|
() => t.formItems,
|
|
3215
3218
|
() => {
|
|
3216
3219
|
Dt(ge(t.formItems)).forEach((i) => {
|
|
@@ -3223,34 +3226,34 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3223
3226
|
deep: !0
|
|
3224
3227
|
}
|
|
3225
3228
|
);
|
|
3226
|
-
const
|
|
3229
|
+
const Y = async () => {
|
|
3227
3230
|
try {
|
|
3228
|
-
|
|
3231
|
+
f.loading = !0;
|
|
3229
3232
|
const { code: i, data: c = [], msg: S } = await h.value.querySceneList({ type: y });
|
|
3230
3233
|
if (i === 2e3) {
|
|
3231
|
-
const O =
|
|
3232
|
-
|
|
3233
|
-
const q =
|
|
3234
|
-
if (!
|
|
3235
|
-
u.value.sceneCode = null,
|
|
3236
|
-
const
|
|
3234
|
+
const O = f.list.find((z) => z.code === u.value.sceneCode);
|
|
3235
|
+
f.list = qa(c, b.value, u.value.sceneSort);
|
|
3236
|
+
const q = f.list.find((z) => z.code === u.value.sceneCode);
|
|
3237
|
+
if (!f.loaded && $.value) {
|
|
3238
|
+
u.value.sceneCode = null, f.loaded = !0;
|
|
3239
|
+
const z = Object.entries(t.customQueryParams).map(([_e, ut]) => {
|
|
3237
3240
|
var We;
|
|
3238
3241
|
return {
|
|
3239
|
-
name:
|
|
3240
|
-
value:
|
|
3241
|
-
type: (We = b.value[
|
|
3242
|
+
name: _e,
|
|
3243
|
+
value: ut,
|
|
3244
|
+
type: (We = b.value[_e]) == null ? void 0 : We.type
|
|
3242
3245
|
};
|
|
3243
3246
|
});
|
|
3244
|
-
I(
|
|
3247
|
+
I(z);
|
|
3245
3248
|
return;
|
|
3246
3249
|
}
|
|
3247
|
-
(!
|
|
3250
|
+
(!f.loaded || O && O.value !== (q == null ? void 0 : q.value)) && I(q == null ? void 0 : q.items), f.loaded = !0;
|
|
3248
3251
|
} else
|
|
3249
|
-
|
|
3252
|
+
dt.error(S);
|
|
3250
3253
|
} finally {
|
|
3251
|
-
|
|
3254
|
+
f.loading = !1;
|
|
3252
3255
|
}
|
|
3253
|
-
},
|
|
3256
|
+
}, Q = ({ code: i, msg: c }) => i === 2e3 ? (dt.success("操作成功"), Y(), Promise.resolve(c)) : (dt.error(c), Promise.reject(c)), be = async ({ name: i, items: c }) => {
|
|
3254
3257
|
try {
|
|
3255
3258
|
const S = await h.value.createScene({
|
|
3256
3259
|
type: y,
|
|
@@ -3258,7 +3261,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3258
3261
|
value: JSON.stringify(c),
|
|
3259
3262
|
asPrivate: !0
|
|
3260
3263
|
});
|
|
3261
|
-
u.value.sceneCode = S == null ? void 0 : S.data,
|
|
3264
|
+
u.value.sceneCode = S == null ? void 0 : S.data, Q(S);
|
|
3262
3265
|
} catch (S) {
|
|
3263
3266
|
return Promise.reject(S);
|
|
3264
3267
|
}
|
|
@@ -3269,26 +3272,26 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3269
3272
|
name: i.name,
|
|
3270
3273
|
value: JSON.stringify(i.items)
|
|
3271
3274
|
});
|
|
3272
|
-
return
|
|
3275
|
+
return Q(c);
|
|
3273
3276
|
} catch (c) {
|
|
3274
3277
|
return Promise.reject(c);
|
|
3275
3278
|
}
|
|
3276
3279
|
}, ie = async (i) => {
|
|
3277
3280
|
try {
|
|
3278
3281
|
const c = await h.value.deleteScene([i]);
|
|
3279
|
-
c.code === 2e3 && (u.value.sceneCode = null, i === u.value.sceneCode && (I([]), u.value.sceneCode = void 0)),
|
|
3282
|
+
c.code === 2e3 && (u.value.sceneCode = null, i === u.value.sceneCode && (I([]), u.value.sceneCode = void 0)), Q(c);
|
|
3280
3283
|
} catch (c) {
|
|
3281
3284
|
return Promise.reject(c);
|
|
3282
3285
|
}
|
|
3283
|
-
}, le = j(() =>
|
|
3284
|
-
|
|
3285
|
-
() => [u.value.sceneCode,
|
|
3286
|
+
}, le = j(() => f.list.length < t.maxSceneCount);
|
|
3287
|
+
ke(
|
|
3288
|
+
() => [u.value.sceneCode, f.list],
|
|
3286
3289
|
() => {
|
|
3287
3290
|
if ($.value && !w.value) {
|
|
3288
3291
|
w.value = !0;
|
|
3289
3292
|
return;
|
|
3290
3293
|
}
|
|
3291
|
-
const i = [...L.value, ...
|
|
3294
|
+
const i = [...L.value, ...f.list].find(
|
|
3292
3295
|
(c) => c.code === u.value.sceneCode
|
|
3293
3296
|
);
|
|
3294
3297
|
I((i == null ? void 0 : i.items) ?? []);
|
|
@@ -3309,12 +3312,12 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3309
3312
|
showTotal: (i) => `共${i}条数据`,
|
|
3310
3313
|
...nt(t.tableProps, "pagination", {}),
|
|
3311
3314
|
onShowSizeChange: (i, c) => {
|
|
3312
|
-
var S, O, q,
|
|
3313
|
-
((S = t.tableProps) == null ? void 0 : S.pagination) !== !1 && ((
|
|
3315
|
+
var S, O, q, z;
|
|
3316
|
+
((S = t.tableProps) == null ? void 0 : S.pagination) !== !1 && ((z = (q = (O = t.tableProps) == null ? void 0 : O.pagination) == null ? void 0 : q.onShowSizeChange) == null || z.call(q, 1, c));
|
|
3314
3317
|
},
|
|
3315
3318
|
onChange: (i, c) => {
|
|
3316
|
-
var S, O, q,
|
|
3317
|
-
R.pagination.current = c !== R.pagination.pageSize ? 1 : i, R.pagination.pageSize = c, ((S = t.tableProps) == null ? void 0 : S.pagination) !== !1 && ((
|
|
3319
|
+
var S, O, q, z;
|
|
3320
|
+
R.pagination.current = c !== R.pagination.pageSize ? 1 : i, R.pagination.pageSize = c, ((S = t.tableProps) == null ? void 0 : S.pagination) !== !1 && ((z = (q = (O = t.tableProps) == null ? void 0 : O.pagination) == null ? void 0 : q.onChange) == null || z.call(q, i, c)), g();
|
|
3318
3321
|
}
|
|
3319
3322
|
},
|
|
3320
3323
|
tableLayout: "fixed",
|
|
@@ -3325,10 +3328,10 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3325
3328
|
...((kt = t.tableProps) == null ? void 0 : kt.scroll) ?? {}
|
|
3326
3329
|
},
|
|
3327
3330
|
rowClassName: (i, c, S) => {
|
|
3328
|
-
var
|
|
3331
|
+
var z;
|
|
3329
3332
|
let O = "";
|
|
3330
|
-
const q = (
|
|
3331
|
-
return
|
|
3333
|
+
const q = (z = t.tableProps) == null ? void 0 : z.rowClassName;
|
|
3334
|
+
return Ie(q) ? O = q(i, c, S) : typeof q == "string" && (O = q), [O, se.value].join(" ");
|
|
3332
3335
|
}
|
|
3333
3336
|
}), rt = j(() => {
|
|
3334
3337
|
try {
|
|
@@ -3336,12 +3339,12 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3336
3339
|
} catch {
|
|
3337
3340
|
return ge(R.dataSource);
|
|
3338
3341
|
}
|
|
3339
|
-
}),
|
|
3342
|
+
}), qe = j(() => Rt(t.columns).map((i) => {
|
|
3340
3343
|
const c = u.value.columnConfig[i.key], S = { ...i };
|
|
3341
|
-
return
|
|
3344
|
+
return vt.forEach((O) => {
|
|
3342
3345
|
O !== "key" && (c == null ? void 0 : c[O]) !== void 0 && (S[O] = c[O]);
|
|
3343
3346
|
}), S;
|
|
3344
|
-
})),
|
|
3347
|
+
})), Ue = (i, c) => {
|
|
3345
3348
|
u.value.columnConfig[c.key] = {
|
|
3346
3349
|
...u.value.columnConfig[c.key] ?? {},
|
|
3347
3350
|
width: i
|
|
@@ -3355,19 +3358,21 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3355
3358
|
{}
|
|
3356
3359
|
);
|
|
3357
3360
|
};
|
|
3358
|
-
|
|
3359
|
-
() => [
|
|
3361
|
+
ke(
|
|
3362
|
+
() => [qe.value, t.sortable],
|
|
3360
3363
|
() => {
|
|
3361
3364
|
const i = {
|
|
3362
|
-
key:
|
|
3363
|
-
type:
|
|
3365
|
+
key: G.sort,
|
|
3366
|
+
type: G.sort,
|
|
3364
3367
|
title: "",
|
|
3365
3368
|
fixed: "left",
|
|
3366
3369
|
width: 60
|
|
3367
|
-
};
|
|
3370
|
+
}, c = qe.value.filter(({ visible: z }) => z), S = c.filter((z) => z.fixed === "left").sort((z, _e) => z.index - _e.index), O = c.filter((z) => !z.fixed).sort((z, _e) => z.index - _e.index), q = c.filter((z) => z.fixed === "right").sort((z, _e) => z.index - _e.index);
|
|
3368
3371
|
R.columns = [
|
|
3369
3372
|
...t.sortable ? [i] : [],
|
|
3370
|
-
...
|
|
3373
|
+
...S,
|
|
3374
|
+
...O,
|
|
3375
|
+
...q
|
|
3371
3376
|
];
|
|
3372
3377
|
},
|
|
3373
3378
|
{
|
|
@@ -3398,12 +3403,12 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3398
3403
|
onEnd: (c) => {
|
|
3399
3404
|
const { oldIndex: S, newIndex: O } = c;
|
|
3400
3405
|
if (S === void 0 || O === void 0) return;
|
|
3401
|
-
const q = ge(R.dataSource), [
|
|
3402
|
-
q.splice(O, 0,
|
|
3406
|
+
const q = ge(R.dataSource), [z] = q.splice(S, 1);
|
|
3407
|
+
q.splice(O, 0, z), r("row-sort-end", q);
|
|
3403
3408
|
}
|
|
3404
3409
|
});
|
|
3405
|
-
},
|
|
3406
|
-
b.value[i].value = c, r("form-item-change", i, c, ge(b.value[i]), st,
|
|
3410
|
+
}, Z = (i, c) => {
|
|
3411
|
+
b.value[i].value = c, r("form-item-change", i, c, ge(b.value[i]), st, it), b.value[i].quiet !== !0 && V();
|
|
3407
3412
|
}, ee = (i, c) => {
|
|
3408
3413
|
T.value = !1;
|
|
3409
3414
|
let S = ge(b.value);
|
|
@@ -3417,14 +3422,14 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3417
3422
|
onUpdate: me,
|
|
3418
3423
|
onUpdateFormConfig: (O) => {
|
|
3419
3424
|
O.forEach((q) => {
|
|
3420
|
-
|
|
3425
|
+
Ee(b.value, q.name, q);
|
|
3421
3426
|
});
|
|
3422
3427
|
},
|
|
3423
3428
|
onSearch: (O) => {
|
|
3424
3429
|
I(O);
|
|
3425
3430
|
},
|
|
3426
3431
|
onFormItemChange(O, q) {
|
|
3427
|
-
r("form-item-change", O, q, ge(b.value[O]), st);
|
|
3432
|
+
r("form-item-change", O, q, ge(b.value[O]), st, it);
|
|
3428
3433
|
},
|
|
3429
3434
|
onCancel() {
|
|
3430
3435
|
l.value = void 0;
|
|
@@ -3434,43 +3439,43 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3434
3439
|
}, ye = () => {
|
|
3435
3440
|
T.value = !1, C({
|
|
3436
3441
|
props: {
|
|
3437
|
-
list:
|
|
3438
|
-
allowCreateScene:
|
|
3442
|
+
list: f.list,
|
|
3443
|
+
allowCreateScene: p(le),
|
|
3439
3444
|
onCreate: () => ee(de.create),
|
|
3440
3445
|
onUpdate: (i) => ee(de.update, i),
|
|
3441
3446
|
onDelete: (i) => ie(i),
|
|
3442
3447
|
onSort: (i) => {
|
|
3443
|
-
u.value.sceneSort = i,
|
|
3448
|
+
u.value.sceneSort = i, f.list = f.list.sort((c, S) => i.indexOf(c.code) - i.indexOf(S.code));
|
|
3444
3449
|
}
|
|
3445
3450
|
}
|
|
3446
3451
|
});
|
|
3447
3452
|
}, ot = async (i) => {
|
|
3448
3453
|
await $n();
|
|
3449
|
-
const c =
|
|
3454
|
+
const c = f.list.find((S) => S.code === i);
|
|
3450
3455
|
r("scene-change", c);
|
|
3451
3456
|
}, lt = ({ name: i }) => {
|
|
3452
|
-
|
|
3453
|
-
},
|
|
3457
|
+
Ee(b.value, `${i}._selected`, !1), V();
|
|
3458
|
+
}, Ge = (i) => b.value[i], J = (i, c, S) => {
|
|
3454
3459
|
if (Kt.includes(c))
|
|
3455
|
-
return
|
|
3456
|
-
if (!
|
|
3457
|
-
return
|
|
3460
|
+
return xe("setFormItem error,", `form item with prop "${i}" is readonly`);
|
|
3461
|
+
if (!Ge(i))
|
|
3462
|
+
return xe("setFormItem error,", `Cannot find form item with name "${i}"`);
|
|
3458
3463
|
if (c === "visible" && b.value[i].fixed)
|
|
3459
|
-
return
|
|
3460
|
-
|
|
3461
|
-
},
|
|
3464
|
+
return xe("setFormItem error,", "Cannot change the visible of a fixed form item");
|
|
3465
|
+
Ee(b.value, `${i}.${c}`, S);
|
|
3466
|
+
}, je = (i, c) => {
|
|
3462
3467
|
if (!b.value[i])
|
|
3463
|
-
return
|
|
3468
|
+
return xe("setFormValue error,", `Cannot find form item with name "${i}"`);
|
|
3464
3469
|
b.value[i].value = c;
|
|
3465
|
-
},
|
|
3470
|
+
}, $e = (i) => {
|
|
3466
3471
|
Object.entries(i).forEach(([c, S]) => {
|
|
3467
|
-
|
|
3472
|
+
je(c, S);
|
|
3468
3473
|
});
|
|
3469
3474
|
}, nn = (i) => {
|
|
3470
3475
|
var c;
|
|
3471
3476
|
return (c = b.value[i]) == null ? void 0 : c.value;
|
|
3472
|
-
},
|
|
3473
|
-
const c = {}, S = i ?
|
|
3477
|
+
}, St = (i) => {
|
|
3478
|
+
const c = {}, S = i ? Fe(b.value, Le(i)) : b.value;
|
|
3474
3479
|
for (const O in S) {
|
|
3475
3480
|
const q = S[O];
|
|
3476
3481
|
q._selected && (c[O] = ge(q.value));
|
|
@@ -3482,43 +3487,43 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3482
3487
|
R.dataSource[i] = c;
|
|
3483
3488
|
}, st = {
|
|
3484
3489
|
getFormItem(i) {
|
|
3485
|
-
return l.value ? l.value.getFormItem(i) :
|
|
3490
|
+
return l.value ? l.value.getFormItem(i) : Ge(i);
|
|
3486
3491
|
},
|
|
3487
3492
|
setFormItem(i, c, S) {
|
|
3488
|
-
l.value ? l.value.setFormItem(i, c, S) :
|
|
3493
|
+
l.value ? l.value.setFormItem(i, c, S) : J(i, c, S);
|
|
3489
3494
|
},
|
|
3490
3495
|
getFormValues(i) {
|
|
3491
|
-
return l.value ? l.value.getFormValues(i) :
|
|
3496
|
+
return l.value ? l.value.getFormValues(i) : St(i);
|
|
3492
3497
|
},
|
|
3493
3498
|
setFormValues(i) {
|
|
3494
|
-
l.value ? l.value.setFormValues(i) :
|
|
3499
|
+
l.value ? l.value.setFormValues(i) : $e(i);
|
|
3495
3500
|
},
|
|
3496
3501
|
getFormValue(i) {
|
|
3497
3502
|
return l.value ? l.value.getFormValue(i) : nn(i);
|
|
3498
3503
|
},
|
|
3499
3504
|
setFormValue(i, c) {
|
|
3500
|
-
l.value ? l.value.setFormValue(i, c) :
|
|
3505
|
+
l.value ? l.value.setFormValue(i, c) : je(i, c);
|
|
3501
3506
|
}
|
|
3502
|
-
},
|
|
3507
|
+
}, it = {
|
|
3503
3508
|
getTableData: an,
|
|
3504
3509
|
setTableData: rn,
|
|
3505
3510
|
setTableDataItem: on,
|
|
3506
3511
|
onRefresh: V
|
|
3507
3512
|
}, ln = {
|
|
3508
3513
|
...st,
|
|
3509
|
-
...
|
|
3514
|
+
...it,
|
|
3510
3515
|
onRefresh: V,
|
|
3511
3516
|
isInitialized: o
|
|
3512
3517
|
};
|
|
3513
|
-
e(ln),
|
|
3518
|
+
e(ln), ke(() => [...t.refreshDeps], V, {
|
|
3514
3519
|
deep: !0,
|
|
3515
3520
|
immediate: !0
|
|
3516
|
-
}),
|
|
3521
|
+
}), ke(
|
|
3517
3522
|
() => t.enableScene,
|
|
3518
3523
|
(i) => {
|
|
3519
|
-
i ?
|
|
3524
|
+
i ? Y() : I([]);
|
|
3520
3525
|
}
|
|
3521
|
-
),
|
|
3526
|
+
), ke(
|
|
3522
3527
|
() => t.sortable,
|
|
3523
3528
|
(i) => {
|
|
3524
3529
|
i && M();
|
|
@@ -3527,32 +3532,32 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3527
3532
|
immediate: !0
|
|
3528
3533
|
}
|
|
3529
3534
|
), _n(async () => {
|
|
3530
|
-
t.enableScene ? await
|
|
3535
|
+
t.enableScene ? await Y() : g(), o.value = !0;
|
|
3531
3536
|
});
|
|
3532
3537
|
const sn = {
|
|
3533
3538
|
token: {
|
|
3534
|
-
borderRadius:
|
|
3539
|
+
borderRadius: 2
|
|
3535
3540
|
}
|
|
3536
3541
|
};
|
|
3537
3542
|
return (i, c) => {
|
|
3538
|
-
const S = E("a-form-item"), O = E("a-button"), q = E("a-select"),
|
|
3543
|
+
const S = E("a-form-item"), O = E("a-button"), q = E("a-select"), z = E("a-divider"), _e = E("a-space"), ut = E("a-form"), We = E("a-typography-text"), un = E("a-tooltip"), cn = E("a-table"), dn = E("a-config-provider");
|
|
3539
3544
|
return x(), B(dn, {
|
|
3540
|
-
locale:
|
|
3545
|
+
locale: p(Jt),
|
|
3541
3546
|
theme: sn
|
|
3542
3547
|
}, {
|
|
3543
3548
|
default: _(() => [
|
|
3544
|
-
|
|
3549
|
+
H("div", {
|
|
3545
3550
|
class: m([i.$style.superTable, "antd-super-table"]),
|
|
3546
3551
|
style: re(a.wrapperStyle)
|
|
3547
3552
|
}, [
|
|
3548
|
-
a.enableScene || i.$slots.extra ? (x(),
|
|
3553
|
+
a.enableScene || i.$slots.extra ? (x(), U("div", {
|
|
3549
3554
|
key: 0,
|
|
3550
3555
|
class: m(i.$style.superTableHeader)
|
|
3551
3556
|
}, [
|
|
3552
|
-
|
|
3557
|
+
H("div", {
|
|
3553
3558
|
class: m(i.$style.searchFormWrapper)
|
|
3554
3559
|
}, [
|
|
3555
|
-
a.enableScene ? (x(), B(
|
|
3560
|
+
a.enableScene ? (x(), B(ut, {
|
|
3556
3561
|
key: 0,
|
|
3557
3562
|
layout: "inline",
|
|
3558
3563
|
class: m(i.$style.searchForm)
|
|
@@ -3567,32 +3572,32 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3567
3572
|
v(S, { label: "场景选择" }, {
|
|
3568
3573
|
default: _(() => [
|
|
3569
3574
|
v(q, {
|
|
3570
|
-
value:
|
|
3571
|
-
"onUpdate:value": c[1] || (c[1] = (X) =>
|
|
3575
|
+
value: p(u).sceneCode,
|
|
3576
|
+
"onUpdate:value": c[1] || (c[1] = (X) => p(u).sceneCode = X),
|
|
3572
3577
|
class: m(i.$style.sceneSelect),
|
|
3573
3578
|
placeholder: "请选择",
|
|
3574
3579
|
"allow-clear": "",
|
|
3575
3580
|
"show-search": "",
|
|
3576
3581
|
"option-filter-prop": "name",
|
|
3577
|
-
options: [...L.value, ...
|
|
3582
|
+
options: [...L.value, ...f.list],
|
|
3578
3583
|
"field-names": { value: "code", label: "name" },
|
|
3579
3584
|
open: T.value,
|
|
3580
|
-
loading:
|
|
3585
|
+
loading: f.loading,
|
|
3581
3586
|
onChange: ot,
|
|
3582
3587
|
onDropdownVisibleChange: c[2] || (c[2] = (X) => T.value = X)
|
|
3583
3588
|
}, {
|
|
3584
3589
|
dropdownRender: _(({ menuNode: X }) => [
|
|
3585
|
-
v(
|
|
3586
|
-
|
|
3590
|
+
v(p(rr), { vnodes: X }, null, 8, ["vnodes"]),
|
|
3591
|
+
H("div", {
|
|
3587
3592
|
class: m(i.$style.sceneOpBtnWrapper)
|
|
3588
3593
|
}, [
|
|
3589
3594
|
v(O, {
|
|
3590
3595
|
type: "link",
|
|
3591
3596
|
block: "",
|
|
3592
|
-
icon:
|
|
3597
|
+
icon: W(p(Nn)),
|
|
3593
3598
|
class: m(i.$style.sceneOpBtn),
|
|
3594
3599
|
disabled: !le.value,
|
|
3595
|
-
onClick: c[0] || (c[0] = (
|
|
3600
|
+
onClick: c[0] || (c[0] = (Ne) => ee(p(de).create))
|
|
3596
3601
|
}, {
|
|
3597
3602
|
default: _(() => c[6] || (c[6] = [
|
|
3598
3603
|
ne(" 新建场景 ")
|
|
@@ -3602,7 +3607,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3602
3607
|
v(O, {
|
|
3603
3608
|
type: "link",
|
|
3604
3609
|
block: "",
|
|
3605
|
-
icon:
|
|
3610
|
+
icon: W(p(Bn)),
|
|
3606
3611
|
class: m(i.$style.sceneOpBtn),
|
|
3607
3612
|
onClick: ye
|
|
3608
3613
|
}, {
|
|
@@ -3620,15 +3625,15 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3620
3625
|
}),
|
|
3621
3626
|
v(S, null, {
|
|
3622
3627
|
default: _(() => [
|
|
3623
|
-
v(
|
|
3628
|
+
v(_e, null, {
|
|
3624
3629
|
split: _(() => [
|
|
3625
|
-
v(
|
|
3630
|
+
v(z, { type: "vertical" })
|
|
3626
3631
|
]),
|
|
3627
3632
|
default: _(() => [
|
|
3628
3633
|
v(O, {
|
|
3629
3634
|
type: "primary",
|
|
3630
|
-
icon:
|
|
3631
|
-
onClick: c[3] || (c[3] = (X) => ee(
|
|
3635
|
+
icon: W(p(Dn)),
|
|
3636
|
+
onClick: c[3] || (c[3] = (X) => ee(p(de).search))
|
|
3632
3637
|
}, {
|
|
3633
3638
|
default: _(() => c[8] || (c[8] = [
|
|
3634
3639
|
ne(" 高级筛选 ")
|
|
@@ -3639,7 +3644,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3639
3644
|
key: 0,
|
|
3640
3645
|
type: "primary",
|
|
3641
3646
|
ghost: "",
|
|
3642
|
-
icon:
|
|
3647
|
+
icon: W(p(Rn)),
|
|
3643
3648
|
loading: R.loading,
|
|
3644
3649
|
onClick: V
|
|
3645
3650
|
}, {
|
|
@@ -3664,7 +3669,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3664
3669
|
_: 3
|
|
3665
3670
|
}, 8, ["class"])) : N("", !0)
|
|
3666
3671
|
], 2),
|
|
3667
|
-
i.$slots.extra ? (x(),
|
|
3672
|
+
i.$slots.extra ? (x(), U("div", {
|
|
3668
3673
|
key: 0,
|
|
3669
3674
|
class: m(i.$style.superTableExtra)
|
|
3670
3675
|
}, [
|
|
@@ -3674,34 +3679,34 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3674
3679
|
v(wo, {
|
|
3675
3680
|
"form-config-map": b.value,
|
|
3676
3681
|
"form-item-col-span": a.formItemColSpan,
|
|
3677
|
-
onFormItemChange:
|
|
3682
|
+
onFormItemChange: Z,
|
|
3678
3683
|
onDelete: c[4] || (c[4] = (X) => lt(X))
|
|
3679
3684
|
}, null, 8, ["form-config-map", "form-item-col-span"]),
|
|
3680
|
-
|
|
3685
|
+
H("div", {
|
|
3681
3686
|
class: m(i.$style.tableWrapper)
|
|
3682
3687
|
}, [
|
|
3683
|
-
i.$slots.tableHead || i.$slots.toolBar ? (x(),
|
|
3688
|
+
i.$slots.tableHead || i.$slots.toolBar ? (x(), U("div", {
|
|
3684
3689
|
key: 0,
|
|
3685
3690
|
class: m(i.$style.toolbar)
|
|
3686
3691
|
}, [
|
|
3687
|
-
|
|
3692
|
+
H("div", {
|
|
3688
3693
|
class: m(i.$style.tableHeadWrapper)
|
|
3689
3694
|
}, [
|
|
3690
3695
|
ve(i.$slots, "tableHead")
|
|
3691
3696
|
], 2),
|
|
3692
|
-
i.$slots.toolBarExtra ? (x(),
|
|
3697
|
+
i.$slots.toolBarExtra ? (x(), U("div", {
|
|
3693
3698
|
key: 0,
|
|
3694
3699
|
class: m(i.$style.actionBtns)
|
|
3695
3700
|
}, [
|
|
3696
3701
|
ve(i.$slots, "toolBarExtra")
|
|
3697
3702
|
], 2)) : N("", !0)
|
|
3698
3703
|
], 2)) : N("", !0),
|
|
3699
|
-
|
|
3704
|
+
H("div", {
|
|
3700
3705
|
class: m(i.$style.tableContent)
|
|
3701
3706
|
}, [
|
|
3702
3707
|
a.enableTableConfig ? (x(), B($r, {
|
|
3703
3708
|
key: 0,
|
|
3704
|
-
columns:
|
|
3709
|
+
columns: qe.value,
|
|
3705
3710
|
onChange: P
|
|
3706
3711
|
}, null, 8, ["columns"])) : N("", !0),
|
|
3707
3712
|
v(cn, ue({
|
|
@@ -3710,9 +3715,9 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3710
3715
|
}, {
|
|
3711
3716
|
...R,
|
|
3712
3717
|
dataSource: rt.value
|
|
3713
|
-
}, { onResizeColumn:
|
|
3718
|
+
}, { onResizeColumn: Ue }), Cn({
|
|
3714
3719
|
headerCell: _(({ column: X }) => [
|
|
3715
|
-
X.class !== "ant-table-row-expand-icon-cell" ? (x(),
|
|
3720
|
+
X.class !== "ant-table-row-expand-icon-cell" ? (x(), U("div", {
|
|
3716
3721
|
key: 0,
|
|
3717
3722
|
class: m(i.$style.headerCell)
|
|
3718
3723
|
}, [
|
|
@@ -3723,13 +3728,13 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3723
3728
|
}, null, 8, ["ellipsis", "content", "class"]),
|
|
3724
3729
|
X.titleTooltip ? (x(), B(un, { key: 0 }, {
|
|
3725
3730
|
title: _(() => [
|
|
3726
|
-
|
|
3731
|
+
H("span", {
|
|
3727
3732
|
innerHTML: X.titleTooltip
|
|
3728
3733
|
}, null, 8, Io)
|
|
3729
3734
|
]),
|
|
3730
3735
|
default: _(() => [
|
|
3731
|
-
v(
|
|
3732
|
-
style: re({ color:
|
|
3736
|
+
v(p(zn), {
|
|
3737
|
+
style: re({ color: p(oe).colorTextQuaternary }),
|
|
3733
3738
|
class: m(i.$style.headerCellTooltipIcon)
|
|
3734
3739
|
}, null, 8, ["style", "class"])
|
|
3735
3740
|
]),
|
|
@@ -3737,10 +3742,10 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3737
3742
|
}, 1024)) : N("", !0)
|
|
3738
3743
|
], 2)) : N("", !0)
|
|
3739
3744
|
]),
|
|
3740
|
-
bodyCell: _(({ column: X, record:
|
|
3741
|
-
Ut([
|
|
3745
|
+
bodyCell: _(({ column: X, record: Ne, index: It }) => [
|
|
3746
|
+
Ut([Ne == null ? void 0 : Ne[R.rowKey], X == null ? void 0 : X.key, It], () => v(ar, {
|
|
3742
3747
|
column: X,
|
|
3743
|
-
record:
|
|
3748
|
+
record: Ne,
|
|
3744
3749
|
index: It,
|
|
3745
3750
|
hasRouter: s.value
|
|
3746
3751
|
}, null, 8, ["column", "record", "index", "hasRouter"]), c, 5)
|
|
@@ -3759,7 +3764,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3759
3764
|
} : void 0
|
|
3760
3765
|
]), 1040)
|
|
3761
3766
|
], 2),
|
|
3762
|
-
i.$slots.tableFoot ? (x(),
|
|
3767
|
+
i.$slots.tableFoot ? (x(), U("div", {
|
|
3763
3768
|
key: 1,
|
|
3764
3769
|
class: m(i.$style.tableFootWrapper)
|
|
3765
3770
|
}, [
|
|
@@ -3772,7 +3777,7 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3772
3777
|
}, 8, ["locale"]);
|
|
3773
3778
|
};
|
|
3774
3779
|
}
|
|
3775
|
-
}), xo = "_superTable_1j2zk_1", To = "_superTableHeader_1j2zk_5", Po = "_searchFormWrapper_1j2zk_10", Oo = "_searchForm_1j2zk_10", qo = "_sceneSelect_1j2zk_17", Ao = "_tableWrapper_1j2zk_20", Eo = "_toolbar_1j2zk_20", Lo = "_actionBtns_1j2zk_27", Mo = "_tableHeadWrapper_1j2zk_32", jo = "_tableContent_1j2zk_35", No = "_headerCell_1j2zk_38", Bo = "_headerCellText_1j2zk_43", Do = "_headerCellTooltipIcon_1j2zk_46", Ro = "_sceneOpBtnWrapper_1j2zk_50",
|
|
3780
|
+
}), xo = "_superTable_1j2zk_1", To = "_superTableHeader_1j2zk_5", Po = "_searchFormWrapper_1j2zk_10", Oo = "_searchForm_1j2zk_10", qo = "_sceneSelect_1j2zk_17", Ao = "_tableWrapper_1j2zk_20", Eo = "_toolbar_1j2zk_20", Lo = "_actionBtns_1j2zk_27", Mo = "_tableHeadWrapper_1j2zk_32", jo = "_tableContent_1j2zk_35", No = "_headerCell_1j2zk_38", Bo = "_headerCellText_1j2zk_43", Do = "_headerCellTooltipIcon_1j2zk_46", Ro = "_sceneOpBtnWrapper_1j2zk_50", zo = "_sceneOpBtn_1j2zk_50", Vo = {
|
|
3776
3781
|
superTable: xo,
|
|
3777
3782
|
superTableHeader: To,
|
|
3778
3783
|
searchFormWrapper: Po,
|
|
@@ -3787,16 +3792,16 @@ const Ke = 2e3, ko = (a) => {
|
|
|
3787
3792
|
headerCellText: Bo,
|
|
3788
3793
|
headerCellTooltipIcon: Do,
|
|
3789
3794
|
sceneOpBtnWrapper: Ro,
|
|
3790
|
-
sceneOpBtn:
|
|
3795
|
+
sceneOpBtn: zo
|
|
3791
3796
|
}, Yo = {
|
|
3792
|
-
$style:
|
|
3797
|
+
$style: Vo
|
|
3793
3798
|
}, Ht = /* @__PURE__ */ he(Fo, [["__cssModules", Yo]]);
|
|
3794
3799
|
Ht.install = (a) => {
|
|
3795
3800
|
a.component("SuperTable", Ht);
|
|
3796
3801
|
};
|
|
3797
3802
|
export {
|
|
3798
3803
|
Or as DynamicList,
|
|
3799
|
-
|
|
3800
|
-
|
|
3804
|
+
G as SuperTableColumnTypeEnum,
|
|
3805
|
+
K as SuperTableFormItemTypeEnum,
|
|
3801
3806
|
Ht as default
|
|
3802
3807
|
};
|