@aplus-frontend/ui 0.6.0-beta.21 → 0.6.0-beta.22
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/index.mjs +76 -74
- package/es/src/ap-drawer/ApDrawer.vue.d.ts +1 -4
- package/es/src/ap-drawer/ApDrawer.vue.mjs +24 -37
- package/es/src/ap-drawer/interface.d.ts +0 -1
- package/es/src/ap-form/item/index.vue.mjs +75 -83
- package/es/src/ap-form/item-group/index.vue.mjs +34 -35
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +18 -20
- package/es/src/ap-grid/index.vue.mjs +46 -46
- package/es/src/ap-grid/interface.d.ts +3 -3
- package/es/src/ap-list/index.vue.mjs +34 -34
- package/es/src/ap-list/interface.d.ts +4 -3
- package/es/src/ap-table/ap-table.vue2.mjs +57 -57
- package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -3
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +15 -15
- package/es/src/ap-table/interface.d.ts +3 -3
- package/es/src/business/ap-keep-alive/index.d.ts +2 -1
- package/es/src/business/ap-keep-alive/index.mjs +11 -9
- package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +7 -7
- package/es/src/business/ap-keep-alive/utils.d.ts +1 -0
- package/es/src/business/ap-keep-alive/utils.mjs +10 -9
- package/es/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +36 -30
- package/es/src/business/ap-radio-group/index.d.ts +6 -0
- package/es/src/business/hooks/usePageListApGrid.mjs +1 -1
- package/es/src/index.mjs +65 -63
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ap-drawer/ApDrawer.vue.d.ts +1 -4
- package/lib/src/ap-drawer/ApDrawer.vue.js +1 -1
- package/lib/src/ap-drawer/interface.d.ts +0 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +3 -3
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-list/interface.d.ts +4 -3
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +3 -3
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/ap-table/interface.d.ts +3 -3
- package/lib/src/business/ap-keep-alive/index.d.ts +2 -1
- package/lib/src/business/ap-keep-alive/index.js +1 -1
- package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -1
- package/lib/src/business/ap-keep-alive/utils.d.ts +1 -0
- package/lib/src/business/ap-keep-alive/utils.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue.d.ts +2 -0
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-radio-group/index.d.ts +6 -0
- package/lib/src/business/hooks/usePageListApGrid.js +1 -1
- package/lib/src/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
- package/theme/antd-global-overwrite/admin/alert.css +1 -1
- package/theme/antd-global-overwrite/admin/field.css +3 -0
- package/theme/antd-global-overwrite/admin/field.less +4 -0
- package/theme/antd-global-overwrite/admin/index.css +10 -1
- package/theme/antd-global-overwrite/admin/modal.css +6 -0
- package/theme/antd-global-overwrite/admin/modal.less +8 -0
- package/theme/antd-global-overwrite/aplus/alert.css +1 -1
- package/theme/antd-global-overwrite/aplus/field.css +3 -0
- package/theme/antd-global-overwrite/aplus/field.less +4 -0
- package/theme/antd-global-overwrite/aplus/index.css +11 -2
- package/theme/antd-global-overwrite/aplus/modal.css +7 -1
- package/theme/antd-global-overwrite/aplus/modal.less +9 -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 +2 -2
- package/theme/ap-attachment/ap-attachment.css +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-copy/ap-copy.css +1 -1
- package/theme/ap-descriptions/ap-descriptions.css +1 -1
- package/theme/ap-download/ap-download.css +4 -4
- package/theme/ap-drawer/ap-drawer.css +5 -6
- package/theme/ap-drawer/ap-drawer.less +4 -7
- package/theme/ap-expand-alert/ap-expand-alert.css +2 -2
- 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 +4 -1
- package/theme/ap-form/ap-form-item.less +3 -0
- package/theme/ap-form/drawer-form.css +1 -1
- package/theme/ap-form/index.css +8 -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 +5 -5
- package/theme/ap-form/search-form.css +8 -5
- package/theme/ap-grid/editable.css +1 -1
- package/theme/ap-grid/index.css +16 -11
- package/theme/ap-grid/index.less +2 -2
- 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 +4 -4
- 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-radio-group/ap-radio-group.css +2 -1
- package/theme/ap-radio-group/ap-radio-group.less +1 -0
- package/theme/ap-select-layout/ap-select-layout.css +3 -3
- package/theme/ap-size-input/ap-size-input.css +1 -1
- package/theme/ap-status/ap-status.css +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 +12 -9
- package/theme/ap-table/setting/index.css +3 -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 +2 -2
- package/theme/ap-table-modal/index.css +12 -9
- package/theme/ap-tag/ap-tag-group.css +1 -1
- package/theme/ap-tag/ap-tag.css +4 -4
- package/theme/ap-title/ap-title.css +1 -1
- package/theme/ap-upload/index.css +2 -2
- package/theme/ap-upload/multiple-file.css +1 -1
- package/theme/ap-upload/picture.css +1 -1
- package/theme/ap-upload/single-file.css +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 +1 -1
- package/theme/batch-input-group/popover-input.css +1 -1
- package/theme/check-card/index.css +4 -4
- package/theme/editable-table/index.css +9 -6
- package/theme/full-screen/index.css +1 -1
- package/theme/index.css +46 -39
- package/theme/mask/index.css +1 -1
- package/theme/mixins/config.less +3 -3
- 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 +2 -2
- package/theme/text/group.css +1 -1
- package/theme/text/index.css +2 -2
- package/theme/ui-mode.css +2 -0
- package/theme/ui-mode.less +2 -0
- package/theme/work-order-modal/index.css +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { isVNode as C, defineComponent as
|
|
2
|
-
import { Col as
|
|
3
|
-
import { pick as
|
|
4
|
-
import { apFormItemColPropKeys as
|
|
5
|
-
import { genRealChildren as
|
|
1
|
+
import { isVNode as C, defineComponent as _, useSlots as k, unref as r, createVNode as w, mergeProps as u, createBlock as l, openBlock as i, withCtx as P, createElementBlock as R, Fragment as S, renderList as b, resolveDynamicComponent as h } from "vue";
|
|
2
|
+
import { Col as x, Row as B } from "@aplus-frontend/antdv";
|
|
3
|
+
import { pick as N, isBoolean as j, omit as F } from "lodash-unified";
|
|
4
|
+
import { apFormItemColPropKeys as D } from "../constant.mjs";
|
|
5
|
+
import { genRealChildren as I, buildColSpan as O, getStringName as V } from "./helper.mjs";
|
|
6
6
|
import "../../config-provider/index.mjs";
|
|
7
|
-
import { isDef as
|
|
8
|
-
import { useNamespace as
|
|
9
|
-
function
|
|
10
|
-
return typeof
|
|
7
|
+
import { isDef as $ } from "../../utils/index.mjs";
|
|
8
|
+
import { useNamespace as v } from "../../config-provider/hooks/use-namespace.mjs";
|
|
9
|
+
function A(o) {
|
|
10
|
+
return typeof o == "function" || Object.prototype.toString.call(o) === "[object Object]" && !C(o);
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const M = /* @__PURE__ */ _({
|
|
13
13
|
name: "ApFormItemGroup",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -27,30 +27,29 @@ const T = /* @__PURE__ */ h({
|
|
|
27
27
|
default: 3
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
-
setup(
|
|
31
|
-
const {
|
|
32
|
-
b:
|
|
33
|
-
} =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
default: S(() => [(s(!0), b(x, null, N(f.value, (e) => (s(), d(j(e.node), {
|
|
30
|
+
setup(o) {
|
|
31
|
+
const m = o, p = k(), {
|
|
32
|
+
b: s
|
|
33
|
+
} = v("ap-form-item-group");
|
|
34
|
+
function d() {
|
|
35
|
+
var a;
|
|
36
|
+
const c = I(((a = p.default) == null ? void 0 : a.call(p)) || []);
|
|
37
|
+
return r(c).map((e, f) => {
|
|
38
|
+
const t = e.props, n = N(t, D), g = n != null && n.span ? {} : O(m.countPerRow), y = j(t.hidden) ? !!t.hidden : $(t.hidden);
|
|
39
|
+
return {
|
|
40
|
+
key: `${f}-${V(t.name)}`,
|
|
41
|
+
node: w(x, u(g, n, {
|
|
42
|
+
class: y ? s("col-hidden") : ""
|
|
43
|
+
}), A(e) ? e : {
|
|
44
|
+
default: () => [e]
|
|
45
|
+
})
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return (c, a) => (i(), l(r(B), u({
|
|
50
|
+
class: r(s)()
|
|
51
|
+
}, r(F)(m, ["countPerRow"])), {
|
|
52
|
+
default: P(() => [(i(!0), R(S, null, b(d(), (e) => (i(), l(h(e.node), {
|
|
54
53
|
key: e.key
|
|
55
54
|
}))), 128))]),
|
|
56
55
|
_: 1
|
|
@@ -58,5 +57,5 @@ const T = /* @__PURE__ */ h({
|
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
M as default
|
|
62
61
|
};
|
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as w, watchEffect as a, computed as s, unref as i } from "vue";
|
|
2
2
|
import { useResizeObserver as P } from "@vueuse/core";
|
|
3
3
|
import { isUndefined as R } from "lodash-unified";
|
|
4
|
-
const c = [1, 2, 3, 4, 6, 8, 12, 24], g = { xs: 0, sm: 768, md: 1280, lg: 1728 },
|
|
5
|
-
(
|
|
6
|
-
),
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
(
|
|
10
|
-
|
|
11
|
-
return;
|
|
12
|
-
const { stop: o } = P(e.resizeTarget, (f) => {
|
|
4
|
+
const c = [1, 2, 3, 4, 6, 8, 12, 24], g = { xs: 0, sm: 768, md: 1280, lg: 1728 }, h = Object.entries(g).sort(
|
|
5
|
+
(t, r) => r[1] - t[1]
|
|
6
|
+
), v = (t) => {
|
|
7
|
+
const r = w(0);
|
|
8
|
+
a(
|
|
9
|
+
(e) => {
|
|
10
|
+
const n = R(t.resizeTarget) ? document.documentElement : t.resizeTarget, { stop: o } = P(n, (f) => {
|
|
13
11
|
const m = f[0], { width: d } = m.contentRect;
|
|
14
|
-
|
|
12
|
+
r.value = d;
|
|
15
13
|
});
|
|
16
|
-
|
|
14
|
+
e(() => {
|
|
17
15
|
o();
|
|
18
16
|
});
|
|
19
17
|
},
|
|
20
18
|
{ flush: "post" }
|
|
21
19
|
);
|
|
22
20
|
const u = s(() => {
|
|
23
|
-
for (const [
|
|
24
|
-
if (i(
|
|
25
|
-
return
|
|
21
|
+
for (const [e, n] of h)
|
|
22
|
+
if (i(r) > n)
|
|
23
|
+
return e;
|
|
26
24
|
return "md";
|
|
27
25
|
});
|
|
28
26
|
return s(() => {
|
|
29
|
-
const
|
|
30
|
-
(o) => o ===
|
|
31
|
-
),
|
|
32
|
-
return
|
|
27
|
+
const e = c.findIndex(
|
|
28
|
+
(o) => o === t.countPerRow
|
|
29
|
+
), n = i(u);
|
|
30
|
+
return n === "lg" ? c[e + 1] || t.countPerRow : n === "xs" && c[e - 1] || t.countPerRow;
|
|
33
31
|
});
|
|
34
32
|
};
|
|
35
33
|
export {
|
|
36
|
-
|
|
34
|
+
v as useCountPerRow
|
|
37
35
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { defineComponent as Ve, useSlots as Ke, getCurrentInstance as Le, ref as F, computed as n, unref as o,
|
|
2
|
-
import { VxeTable as
|
|
1
|
+
import { defineComponent as Ve, useSlots as Ke, getCurrentInstance as Le, ref as F, computed as n, unref as o, toRef as De, nextTick as Oe, watch as B, createElementBlock as I, openBlock as c, normalizeStyle as V, normalizeClass as h, createCommentVNode as S, createElementVNode as E, createVNode as J, mergeProps as v, createSlots as Q, withCtx as C, Fragment as Y, renderList as K, createBlock as f, resolveDynamicComponent as L, renderSlot as D, normalizeProps as $e, guardReactiveProps as He } from "vue";
|
|
2
|
+
import { VxeTable as Me, VxeColumn as Z } 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 ee } from "vxe-pc-ui";
|
|
6
|
-
import { isUndefined as R, isFunction as oe, omit as
|
|
7
|
-
import { ApForm as
|
|
6
|
+
import { isUndefined as R, isFunction as oe, omit as We } from "lodash-unified";
|
|
7
|
+
import { ApForm as je } from "../ap-form/index.mjs";
|
|
8
8
|
import "../config-provider/index.mjs";
|
|
9
|
-
import { noRenderAsFormItemValueList as
|
|
10
|
-
import { getColumnOrder as ae, updateFormProps as
|
|
11
|
-
import { useTablePaging as
|
|
12
|
-
import { Empty as re, Pagination as
|
|
13
|
-
import { useInnerParams as
|
|
14
|
-
import { toVxeProps as
|
|
15
|
-
import
|
|
16
|
-
import { useProvideApTable as
|
|
17
|
-
import { sizeReverseMap as
|
|
18
|
-
import { useRenderColumns as
|
|
19
|
-
import { useToken as
|
|
9
|
+
import { noRenderAsFormItemValueList as qe } from "../ap-table/constants.mjs";
|
|
10
|
+
import { getColumnOrder as ae, updateFormProps as Ue, getFieldProps as Ge, getSearchFormItemRenderNode as Xe, recursionApColumns as te } from "../ap-table/utils.mjs";
|
|
11
|
+
import { useTablePaging as Je } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
12
|
+
import { Empty as re, Pagination as Qe } from "@aplus-frontend/antdv";
|
|
13
|
+
import { useInnerParams as Ye } from "./hooks/use-inner-params.mjs";
|
|
14
|
+
import { toVxeProps as Ze, getRowExpandProps as eo, getRowSelectionProps as oo } from "./utils/table.mjs";
|
|
15
|
+
import ao from "./hooks/use-row-selection.mjs";
|
|
16
|
+
import { useProvideApTable as to } from "../ap-table/context.mjs";
|
|
17
|
+
import { sizeReverseMap as ro, sizeMap as lo, ROW_SELECTION_FIELD as no } from "./constants.mjs";
|
|
18
|
+
import { useRenderColumns as so } from "./hooks/use-render-columns.mjs";
|
|
19
|
+
import { useToken as io } from "@aplus-frontend/antdv/es/theme/internal";
|
|
20
20
|
import "../scroll-bar/index.mjs";
|
|
21
|
-
import { isDef as
|
|
22
|
-
import { getValidVNodeList as
|
|
23
|
-
import { useNamespace as
|
|
24
|
-
import { useGlobalConfig as
|
|
25
|
-
import { useLocale as
|
|
26
|
-
import
|
|
27
|
-
const
|
|
21
|
+
import { isDef as co } from "../utils/index.mjs";
|
|
22
|
+
import { getValidVNodeList as uo } from "../utils/slot.mjs";
|
|
23
|
+
import { useNamespace as po } from "../config-provider/hooks/use-namespace.mjs";
|
|
24
|
+
import { useGlobalConfig as fo } from "../config-provider/hooks/use-global-config.mjs";
|
|
25
|
+
import { useLocale as mo } from "../config-provider/hooks/use-locale.mjs";
|
|
26
|
+
import go from "../scroll-bar/index.vue.mjs";
|
|
27
|
+
const Mo = /* @__PURE__ */ Ve({
|
|
28
28
|
name: "ApGrid",
|
|
29
29
|
__name: "index",
|
|
30
30
|
props: {
|
|
@@ -118,11 +118,11 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
118
118
|
var X;
|
|
119
119
|
const b = Ke(), t = le, x = (X = Le()) == null ? void 0 : X.appContext.app;
|
|
120
120
|
x && !x.__VXE_PC_UI_INSTALLED__ && (x.use(ee), x.__VXE_PC_UI_INSTALLED__ = !0);
|
|
121
|
-
const { e: P, b: u, be: se } =
|
|
121
|
+
const { e: P, b: u, be: se } = po("ap-grid"), ie = fo("valueTypeMap"), i = F([]), O = F([]), s = F(), k = F(t.size), [, d] = io(), { t: ce } = mo();
|
|
122
122
|
ee.setConfig({
|
|
123
123
|
i18n: (e, a) => ce(`ap.${e}`, a)
|
|
124
124
|
});
|
|
125
|
-
const { renderConfig: de, updateSignal: ue } =
|
|
125
|
+
const { renderConfig: de, updateSignal: ue } = so(i);
|
|
126
126
|
let $ = 0;
|
|
127
127
|
const pe = n(() => {
|
|
128
128
|
if (s.value)
|
|
@@ -132,14 +132,14 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
132
132
|
}), H = n(() => {
|
|
133
133
|
var e, a, r;
|
|
134
134
|
return $++, ((r = (a = (e = t.columns) == null ? void 0 : e.filter(
|
|
135
|
-
(l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !
|
|
135
|
+
(l) => !l.hideInSearch && l.dataIndex && (l.valueType || l.customRenderFormItem) && !qe.includes(l.valueType)
|
|
136
136
|
)) == null ? void 0 : a.sort((l, p) => {
|
|
137
137
|
let w = ae(l.order);
|
|
138
138
|
return ae(p.order) - w;
|
|
139
139
|
})) == null ? void 0 : r.map((l) => {
|
|
140
|
-
const p =
|
|
140
|
+
const p = Ue(
|
|
141
141
|
l,
|
|
142
|
-
|
|
142
|
+
Ge(l.fieldProps, {})
|
|
143
143
|
), w = {
|
|
144
144
|
...l,
|
|
145
145
|
fieldProps: {
|
|
@@ -152,14 +152,14 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
152
152
|
},
|
|
153
153
|
renderNode: void 0
|
|
154
154
|
};
|
|
155
|
-
return w.renderNode =
|
|
155
|
+
return w.renderNode = Xe(
|
|
156
156
|
w,
|
|
157
157
|
o(ie)
|
|
158
158
|
), w;
|
|
159
159
|
})) || [];
|
|
160
160
|
}), fe = n(() => {
|
|
161
161
|
var a;
|
|
162
|
-
return
|
|
162
|
+
return co(t.manual) ? t.manual : uo(((a = b.searchFormExtra) == null ? void 0 : a.call(b)) || []).some((r) => {
|
|
163
163
|
var l;
|
|
164
164
|
return ((l = r.type) == null ? void 0 : l.name) === "ApView";
|
|
165
165
|
});
|
|
@@ -185,7 +185,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
185
185
|
handleTableChangeOptional: ve,
|
|
186
186
|
getPaging: Ce,
|
|
187
187
|
setPaging: be
|
|
188
|
-
} =
|
|
188
|
+
} = Je({
|
|
189
189
|
async request(e) {
|
|
190
190
|
var r;
|
|
191
191
|
if (!g.value.preserveSelectedRowKeys && R(t.dataSource) && _(), !R(t.dataSource)) {
|
|
@@ -204,24 +204,24 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
204
204
|
namespace: "ap-grid",
|
|
205
205
|
filterFields: W,
|
|
206
206
|
sortFields: M,
|
|
207
|
-
|
|
207
|
+
params: De(t, "params"),
|
|
208
208
|
defaultData: t.defaultData,
|
|
209
209
|
manual: o(fe),
|
|
210
210
|
formatParams: t.beforeSearchSubmit,
|
|
211
211
|
pagination: t.pagination,
|
|
212
212
|
onClickReset: ze,
|
|
213
213
|
onAfterRequest: G
|
|
214
|
-
}), { sortChangeEvent: ye, filterChangeEvent: we, paginationChangeEvent: Se } =
|
|
215
|
-
|
|
214
|
+
}), { sortChangeEvent: ye, filterChangeEvent: we, paginationChangeEvent: Se } = Ye(ve);
|
|
215
|
+
to({
|
|
216
216
|
columns: n(() => i.value),
|
|
217
217
|
columnsBackup: n(() => O.value),
|
|
218
|
-
size: n(() =>
|
|
218
|
+
size: n(() => lo[k.value]),
|
|
219
219
|
updateColumns(e) {
|
|
220
220
|
var a;
|
|
221
221
|
i.value = e, (a = t.onShownColumnsChange) == null || a.call(t, e);
|
|
222
222
|
},
|
|
223
223
|
updateSize(e) {
|
|
224
|
-
k.value =
|
|
224
|
+
k.value = ro[e];
|
|
225
225
|
},
|
|
226
226
|
renderConfig: n(() => ({
|
|
227
227
|
className: se("table-header", "title"),
|
|
@@ -241,7 +241,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
241
241
|
() => R(t.loading) ? m.loading : t.loading
|
|
242
242
|
), ke = n(
|
|
243
243
|
() => R(t.dataSource) ? m.records : t.dataSource
|
|
244
|
-
), { selectedRows: z, rowSelection: g, ...y } =
|
|
244
|
+
), { selectedRows: z, rowSelection: g, ...y } = ao({
|
|
245
245
|
...t.rowSelection === !0 ? {} : t.rowSelection,
|
|
246
246
|
dataSource: ke,
|
|
247
247
|
rowKey: t.rowKey
|
|
@@ -313,7 +313,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
313
313
|
e && (e.clearSort(), e.clearFilter());
|
|
314
314
|
}
|
|
315
315
|
function G() {
|
|
316
|
-
|
|
316
|
+
Oe(() => {
|
|
317
317
|
var e, a;
|
|
318
318
|
g.value.type === "radio" ? (e = s.value) == null || e.setRadioRowKey(g.value.selectedRowKeys[0]) : (a = s.value) == null || a.setCheckboxRowKey(
|
|
319
319
|
g.value.selectedRowKeys,
|
|
@@ -381,7 +381,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
381
381
|
class: h(e.card ? o(P)("search-wrapper") : null),
|
|
382
382
|
style: V(e.searchFormWrapperStyle)
|
|
383
383
|
}, [
|
|
384
|
-
J(o(
|
|
384
|
+
J(o(je).SearchForm, v(e.searchForm || {}, {
|
|
385
385
|
ref_key: "formRef",
|
|
386
386
|
ref: T,
|
|
387
387
|
"custom-reset": "",
|
|
@@ -427,7 +427,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
427
427
|
E("div", {
|
|
428
428
|
class: h(o(u)("vxe-wrapper"))
|
|
429
429
|
}, [
|
|
430
|
-
(c(), f(o(
|
|
430
|
+
(c(), f(o(Me), v(o(Ze)(t), {
|
|
431
431
|
ref_key: "tableRef",
|
|
432
432
|
ref: s,
|
|
433
433
|
key: o(ue),
|
|
@@ -468,23 +468,23 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
468
468
|
}, null, 8, ["image"])
|
|
469
469
|
]),
|
|
470
470
|
default: C(() => [
|
|
471
|
-
t.expandable && i.value.length ? (c(), f(o(Z), v({ key: 0 }, o(
|
|
471
|
+
t.expandable && i.value.length ? (c(), f(o(Z), v({ key: 0 }, o(eo)(e.expandable), { fixed: Re.value }), {
|
|
472
472
|
content: C((r) => [
|
|
473
473
|
(c(), f(L(t.expandable.renderContent(r))))
|
|
474
474
|
]),
|
|
475
475
|
_: 1
|
|
476
476
|
}, 16, ["fixed"])) : S("", !0),
|
|
477
|
-
t.rowSelection && i.value.length ? (c(), f(o(Z), v({ key: 1 }, o(
|
|
477
|
+
t.rowSelection && i.value.length ? (c(), f(o(Z), v({ key: 1 }, o(oo)(o(g), i.value), { field: o(no) }), null, 16, ["field"])) : S("", !0),
|
|
478
478
|
(c(!0), I(Y, null, K(o(de), (r) => (c(), f(L(r), {
|
|
479
479
|
key: r.props.colId
|
|
480
480
|
}))), 128))
|
|
481
481
|
]),
|
|
482
482
|
_: 2
|
|
483
483
|
}, [
|
|
484
|
-
K(o(
|
|
484
|
+
K(o(We)(b, ["searchFormExtra"]), (r, l) => ({
|
|
485
485
|
name: l,
|
|
486
486
|
fn: C((p) => [
|
|
487
|
-
D(e.$slots, l,
|
|
487
|
+
D(e.$slots, l, $e(He(p || {})))
|
|
488
488
|
])
|
|
489
489
|
}))
|
|
490
490
|
]), 1040, ["data", "sort-config", "filter-config", "loading", "style", "size", "onSortChange", "onFilterChange"]))
|
|
@@ -492,7 +492,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
492
492
|
E("div", {
|
|
493
493
|
class: h(o(u)("pagination-wrapper"))
|
|
494
494
|
}, [
|
|
495
|
-
e.sticky ? (c(), f(o(
|
|
495
|
+
e.sticky ? (c(), f(o(go), {
|
|
496
496
|
key: 0,
|
|
497
497
|
direction: "horizontal",
|
|
498
498
|
"scroll-container": pe.value,
|
|
@@ -500,7 +500,7 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
500
500
|
"bar-color": "var(--ap-scrollbar-thumb-color-base)",
|
|
501
501
|
"track-color": "var(--ap-table-header-bg, #f2f6f9)"
|
|
502
502
|
}, null, 8, ["scroll-container"])) : S("", !0),
|
|
503
|
-
e.pagination !== !1 ? (c(), f(o(
|
|
503
|
+
e.pagination !== !1 ? (c(), f(o(Qe), v({
|
|
504
504
|
key: 1,
|
|
505
505
|
class: o(u)("pagination")
|
|
506
506
|
}, o(j).pagination, { onChange: o(Se) }), null, 16, ["class", "onChange"])) : S("", !0)
|
|
@@ -510,5 +510,5 @@ const Ho = /* @__PURE__ */ Ve({
|
|
|
510
510
|
}
|
|
511
511
|
});
|
|
512
512
|
export {
|
|
513
|
-
|
|
513
|
+
Mo as default
|
|
514
514
|
};
|
|
@@ -3,7 +3,7 @@ import { ApTablePaginationConfig, ApTableValueFields, ApTableValueTypes, CommonF
|
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
import { TableProps } from '@aplus-frontend/antdv';
|
|
5
5
|
import { ColumnFilterItem, SortOrder, TableRowSelection } from '@aplus-frontend/antdv/es/table/interface';
|
|
6
|
-
import { ComputedRef, CSSProperties,
|
|
6
|
+
import { ComputedRef, CSSProperties, VNode } from 'vue';
|
|
7
7
|
import { VxeTablePropTypes, VxeColumnPropTypes, VxeTableProps, VxeTableDefines, VxeColumnSlots, VxeColumnProps } from 'vxe-table';
|
|
8
8
|
import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
|
|
9
9
|
export type ColConfigType = VxeTableDefines.ColumnOptions;
|
|
@@ -135,9 +135,9 @@ export type ApGridProps<RecordType = any, ParamsType = any> = Omit<TableProps<Re
|
|
|
135
135
|
card?: boolean;
|
|
136
136
|
/**
|
|
137
137
|
* request额外请求的参数
|
|
138
|
-
*
|
|
138
|
+
* 数据变化后将会重新发起网络请求
|
|
139
139
|
*/
|
|
140
|
-
params?: ParamsType
|
|
140
|
+
params?: ParamsType;
|
|
141
141
|
/**
|
|
142
142
|
* 请求获取dataSource
|
|
143
143
|
* @param params
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as _, ref as x, unref as t, computed as p, watch as
|
|
2
|
-
import { Empty as E, Spin as
|
|
3
|
-
import { useTablePaging as
|
|
1
|
+
import { defineComponent as _, ref as x, toRef as ee, unref as t, computed as p, watch as te, createElementBlock as s, openBlock as i, normalizeStyle as h, normalizeClass as l, renderSlot as u, createElementVNode as ae, createCommentVNode as I, createVNode as g, Fragment as F, createBlock as V, withCtx as b, renderList as ne, mergeProps as re } from "vue";
|
|
2
|
+
import { Empty as E, Spin as oe, Pagination as ie } from "@aplus-frontend/antdv";
|
|
3
|
+
import { useTablePaging as le } from "../ap-table/hooks/use-table-paging-ng.mjs";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
|
-
import { isUndefined as L, isNumber as
|
|
6
|
-
import { useOfflineList as
|
|
5
|
+
import { isUndefined as L, isNumber as se, omit as ue } from "lodash-unified";
|
|
6
|
+
import { useOfflineList as ce } from "./hooks/use-offline-list.mjs";
|
|
7
7
|
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
|
8
|
-
import { RecycleScroller as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
const
|
|
8
|
+
import { RecycleScroller as me, DynamicScroller as de, DynamicScrollerItem as fe } from "vue-virtual-scroller";
|
|
9
|
+
import { useNamespace as pe } from "../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
const De = /* @__PURE__ */ _({
|
|
11
11
|
name: "ApList",
|
|
12
12
|
__name: "index",
|
|
13
13
|
props: {
|
|
@@ -28,19 +28,19 @@ const we = /* @__PURE__ */ _({
|
|
|
28
28
|
rowKey: {},
|
|
29
29
|
adaptive: { type: Boolean, default: !1 }
|
|
30
30
|
},
|
|
31
|
-
setup(O, { expose:
|
|
32
|
-
const
|
|
31
|
+
setup(O, { expose: R }) {
|
|
32
|
+
const N = E.PRESENTED_IMAGE_SIMPLE, r = O, { b: d, e: y, bm: T, m: $ } = pe("ap-list"), k = x(), {
|
|
33
33
|
formRef: S,
|
|
34
|
-
submit:
|
|
35
|
-
reset:
|
|
34
|
+
submit: w,
|
|
35
|
+
reset: B,
|
|
36
36
|
handleTableChange: A,
|
|
37
37
|
data: v,
|
|
38
38
|
refresh: j,
|
|
39
39
|
refreshByDelete: q,
|
|
40
|
-
tableProps:
|
|
40
|
+
tableProps: D,
|
|
41
41
|
getPaging: K,
|
|
42
42
|
setPaging: M
|
|
43
|
-
} =
|
|
43
|
+
} = le({
|
|
44
44
|
async request(e) {
|
|
45
45
|
var n;
|
|
46
46
|
const a = await ((n = r.request) == null ? void 0 : n.call(r, e));
|
|
@@ -49,16 +49,16 @@ const we = /* @__PURE__ */ _({
|
|
|
49
49
|
total: (a == null ? void 0 : a.total) || 0
|
|
50
50
|
};
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
params: ee(r, "params"),
|
|
53
53
|
defaultData: r.defaultData,
|
|
54
54
|
manual: r.manual,
|
|
55
55
|
pagination: r.pagination,
|
|
56
56
|
formatParams: r.beforeSearchSubmit
|
|
57
57
|
}), W = { form: S }, {
|
|
58
|
-
pagination:
|
|
58
|
+
pagination: P,
|
|
59
59
|
dataSource: G,
|
|
60
60
|
onChange: U
|
|
61
|
-
} =
|
|
61
|
+
} = ce(r);
|
|
62
62
|
function H(e, a) {
|
|
63
63
|
if (t(f)) {
|
|
64
64
|
U(e, a);
|
|
@@ -73,9 +73,9 @@ const we = /* @__PURE__ */ _({
|
|
|
73
73
|
}
|
|
74
74
|
const c = p(() => t(f) ? t(G) : t(v).records), m = p(() => L(r.loading) ? t(v).loading : r.loading), J = p(() => {
|
|
75
75
|
var e, a;
|
|
76
|
-
return r.pagination === !1 || r.virtual ? !1 : ((e = r.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(f) ? (((a = r.dataSource) == null ? void 0 : a.length) || 0) > t(
|
|
76
|
+
return r.pagination === !1 || r.virtual ? !1 : ((e = r.pagination) == null ? void 0 : e.hideOnSinglePage) !== !0 ? !0 : t(f) ? (((a = r.dataSource) == null ? void 0 : a.length) || 0) > t(P).pageSize : t(v).total > t(D).pagination.pageSize;
|
|
77
77
|
}), f = p(() => !L(r.dataSource));
|
|
78
|
-
|
|
78
|
+
te(
|
|
79
79
|
() => t(m),
|
|
80
80
|
(e) => {
|
|
81
81
|
var a;
|
|
@@ -95,9 +95,9 @@ const we = /* @__PURE__ */ _({
|
|
|
95
95
|
var a, n, o;
|
|
96
96
|
(o = (n = (a = S.value) == null ? void 0 : a.apForm) == null ? void 0 : n.setFieldsValue) == null || o.call(n, e);
|
|
97
97
|
}
|
|
98
|
-
return
|
|
99
|
-
submit: () =>
|
|
100
|
-
reset: () =>
|
|
98
|
+
return R({
|
|
99
|
+
submit: () => w(),
|
|
100
|
+
reset: () => B(),
|
|
101
101
|
refresh: () => j(),
|
|
102
102
|
refreshByDelete: (e) => q(e),
|
|
103
103
|
scrollToFirstRow: Q,
|
|
@@ -111,10 +111,10 @@ const we = /* @__PURE__ */ _({
|
|
|
111
111
|
}, [
|
|
112
112
|
u(e.$slots, "header", {
|
|
113
113
|
formIns: W,
|
|
114
|
-
submit: t(
|
|
115
|
-
reset: t(
|
|
114
|
+
submit: t(w),
|
|
115
|
+
reset: t(B)
|
|
116
116
|
}),
|
|
117
|
-
|
|
117
|
+
ae("div", {
|
|
118
118
|
class: l([
|
|
119
119
|
t(d)("content-container"),
|
|
120
120
|
{ [t(T)("content-container", "spinning")]: m.value }
|
|
@@ -124,13 +124,13 @@ const we = /* @__PURE__ */ _({
|
|
|
124
124
|
key: 0,
|
|
125
125
|
class: l(t(y)("spin-wrapper"))
|
|
126
126
|
}, [
|
|
127
|
-
g(t(
|
|
127
|
+
g(t(oe), { spinning: m.value }, null, 8, ["spinning"])
|
|
128
128
|
], 2)) : I("", !0),
|
|
129
129
|
c.value.length === 0 ? u(e.$slots, "empty", {
|
|
130
130
|
key: 1,
|
|
131
131
|
loading: m.value
|
|
132
132
|
}, () => [
|
|
133
|
-
g(t(E), { image: t(
|
|
133
|
+
g(t(E), { image: t(N) }, null, 8, ["image"])
|
|
134
134
|
]) : (i(), s("div", {
|
|
135
135
|
key: 2,
|
|
136
136
|
ref_key: "contentRef",
|
|
@@ -139,7 +139,7 @@ const we = /* @__PURE__ */ _({
|
|
|
139
139
|
class: l(t(y)("content"))
|
|
140
140
|
}, [
|
|
141
141
|
e.virtual ? (i(), s(F, { key: 0 }, [
|
|
142
|
-
t(
|
|
142
|
+
t(se)(e.virtual) ? (i(), V(t(me), {
|
|
143
143
|
key: 0,
|
|
144
144
|
class: l(t(d)("scroll-wrapper")),
|
|
145
145
|
items: c.value,
|
|
@@ -153,7 +153,7 @@ const we = /* @__PURE__ */ _({
|
|
|
153
153
|
})
|
|
154
154
|
]),
|
|
155
155
|
_: 3
|
|
156
|
-
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), V(t(
|
|
156
|
+
}, 8, ["class", "items", "item-size", "key-field"])) : (i(), V(t(de), {
|
|
157
157
|
key: 1,
|
|
158
158
|
items: c.value,
|
|
159
159
|
"min-item-size": e.virtual.minItemSize,
|
|
@@ -162,7 +162,7 @@ const we = /* @__PURE__ */ _({
|
|
|
162
162
|
default: b(({ item: n, index: o, active: Z }) => {
|
|
163
163
|
var z, C;
|
|
164
164
|
return [
|
|
165
|
-
g(t(
|
|
165
|
+
g(t(fe), {
|
|
166
166
|
item: n,
|
|
167
167
|
active: Z,
|
|
168
168
|
"data-index": o,
|
|
@@ -184,7 +184,7 @@ const we = /* @__PURE__ */ _({
|
|
|
184
184
|
key: 1,
|
|
185
185
|
dataSource: c.value
|
|
186
186
|
}, () => [
|
|
187
|
-
(i(!0), s(F, null,
|
|
187
|
+
(i(!0), s(F, null, ne(c.value, (n, o) => u(e.$slots, "renderItem", {
|
|
188
188
|
item: n,
|
|
189
189
|
index: o
|
|
190
190
|
})), 256))
|
|
@@ -196,8 +196,8 @@ const we = /* @__PURE__ */ _({
|
|
|
196
196
|
class: l(t(y)("footer")),
|
|
197
197
|
style: h(e.footerWarpperStyle)
|
|
198
198
|
}, [
|
|
199
|
-
g(t(
|
|
200
|
-
f.value ? t(
|
|
199
|
+
g(t(ie), re(
|
|
200
|
+
f.value ? t(P) : t(ue)(t(D).pagination, ["showTotal"]),
|
|
201
201
|
{ onChange: H }
|
|
202
202
|
), null, 16)
|
|
203
203
|
], 6)) : I("", !0)
|
|
@@ -205,5 +205,5 @@ const we = /* @__PURE__ */ _({
|
|
|
205
205
|
}
|
|
206
206
|
});
|
|
207
207
|
export {
|
|
208
|
-
|
|
208
|
+
De as default
|
|
209
209
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyleValue } from 'vue';
|
|
2
2
|
import { RequestData } from '../ap-table';
|
|
3
3
|
import { Recordable } from '../type';
|
|
4
4
|
import { InternalPagingType } from '../ap-table/hooks/use-table-paging-ng';
|
|
@@ -17,9 +17,10 @@ export type ApListProps<RecordType = any, ParamsType = Recordable> = {
|
|
|
17
17
|
*/
|
|
18
18
|
onItem?: (record: RecordType, index: number) => void;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* 依赖的额外的参数
|
|
21
|
+
* 变更后会重新发起网络请求
|
|
21
22
|
*/
|
|
22
|
-
params?: ParamsType
|
|
23
|
+
params?: ParamsType;
|
|
23
24
|
/**
|
|
24
25
|
* 请求数据
|
|
25
26
|
* @param params
|