@aplus-frontend/ui 6.12.0 → 6.13.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/es/src/ap-descriptions/interface.d.ts +1 -1
- package/es/src/ap-form/ap-form.vue2.mjs +118 -108
- package/es/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/es/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/es/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
- package/es/src/ap-form/search-form/hooks/use-collapse-input-count.mjs +23 -18
- package/es/src/ap-form/search-form/hooks/use-sorter.mjs +31 -30
- package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/es/src/ap-form/search-form/index.vue.mjs +35 -35
- package/es/src/ap-grid/index.vue.mjs +221 -225
- package/es/src/ap-modal/interface.d.ts +8 -0
- package/es/src/ap-modal/utils/createModalStream.mjs +69 -66
- package/es/src/ap-table/ap-table.vue2.mjs +107 -111
- package/es/src/ap-table/constants.d.ts +5 -5
- package/es/src/ap-table/context.d.ts +1 -0
- package/es/src/ap-table/context.mjs +6 -5
- package/es/src/ap-table/utils.d.ts +5 -3247
- package/es/src/ap-table/utils.mjs +107 -121
- package/es/src/business/ap-view/ap-view.vue2.mjs +76 -74
- package/es/src/business/ap-view/interface.d.ts +1 -0
- package/es/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/es/src/business/batch-input-group/index.vue.mjs +56 -52
- package/es/src/business/batch-input-group/interface.d.ts +5 -0
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +36 -32
- package/es/src/business/batch-input-group/utils.d.ts +8 -0
- package/es/src/business/batch-input-group/utils.mjs +10 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ap-descriptions/interface.d.ts +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/index.vue.d.ts +2 -2
- package/lib/src/ap-form/items/text/password.vue.d.ts +2 -2
- package/lib/src/ap-form/items/tree-select/index.vue.d.ts +2 -2
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.d.ts +8 -1
- package/lib/src/ap-form/search-form/hooks/use-collapse-input-count.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-sorter.js +1 -1
- package/lib/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-modal/interface.d.ts +8 -0
- package/lib/src/ap-modal/utils/createModalStream.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +5 -5
- package/lib/src/ap-table/context.d.ts +1 -0
- package/lib/src/ap-table/context.js +1 -1
- package/lib/src/ap-table/utils.d.ts +5 -3247
- package/lib/src/ap-table/utils.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/interface.d.ts +1 -0
- package/lib/src/business/batch-input-group/index.vue.d.ts +2 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/interface.d.ts +5 -0
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +3 -2
- package/lib/src/business/batch-input-group/utils.d.ts +8 -0
- package/lib/src/business/batch-input-group/utils.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/theme/ap-grid/index.css +3 -0
- package/theme/ap-grid/index.less +3 -4
- package/theme/index.css +3 -0
- package/es/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
- package/es/src/ap-table/components/dynamic-component/index.vue.mjs +0 -4
- package/es/src/ap-table/components/dynamic-component/index.vue2.mjs +0 -15
- package/lib/src/ap-table/components/dynamic-component/index.vue.d.ts +0 -4
- package/lib/src/ap-table/components/dynamic-component/index.vue.js +0 -1
- package/lib/src/ap-table/components/dynamic-component/index.vue2.js +0 -1
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { apTableRenderItemMap as
|
|
4
|
-
import { isType as
|
|
1
|
+
import { isVNode as g, createVNode as u, mergeProps as f, cloneVNode as h, Fragment as j } from "vue";
|
|
2
|
+
import { isObject as d, isArray as c, isUndefined as E, isFunction as b, omit as O, isBoolean as N, isString as F, isEqual as S, sortBy as m, isPlainObject as y, every as v, isEmpty as C } from "lodash-unified";
|
|
3
|
+
import { apTableRenderItemMap as I, apTableFormItemMap as P } from "./constants.mjs";
|
|
4
|
+
import { isType as w } from "@fruits-chain/utils";
|
|
5
5
|
import "../ap-form/index.mjs";
|
|
6
|
-
import { Tooltip as
|
|
7
|
-
import { QuestionCircleOutlined as
|
|
8
|
-
import "
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
function R(t) {
|
|
12
|
-
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !E(t);
|
|
6
|
+
import { Tooltip as x } from "@aplus-frontend/antdv";
|
|
7
|
+
import { QuestionCircleOutlined as A } from "@ant-design/icons-vue";
|
|
8
|
+
import V from "../ap-form/item/index.vue.mjs";
|
|
9
|
+
function _(t) {
|
|
10
|
+
return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !g(t);
|
|
13
11
|
}
|
|
14
12
|
const q = (t, e, n) => {
|
|
15
13
|
let o = {};
|
|
16
|
-
return
|
|
17
|
-
|
|
14
|
+
return d(t) ? Object.keys(t).forEach((r) => {
|
|
15
|
+
d(t[r]) ? o[r] = q(t[r], e[r], n) : o[r] = n(t[r], e);
|
|
18
16
|
}) : o = n(t, e), o;
|
|
19
|
-
},
|
|
17
|
+
}, X = (t, e) => {
|
|
20
18
|
switch (t) {
|
|
21
19
|
case "dayjs":
|
|
22
20
|
return e.valueOf();
|
|
@@ -28,7 +26,7 @@ const q = (t, e, n) => {
|
|
|
28
26
|
}
|
|
29
27
|
case "multiple":
|
|
30
28
|
case "multipleNumber":
|
|
31
|
-
return
|
|
29
|
+
return c(e) ? e : [e];
|
|
32
30
|
case "boolean":
|
|
33
31
|
return e;
|
|
34
32
|
case "object":
|
|
@@ -37,117 +35,105 @@ const q = (t, e, n) => {
|
|
|
37
35
|
return e;
|
|
38
36
|
}
|
|
39
37
|
};
|
|
40
|
-
function
|
|
41
|
-
return
|
|
38
|
+
function Y(t) {
|
|
39
|
+
return c(t) ? t.join(".") : t;
|
|
42
40
|
}
|
|
43
41
|
function W(t) {
|
|
44
42
|
const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
|
|
45
43
|
return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
|
|
46
44
|
}
|
|
47
|
-
const
|
|
48
|
-
const e = [], n =
|
|
49
|
-
return n.forEach((o,
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
if (typeof
|
|
45
|
+
const B = (t) => W(t) === "map" ? t : new Map(Object.entries(t || {})), T = (t) => {
|
|
46
|
+
const e = [], n = B(t);
|
|
47
|
+
return n.forEach((o, r) => {
|
|
48
|
+
const i = n.get(r) || n.get(`${r}`);
|
|
49
|
+
if (i) {
|
|
50
|
+
if (typeof i == "object" && (i != null && i.text)) {
|
|
53
51
|
e.push({
|
|
54
|
-
text:
|
|
55
|
-
value:
|
|
56
|
-
label:
|
|
57
|
-
disabled:
|
|
52
|
+
text: i == null ? void 0 : i.text,
|
|
53
|
+
value: r,
|
|
54
|
+
label: i == null ? void 0 : i.text,
|
|
55
|
+
disabled: i.disabled
|
|
58
56
|
});
|
|
59
57
|
return;
|
|
60
58
|
}
|
|
61
59
|
e.push({
|
|
62
|
-
text:
|
|
63
|
-
label:
|
|
64
|
-
value:
|
|
60
|
+
text: i,
|
|
61
|
+
label: i,
|
|
62
|
+
value: r
|
|
65
63
|
});
|
|
66
64
|
}
|
|
67
65
|
}), e;
|
|
68
|
-
},
|
|
69
|
-
function
|
|
70
|
-
return !t || !
|
|
66
|
+
}, Z = (t) => E(t) || t < 0 ? 0 : t;
|
|
67
|
+
function R(t, e) {
|
|
68
|
+
return !t || !b(t) ? t : t(e);
|
|
71
69
|
}
|
|
72
|
-
function
|
|
70
|
+
function k(t) {
|
|
73
71
|
let e = t.valueType || "text";
|
|
74
72
|
return t.valueEnum && (e = "status"), e;
|
|
75
73
|
}
|
|
76
|
-
function
|
|
74
|
+
function H(t, e, n, o) {
|
|
77
75
|
var s;
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
76
|
+
const r = I[t];
|
|
77
|
+
if (r)
|
|
78
|
+
return u(r, f(e, {
|
|
81
79
|
mode: "read"
|
|
82
80
|
}), null);
|
|
83
|
-
const
|
|
84
|
-
return ((s =
|
|
81
|
+
const i = o == null ? void 0 : o[t];
|
|
82
|
+
return ((s = i == null ? void 0 : i.render) == null ? void 0 : s.call(i, e.value, n, e)) || e.value;
|
|
85
83
|
}
|
|
86
|
-
function
|
|
84
|
+
function M(t, e) {
|
|
87
85
|
if (t.customRenderFormItem)
|
|
88
|
-
return {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
...u.props || {},
|
|
96
|
-
// 需要额外设置的属性(用于显示和隐藏节点)
|
|
97
|
-
hidden: s.hidden,
|
|
98
|
-
class: s.class
|
|
99
|
-
});
|
|
100
|
-
}
|
|
86
|
+
return () => {
|
|
87
|
+
const r = t.customRenderFormItem(t);
|
|
88
|
+
return h(r, {
|
|
89
|
+
...t.fieldProps,
|
|
90
|
+
span: t.span,
|
|
91
|
+
...r.props || {}
|
|
92
|
+
});
|
|
101
93
|
};
|
|
102
|
-
const n =
|
|
94
|
+
const n = P[t.valueType];
|
|
103
95
|
if (n)
|
|
104
|
-
return {
|
|
105
|
-
|
|
106
|
-
};
|
|
96
|
+
return () => u(n, f(t.fieldProps, {
|
|
97
|
+
span: t.span
|
|
98
|
+
}), null);
|
|
107
99
|
const o = e == null ? void 0 : e[t.valueType];
|
|
108
|
-
|
|
109
|
-
var
|
|
110
|
-
const
|
|
111
|
-
return
|
|
112
|
-
hidden: r.hidden,
|
|
113
|
-
class: r.class,
|
|
100
|
+
return () => {
|
|
101
|
+
var i;
|
|
102
|
+
const r = (i = o == null ? void 0 : o.renderFormItem) == null ? void 0 : i.call(o, t.fieldProps.field);
|
|
103
|
+
return r ? u(V, f(t.fieldProps, {
|
|
114
104
|
span: t.span
|
|
115
|
-
}),
|
|
116
|
-
default: () => [
|
|
105
|
+
}), _(r) ? r : {
|
|
106
|
+
default: () => [r]
|
|
117
107
|
}) : null;
|
|
118
|
-
}
|
|
119
|
-
return {
|
|
120
|
-
Comp: y,
|
|
121
|
-
render: i
|
|
122
108
|
};
|
|
123
109
|
}
|
|
124
|
-
function
|
|
125
|
-
const n =
|
|
110
|
+
function tt(t, e) {
|
|
111
|
+
const n = R(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, r = t.valueType === "switch", i = t.valueType === "index", s = r ? {
|
|
126
112
|
checked: e.value
|
|
127
113
|
} : {
|
|
128
|
-
value:
|
|
114
|
+
value: i ? e.index + 1 : e.value
|
|
129
115
|
};
|
|
130
116
|
return t.valueEnum && (o.valueEnum = t.valueEnum), {
|
|
131
|
-
...
|
|
117
|
+
...O(o, ["request"]),
|
|
132
118
|
...s
|
|
133
119
|
};
|
|
134
120
|
}
|
|
135
|
-
function
|
|
121
|
+
function et(t) {
|
|
136
122
|
const e = {
|
|
137
123
|
...t
|
|
138
124
|
};
|
|
139
|
-
return
|
|
125
|
+
return N(t.filters) && t.filters && t.valueEnum && (e.filters = T(t.valueEnum)), e;
|
|
140
126
|
}
|
|
141
|
-
function
|
|
127
|
+
function nt(t, e) {
|
|
142
128
|
var o;
|
|
143
129
|
const n = e || {};
|
|
144
130
|
return t.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
|
|
145
131
|
...n.field,
|
|
146
|
-
options:
|
|
132
|
+
options: T(t.valueEnum)
|
|
147
133
|
}), n;
|
|
148
134
|
}
|
|
149
|
-
function
|
|
150
|
-
if (!
|
|
135
|
+
function rt(t) {
|
|
136
|
+
if (!w("Object")(t))
|
|
151
137
|
return t;
|
|
152
138
|
try {
|
|
153
139
|
return JSON.stringify(t);
|
|
@@ -155,76 +141,76 @@ function st(t) {
|
|
|
155
141
|
return t;
|
|
156
142
|
}
|
|
157
143
|
}
|
|
158
|
-
function
|
|
159
|
-
const
|
|
144
|
+
function ot(t, e, n, o) {
|
|
145
|
+
const r = n == null ? void 0 : n({
|
|
160
146
|
title: t.title,
|
|
161
147
|
column: t
|
|
162
|
-
}),
|
|
163
|
-
if (
|
|
164
|
-
return
|
|
165
|
-
const
|
|
148
|
+
}), i = (r == null ? void 0 : r.filter((l) => l.type !== Symbol.for("v-cmt"))) || [];
|
|
149
|
+
if (r && i.length > 0)
|
|
150
|
+
return r;
|
|
151
|
+
const a = F(t.title) ? u("span", {
|
|
166
152
|
class: e,
|
|
167
153
|
title: t.title
|
|
168
|
-
}, [t.title]) : t.title,
|
|
169
|
-
return
|
|
154
|
+
}, [t.title]) : t.title, p = t.tooltip ? b(t.tooltip) ? t.tooltip(t) : u(j, null, [t.tooltip]) : null;
|
|
155
|
+
return p ? u("span", {
|
|
170
156
|
style: {
|
|
171
157
|
display: "inline-flex",
|
|
172
158
|
alignItems: "center",
|
|
173
159
|
maxWidth: "100%"
|
|
174
160
|
}
|
|
175
|
-
}, [
|
|
176
|
-
title:
|
|
161
|
+
}, [a, u(x, {
|
|
162
|
+
title: p,
|
|
177
163
|
placement: "bottom",
|
|
178
|
-
getPopupContainer: (
|
|
164
|
+
getPopupContainer: (l) => l.closest(".ant-table") || l.closest(".ant-modal") || l.closest(".vxe-table") || document.body
|
|
179
165
|
}, {
|
|
180
|
-
default: () => [
|
|
166
|
+
default: () => [u(A, {
|
|
181
167
|
style: {
|
|
182
168
|
paddingInline: "4px",
|
|
183
169
|
color: o,
|
|
184
170
|
verticalAlign: "middle"
|
|
185
171
|
}
|
|
186
172
|
}, null)]
|
|
187
|
-
})]) :
|
|
173
|
+
})]) : a;
|
|
188
174
|
}
|
|
189
|
-
function
|
|
175
|
+
function it(t, e) {
|
|
190
176
|
const n = [];
|
|
191
|
-
function o(
|
|
192
|
-
var
|
|
193
|
-
for (const s of
|
|
194
|
-
(
|
|
177
|
+
function o(r) {
|
|
178
|
+
var i;
|
|
179
|
+
for (const s of r)
|
|
180
|
+
(i = s.children) != null && i.length ? o(s.children) : n.push(e(s));
|
|
195
181
|
}
|
|
196
182
|
return o(t), n;
|
|
197
183
|
}
|
|
198
|
-
function
|
|
199
|
-
if (
|
|
200
|
-
return S(
|
|
201
|
-
if (
|
|
202
|
-
const n = (o) =>
|
|
184
|
+
function st(t, e) {
|
|
185
|
+
if (c(t) && c(e))
|
|
186
|
+
return S(m(t), m(e));
|
|
187
|
+
if (y(t) && y(e)) {
|
|
188
|
+
const n = (o) => v(o, (r) => r == null) || C(o);
|
|
203
189
|
if (n(t) && n(e))
|
|
204
190
|
return !0;
|
|
205
191
|
}
|
|
206
192
|
}
|
|
207
|
-
function
|
|
193
|
+
function ut(t) {
|
|
208
194
|
if (t !== !1)
|
|
209
195
|
return t;
|
|
210
196
|
}
|
|
211
197
|
export {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
198
|
+
et as apColumnToColumn,
|
|
199
|
+
Y as dataIndexToStr,
|
|
200
|
+
ut as falseToUndefined,
|
|
215
201
|
q as formatParamsValueType,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
202
|
+
Z as getColumnOrder,
|
|
203
|
+
R as getFieldProps,
|
|
204
|
+
M as getSearchFormItemRenderNode,
|
|
205
|
+
H as getTableCellRenderNode,
|
|
206
|
+
tt as getTableRenderProps,
|
|
207
|
+
k as getTableRenderType,
|
|
208
|
+
ot as getTableTitle,
|
|
209
|
+
st as isEqualCustom,
|
|
210
|
+
B as objectToMap,
|
|
211
|
+
rt as objectToString,
|
|
212
|
+
X as parseFieldValue,
|
|
213
|
+
it as recursionApColumns,
|
|
214
|
+
nt as updateFormProps,
|
|
215
|
+
T as valueEnumToArray
|
|
230
216
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as Z, computed as E, ref as K, createVNode as N, watch as U, createBlock as R, openBlock as C, unref as b, mergeProps as S, withCtx as O, createElementVNode as D, normalizeClass as ee } from "vue";
|
|
2
2
|
import "../../config-provider/index.mjs";
|
|
3
|
-
import
|
|
4
|
-
import { ApBatchActionGroup as
|
|
3
|
+
import te from "./icons/line-down.vue.mjs";
|
|
4
|
+
import { ApBatchActionGroup as ie } from "../ap-batch-action-group/index.mjs";
|
|
5
5
|
import "./components/main-button-content.vue.mjs";
|
|
6
6
|
import "./components/menu-list-content.vue.mjs";
|
|
7
|
-
import { useViewProvide as
|
|
8
|
-
import { useInjectApTable as
|
|
7
|
+
import { useViewProvide as le } from "./hooks/use-view-provide.mjs";
|
|
8
|
+
import { useInjectApTable as se } from "../../ap-table/context.mjs";
|
|
9
9
|
import { SYSTEM_VIEW_KEY as V } from "./utils/enum.mjs";
|
|
10
|
-
import { isValid as
|
|
10
|
+
import { isValid as re } from "@aplus-frontend/utils";
|
|
11
11
|
import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
|
|
12
12
|
import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import { useLocale as oe } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
const Ie = /* @__PURE__ */
|
|
14
|
+
import fe from "./components/main-button-content.vue2.mjs";
|
|
15
|
+
import ae from "./components/menu-list-content.vue2.mjs";
|
|
16
|
+
const Ie = /* @__PURE__ */ Z({
|
|
17
17
|
name: "ApView",
|
|
18
18
|
__name: "ap-view",
|
|
19
19
|
props: {
|
|
@@ -39,7 +39,7 @@ const Ie = /* @__PURE__ */ X({
|
|
|
39
39
|
setup(k, {
|
|
40
40
|
expose: A
|
|
41
41
|
}) {
|
|
42
|
-
const
|
|
42
|
+
const o = k, L = me("viewCacheOption"), {
|
|
43
43
|
b: g
|
|
44
44
|
} = ne("ap-view"), {
|
|
45
45
|
t: P
|
|
@@ -51,19 +51,20 @@ const Ie = /* @__PURE__ */ X({
|
|
|
51
51
|
setSearchFormValues: j,
|
|
52
52
|
submit: G,
|
|
53
53
|
reset: $,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
refresh: Y,
|
|
55
|
+
getSearchFormSorterItems: z,
|
|
56
|
+
setSearchFormSorterItems: M,
|
|
57
|
+
resetSearchFormSorterItems: W
|
|
58
|
+
} = se(), q = K(!1), F = K(!1), d = K("");
|
|
58
59
|
let c = !1, _ = !1;
|
|
59
|
-
const
|
|
60
|
+
const H = {
|
|
60
61
|
dropdownType: "dropdown",
|
|
61
|
-
content: N(
|
|
62
|
-
maxViewNum:
|
|
62
|
+
content: N(fe, {
|
|
63
|
+
maxViewNum: o.maxViewNum
|
|
63
64
|
}, null)
|
|
64
|
-
},
|
|
65
|
+
}, r = K([v.value]), J = E(() => r.value.map((t) => ({
|
|
65
66
|
id: t.viewKey,
|
|
66
|
-
content: N(
|
|
67
|
+
content: N(ae, {
|
|
67
68
|
view: t
|
|
68
69
|
}, null)
|
|
69
70
|
}))), e = {
|
|
@@ -71,29 +72,30 @@ const Ie = /* @__PURE__ */ X({
|
|
|
71
72
|
setSearchFormValues: j,
|
|
72
73
|
submit: G,
|
|
73
74
|
reset: $,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
refresh: Y,
|
|
76
|
+
getSearchFormSorterItems: z,
|
|
77
|
+
setSearchFormSorterItems: M,
|
|
78
|
+
resetSearchFormSorterItems: W,
|
|
79
|
+
...o.saveDataSource
|
|
78
80
|
}, l = {
|
|
79
81
|
...L.value,
|
|
80
|
-
...
|
|
81
|
-
},
|
|
82
|
-
if (
|
|
82
|
+
...o.viewCacheOption
|
|
83
|
+
}, h = () => {
|
|
84
|
+
if (o.isDefaultSystemView)
|
|
83
85
|
return V;
|
|
84
|
-
if ((
|
|
86
|
+
if ((o.isFirstDefaultSystemView || _) && c)
|
|
85
87
|
return V;
|
|
86
|
-
const t =
|
|
88
|
+
const t = r.value.find((i) => i.isDefault);
|
|
87
89
|
return (t == null ? void 0 : t.viewKey) ?? V;
|
|
88
90
|
}, p = (t) => {
|
|
89
91
|
d.value = t;
|
|
90
|
-
const i =
|
|
92
|
+
const i = r.value.find((s) => s.viewKey === d.value);
|
|
91
93
|
i && setTimeout(() => {
|
|
92
|
-
var s,
|
|
93
|
-
i.viewKey === V ? c ?
|
|
94
|
-
...Object.fromEntries(Object.keys(((
|
|
94
|
+
var s, m, n, a, f, u, y, I, x, B;
|
|
95
|
+
i.viewKey === V ? c ? o.manual || (s = e == null ? void 0 : e.refresh) == null || s.call(e) : ((m = e == null ? void 0 : e.resetSearchFormSorterItems) == null || m.call(e), o.manual || (n = e == null ? void 0 : e.reset) == null || n.call(e)) : ((u = e == null ? void 0 : e.setSearchFormValues) == null || u.call(e, {
|
|
96
|
+
...Object.fromEntries(Object.keys(((a = e == null ? void 0 : e.getSearchFormValues) == null ? void 0 : a.call(e)) ?? {}).map((X) => [X, void 0])) ?? {},
|
|
95
97
|
...((f = i.viewConfig) == null ? void 0 : f.searchForm) ?? {}
|
|
96
|
-
}), (
|
|
98
|
+
}), (I = e == null ? void 0 : e.setSearchFormSorterItems) == null || I.call(e, ((y = i.viewConfig) == null ? void 0 : y.sorterItems) ?? []), c ? o.manual || (x = e == null ? void 0 : e.refresh) == null || x.call(e) : (B = e == null ? void 0 : e.submit) == null || B.call(e)), c = !1;
|
|
97
99
|
});
|
|
98
100
|
}, w = {
|
|
99
101
|
getViewList: async (t) => {
|
|
@@ -101,12 +103,12 @@ const Ie = /* @__PURE__ */ X({
|
|
|
101
103
|
try {
|
|
102
104
|
const {
|
|
103
105
|
tableKey: s
|
|
104
|
-
} = t,
|
|
106
|
+
} = t, m = await ((i = l == null ? void 0 : l.getViewList) == null ? void 0 : i.call(l, {
|
|
105
107
|
tableKey: s
|
|
106
108
|
}));
|
|
107
|
-
return
|
|
109
|
+
return r.value = [v.value, ...m ?? []], p(h()), r.value;
|
|
108
110
|
} catch {
|
|
109
|
-
return
|
|
111
|
+
return r.value = [v.value], p(V), r.value;
|
|
110
112
|
}
|
|
111
113
|
},
|
|
112
114
|
addView: async (t) => {
|
|
@@ -114,72 +116,72 @@ const Ie = /* @__PURE__ */ X({
|
|
|
114
116
|
const {
|
|
115
117
|
tableKey: i,
|
|
116
118
|
viewKey: s,
|
|
117
|
-
viewName:
|
|
118
|
-
isDefault:
|
|
119
|
-
viewConfig:
|
|
119
|
+
viewName: m,
|
|
120
|
+
isDefault: n,
|
|
121
|
+
viewConfig: a
|
|
120
122
|
} = t;
|
|
121
123
|
await ((f = l == null ? void 0 : l.addView) == null ? void 0 : f.call(l, {
|
|
122
124
|
tableKey: i,
|
|
123
125
|
viewKey: s,
|
|
124
|
-
viewName:
|
|
125
|
-
isDefault:
|
|
126
|
-
viewConfig:
|
|
127
|
-
})),
|
|
128
|
-
...
|
|
126
|
+
viewName: m,
|
|
127
|
+
isDefault: n,
|
|
128
|
+
viewConfig: a
|
|
129
|
+
})), n && (r.value = r.value.map((u) => ({
|
|
130
|
+
...u,
|
|
129
131
|
isDefault: !1
|
|
130
|
-
}))),
|
|
132
|
+
}))), r.value = [...r.value, {
|
|
131
133
|
viewKey: s,
|
|
132
|
-
viewName:
|
|
133
|
-
isDefault:
|
|
134
|
-
viewConfig:
|
|
134
|
+
viewName: m,
|
|
135
|
+
isDefault: n,
|
|
136
|
+
viewConfig: a
|
|
135
137
|
}], p(s);
|
|
136
138
|
},
|
|
137
139
|
changeView: async (t) => {
|
|
138
|
-
var
|
|
140
|
+
var u;
|
|
139
141
|
const {
|
|
140
142
|
tableKey: i,
|
|
141
143
|
viewKey: s,
|
|
142
|
-
viewName:
|
|
143
|
-
isDefault:
|
|
144
|
-
viewConfig:
|
|
144
|
+
viewName: m,
|
|
145
|
+
isDefault: n,
|
|
146
|
+
viewConfig: a
|
|
145
147
|
} = t;
|
|
146
|
-
await ((
|
|
148
|
+
await ((u = l == null ? void 0 : l.changeView) == null ? void 0 : u.call(l, {
|
|
147
149
|
tableKey: i,
|
|
148
150
|
viewKey: s,
|
|
149
|
-
viewName:
|
|
150
|
-
isDefault:
|
|
151
|
-
viewConfig:
|
|
152
|
-
})),
|
|
151
|
+
viewName: m,
|
|
152
|
+
isDefault: n,
|
|
153
|
+
viewConfig: a
|
|
154
|
+
})), n && (r.value = r.value.map((y) => ({
|
|
153
155
|
...y,
|
|
154
156
|
isDefault: !1
|
|
155
157
|
})));
|
|
156
|
-
const f =
|
|
157
|
-
f && (f.viewName =
|
|
158
|
+
const f = r.value.find((y) => y.viewKey === s);
|
|
159
|
+
f && (f.viewName = m, f.isDefault = n, f.viewConfig = a), p(s);
|
|
158
160
|
},
|
|
159
161
|
removeView: async (t) => {
|
|
160
|
-
var
|
|
162
|
+
var m;
|
|
161
163
|
const {
|
|
162
164
|
tableKey: i,
|
|
163
165
|
viewKey: s
|
|
164
166
|
} = t;
|
|
165
|
-
await ((
|
|
167
|
+
await ((m = l == null ? void 0 : l.removeView) == null ? void 0 : m.call(l, {
|
|
166
168
|
tableKey: i,
|
|
167
169
|
viewKey: s
|
|
168
|
-
})),
|
|
170
|
+
})), r.value = r.value.filter((n) => n.viewKey !== s), s === d.value && p(h());
|
|
169
171
|
}
|
|
170
|
-
},
|
|
171
|
-
tableKey:
|
|
172
|
+
}, Q = {
|
|
173
|
+
tableKey: o.tableKey,
|
|
172
174
|
currentViewKey: d,
|
|
173
175
|
changeCurrentViewKey: p,
|
|
174
|
-
popoverOpen:
|
|
176
|
+
popoverOpen: q,
|
|
175
177
|
menuOpen: F,
|
|
176
|
-
viewList:
|
|
178
|
+
viewList: r,
|
|
177
179
|
viewListCRUD: w,
|
|
178
180
|
saveDataSource: e
|
|
179
181
|
};
|
|
180
|
-
return
|
|
182
|
+
return le(Q), U(() => o.tableKey, (t) => {
|
|
181
183
|
var i;
|
|
182
|
-
|
|
184
|
+
re(t) && (c = !0, (i = w == null ? void 0 : w.getViewList) == null || i.call(w, {
|
|
183
185
|
tableKey: t
|
|
184
186
|
}));
|
|
185
187
|
}, {
|
|
@@ -188,21 +190,21 @@ const Ie = /* @__PURE__ */ X({
|
|
|
188
190
|
setFirstDefaultSystemView: (t) => {
|
|
189
191
|
_ = t;
|
|
190
192
|
}
|
|
191
|
-
}), (t, i) => (
|
|
193
|
+
}), (t, i) => (C(), R(b(ie), S({
|
|
192
194
|
...t.$attrs
|
|
193
195
|
}, {
|
|
194
196
|
open: F.value,
|
|
195
197
|
"onUpdate:open": i[0] || (i[0] = (s) => F.value = s),
|
|
196
198
|
class: [b(g)()],
|
|
197
|
-
"button-props":
|
|
198
|
-
"menu-list":
|
|
199
|
+
"button-props": H,
|
|
200
|
+
"menu-list": J.value,
|
|
199
201
|
"overlay-class-name": [b(g)("overlay")],
|
|
200
202
|
trigger: "click",
|
|
201
203
|
placement: "bottom"
|
|
202
204
|
}), {
|
|
203
|
-
icon:
|
|
204
|
-
class:
|
|
205
|
-
}, [N(
|
|
205
|
+
icon: O(() => [D("div", {
|
|
206
|
+
class: ee([b(g)("icon")])
|
|
207
|
+
}, [N(te)], 2)]),
|
|
206
208
|
_: 1
|
|
207
209
|
}, 16, ["open", "class", "menu-list", "overlay-class-name"]));
|
|
208
210
|
}
|
|
@@ -5,6 +5,7 @@ export interface SaveDataSource {
|
|
|
5
5
|
setSearchFormValues?: (values: Partial<Recordable>) => void;
|
|
6
6
|
submit?: () => void;
|
|
7
7
|
reset?: () => void;
|
|
8
|
+
refresh?: () => void;
|
|
8
9
|
getSearchFormSorterItems?: () => ApFormSearchFormPopoverSorterItem[];
|
|
9
10
|
setSearchFormSorterItems?: (sortedItems: ApFormSearchFormPopoverSorterItem[]) => void;
|
|
10
11
|
resetSearchFormSorterItems?: () => void;
|
|
@@ -19,6 +19,7 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
19
19
|
emptyText: string;
|
|
20
20
|
hasAll: boolean;
|
|
21
21
|
popoverPlacement: "left" | "right" | number;
|
|
22
|
+
maxNum: number;
|
|
22
23
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
23
24
|
containerRef: HTMLDivElement;
|
|
24
25
|
inputRef: ({
|
|
@@ -52,9 +53,9 @@ declare const _default: DefineComponent<BatchInputGroupProps, {}, {}, {}, {}, Co
|
|
|
52
53
|
readonly suffix?: any;
|
|
53
54
|
readonly focused?: boolean | undefined;
|
|
54
55
|
readonly handleReset?: MouseEventHandler | undefined;
|
|
55
|
-
readonly placeholder?: string | number | undefined;
|
|
56
56
|
readonly defaultValue?: string | number | undefined;
|
|
57
57
|
readonly id?: string | undefined;
|
|
58
|
+
readonly placeholder?: string | number | undefined;
|
|
58
59
|
readonly autocomplete?: string | undefined;
|
|
59
60
|
readonly maxlength?: number | undefined;
|
|
60
61
|
readonly showCount?: boolean | ShowCountProps | undefined;
|