@web-utils/form-ui 1.0.0-beta86 → 1.0.0-beta88
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/affix/index.mjs +1 -1
- package/chunks/{4kjeIiag2.mjs → 5RCAxanu2.mjs} +3 -3
- package/chunks/{vebd58-O.mjs → 9ec0Wti82.mjs} +1 -1
- package/chunks/{BxcsELcB2.mjs → B7BaAm4k2.mjs} +2 -2
- package/chunks/{DSTNXl142.mjs → BFhVUqpP2.mjs} +2 -2
- package/chunks/BLKcXIrX.mjs +517 -0
- package/chunks/{C8h_P_kl2.mjs → BSOrm2U4.mjs} +2 -2
- package/chunks/BbUUI4mF.mjs +204 -0
- package/chunks/{D_q3C3v4.mjs → BegZOXrr.mjs} +4 -4
- package/chunks/{BIy6bO4j.mjs → Bg01eBVa2.mjs} +2 -2
- package/chunks/{DJlgX5ty.mjs → BhPVs8Ju.mjs} +1 -1
- package/chunks/{DrvwVjzq2.mjs → BmbhIxPF2.mjs} +2 -2
- package/chunks/{BYu4QaK72.mjs → Br3whXEJ2.mjs} +2 -2
- package/chunks/{y1Q66LEa2.mjs → BuI82QMb2.mjs} +1 -1
- package/chunks/{CCpKg0cM.mjs → Bv7b2DXh2.mjs} +2 -2
- package/chunks/{ofu8wJKp.mjs → C-s-88fN2.mjs} +1 -1
- package/chunks/{CET31mBi.mjs → C54nZqvy2.mjs} +1 -1
- package/chunks/CBHGpbDK.mjs +56 -0
- package/chunks/CFpGTE5U2.mjs +221 -0
- package/chunks/CIihGrgY.mjs +30 -0
- package/chunks/{XQwnPkab2.mjs → CW021IPm2.mjs} +1 -1
- package/chunks/{CLn5E7NV.mjs → CW1nopZH.mjs} +1 -1
- package/chunks/CY2YrwMT.mjs +302 -0
- package/chunks/{DVF9q3oX.mjs → CdvD0NRo2.mjs} +2 -2
- package/chunks/Cf_h9S62.mjs +378 -0
- package/chunks/{8h-xBLL82.mjs → CixNVW_T2.mjs} +10 -10
- package/chunks/{By-W0XXn2.mjs → ClkLQjZ82.mjs} +1 -1
- package/chunks/CsNZt53l.mjs +4074 -0
- package/chunks/{HFLY8Wla.mjs → D1mQTnJ8.mjs} +181 -185
- package/chunks/{CjCNtCWd.mjs → D20CQ-B6.mjs} +1 -1
- package/chunks/{BxuM-fgJ.mjs → D2kLAzxW.mjs} +1 -1
- package/chunks/{tfaGdZX2.mjs → D8_fl5Oq.mjs} +4 -4
- package/chunks/{C28bnMcw.mjs → DC3DNg_r.mjs} +1 -1
- package/chunks/{DWN5uzm02.mjs → DL4xcGES2.mjs} +10 -10
- package/chunks/{SWO35fS42.mjs → Dd4RtBO02.mjs} +1 -1
- package/chunks/{3nLaRSbR2.mjs → DdHN2Nv72.mjs} +1 -1
- package/chunks/{BrSqLOi5.mjs → DmJaItEY.mjs} +6 -6
- package/chunks/{CkHQY4ME2.mjs → Dnapnskp2.mjs} +1 -1
- package/chunks/{vHsAJZRT.mjs → MUk_IdeO2.mjs} +2 -2
- package/chunks/NAZ8HFBg.mjs +340 -0
- package/chunks/{saZ_qJOT.mjs → aOv3rI7q.mjs} +1 -1
- package/chunks/{mqi8hesW2.mjs → dxZzZgUn.mjs} +2 -2
- package/chunks/{Tq3_dajC2.mjs → m5oFTe8Y2.mjs} +1 -1
- package/chunks/{Dst9_BmZ.mjs → n7IipIUY.mjs} +3 -3
- package/chunks/{SInS7QSL.mjs → vCOhFr2x.mjs} +1 -1
- package/constants/index.d.ts +2 -0
- package/constants/index.mjs +2 -2
- package/data-table-picker/index.mjs +1 -1
- package/dialog-form/index.d.ts +4 -0
- package/dialog-form/index.mjs +154 -0
- package/dialog-form/style.css +1 -0
- package/empty-view/index.d.ts +2 -2
- package/flex-box/index.mjs +1 -1
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow-designer/index.mjs +1 -1
- package/form-cascader/index.mjs +1 -1
- package/form-checkbox/index.mjs +1 -1
- package/form-checkbox-group/index.mjs +1 -1
- package/form-date-picker/index.d.ts +4 -4
- package/form-date-picker/index.mjs +1 -1
- package/form-holder/index.mjs +1 -1
- package/form-image/index.mjs +1 -1
- package/form-input/index.mjs +1 -1
- package/form-input-cron-expression/index.mjs +1 -1
- package/form-input-email/index.mjs +1 -1
- package/form-input-id-card/index.mjs +1 -1
- package/form-input-number/index.mjs +1 -1
- package/form-input-phone-number/index.mjs +1 -1
- package/form-input-tag/index.mjs +1 -1
- package/form-input-time/index.mjs +1 -1
- package/form-item/index.mjs +1 -1
- package/form-item-group/index.mjs +1 -1
- package/form-radio-group/index.mjs +1 -1
- package/form-rate/index.mjs +1 -1
- package/form-row/index.mjs +1 -1
- package/form-select/index.mjs +1 -1
- package/form-slider/index.mjs +1 -1
- package/form-switch/index.mjs +1 -1
- package/form-table/index.mjs +1 -1
- package/form-table-plus/index.mjs +1 -1
- package/form-text/index.mjs +1 -1
- package/form-textarea/index.mjs +1 -1
- package/form-time-select/index.mjs +1 -1
- package/form-tree-select/index.mjs +1 -1
- package/form-tree-select-multiple/index.mjs +1 -1
- package/form-view/index.mjs +2 -2
- package/fy-array/index.d.ts +234 -0
- package/fy-array/index.mjs +130 -0
- package/fy-array/style.css +1 -0
- package/fy-button/index.d.ts +18 -0
- package/fy-button/index.mjs +2 -0
- package/fy-button/style.css +1 -0
- package/fy-cascader/index.d.ts +298 -0
- package/fy-cascader/index.mjs +116 -0
- package/fy-checkbox/index.d.ts +231 -0
- package/fy-checkbox/index.mjs +100 -0
- package/fy-checkbox/style.css +1 -0
- package/fy-curd/index.d.ts +908 -0
- package/fy-curd/index.mjs +2 -0
- package/fy-date/index.d.ts +246 -0
- package/fy-date/index.mjs +79 -0
- package/fy-date/style.css +1 -0
- package/fy-dynamic/index.d.ts +268 -0
- package/fy-dynamic/index.mjs +2 -0
- package/fy-empty/index.d.ts +31 -0
- package/fy-empty/index.mjs +35 -0
- package/fy-empty/style.css +1 -0
- package/fy-form/index.d.ts +522 -0
- package/fy-form/index.mjs +2 -0
- package/fy-form/style.css +1 -0
- package/fy-input/index.d.ts +316 -0
- package/fy-input/index.mjs +122 -0
- package/fy-input-color/index.d.ts +235 -0
- package/fy-input-color/index.mjs +80 -0
- package/fy-input-icon/index.d.ts +244 -0
- package/fy-input-icon/index.mjs +133 -0
- package/fy-input-icon/style.css +1 -0
- package/fy-input-map/index.d.ts +266 -0
- package/fy-input-map/index.mjs +248 -0
- package/fy-input-map/style.css +1 -0
- package/fy-input-number/index.d.ts +266 -0
- package/fy-input-number/index.mjs +78 -0
- package/fy-input-table/index.d.ts +248 -0
- package/fy-input-table/index.mjs +166 -0
- package/fy-input-table/style.css +1 -0
- package/fy-input-tree/index.d.ts +351 -0
- package/fy-input-tree/index.mjs +266 -0
- package/fy-input-tree/style.css +1 -0
- package/fy-radio/index.d.ts +218 -0
- package/fy-radio/index.mjs +56 -0
- package/fy-radio/style.css +1 -0
- package/fy-rate/index.d.ts +288 -0
- package/fy-rate/index.mjs +90 -0
- package/fy-rate/style.css +1 -0
- package/fy-select/index.d.ts +324 -0
- package/fy-select/index.mjs +2 -0
- package/fy-select/style.css +1 -0
- package/fy-slider/index.d.ts +249 -0
- package/fy-slider/index.mjs +72 -0
- package/fy-switch/index.d.ts +229 -0
- package/fy-switch/index.mjs +71 -0
- package/fy-tabs/index.d.ts +20 -0
- package/fy-tabs/index.mjs +50 -0
- package/fy-time/index.d.ts +704 -0
- package/fy-time/index.mjs +85 -0
- package/fy-title/index.d.ts +224 -0
- package/fy-title/index.mjs +18 -0
- package/fy-title/style.css +1 -0
- package/fy-tree/index.d.ts +141 -0
- package/fy-tree/index.mjs +390 -0
- package/fy-tree/style.css +1 -0
- package/fy-u-editor/index.d.ts +116 -0
- package/fy-u-editor/index.mjs +2 -0
- package/fy-u-editor/style.css +1 -0
- package/fy-upload/index.d.ts +379 -0
- package/fy-upload/index.mjs +2 -0
- package/fy-upload/style.css +1 -0
- package/helper/avue.d.ts +36 -0
- package/helper/avue.mjs +35 -0
- package/helper/input.mjs +1 -1
- package/icon-temp/index.d.ts +19 -0
- package/icon-temp/index.mjs +27 -0
- package/icon-temp/style.css +1 -0
- package/image-viewer/index.d.ts +1 -1
- package/index.css +1 -1
- package/index.d.ts +31 -1
- package/index.mjs +118 -90
- package/keyboard/index.mjs +1 -1
- package/monaco-editor/index.d.ts +126 -0
- package/monaco-editor/index.mjs +2 -0
- package/monaco-editor/style.css +1 -0
- package/package.json +3 -1
- package/pageable-table/index.d.ts +1 -1
- package/pageable-table/index.mjs +1 -1
- package/photo-swipe/index.mjs +1 -1
- package/resolver/components.mjs +1 -1
- package/split-pane/index.mjs +1 -1
- package/sub-table/index.mjs +1 -1
- package/sub-table-plus/index.mjs +1 -1
- package/table-column-def/index.d.ts +6 -6
- package/table-view/index.mjs +4 -4
- package/tag-render/index.d.ts +1 -1
- package/toolbar/index.mjs +1 -1
- package/vue-cron/index.mjs +1 -1
- package/vue-tags-input/index.d.ts +1 -1
- package/vue-tree-select/index.mjs +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +1 -1
- package/x-input-tag/index.mjs +1 -1
- package/chunks/{DCqyZyF6.mjs → BCYFaOiB.mjs} +0 -0
- package/chunks/{B1luuf_A2.mjs → BJDeTpmp2.mjs} +0 -0
- package/chunks/{BhHMGhJ8.mjs → BcsscZAM.mjs} +0 -0
- package/chunks/{DbcxJ45j.mjs → BfW25VbY.mjs} +1 -1
- package/chunks/{6dNVtIN32.mjs → BjccroM8.mjs} +0 -0
- package/chunks/{BTGrh7dw2.mjs → Br0vC3nS2.mjs} +0 -0
- package/chunks/{BM5LdxU72.mjs → CB0zQsKV2.mjs} +0 -0
- package/chunks/{Bs926z902.mjs → CHqxWrj7.mjs} +1 -1
- package/chunks/{B5c0s3IR.mjs → CJwAjhLy.mjs} +1 -1
- package/chunks/{BAG_R87k2.mjs → CZnwC17w.mjs} +0 -0
- package/chunks/{tVHVSu5h.mjs → CbedyG4s.mjs} +4 -4
- package/chunks/{BwL9Xz1F.mjs → Cp1olyWc.mjs} +0 -0
- package/chunks/{KOJEsarR2.mjs → CpmWELPU.mjs} +0 -0
- package/chunks/{C-zPVdz-.mjs → D9ft-f6n.mjs} +1 -1
- package/chunks/{PEU1JRcN2.mjs → DEHzWyyp.mjs} +0 -0
- package/chunks/{CHmZyvFr.mjs → DJe2Reym.mjs} +0 -0
- package/chunks/{CpsHWpwH2.mjs → DNq7pbXh2.mjs} +0 -0
- package/chunks/{X-ckP2Hj.mjs → DOLQ28wD.mjs} +0 -0
- package/chunks/{tqW2DSco.mjs → fT8tFJVO.mjs} +1 -1
- /package/chunks/{Dkw6LNCq2.mjs → jG7vu3RX.mjs} +0 -0
- /package/chunks/{b0ve2YgF.mjs → mQG01w6Y.mjs} +0 -0
|
@@ -8,8 +8,8 @@ import { t as u } from "./6eDDQWcr.mjs";
|
|
|
8
8
|
import { useVisibilityChange as ee } from "../hook/useVisibilityChange.mjs";
|
|
9
9
|
import { ElCheckbox as d, ElDrawer as f, ElEmpty as te, ElMessage as ne, ElPagination as p, ElRadio as m, ElTable as h, ElTableColumn as g } from "element-plus/es";
|
|
10
10
|
import "element-plus/es/components/base/style/css";
|
|
11
|
-
import { Fragment as
|
|
12
|
-
import { isFunction as
|
|
11
|
+
import { Fragment as re, computed as _, createBlock as v, createTextVNode as y, createVNode as b, inject as x, isVNode as S, mergeModels as C, mergeProps as w, nextTick as ie, onUpdated as ae, openBlock as T, provide as E, reactive as D, ref as O, toDisplayString as k, useModel as A, useTemplateRef as oe, watch as j, withCtx as M } from "vue";
|
|
12
|
+
import { isFunction as N } from "@web-utils/core";
|
|
13
13
|
import "element-plus/es/components/message/style/css";
|
|
14
14
|
import "element-plus/es/components/drawer/style/css";
|
|
15
15
|
import "element-plus/es/components/table/style/css";
|
|
@@ -18,12 +18,12 @@ import "element-plus/es/components/table-column/style/css";
|
|
|
18
18
|
import "element-plus/es/components/pagination/style/css";
|
|
19
19
|
import "element-plus/es/components/empty/style/css";
|
|
20
20
|
import "element-plus/es/components/radio/style/css";
|
|
21
|
-
import { useEventBus as
|
|
22
|
-
import { uuid as
|
|
21
|
+
import { useEventBus as se } from "@web-utils/vue/hooks/useEventBus";
|
|
22
|
+
import { uuid as ce } from "@web-utils/integrations/uuid";
|
|
23
23
|
//#region src/components/table/components/TableColumnSettingPanel.vue
|
|
24
|
-
var
|
|
24
|
+
var P = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
|
|
25
25
|
__name: "TableColumnSettingPanel",
|
|
26
|
-
props: /* @__PURE__ */
|
|
26
|
+
props: /* @__PURE__ */ C({ columns: {
|
|
27
27
|
type: Array,
|
|
28
28
|
default: () => []
|
|
29
29
|
} }, {
|
|
@@ -33,9 +33,9 @@ var I = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
|
|
|
33
33
|
},
|
|
34
34
|
modelModifiers: {}
|
|
35
35
|
}),
|
|
36
|
-
emits: /* @__PURE__ */
|
|
36
|
+
emits: /* @__PURE__ */ C(["update:settings"], ["update:modelValue"]),
|
|
37
37
|
setup(e, { expose: t, emit: n }) {
|
|
38
|
-
let r =
|
|
38
|
+
let r = A(e, "modelValue"), i = n, a = D({
|
|
39
39
|
hideProps: {},
|
|
40
40
|
fixedProps: {},
|
|
41
41
|
filterableProps: {},
|
|
@@ -45,48 +45,48 @@ var I = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
|
|
|
45
45
|
};
|
|
46
46
|
return t({ settings: a }), (t, n) => {
|
|
47
47
|
let i = g, a = d, s = h, c = f;
|
|
48
|
-
return
|
|
48
|
+
return T(), v(c, {
|
|
49
49
|
modelValue: r.value,
|
|
50
50
|
"onUpdate:modelValue": n[0] || (n[0] = (e) => r.value = e),
|
|
51
51
|
class: "table-column-filter",
|
|
52
52
|
title: "表格设置",
|
|
53
53
|
"append-to-body": ""
|
|
54
54
|
}, {
|
|
55
|
-
default:
|
|
55
|
+
default: M(() => [b(s, {
|
|
56
56
|
data: e.columns,
|
|
57
57
|
border: ""
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
|
|
61
|
-
default:
|
|
59
|
+
default: M(() => [
|
|
60
|
+
b(i, { label: "列名" }, {
|
|
61
|
+
default: M(({ row: e }) => [y(k(e.label), 1)]),
|
|
62
62
|
_: 1
|
|
63
63
|
}),
|
|
64
|
-
|
|
64
|
+
b(i, {
|
|
65
65
|
label: "隐藏",
|
|
66
66
|
align: "center"
|
|
67
67
|
}, {
|
|
68
|
-
default:
|
|
68
|
+
default: M(({ row: e }) => [b(a, { onChange: (t) => o(t, e, "hide") }, null, 8, ["onChange"])]),
|
|
69
69
|
_: 1
|
|
70
70
|
}),
|
|
71
|
-
|
|
71
|
+
b(i, {
|
|
72
72
|
label: "冻结",
|
|
73
73
|
align: "center"
|
|
74
74
|
}, {
|
|
75
|
-
default:
|
|
75
|
+
default: M(({ row: e }) => [b(a, { onChange: (t) => o(t, e, "fixed") }, null, 8, ["onChange"])]),
|
|
76
76
|
_: 1
|
|
77
77
|
}),
|
|
78
|
-
|
|
78
|
+
b(i, {
|
|
79
79
|
label: "过滤",
|
|
80
80
|
align: "center"
|
|
81
81
|
}, {
|
|
82
|
-
default:
|
|
82
|
+
default: M(({ row: e }) => [b(a, { onChange: (t) => o(t, e, "filterable") }, null, 8, ["onChange"])]),
|
|
83
83
|
_: 1
|
|
84
84
|
}),
|
|
85
|
-
|
|
85
|
+
b(i, {
|
|
86
86
|
label: "排序",
|
|
87
87
|
align: "center"
|
|
88
88
|
}, {
|
|
89
|
-
default:
|
|
89
|
+
default: M(({ row: e }) => [b(a, {
|
|
90
90
|
title: e.allowSort ? null : "该列不支持排序!",
|
|
91
91
|
disabled: !e.allowSort,
|
|
92
92
|
onChange: (t) => o(t, e, "sortable")
|
|
@@ -107,29 +107,29 @@ var I = /* @__PURE__ */ Object.assign({ name: "TableColumnSettingPanel" }, {
|
|
|
107
107
|
});
|
|
108
108
|
//#endregion
|
|
109
109
|
//#region src/components/table/components/TableColumnFilterable.vue?vue&type=script&lang.jsx
|
|
110
|
-
function
|
|
111
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
110
|
+
function F(e) {
|
|
111
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !S(e);
|
|
112
112
|
}
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region src/components/table/components/TableColumnFilterable.vue
|
|
115
|
-
var
|
|
115
|
+
var le = {
|
|
116
116
|
name: "TableColumnFilterable",
|
|
117
117
|
props: { ...l },
|
|
118
118
|
setup(t, { slots: n }) {
|
|
119
|
-
let r =
|
|
119
|
+
let r = x(o, null), i = e(t, (e) => e !== "filterMethod" && e !== "filters"), a = _(() => {
|
|
120
120
|
if (t.filterable && r) return (e, t, n) => t[n.property] === e;
|
|
121
|
-
}), s =
|
|
121
|
+
}), s = _(() => {
|
|
122
122
|
if (t.filterable && r) return [...new Set(r.records.value.map((e) => e[t.prop]).filter((e) => e))].map((e) => ({
|
|
123
123
|
text: e,
|
|
124
124
|
value: e
|
|
125
125
|
}));
|
|
126
126
|
});
|
|
127
|
-
return () =>
|
|
127
|
+
return () => b(u, w(i.value, {
|
|
128
128
|
filterMethod: a.value,
|
|
129
129
|
filters: s.value
|
|
130
|
-
}),
|
|
130
|
+
}), F(n) ? n : { default: () => [n] });
|
|
131
131
|
}
|
|
132
|
-
},
|
|
132
|
+
}, I = {
|
|
133
133
|
data: {
|
|
134
134
|
type: Array,
|
|
135
135
|
default: () => []
|
|
@@ -305,7 +305,7 @@ var se = {
|
|
|
305
305
|
selectExport: Boolean,
|
|
306
306
|
useVisibilityChange: Boolean,
|
|
307
307
|
rowDbClick: Function
|
|
308
|
-
},
|
|
308
|
+
}, L = {
|
|
309
309
|
data: !0,
|
|
310
310
|
rowDbClick: !0,
|
|
311
311
|
selectionWidth: !0,
|
|
@@ -332,113 +332,113 @@ var se = {
|
|
|
332
332
|
columns: !0,
|
|
333
333
|
payloadStyle: !0,
|
|
334
334
|
disabledRowKeys: !0
|
|
335
|
-
},
|
|
335
|
+
}, ue = (e) => L[e] !== !0;
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region src/components/table/PageableTable.vue?vue&type=script&lang.jsx
|
|
338
|
-
function
|
|
338
|
+
function de(e) {
|
|
339
339
|
let t = "";
|
|
340
340
|
for (let n in e) t += `<TableColumnDef prop="${n}" label="${n}"/>\n`;
|
|
341
341
|
return t;
|
|
342
342
|
}
|
|
343
|
-
var
|
|
343
|
+
var R = {
|
|
344
344
|
loading: 1,
|
|
345
345
|
error: -1,
|
|
346
346
|
empty: 2,
|
|
347
347
|
success: 0
|
|
348
|
-
},
|
|
348
|
+
}, z = {
|
|
349
349
|
name: "PageableTable",
|
|
350
350
|
emits: { "page-loaded": null },
|
|
351
351
|
inheritAttrs: !1,
|
|
352
|
-
props: { ...
|
|
352
|
+
props: { ...I },
|
|
353
353
|
setup(e, { emit: l, attrs: u, slots: d, expose: f }) {
|
|
354
|
-
|
|
355
|
-
let
|
|
354
|
+
E(a, e.rowDbClick);
|
|
355
|
+
let v = oe("table"), x = O({
|
|
356
356
|
hideProps: {},
|
|
357
357
|
fixedProps: {},
|
|
358
358
|
filterableProps: {},
|
|
359
359
|
sortableProps: {}
|
|
360
|
-
}),
|
|
360
|
+
}), S = O(R.empty), C = O([]), T = O(null), D = O(!1), k = O([]), A = O({
|
|
361
361
|
total: 0,
|
|
362
362
|
page: 1,
|
|
363
363
|
limit: e.pageSize,
|
|
364
364
|
ascs: e.ascs,
|
|
365
365
|
descs: e.descs
|
|
366
|
-
}),
|
|
367
|
-
asc:
|
|
368
|
-
desc:
|
|
369
|
-
page:
|
|
370
|
-
limit:
|
|
366
|
+
}), M = O(0), F = O(0), I = _(() => e.reloadOnModelChange ? {
|
|
367
|
+
asc: A.value.ascs,
|
|
368
|
+
desc: A.value.descs,
|
|
369
|
+
page: A.value.page,
|
|
370
|
+
limit: A.value.limit,
|
|
371
371
|
model: e.model
|
|
372
372
|
} : {
|
|
373
|
-
asc:
|
|
374
|
-
desc:
|
|
375
|
-
page:
|
|
376
|
-
limit:
|
|
377
|
-
}),
|
|
373
|
+
asc: A.value.ascs,
|
|
374
|
+
desc: A.value.descs,
|
|
375
|
+
page: A.value.page,
|
|
376
|
+
limit: A.value.limit
|
|
377
|
+
}), L = _(() => {
|
|
378
378
|
var e;
|
|
379
|
-
let t = `${(
|
|
379
|
+
let t = `${(A.value.page - 1) * A.value.limit + (((e = C.value) == null ? void 0 : e.length) ?? 0)}`;
|
|
380
380
|
return t.length > 3 ? 60 + (t.length - 3) * 10 : 60;
|
|
381
|
-
}),
|
|
382
|
-
|
|
383
|
-
},
|
|
384
|
-
if (e.clickRowSelect &&
|
|
381
|
+
}), z = () => {
|
|
382
|
+
V();
|
|
383
|
+
}, B = (t, n, r) => {
|
|
384
|
+
if (e.clickRowSelect && Z(t)) {
|
|
385
385
|
var i;
|
|
386
|
-
if (
|
|
386
|
+
if (k.value.find((n) => n[e.rowKey] === t[e.rowKey])) {
|
|
387
387
|
var a;
|
|
388
|
-
(a =
|
|
388
|
+
(a = v.value) == null || a.toggleRowSelection(t, !1);
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
|
-
(i =
|
|
391
|
+
(i = v.value) == null || i.toggleRowSelection(t);
|
|
392
392
|
}
|
|
393
|
-
},
|
|
393
|
+
}, V = () => {
|
|
394
394
|
var e, t;
|
|
395
|
-
let n = (e =
|
|
395
|
+
let n = (e = v.value) == null || (e = e.$children) == null ? void 0 : e.find((e) => {
|
|
396
396
|
var t;
|
|
397
397
|
return ((t = e.$options) == null ? void 0 : t.name) === "ElTableBody";
|
|
398
398
|
});
|
|
399
399
|
n == null || (t = n.$refs) == null || (t = t.tooltip) == null || t.hide();
|
|
400
|
-
},
|
|
401
|
-
|
|
402
|
-
},
|
|
403
|
-
|
|
404
|
-
},
|
|
405
|
-
e.payloadStyle === "body" ? (
|
|
406
|
-
}, me = (e) => {
|
|
407
|
-
Q(e) && (D.value = e);
|
|
400
|
+
}, H = ({ scrollLeft: e, scrollTop: t }) => {
|
|
401
|
+
M.value = t, F.value = e;
|
|
402
|
+
}, fe = () => {
|
|
403
|
+
_e(M.value, F.value);
|
|
404
|
+
}, pe = (e) => n(de(e)), me = ({ prop: t, order: n }) => {
|
|
405
|
+
e.payloadStyle === "body" ? (A.value.ascs = n === "ascending" ? [t] : e.ascs, A.value.descs = n === "descending" ? [t] : e.descs) : (A.value.ascs = n === "ascending" ? t : "", A.value.descs = n === "descending" ? t : "");
|
|
408
406
|
}, he = (e) => {
|
|
409
|
-
|
|
410
|
-
},
|
|
407
|
+
Z(e) && (T.value = e);
|
|
408
|
+
}, ge = (e) => {
|
|
409
|
+
k.value = e;
|
|
410
|
+
}, U = () => {
|
|
411
411
|
var e;
|
|
412
|
-
(e =
|
|
413
|
-
},
|
|
412
|
+
(e = v.value) == null || e.clearSelection();
|
|
413
|
+
}, W = () => {
|
|
414
414
|
let t;
|
|
415
415
|
return t = e.payloadStyle === "body" ? {
|
|
416
416
|
page: {
|
|
417
|
-
...
|
|
418
|
-
current:
|
|
419
|
-
size:
|
|
417
|
+
...A.value,
|
|
418
|
+
current: A.value.page,
|
|
419
|
+
size: A.value.limit
|
|
420
420
|
},
|
|
421
421
|
example: e.model || {}
|
|
422
422
|
} : {
|
|
423
|
-
...
|
|
424
|
-
current:
|
|
425
|
-
size:
|
|
423
|
+
...A.value,
|
|
424
|
+
current: A.value.page,
|
|
425
|
+
size: A.value.limit,
|
|
426
426
|
...e.model || {}
|
|
427
|
-
}, e.selectExport && (e.rowKey ? t.exportKeys =
|
|
428
|
-
},
|
|
427
|
+
}, e.selectExport && (e.rowKey ? t.exportKeys = k.value.map((t) => t[e.rowKey]) : t.exportKeys = k.value.map((e) => C.value.indexOf(e))), t;
|
|
428
|
+
}, G = async (t = !0) => {
|
|
429
429
|
if (!e.api && e.data !== !1) {
|
|
430
430
|
var n;
|
|
431
|
-
|
|
431
|
+
C.value = e.data, A.value.page = 1, A.value.total = (n = C.value) == null ? void 0 : n.length, A.value.limit = A.value.total < 1 ? e.pageSize : A.value.total;
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
434
|
-
t !== !1 && (
|
|
435
|
-
let r, i =
|
|
434
|
+
t !== !1 && (C.value = []);
|
|
435
|
+
let r, i = W();
|
|
436
436
|
if (e.api) {
|
|
437
|
-
t !== !1 && (
|
|
437
|
+
t !== !1 && (S.value = R.loading);
|
|
438
438
|
try {
|
|
439
439
|
e.api && (r = await e.api(i));
|
|
440
440
|
} catch {
|
|
441
|
-
|
|
441
|
+
S.value = R.error;
|
|
442
442
|
return;
|
|
443
443
|
}
|
|
444
444
|
} else if (e.data) r = { data: { data: {
|
|
@@ -453,28 +453,28 @@ var B = {
|
|
|
453
453
|
return;
|
|
454
454
|
}
|
|
455
455
|
let { data: { data: a } = {} } = r || {}, { total: o, records: s } = a || {};
|
|
456
|
-
|
|
457
|
-
},
|
|
458
|
-
|
|
456
|
+
A.value.total = Number(o), C.value = await ve(s), !s || !s.length ? S.value = R.empty : S.value = R.success, K(), l("page-loaded", a);
|
|
457
|
+
}, K = () => {
|
|
458
|
+
ie(() => {
|
|
459
459
|
var e;
|
|
460
|
-
(e =
|
|
460
|
+
(e = v.value) == null || e.doLayout();
|
|
461
461
|
});
|
|
462
|
-
},
|
|
463
|
-
await
|
|
464
|
-
},
|
|
465
|
-
|
|
462
|
+
}, q = async (e) => {
|
|
463
|
+
await G(e);
|
|
464
|
+
}, J = () => {
|
|
465
|
+
A.value = {
|
|
466
466
|
total: 0,
|
|
467
467
|
page: 1,
|
|
468
468
|
limit: e.pageSize,
|
|
469
469
|
ascs: e.ascs,
|
|
470
470
|
descs: e.descs
|
|
471
471
|
};
|
|
472
|
-
},
|
|
473
|
-
|
|
474
|
-
},
|
|
472
|
+
}, _e = (e, t) => {
|
|
473
|
+
v.value.setScrollTop(e), v.value.setScrollLeft(t);
|
|
474
|
+
}, Y = (e, t) => {
|
|
475
475
|
var n;
|
|
476
|
-
(n =
|
|
477
|
-
},
|
|
476
|
+
(n = v.value) == null || n.toggleRowSelection(e, t);
|
|
477
|
+
}, ve = async (t) => {
|
|
478
478
|
if (!t) return [];
|
|
479
479
|
let n = [...t];
|
|
480
480
|
for (let t of n) for (let n of e.dicOptions) if (t[`$${n.prop}`] = t[n.prop], n.dicData) {
|
|
@@ -482,27 +482,27 @@ var B = {
|
|
|
482
482
|
t[n.prop] = ((r = n.dicData.find((e) => e.modelValue === t[n.prop])) == null ? void 0 : r.label) || t[n.prop];
|
|
483
483
|
} else t[n.prop] = await c(n.dicType, t[n.prop]);
|
|
484
484
|
return n;
|
|
485
|
-
},
|
|
486
|
-
|
|
487
|
-
},
|
|
485
|
+
}, X = () => {
|
|
486
|
+
D.value = !D.value;
|
|
487
|
+
}, Z = (t) => {
|
|
488
488
|
var n;
|
|
489
489
|
return !(t != null && t.disabled) && !((n = e.disabledRowKeys) != null && n.includes(t == null ? void 0 : t[e.rowKey]));
|
|
490
490
|
};
|
|
491
491
|
e.useVisibilityChange && ee({ onPageVisible: () => {
|
|
492
|
-
|
|
493
|
-
} }),
|
|
494
|
-
t === e.viewId &&
|
|
495
|
-
}),
|
|
492
|
+
q(!1);
|
|
493
|
+
} }), se("reloadTableView", (t) => {
|
|
494
|
+
t === e.viewId && G();
|
|
495
|
+
}), j(() => e.url, J), j(() => e.api, J), j(() => e.data, G), j(() => I.value, G, {
|
|
496
496
|
deep: !0,
|
|
497
497
|
immediate: e.immediate
|
|
498
498
|
});
|
|
499
|
-
let
|
|
499
|
+
let Q = (t) => {
|
|
500
500
|
let n;
|
|
501
|
-
if (
|
|
501
|
+
if (N(e.rowKey)) {
|
|
502
502
|
if (n = e.rowKey(t), n) return n;
|
|
503
503
|
} else if (e.rowKey && (n = t[e.rowKey], n)) return n;
|
|
504
|
-
return n = "__rowKey", t[n] || (t[n] =
|
|
505
|
-
}, $ =
|
|
504
|
+
return n = "__rowKey", t[n] || (t[n] = ce(!1)), t[n];
|
|
505
|
+
}, $ = _(() => {
|
|
506
506
|
let t = [];
|
|
507
507
|
if (d.default) {
|
|
508
508
|
var n;
|
|
@@ -515,7 +515,7 @@ var B = {
|
|
|
515
515
|
prop: o,
|
|
516
516
|
allowSort: a !== !1
|
|
517
517
|
};
|
|
518
|
-
i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), l.hide =
|
|
518
|
+
i && (l.headerSlot = i.header, l.defaultSlot = i.default, l.expandSlot = i.expand, l.iconSlot = i["filter-icon"]), l.hide = x.value.hideProps[o], l.filterable = x.value.filterableProps[o], l.sortable = x.value.sortableProps[o] === !0, l.fixed = s || x.value.fixedProps[o], t.push(l);
|
|
519
519
|
}
|
|
520
520
|
} else if (e.columns) for (let n = 0; n < e.columns.length; n++) {
|
|
521
521
|
let { prop: r, sortable: i, fixed: a, ...o } = e.columns[n], s = {
|
|
@@ -523,132 +523,128 @@ var B = {
|
|
|
523
523
|
prop: r,
|
|
524
524
|
allowSort: i !== !1
|
|
525
525
|
};
|
|
526
|
-
s.hide =
|
|
526
|
+
s.hide = x.value.hideProps[r], s.filterable = x.value.filterableProps[r], s.sortable = x.value.sortableProps[r] === !0, s.fixed = a || x.value.fixedProps[r], t.push(s);
|
|
527
527
|
}
|
|
528
528
|
return t;
|
|
529
529
|
});
|
|
530
|
-
|
|
531
|
-
|
|
530
|
+
ae(() => {
|
|
531
|
+
fe();
|
|
532
532
|
}), f({
|
|
533
|
-
records:
|
|
534
|
-
getPage:
|
|
535
|
-
refresh:
|
|
536
|
-
reload:
|
|
537
|
-
doLayout:
|
|
538
|
-
clearSelection:
|
|
539
|
-
toggleRowSelection:
|
|
540
|
-
toggleSettings:
|
|
541
|
-
currentRow:
|
|
542
|
-
getPageQuery:
|
|
533
|
+
records: C,
|
|
534
|
+
getPage: G,
|
|
535
|
+
refresh: q,
|
|
536
|
+
reload: J,
|
|
537
|
+
doLayout: K,
|
|
538
|
+
clearSelection: U,
|
|
539
|
+
toggleRowSelection: Y,
|
|
540
|
+
toggleSettings: X,
|
|
541
|
+
currentRow: T,
|
|
542
|
+
getPageQuery: W,
|
|
543
543
|
tableColumns: $
|
|
544
|
-
}),
|
|
545
|
-
records:
|
|
546
|
-
getPage:
|
|
547
|
-
refresh:
|
|
548
|
-
reload:
|
|
549
|
-
doLayout:
|
|
550
|
-
clearSelection:
|
|
551
|
-
toggleRowSelection:
|
|
552
|
-
toggleSettings:
|
|
544
|
+
}), E(o, {
|
|
545
|
+
records: C,
|
|
546
|
+
getPage: G,
|
|
547
|
+
refresh: q,
|
|
548
|
+
reload: J,
|
|
549
|
+
doLayout: K,
|
|
550
|
+
clearSelection: U,
|
|
551
|
+
toggleRowSelection: Y,
|
|
552
|
+
toggleSettings: X
|
|
553
553
|
});
|
|
554
|
-
let { autoBindProps: ye, listeners: be } = t(e, { predicate:
|
|
555
|
-
return () =>
|
|
554
|
+
let { autoBindProps: ye, listeners: be } = t(e, { predicate: ue });
|
|
555
|
+
return () => b("div", {
|
|
556
556
|
class: [
|
|
557
557
|
"pageable-table",
|
|
558
558
|
{ "auto-height": e.autoHeight },
|
|
559
559
|
u.class
|
|
560
560
|
],
|
|
561
561
|
style: u.style
|
|
562
|
-
}, [
|
|
563
|
-
d.toolbar && d.toolbar({ selectedRows:
|
|
564
|
-
|
|
562
|
+
}, [b("div", { class: "pageable-table-wrapper" }, [
|
|
563
|
+
d.toolbar && d.toolbar({ selectedRows: k.value }),
|
|
564
|
+
b(h, w(be.value, ye.value, {
|
|
565
565
|
ref: "table",
|
|
566
|
-
data:
|
|
566
|
+
data: C.value,
|
|
567
567
|
class: ["flex-item", { "header-bold": e.headerBold }],
|
|
568
568
|
border: e.border,
|
|
569
569
|
stripe: !0,
|
|
570
|
-
rowKey:
|
|
570
|
+
rowKey: Q,
|
|
571
571
|
size: "default",
|
|
572
572
|
height: e.autoHeight ? null : "auto",
|
|
573
|
-
onScroll:
|
|
574
|
-
onSortChange:
|
|
575
|
-
onRowDblclick:
|
|
576
|
-
onRowClick:
|
|
577
|
-
onCellClick:
|
|
578
|
-
onCurrentChange:
|
|
579
|
-
onSelectionChange:
|
|
573
|
+
onScroll: H,
|
|
574
|
+
onSortChange: me,
|
|
575
|
+
onRowDblclick: z,
|
|
576
|
+
onRowClick: B,
|
|
577
|
+
onCellClick: V,
|
|
578
|
+
onCurrentChange: he,
|
|
579
|
+
onSelectionChange: ge
|
|
580
580
|
}), {
|
|
581
581
|
default: () => {
|
|
582
582
|
let t = [];
|
|
583
|
-
if (e.multiple && e.selection && t.push(
|
|
583
|
+
if (e.multiple && e.selection && t.push(b(g, {
|
|
584
584
|
key: "selection",
|
|
585
585
|
type: "selection",
|
|
586
|
-
selectable:
|
|
586
|
+
selectable: Z,
|
|
587
587
|
width: e.selectionWidth,
|
|
588
588
|
align: "center"
|
|
589
|
-
}, null)), !e.multiple && e.selection && t.push(
|
|
589
|
+
}, null)), !e.multiple && e.selection && t.push(b(g, {
|
|
590
590
|
key: "single-selection",
|
|
591
591
|
type: "single-selection",
|
|
592
592
|
"class-name": "single-select-column",
|
|
593
593
|
width: e.selectionWidth,
|
|
594
594
|
align: "center"
|
|
595
595
|
}, {
|
|
596
|
-
header: () =>
|
|
597
|
-
modelValue: !!
|
|
596
|
+
header: () => b(m, {
|
|
597
|
+
modelValue: !!T.value,
|
|
598
598
|
label: !0
|
|
599
|
-
}, { default: () => [
|
|
600
|
-
default: ({ row:
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
modelValue: ((n = D.value) == null ? void 0 : n[r]) === t[r]
|
|
607
|
-
}, { default: () => [x("span", null, null)] });
|
|
608
|
-
}
|
|
609
|
-
})), e.index && t.push(x(g, {
|
|
599
|
+
}, { default: () => [b("span", null, null)] }),
|
|
600
|
+
default: ({ row: e }) => b(m, {
|
|
601
|
+
label: !0,
|
|
602
|
+
disabled: !Z(e),
|
|
603
|
+
modelValue: T.value && Q(T.value) === Q(e)
|
|
604
|
+
}, { default: () => [b("span", null, null)] })
|
|
605
|
+
})), e.index && t.push(b(g, {
|
|
610
606
|
key: "index",
|
|
611
607
|
type: "index",
|
|
612
608
|
label: "序号",
|
|
613
|
-
width:
|
|
609
|
+
width: L.value,
|
|
614
610
|
align: "center"
|
|
615
|
-
}, { default: ({ $index: e }) => (
|
|
611
|
+
}, { default: ({ $index: e }) => (A.value.page - 1) * A.value.limit + e + 1 || e + 1 })), $.value.length > 0) for (let e = 0; e < $.value.length; e++) {
|
|
616
612
|
let n = $.value[e];
|
|
617
613
|
if (n.hide) continue;
|
|
618
614
|
let { prop: r, headerSlot: i, defaultSlot: a, expandSlot: o, iconSlot: s, ...c } = n;
|
|
619
|
-
t.push(
|
|
615
|
+
t.push(b(le, w(c, { prop: r }), {
|
|
620
616
|
default: d[r] ? ({ row: e }) => d[r]({ row: e }) : a,
|
|
621
617
|
header: i,
|
|
622
618
|
expand: o,
|
|
623
619
|
"filter-icon": s
|
|
624
620
|
}));
|
|
625
621
|
}
|
|
626
|
-
else t.push(
|
|
622
|
+
else t.push(b(g, {
|
|
627
623
|
key: "default",
|
|
628
624
|
label: "点击表格行复制模板"
|
|
629
|
-
}, { default: ({ row: e }) =>
|
|
625
|
+
}, { default: ({ row: e }) => b("pre", {
|
|
630
626
|
class: "pointer",
|
|
631
|
-
onClick: () =>
|
|
627
|
+
onClick: () => pe(e)
|
|
632
628
|
}, [JSON.stringify(e, null, " ")]) }));
|
|
633
629
|
return t;
|
|
634
630
|
},
|
|
635
|
-
empty: () => d.empty ? d.empty() :
|
|
636
|
-
|
|
637
|
-
|
|
631
|
+
empty: () => d.empty ? d.empty() : b(re, null, [
|
|
632
|
+
S.value === R.loading && b("span", { class: "pageable-table-loading" }, [b("i", { class: "table-status-icon el-icon-loading" }, null), y("加载中...")]),
|
|
633
|
+
S.value === R.error && b(s, {
|
|
638
634
|
class: "pageable-table-error",
|
|
639
|
-
onClick:
|
|
640
|
-
}, { default: () => [
|
|
641
|
-
|
|
635
|
+
onClick: q
|
|
636
|
+
}, { default: () => [b("i", { class: "table-status-icon el-icon-error" }, null), y("加载失败,点击重试!")] }),
|
|
637
|
+
S.value !== R.loading && S.value !== R.error && b(te, null, null)
|
|
642
638
|
]),
|
|
643
639
|
append: d.append
|
|
644
640
|
}),
|
|
645
|
-
e.paging &&
|
|
646
|
-
"current-page":
|
|
647
|
-
"onUpdate:current-page": (e) =>
|
|
641
|
+
e.paging && b(p, {
|
|
642
|
+
"current-page": A.value.page,
|
|
643
|
+
"onUpdate:current-page": (e) => A.value.page = e,
|
|
648
644
|
"hide-on-single-page": e.hideOnSinglePage,
|
|
649
|
-
"page-size":
|
|
650
|
-
"onUpdate:page-size": (e) =>
|
|
651
|
-
total:
|
|
645
|
+
"page-size": A.value.limit,
|
|
646
|
+
"onUpdate:page-size": (e) => A.value.limit = e,
|
|
647
|
+
total: A.value.total,
|
|
652
648
|
"page-sizes": [
|
|
653
649
|
10,
|
|
654
650
|
25,
|
|
@@ -662,15 +658,15 @@ var B = {
|
|
|
662
658
|
background: !0,
|
|
663
659
|
layout: "total, sizes, prev, pager, next, jumper"
|
|
664
660
|
}, null),
|
|
665
|
-
|
|
666
|
-
settings:
|
|
667
|
-
"onUpdate:settings": (e) =>
|
|
668
|
-
modelValue:
|
|
669
|
-
"onUpdate:modelValue": (e) =>
|
|
661
|
+
b(P, {
|
|
662
|
+
settings: x.value,
|
|
663
|
+
"onUpdate:settings": (e) => x.value = e,
|
|
664
|
+
modelValue: D.value,
|
|
665
|
+
"onUpdate:modelValue": (e) => D.value = e,
|
|
670
666
|
columns: $.value
|
|
671
667
|
}, null)
|
|
672
|
-
]),
|
|
668
|
+
]), b(i, { onNotify: K }, null)]);
|
|
673
669
|
}
|
|
674
670
|
};
|
|
675
671
|
//#endregion
|
|
676
|
-
export {
|
|
672
|
+
export { z as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { allProps as e, predicate as t } from "../props/cascader.mjs";
|
|
2
|
-
import { n, o as r } from "./
|
|
2
|
+
import { n, o as r } from "./mQG01w6Y.mjs";
|
|
3
3
|
import { useDictionary as i } from "../hook/useDictionary.mjs";
|
|
4
4
|
import { ElCascader as a } from "element-plus/es";
|
|
5
5
|
import "element-plus/es/components/base/style/css";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { allProps as e, predicate as t } from "../props/date.mjs";
|
|
2
|
-
import { n, o as r } from "./
|
|
2
|
+
import { n, o as r } from "./mQG01w6Y.mjs";
|
|
3
3
|
import { ElDatePicker as i } from "element-plus/es";
|
|
4
4
|
import "element-plus/es/components/base/style/css";
|
|
5
5
|
import { computed as a, createVNode as o, mergeProps as s } from "vue";
|