@aplus-frontend/ui 0.6.0-beta.7 → 0.6.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/src/ap-form/interface.d.ts +4 -0
- package/es/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +40 -36
- package/es/src/ap-form/search-form/components/popover-sorter/index.vue2.mjs +89 -75
- package/es/src/ap-form/search-form/index.vue.d.ts +6 -2
- package/es/src/ap-form/search-form/index.vue.mjs +76 -75
- package/es/src/ap-grid/constants.d.ts +3 -3
- package/es/src/ap-grid/constants.mjs +9 -9
- package/es/src/ap-grid/index.vue.mjs +44 -46
- package/es/src/ap-grid/interface.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +1 -1
- package/es/src/ap-tag/ap-tag-group.vue.mjs +32 -28
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +89 -70
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +18 -17
- package/es/src/business/ap-input-radio/ApInputRadio.vue2.mjs +27 -25
- package/es/src/business/ap-label/constans.mjs +1 -1
- package/es/src/business/ap-view/ap-view.vue2.mjs +121 -118
- package/es/src/business/ap-view/components/main-button-content.vue2.mjs +55 -51
- package/es/src/business/hooks/usePageListApGrid.mjs +1 -1
- package/lib/src/ap-form/interface.d.ts +4 -0
- package/lib/src/ap-form/search-form/components/popover-filter.vue.d.ts +131 -2
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/index.vue2.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/constants.d.ts +3 -3
- package/lib/src/ap-grid/constants.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-input-radio/ApInputRadio.vue2.js +1 -1
- package/lib/src/business/ap-label/constans.js +1 -1
- package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue2.js +1 -1
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/package.json +1 -1
- package/theme/ap-action/item-dropdown.css +1 -1
- package/theme/ap-action/item.css +2 -2
- package/theme/ap-appendix/ap-appendix.css +3 -3
- package/theme/ap-appendix/ap-appendix.less +2 -2
- package/theme/ap-attachment/ap-attachment.css +3 -2
- package/theme/ap-attachment/ap-attachment.less +2 -2
- package/theme/ap-batch-action/ap-batch-action.css +1 -1
- package/theme/ap-button/ap-button.css +1 -1
- package/theme/ap-card/ap-card.css +1 -1
- package/theme/ap-descriptions/ap-descriptions.css +1 -1
- package/theme/ap-download/ap-download.css +1 -1
- package/theme/ap-expand-alert/ap-expand-alert.css +2 -2
- package/theme/ap-expand-alert/ap-expand-alert.less +2 -1
- package/theme/ap-field/checkbox.css +1 -1
- package/theme/ap-field/index.css +1 -1
- package/theme/ap-field/number.css +1 -1
- package/theme/ap-field/radio.css +1 -1
- package/theme/ap-field/text-area.css +1 -1
- package/theme/ap-form/ap-form-item-group.css +1 -1
- package/theme/ap-form/ap-form-item.css +1 -1
- package/theme/ap-form/drawer-form.css +1 -1
- package/theme/ap-form/index.css +14 -5
- package/theme/ap-form/item-text-group.css +1 -1
- package/theme/ap-form/item-text.css +1 -1
- package/theme/ap-form/modal-form.css +1 -1
- package/theme/ap-form/search-form-sorter.css +6 -5
- package/theme/ap-form/search-form-sorter.less +1 -0
- package/theme/ap-form/search-form.css +14 -5
- package/theme/ap-form/search-form.less +8 -0
- package/theme/ap-grid/editable.css +1 -1
- package/theme/ap-grid/index.css +26 -7
- package/theme/ap-grid/index.less +11 -1
- package/theme/ap-group-search/ap-extension-select.css +1 -1
- package/theme/ap-group-search/ap-group-search.css +1 -1
- package/theme/ap-group-search/ap-popover-select.css +1 -1
- package/theme/ap-image/ap-image.css +1 -1
- package/theme/ap-input-radio/ap-input-radio.css +1 -1
- package/theme/ap-label/ap-label.css +1 -1
- package/theme/ap-ladder/ap-ladder.css +2 -1
- package/theme/ap-ladder/ap-ladder.less +1 -0
- package/theme/ap-layout/ap-info-layout.css +1 -1
- package/theme/ap-list/index.css +1 -1
- package/theme/ap-product-info/ap-product-info.css +1 -1
- package/theme/ap-select-layout/ap-select-layout.css +1 -1
- package/theme/ap-size-input/ap-size-input.css +1 -1
- package/theme/ap-status/ap-status.css +2 -2
- package/theme/ap-status/ap-status.less +1 -1
- package/theme/ap-summary/index.css +1 -1
- package/theme/ap-table/ap-table-index.css +1 -1
- package/theme/ap-table/ap-table-paragraph-ellipsis.css +1 -1
- package/theme/ap-table/ap-table.css +20 -12
- package/theme/ap-table/ap-table.less +4 -4
- package/theme/ap-table/setting/index.css +2 -3
- package/theme/ap-table/setting/modal.css +2 -2
- package/theme/ap-table/setting/select-group.css +1 -1
- package/theme/ap-table/setting/sortable-item-meta.css +1 -1
- package/theme/ap-table/setting/sortable-item.css +1 -1
- package/theme/ap-table/setting/sorter.css +1 -2
- package/theme/ap-table-modal/index.css +20 -12
- package/theme/ap-tag/ap-tag-group.css +3 -3
- package/theme/ap-tag/ap-tag-group.less +2 -3
- package/theme/ap-tag/ap-tag.css +4 -4
- package/theme/ap-tag/ap-tag.less +3 -3
- package/theme/ap-title/ap-title.css +6 -4
- package/theme/ap-title/ap-title.less +5 -3
- package/theme/ap-upload/index.css +6 -6
- package/theme/ap-upload/multiple-file.css +2 -2
- package/theme/ap-upload/multiple-file.less +1 -1
- package/theme/ap-upload/picture.css +3 -3
- package/theme/ap-upload/picture.less +2 -2
- package/theme/ap-upload/single-file.css +3 -3
- package/theme/ap-upload/single-file.less +2 -2
- package/theme/ap-upload/upload.css +1 -1
- package/theme/ap-upload-single/index.css +1 -1
- package/theme/ap-view/ap-view.css +1 -1
- package/theme/batch-input-group/index.css +2 -1
- package/theme/batch-input-group/popover-input.css +2 -1
- package/theme/batch-input-group/popover-input.less +1 -0
- package/theme/check-card/index.css +4 -4
- package/theme/editable-table/index.css +15 -6
- package/theme/full-screen/index.css +1 -1
- package/theme/index.css +60 -37
- package/theme/mask/index.css +1 -1
- package/theme/mixins/config.less +1 -1
- package/theme/mixins/mixins.css +1 -1
- package/theme/scroll-bar/index.css +1 -1
- package/theme/scroll-view/index.css +1 -1
- package/theme/splitter/index.css +3 -3
- package/theme/text/group.css +1 -1
- package/theme/text/index.css +2 -2
- package/theme/work-order-modal/index.css +1 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { Col as R, Flex as
|
|
1
|
+
import { isVNode as oe, defineComponent as ae, useSlots as ne, ref as L, shallowRef as U, computed as _, unref as n, watch as V, createVNode as t, Fragment as w, createBlock as x, openBlock as d, mergeProps as le, withCtx as A, resolveDynamicComponent as B, createElementBlock as re, renderList as se } from "vue";
|
|
2
|
+
import { Col as R, Flex as N, Button as M, Row as ie } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../ap-form.vue.mjs";
|
|
4
4
|
import "../item/index.vue2.mjs";
|
|
5
|
-
import { genRealChildren as
|
|
5
|
+
import { genRealChildren as W } from "../item-group/helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isArray as
|
|
8
|
-
import { isDef as
|
|
9
|
-
import { execFunc as
|
|
7
|
+
import { isArray as ue, isBoolean as ce, omit as pe } from "lodash-unified";
|
|
8
|
+
import { isDef as D } from "../../utils/index.mjs";
|
|
9
|
+
import { execFunc as q, diffFormItem as de } from "./utils.mjs";
|
|
10
10
|
import "./components/popover-filter.vue.mjs";
|
|
11
|
-
import { useCountPerRow as
|
|
11
|
+
import { useCountPerRow as fe } from "./hooks/use-count-per-row.mjs";
|
|
12
12
|
import "./components/popover-sorter/index.vue.mjs";
|
|
13
|
-
import { useNamespace as
|
|
14
|
-
import { useLocale as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
function
|
|
20
|
-
return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !
|
|
13
|
+
import { useNamespace as me } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
|
+
import { useLocale as he } from "../../config-provider/hooks/use-locale.mjs";
|
|
15
|
+
import z from "../item/index.vue.mjs";
|
|
16
|
+
import xe from "./components/popover-filter.vue2.mjs";
|
|
17
|
+
import ye from "./components/popover-sorter/index.vue2.mjs";
|
|
18
|
+
import ge from "../ap-form.vue2.mjs";
|
|
19
|
+
function ve(f) {
|
|
20
|
+
return typeof f == "function" || Object.prototype.toString.call(f) === "[object Object]" && !oe(f);
|
|
21
21
|
}
|
|
22
|
-
const s = 24,
|
|
22
|
+
const s = 24, Ue = /* @__PURE__ */ ae({
|
|
23
23
|
name: "ApFormSearchForm",
|
|
24
24
|
__name: "index",
|
|
25
25
|
props: {
|
|
@@ -111,102 +111,103 @@ const s = 24, Le = /* @__PURE__ */ te({
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
setup(f, {
|
|
114
|
-
expose:
|
|
114
|
+
expose: H
|
|
115
115
|
}) {
|
|
116
|
-
var
|
|
117
|
-
const i =
|
|
116
|
+
var P;
|
|
117
|
+
const i = ne(), o = f, {
|
|
118
118
|
b: m
|
|
119
|
-
} =
|
|
120
|
-
t:
|
|
121
|
-
} =
|
|
122
|
-
function
|
|
119
|
+
} = me("ap-form-search-form"), {
|
|
120
|
+
t: k
|
|
121
|
+
} = he(), G = fe(o), y = L();
|
|
122
|
+
function I() {
|
|
123
123
|
var a;
|
|
124
124
|
const e = (a = y.value) == null ? void 0 : a.getFieldsValueTransformed(!0);
|
|
125
|
-
|
|
125
|
+
q(o.onSubmit, e);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function J() {
|
|
128
128
|
var e, a;
|
|
129
|
-
o.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e),
|
|
129
|
+
o.customReset || (a = (e = y.value) == null ? void 0 : e.resetFields) == null || a.call(e), q(o.onReset);
|
|
130
130
|
}
|
|
131
|
-
const
|
|
132
|
-
let
|
|
133
|
-
const u =
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}),
|
|
131
|
+
const K = (e) => D(e) ? (ue(e) ? e : [e]).join("") : Date.now();
|
|
132
|
+
let T = [];
|
|
133
|
+
const u = U(W(i.default())), b = L(!1), c = U((P = i.extra) == null ? void 0 : P.call(i)), E = _(() => Math.floor(s / n(G)));
|
|
134
|
+
V(() => i.default(), (e) => {
|
|
135
|
+
T = u.value, u.value = de(T, W(e)), b.value = !1;
|
|
136
|
+
}), V(() => {
|
|
137
137
|
var e;
|
|
138
138
|
return (e = i.extra) == null ? void 0 : e.call(i);
|
|
139
139
|
}, (e) => {
|
|
140
140
|
c.value = e;
|
|
141
141
|
});
|
|
142
142
|
const l = _(() => {
|
|
143
|
-
const e = u.value, a = [], r = [], g = [], h = n(
|
|
144
|
-
let v = 0,
|
|
145
|
-
const
|
|
146
|
-
e.forEach((
|
|
147
|
-
const p =
|
|
148
|
-
if (
|
|
149
|
-
a.push(
|
|
143
|
+
const e = u.value, a = [], r = [], g = [], h = n(E);
|
|
144
|
+
let v = 0, S = 0;
|
|
145
|
+
const Y = s * o.maxRows - h * (n(c) && !o.extraInAction ? 2 : 1);
|
|
146
|
+
e.forEach((F, te) => {
|
|
147
|
+
const p = F.props;
|
|
148
|
+
if (ce(p.hidden) ? !!p.hidden : D(p.hidden))
|
|
149
|
+
a.push(F);
|
|
150
150
|
else {
|
|
151
151
|
let C = p.span || h;
|
|
152
|
-
const
|
|
153
|
-
node:
|
|
152
|
+
const $ = {
|
|
153
|
+
node: F,
|
|
154
154
|
span: C,
|
|
155
|
-
key: `ApFormSearchFormItem-${
|
|
156
|
-
},
|
|
157
|
-
|
|
155
|
+
key: `ApFormSearchFormItem-${te}-${K(p.name)}-${p._signal}`
|
|
156
|
+
}, j = s - v % s;
|
|
157
|
+
j < C && (C += j), v += C, v > Y ? r.push($) : (S = v, g.push($));
|
|
158
158
|
}
|
|
159
159
|
});
|
|
160
|
-
const
|
|
160
|
+
const O = s - (S + h) % s, Z = S % s < h, ee = O < h ? s : O;
|
|
161
161
|
return {
|
|
162
162
|
hideNode: t(w, null, [a]),
|
|
163
163
|
nodes: g,
|
|
164
164
|
collapseNodes: r,
|
|
165
|
-
extraSpan:
|
|
166
|
-
lastRowOnlyIncludeActionAndExtra:
|
|
165
|
+
extraSpan: ee,
|
|
166
|
+
lastRowOnlyIncludeActionAndExtra: Z
|
|
167
167
|
};
|
|
168
168
|
});
|
|
169
|
-
function
|
|
170
|
-
u.value = [...e];
|
|
169
|
+
function Q(e) {
|
|
170
|
+
u.value = [...e], b.value = !0;
|
|
171
171
|
}
|
|
172
|
-
const
|
|
172
|
+
const X = _(() => {
|
|
173
173
|
let e;
|
|
174
174
|
const a = t(R, {
|
|
175
|
-
span: n(
|
|
175
|
+
span: n(E),
|
|
176
176
|
key: "actionWrapper"
|
|
177
177
|
}, {
|
|
178
|
-
default: () => [t(
|
|
179
|
-
default: () => [t(
|
|
178
|
+
default: () => [t(z, null, {
|
|
179
|
+
default: () => [t(N, {
|
|
180
180
|
wrap: "wrap",
|
|
181
181
|
justify: l.value.lastRowOnlyIncludeActionAndExtra && !(n(c) && o.extraInAction) ? "flex-end" : "space-between"
|
|
182
182
|
}, {
|
|
183
|
-
default: () => [t(
|
|
183
|
+
default: () => [t(N, {
|
|
184
184
|
gap: 8,
|
|
185
185
|
wrap: "wrap"
|
|
186
186
|
}, {
|
|
187
187
|
default: () => [t("div", {
|
|
188
188
|
class: m("column-setting-trigger-wrapper")
|
|
189
|
-
}, [l.value.collapseNodes.length ? t(
|
|
190
|
-
onSubmit:
|
|
189
|
+
}, [l.value.collapseNodes.length ? t(xe, {
|
|
190
|
+
onSubmit: I,
|
|
191
191
|
config: l.value.collapseNodes,
|
|
192
192
|
submitLoading: o.submitLoading
|
|
193
|
-
}, null) : null, o.sortable && u.value.length ? t(
|
|
193
|
+
}, null) : null, o.sortable && u.value.length ? t(ye, {
|
|
194
194
|
children: u.value,
|
|
195
|
-
onClickConfirm:
|
|
196
|
-
|
|
195
|
+
onClickConfirm: Q,
|
|
196
|
+
sorted: b.value
|
|
197
|
+
}, null) : null]), t(M, {
|
|
197
198
|
type: "primary",
|
|
198
|
-
onClick:
|
|
199
|
+
onClick: I,
|
|
199
200
|
loading: o.submitLoading,
|
|
200
201
|
htmlType: "submit",
|
|
201
202
|
class: m("action-btn")
|
|
202
203
|
}, {
|
|
203
|
-
default: () => [o.searchText ||
|
|
204
|
-
}), t(
|
|
205
|
-
onClick:
|
|
204
|
+
default: () => [o.searchText || k("ap.apForm.search.search")]
|
|
205
|
+
}), t(M, {
|
|
206
|
+
onClick: J,
|
|
206
207
|
type: "text",
|
|
207
208
|
class: [m("action-btn"), m("action-btn-reset")]
|
|
208
209
|
}, {
|
|
209
|
-
default: () => [o.resetText ||
|
|
210
|
+
default: () => [o.resetText || k("ap.apForm.search.reset")]
|
|
210
211
|
})]
|
|
211
212
|
}), o.extraInAction ? n(c) : null]
|
|
212
213
|
})]
|
|
@@ -215,10 +216,10 @@ const s = 24, Le = /* @__PURE__ */ te({
|
|
|
215
216
|
span: l.value.extraSpan,
|
|
216
217
|
key: "extraNode"
|
|
217
218
|
}, {
|
|
218
|
-
default: () => [t(
|
|
219
|
-
default: () => [t(
|
|
219
|
+
default: () => [t(z, null, {
|
|
220
|
+
default: () => [t(N, {
|
|
220
221
|
justify: l.value.extraSpan === s || l.value.lastRowOnlyIncludeActionAndExtra ? "start" : "flex-end"
|
|
221
|
-
},
|
|
222
|
+
}, ve(e = n(c)) ? e : {
|
|
222
223
|
default: () => [e]
|
|
223
224
|
})]
|
|
224
225
|
})]
|
|
@@ -227,23 +228,23 @@ const s = 24, Le = /* @__PURE__ */ te({
|
|
|
227
228
|
}, null);
|
|
228
229
|
return l.value.lastRowOnlyIncludeActionAndExtra ? t(w, null, [r || g, a]) : t(w, null, [a, r]);
|
|
229
230
|
});
|
|
230
|
-
return
|
|
231
|
+
return H({
|
|
231
232
|
apForm: _(() => n(y))
|
|
232
|
-
}), (e, a) => (d(), x(
|
|
233
|
+
}), (e, a) => (d(), x(ge, le({
|
|
233
234
|
ref_key: "apForm",
|
|
234
235
|
ref: y,
|
|
235
236
|
class: n(m)()
|
|
236
|
-
}, n(
|
|
237
|
-
default:
|
|
237
|
+
}, n(pe)(o, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
|
|
238
|
+
default: A(() => [(d(), x(B(l.value.hideNode))), t(n(ie), {
|
|
238
239
|
gutter: 8
|
|
239
240
|
}, {
|
|
240
|
-
default:
|
|
241
|
+
default: A(() => [(d(!0), re(w, null, se(l.value.nodes, (r) => (d(), x(n(R), {
|
|
241
242
|
key: r.key,
|
|
242
243
|
span: r.span
|
|
243
244
|
}, {
|
|
244
|
-
default:
|
|
245
|
+
default: A(() => [(d(), x(B(r.node)))]),
|
|
245
246
|
_: 2
|
|
246
|
-
}, 1032, ["span"]))), 128)), (d(), x(
|
|
247
|
+
}, 1032, ["span"]))), 128)), (d(), x(B(X.value)))]),
|
|
247
248
|
_: 1
|
|
248
249
|
})]),
|
|
249
250
|
_: 1
|
|
@@ -251,5 +252,5 @@ const s = 24, Le = /* @__PURE__ */ te({
|
|
|
251
252
|
}
|
|
252
253
|
});
|
|
253
254
|
export {
|
|
254
|
-
|
|
255
|
+
Ue as default
|
|
255
256
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare const sizeMap: {
|
|
2
2
|
readonly mini: "small";
|
|
3
3
|
readonly small: "small";
|
|
4
|
-
readonly medium: "
|
|
4
|
+
readonly medium: "middle";
|
|
5
5
|
};
|
|
6
6
|
export declare const sizeReverseMap: {
|
|
7
|
-
readonly small: "
|
|
8
|
-
readonly middle:
|
|
7
|
+
readonly small: "mini";
|
|
8
|
+
readonly middle: "medium";
|
|
9
9
|
};
|
|
10
10
|
export declare const ROW_SELECTION_FIELD = "_ap-grid-row-selection-field";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
mini: "small",
|
|
3
3
|
small: "small",
|
|
4
|
-
medium: "
|
|
5
|
-
},
|
|
6
|
-
small: "
|
|
7
|
-
middle:
|
|
8
|
-
},
|
|
4
|
+
medium: "middle"
|
|
5
|
+
}, i = {
|
|
6
|
+
small: "mini",
|
|
7
|
+
middle: "medium"
|
|
8
|
+
}, l = "_ap-grid-row-selection-field";
|
|
9
9
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
l as ROW_SELECTION_FIELD,
|
|
11
|
+
e as sizeMap,
|
|
12
|
+
i as sizeReverseMap
|
|
13
13
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as Be, useSlots as Fe, getCurrentInstance as Ie, ref as B, computed as n, unref as o, watch as F, createElementBlock as I, openBlock as s, normalizeStyle as V, normalizeClass as g, createCommentVNode as
|
|
1
|
+
import { defineComponent as Be, useSlots as Fe, getCurrentInstance as Ie, ref as B, computed as n, unref as o, watch as F, createElementBlock as I, openBlock as s, normalizeStyle as V, normalizeClass as g, createCommentVNode as y, createElementVNode as E, createVNode as X, mergeProps as h, createSlots as J, withCtx as v, Fragment as Q, renderList as L, createBlock as p, resolveDynamicComponent as D, renderSlot as O, normalizeProps as Ee, guardReactiveProps as Pe } from "vue";
|
|
2
2
|
import { VxeTable as Ne, VxeColumn as Y } from "vxe-table";
|
|
3
3
|
import "vxe-table/es/style.css";
|
|
4
4
|
import "vxe-pc-ui/es/style.css";
|
|
5
5
|
import { VxeUI as Z } from "vxe-pc-ui";
|
|
6
|
-
import { isUndefined as
|
|
6
|
+
import { isUndefined as S, omit as Te } from "lodash-unified";
|
|
7
7
|
import { ApForm as ze } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
9
|
import { noRenderAsFormItemValueList as _e } from "../ap-table/constants.mjs";
|
|
@@ -115,13 +115,13 @@ const No = /* @__PURE__ */ Be({
|
|
|
115
115
|
},
|
|
116
116
|
setup(re, { expose: te }) {
|
|
117
117
|
var G;
|
|
118
|
-
const C = Fe(), a = re,
|
|
119
|
-
|
|
120
|
-
const { e: P, b: c, be: le } = Ze("ap-grid"), ne = eo("valueTypeMap"),
|
|
118
|
+
const C = Fe(), a = re, w = (G = Ie()) == null ? void 0 : G.appContext.app;
|
|
119
|
+
w && !w.__VXE_PC_UI_INSTALLED__ && (w.use(Z), w.__VXE_PC_UI_INSTALLED__ = !0);
|
|
120
|
+
const { e: P, b: c, be: le } = Ze("ap-grid"), ne = eo("valueTypeMap"), d = B([]), $ = B([]), m = B(), x = B(a.size), [, i] = Je(), { t: se } = oo();
|
|
121
121
|
Z.setConfig({
|
|
122
122
|
i18n: (e, r) => se(`ap.${e}`, r)
|
|
123
123
|
});
|
|
124
|
-
const { renderConfig:
|
|
124
|
+
const { renderConfig: de, updateSignal: ie } = Xe(d);
|
|
125
125
|
let K = 0;
|
|
126
126
|
const ce = n(() => {
|
|
127
127
|
if (m.value)
|
|
@@ -133,13 +133,13 @@ const No = /* @__PURE__ */ Be({
|
|
|
133
133
|
return K++, ((l = (r = (e = a.columns) == null ? void 0 : e.filter(
|
|
134
134
|
(t) => !t.hideInSearch && t.dataIndex && (t.valueType || t.customRenderFormItem) && !_e.includes(t.valueType)
|
|
135
135
|
)) == null ? void 0 : r.sort((t, u) => {
|
|
136
|
-
let
|
|
137
|
-
return ee(u.order) -
|
|
136
|
+
let b = ee(t.order);
|
|
137
|
+
return ee(u.order) - b;
|
|
138
138
|
})) == null ? void 0 : l.map((t) => {
|
|
139
139
|
const u = Ae(
|
|
140
140
|
t,
|
|
141
141
|
Ve(t.fieldProps, {})
|
|
142
|
-
),
|
|
142
|
+
), b = {
|
|
143
143
|
...t,
|
|
144
144
|
fieldProps: {
|
|
145
145
|
label: t.title,
|
|
@@ -151,10 +151,10 @@ const No = /* @__PURE__ */ Be({
|
|
|
151
151
|
},
|
|
152
152
|
renderNode: void 0
|
|
153
153
|
};
|
|
154
|
-
return
|
|
155
|
-
|
|
154
|
+
return b.renderNode = Le(
|
|
155
|
+
b,
|
|
156
156
|
o(ne)
|
|
157
|
-
),
|
|
157
|
+
), b;
|
|
158
158
|
})) || [];
|
|
159
159
|
}), ue = n(() => {
|
|
160
160
|
var r;
|
|
@@ -167,10 +167,10 @@ const No = /* @__PURE__ */ Be({
|
|
|
167
167
|
a.card ? null : c("wrapper"),
|
|
168
168
|
a.adaptive ? c("adaptive") : null,
|
|
169
169
|
a.sticky ? c("sticky") : null
|
|
170
|
-
].filter(Boolean)), j = n(() => oe(o(
|
|
170
|
+
].filter(Boolean)), j = n(() => oe(o(d), (e) => {
|
|
171
171
|
if (e.sorter === !0)
|
|
172
172
|
return e.key || e.dataIndex;
|
|
173
|
-
}).filter(Boolean)), H = n(() => oe(o(
|
|
173
|
+
}).filter(Boolean)), H = n(() => oe(o(d), (e) => {
|
|
174
174
|
if (e.filters && !e.onFilter)
|
|
175
175
|
return e.key || e.dataIndex;
|
|
176
176
|
}).filter(Boolean)), {
|
|
@@ -185,7 +185,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
185
185
|
} = De({
|
|
186
186
|
async request(e) {
|
|
187
187
|
var l;
|
|
188
|
-
if (!k.value.preserveSelectedRowKeys &&
|
|
188
|
+
if (!k.value.preserveSelectedRowKeys && S(a.dataSource) && A(), !S(a.dataSource)) {
|
|
189
189
|
const t = e.pageSize * (e.current - 1);
|
|
190
190
|
return {
|
|
191
191
|
data: (a.pagination === !1 ? a.dataSource : a.dataSource.slice(t, t + e.pageSize)) || [],
|
|
@@ -208,19 +208,19 @@ const No = /* @__PURE__ */ Be({
|
|
|
208
208
|
pagination: a.pagination
|
|
209
209
|
}), { sortChangeEvent: he, filterChangeEvent: ve, paginationChangeEvent: Ce } = $e(ge);
|
|
210
210
|
Me({
|
|
211
|
-
columns: n(() =>
|
|
211
|
+
columns: n(() => d.value),
|
|
212
212
|
columnsBackup: n(() => $.value),
|
|
213
|
-
size: n(() =>
|
|
213
|
+
size: n(() => Ue[x.value]),
|
|
214
214
|
updateColumns(e) {
|
|
215
215
|
var r;
|
|
216
|
-
|
|
216
|
+
d.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e);
|
|
217
217
|
},
|
|
218
218
|
updateSize(e) {
|
|
219
|
-
|
|
219
|
+
x.value = qe[e];
|
|
220
220
|
},
|
|
221
221
|
renderConfig: n(() => ({
|
|
222
222
|
className: le("table-header", "title"),
|
|
223
|
-
color:
|
|
223
|
+
color: i.value.colorPrimary
|
|
224
224
|
})),
|
|
225
225
|
dataSource: n(() => o(f).records),
|
|
226
226
|
getSearchFormValues: U,
|
|
@@ -229,13 +229,13 @@ const No = /* @__PURE__ */ Be({
|
|
|
229
229
|
reset: z
|
|
230
230
|
});
|
|
231
231
|
const be = n(
|
|
232
|
-
() =>
|
|
232
|
+
() => d.value.some(
|
|
233
233
|
(e) => e.fixed === "left" || e.fixed === !0
|
|
234
234
|
) ? "left" : void 0
|
|
235
235
|
), ye = n(
|
|
236
|
-
() =>
|
|
236
|
+
() => S(a.loading) ? f.loading : a.loading
|
|
237
237
|
), Se = n(
|
|
238
|
-
() =>
|
|
238
|
+
() => S(a.dataSource) ? f.records : a.dataSource
|
|
239
239
|
), { selectedRows: R, rowSelection: k, ...we } = He({
|
|
240
240
|
...a.rowSelection === !0 ? {} : a.rowSelection,
|
|
241
241
|
dataSource: Se,
|
|
@@ -279,7 +279,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
279
279
|
() => {
|
|
280
280
|
var r;
|
|
281
281
|
const e = Re();
|
|
282
|
-
|
|
282
|
+
d.value = e, (r = a.onShownColumnsChange) == null || r.call(a, e), $.value = e;
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
deep: !0,
|
|
@@ -300,7 +300,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
300
300
|
), F(
|
|
301
301
|
() => a.size,
|
|
302
302
|
(e) => {
|
|
303
|
-
|
|
303
|
+
x.value = e;
|
|
304
304
|
}
|
|
305
305
|
), te({
|
|
306
306
|
submit: T,
|
|
@@ -308,7 +308,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
308
308
|
refresh: me,
|
|
309
309
|
setSearchFormValues: q,
|
|
310
310
|
getSearchFormValues: U,
|
|
311
|
-
getShowColumns: () => o(
|
|
311
|
+
getShowColumns: () => o(d),
|
|
312
312
|
rowSelection: {
|
|
313
313
|
selectedRows: n(() => R.value),
|
|
314
314
|
clearAll: A
|
|
@@ -319,7 +319,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
319
319
|
class: g(pe.value),
|
|
320
320
|
style: V(e.wrapperStyle)
|
|
321
321
|
}, [
|
|
322
|
-
o(
|
|
322
|
+
o(S)(e.dataSource) && e.searchForm !== !1 && W.value.length > 0 ? (s(), I("div", {
|
|
323
323
|
key: 0,
|
|
324
324
|
class: g(e.card ? o(P)("search-wrapper") : null),
|
|
325
325
|
style: V(e.searchFormWrapperStyle)
|
|
@@ -352,7 +352,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
352
352
|
key: "0"
|
|
353
353
|
} : void 0
|
|
354
354
|
]), 1040, ["submit-loading", "onSubmit", "onReset"])
|
|
355
|
-
], 6)) :
|
|
355
|
+
], 6)) : y("", !0),
|
|
356
356
|
E("div", {
|
|
357
357
|
class: g([o(P)("table-wrapper"), e.card ? o(P)("table-wrapper-card") : null]),
|
|
358
358
|
style: V(e.tableWrapperStyle)
|
|
@@ -363,7 +363,7 @@ const No = /* @__PURE__ */ Be({
|
|
|
363
363
|
O(e.$slots, "title", {
|
|
364
364
|
selectedRows: o(R),
|
|
365
365
|
selectedRowKeys: o(k).selectedRowKeys,
|
|
366
|
-
shownColumns:
|
|
366
|
+
shownColumns: d.value,
|
|
367
367
|
clearAll: A
|
|
368
368
|
})
|
|
369
369
|
], 2),
|
|
@@ -373,27 +373,25 @@ const No = /* @__PURE__ */ Be({
|
|
|
373
373
|
(s(), p(o(Ne), h(o(Ke)(a), {
|
|
374
374
|
ref_key: "tableRef",
|
|
375
375
|
ref: m,
|
|
376
|
-
key: o(
|
|
376
|
+
key: o(ie),
|
|
377
377
|
data: o(f).records,
|
|
378
378
|
"sort-config": { remote: j.value.length > 0 },
|
|
379
379
|
"filter-config": { remote: H.value.length > 0 },
|
|
380
380
|
loading: ye.value,
|
|
381
381
|
style: {
|
|
382
|
-
"--vxe-ui-table-row-checkbox-checked-background-color": o(
|
|
383
|
-
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(
|
|
384
|
-
"--vxe-ui-font-primary-color": o(
|
|
382
|
+
"--vxe-ui-table-row-checkbox-checked-background-color": o(i).controlItemBgActive,
|
|
383
|
+
"--vxe-ui-table-row-hover-checkbox-checked-background-color": o(i).controlItemBgActiveHover,
|
|
384
|
+
"--vxe-ui-font-primary-color": o(i).colorPrimary,
|
|
385
385
|
"--vxe-ui-table-header-background-color": "var(--ap-table-header-bg)",
|
|
386
386
|
"--vxe-ui-table-cell-padding-default": "12px",
|
|
387
387
|
"--vxe-ui-table-cell-padding-medium": "9px",
|
|
388
|
-
"--vxe-ui-table-row-radio-checked-background-color": o(
|
|
389
|
-
"--vxe-ui-table-row-hover-radio-checked-background-color": o(
|
|
390
|
-
"--vxe-ui-font-color": o(
|
|
391
|
-
"--vxe-ui-table-border-color": o(
|
|
392
|
-
"--vxe-ui-table-header-font-color": o(
|
|
393
|
-
"--vxe-ui-table-cell-padding-mini": "8px",
|
|
394
|
-
"--vxe-ui-table-row-line-height": "18px"
|
|
388
|
+
"--vxe-ui-table-row-radio-checked-background-color": o(i).controlItemBgActive,
|
|
389
|
+
"--vxe-ui-table-row-hover-radio-checked-background-color": o(i).controlItemBgActiveHover,
|
|
390
|
+
"--vxe-ui-font-color": o(i).colorTextBase,
|
|
391
|
+
"--vxe-ui-table-border-color": o(i).colorBorderSecondary,
|
|
392
|
+
"--vxe-ui-table-header-font-color": o(i).colorTextBase
|
|
395
393
|
},
|
|
396
|
-
size:
|
|
394
|
+
size: x.value,
|
|
397
395
|
onSortChange: o(he),
|
|
398
396
|
onFilterChange: o(ve),
|
|
399
397
|
onCheckboxChange: _,
|
|
@@ -412,9 +410,9 @@ const No = /* @__PURE__ */ Be({
|
|
|
412
410
|
(s(), p(D(a.expandable.renderContent(l))))
|
|
413
411
|
]),
|
|
414
412
|
_: 1
|
|
415
|
-
}, 16, ["fixed"])) :
|
|
416
|
-
a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(je)(o(k),
|
|
417
|
-
(s(!0), I(Q, null, L(o(
|
|
413
|
+
}, 16, ["fixed"])) : y("", !0),
|
|
414
|
+
a.rowSelection ? (s(), p(o(Y), h({ key: 1 }, o(je)(o(k), d.value), { field: o(Ge) }), null, 16, ["field"])) : y("", !0),
|
|
415
|
+
(s(!0), I(Q, null, L(o(de), (l) => (s(), p(D(l), {
|
|
418
416
|
key: l.props.colId
|
|
419
417
|
}))), 128))
|
|
420
418
|
]),
|
|
@@ -438,11 +436,11 @@ const No = /* @__PURE__ */ Be({
|
|
|
438
436
|
"extra-size": -4.2,
|
|
439
437
|
"bar-color": "var(--basic-scrollbar-thumb-color-base, #bfbfbf)",
|
|
440
438
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
441
|
-
}, null, 8, ["scroll-container"])) :
|
|
439
|
+
}, null, 8, ["scroll-container"])) : y("", !0),
|
|
442
440
|
e.pagination !== !1 ? (s(), p(o(Oe), h({
|
|
443
441
|
key: 1,
|
|
444
442
|
class: o(c)("pagination")
|
|
445
|
-
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) :
|
|
443
|
+
}, o(M).pagination, { onChange: o(Ce) }), null, 16, ["class", "onChange"])) : y("", !0)
|
|
446
444
|
], 2)
|
|
447
445
|
], 6)
|
|
448
446
|
], 6));
|
|
@@ -60,7 +60,7 @@ type InternalDataType<DataType = Recordable> = {
|
|
|
60
60
|
loading: boolean;
|
|
61
61
|
};
|
|
62
62
|
export declare const DEFAULT_CURRENT = 1;
|
|
63
|
-
export declare const DEFAULT_PAGE_SIZE =
|
|
63
|
+
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
64
64
|
export declare const useTablePaging: <DataType = any, ParamsType = Record<string, any>>({ manual, request, defaultParams, defaultData, formatParams, paramsValueTypeMap, resetFieldsIgnores, filterFields, sortFields, namespace, pagination }: UseTablePagingParams<DataType, ParamsType>) => {
|
|
65
65
|
formRef: Ref<ApFormSearchFormExpose | undefined, ApFormSearchFormExpose | undefined>;
|
|
66
66
|
submit: () => void;
|
|
@@ -6,7 +6,7 @@ import { isArray as q, isEqualWith as de, isUndefined as pe } from "lodash-unifi
|
|
|
6
6
|
import { isDef as N } from "../../utils/index.mjs";
|
|
7
7
|
import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
|
|
8
8
|
import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
-
const h = 1, D =
|
|
9
|
+
const h = 1, D = 20, B = {
|
|
10
10
|
defaultCurrent: h,
|
|
11
11
|
defaultPageSize: D,
|
|
12
12
|
showLessItems: !1,
|