@aplus-frontend/ui 6.29.1 → 6.29.3
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/ag-grid/components/header-cell/index.vue2.mjs +15 -16
- package/es/src/ag-grid/hooks/use-columns.d.ts +1 -0
- package/es/src/ag-grid/hooks/use-columns.mjs +17 -12
- package/es/src/ag-grid/hooks/use-search-form.mjs +14 -14
- package/es/src/ag-grid/index.vue.mjs +241 -233
- package/es/src/ag-grid/interface.d.ts +4 -0
- package/es/src/ag-grid/utils.d.ts +6 -0
- package/es/src/ag-grid/utils.mjs +16 -11
- package/es/src/ap-field/checkbox/index.vue.mjs +20 -20
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-form/item-group/helper.mjs +36 -31
- package/es/src/ap-form/search-form/hooks/use-count-per-row.mjs +27 -26
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/hooks/use-columns.d.ts +1 -0
- package/lib/src/ag-grid/hooks/use-columns.js +1 -1
- package/lib/src/ag-grid/hooks/use-search-form.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +4 -0
- package/lib/src/ag-grid/utils.d.ts +6 -0
- package/lib/src/ag-grid/utils.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-form/item-group/helper.js +1 -1
- package/lib/src/ap-form/search-form/hooks/use-count-per-row.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
- package/theme/ag-grid/index.css +6 -0
- package/theme/antdv-override.css +6 -0
- package/theme/antdv-override.less +17 -0
- package/theme/ap-field/checkbox.css +3 -0
- package/theme/ap-field/checkbox.less +3 -0
- package/theme/ap-field/index.css +6 -0
- package/theme/ap-field/radio.css +3 -0
- package/theme/ap-field/radio.less +3 -0
- package/theme/ap-grid/index.css +6 -0
- package/theme/ap-table/ap-table.css +6 -0
- package/theme/ap-table-modal/index.css +6 -0
- package/theme/batch-input-group/index.css +6 -0
- package/theme/editable-table/index.css +6 -0
- package/theme/index.css +12 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as w, computed as d, createElementBlock as f, openBlock as s, normalizeClass as r, unref as e, createBlock as B, createCommentVNode as
|
|
2
|
-
import { useToken as
|
|
1
|
+
import { defineComponent as w, computed as d, createElementBlock as f, openBlock as s, normalizeClass as r, unref as e, createBlock as B, createCommentVNode as _, resolveDynamicComponent as D, createVNode as C } from "vue";
|
|
2
|
+
import { useToken as O } from "@aplus-frontend/antdv/es/theme/internal";
|
|
3
3
|
import { CaretUpOutlined as V, CaretDownOutlined as j } from "@ant-design/icons-vue";
|
|
4
4
|
import { getTableTitle as z } from "../../../ap-table/utils.mjs";
|
|
5
5
|
import "../../../config-provider/index.mjs";
|
|
@@ -11,28 +11,27 @@ const K = /* @__PURE__ */ w({
|
|
|
11
11
|
params: {}
|
|
12
12
|
},
|
|
13
13
|
setup(S) {
|
|
14
|
-
const o = S, { b: v, e:
|
|
14
|
+
const o = S, { b: v, e: n } = g("ag-custom-header"), { be: b, bem: k } = g("ap-grid"), [, I] = O(), { sorter: c, setSorter: T } = A(), a = d(() => o.params.column.sorter);
|
|
15
15
|
function h(t) {
|
|
16
16
|
return t ? t === "asc" ? "desc" : null : "asc";
|
|
17
17
|
}
|
|
18
18
|
const m = d(() => o.params?.column?.getColId?.());
|
|
19
|
-
function
|
|
20
|
-
if (!
|
|
19
|
+
function x() {
|
|
20
|
+
if (!a.value)
|
|
21
21
|
return;
|
|
22
|
-
const l = o.params.column.getColId(),
|
|
22
|
+
const l = o.params.column.getColId(), y = o.params.column.getSort(), u = h(y), p = o.params.api, N = p.getColumnState().map((i) => ({
|
|
23
23
|
...i,
|
|
24
24
|
sort: i.colId === l ? u : null
|
|
25
25
|
}));
|
|
26
26
|
p.applyColumnState({
|
|
27
|
-
state: N
|
|
28
|
-
applyOrder: !0
|
|
27
|
+
state: N
|
|
29
28
|
}), T({ [l]: u });
|
|
30
29
|
}
|
|
31
30
|
return (t, l) => (s(), f("div", {
|
|
32
|
-
class: r([e(v)(), { sortable:
|
|
33
|
-
onClick:
|
|
31
|
+
class: r([e(v)(), { sortable: a.value }, `align-${t.params.column.align || "left"}`]),
|
|
32
|
+
onClick: x
|
|
34
33
|
}, [
|
|
35
|
-
(s(), B(
|
|
34
|
+
(s(), B(D(
|
|
36
35
|
e(z)(
|
|
37
36
|
t.params.column,
|
|
38
37
|
[
|
|
@@ -43,17 +42,17 @@ const K = /* @__PURE__ */ w({
|
|
|
43
42
|
e(I).colorTextTertiary
|
|
44
43
|
)
|
|
45
44
|
))),
|
|
46
|
-
|
|
45
|
+
a.value ? (s(), f("span", {
|
|
47
46
|
key: 0,
|
|
48
|
-
class: r(e(
|
|
47
|
+
class: r(e(n)("sort-wrapper"))
|
|
49
48
|
}, [
|
|
50
49
|
C(e(V), {
|
|
51
|
-
class: r({ [e(
|
|
50
|
+
class: r({ [e(n)("sorter-up")]: !0, active: e(c)[m.value] === "asc" })
|
|
52
51
|
}, null, 8, ["class"]),
|
|
53
52
|
C(e(j), {
|
|
54
|
-
class: r({ [e(
|
|
53
|
+
class: r({ [e(n)("sorter-down")]: !0, active: e(c)[m.value] === "desc" })
|
|
55
54
|
}, null, 8, ["class"])
|
|
56
|
-
], 2)) :
|
|
55
|
+
], 2)) : _("", !0)
|
|
57
56
|
], 2));
|
|
58
57
|
}
|
|
59
58
|
});
|
|
@@ -7,4 +7,5 @@ export declare const useColumns: <RecordType>(props: AgGridProps<RecordType>) =>
|
|
|
7
7
|
columns: Ref<AgGridColumnType<RecordType>[], AgGridColumnType<RecordType>[]>;
|
|
8
8
|
shownColumns: Ref<AgGridColumnType<RecordType>[], AgGridColumnType<RecordType>[]>;
|
|
9
9
|
columnKeys: ComputedRef<string[]>;
|
|
10
|
+
getTargetColumnByKey: (key?: string) => AgGridColumnType<RecordType> | undefined;
|
|
10
11
|
};
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import { ref as u, computed as
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ref as u, computed as a, watch as i } from "vue";
|
|
2
|
+
import { getStringKey as l } from "../utils.mjs";
|
|
3
|
+
const g = (o) => {
|
|
4
|
+
const n = u([]), t = u([]);
|
|
4
5
|
function m() {
|
|
5
|
-
return
|
|
6
|
+
return o.columns?.filter((e) => !e.hideInTable) || [];
|
|
6
7
|
}
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
function r(e) {
|
|
9
|
+
return n.value.find((c) => l(c.key) === e);
|
|
10
|
+
}
|
|
11
|
+
const s = a(
|
|
12
|
+
() => n.value.map((e) => l(e.key)).filter(Boolean)
|
|
9
13
|
);
|
|
10
|
-
return
|
|
11
|
-
() =>
|
|
14
|
+
return i(
|
|
15
|
+
() => o.columns,
|
|
12
16
|
() => {
|
|
13
17
|
const e = m();
|
|
14
|
-
|
|
18
|
+
n.value = e, t.value = e, o.onShownColumnsChange?.(e);
|
|
15
19
|
},
|
|
16
20
|
{
|
|
17
21
|
deep: !0,
|
|
18
22
|
immediate: !0
|
|
19
23
|
}
|
|
20
24
|
), {
|
|
21
|
-
columns:
|
|
25
|
+
columns: n,
|
|
22
26
|
shownColumns: t,
|
|
23
|
-
columnKeys:
|
|
27
|
+
columnKeys: s,
|
|
28
|
+
getTargetColumnByKey: r
|
|
24
29
|
};
|
|
25
30
|
};
|
|
26
31
|
export {
|
|
27
|
-
|
|
32
|
+
g as useColumns
|
|
28
33
|
};
|
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { noRenderAsFormItemValueList as s } from "../../ap-table/constants.mjs";
|
|
2
2
|
import { computed as p, unref as l } from "vue";
|
|
3
|
-
import { getColumnOrder as
|
|
3
|
+
import { getColumnOrder as t, updateFormProps as u, getFieldProps as i, getSearchFormItemRenderNode as m } from "../../ap-table/utils.mjs";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
|
-
import { useGlobalConfig as
|
|
6
|
-
const P = (
|
|
7
|
-
let
|
|
8
|
-
const
|
|
9
|
-
return p(() => (
|
|
10
|
-
(e) => !e.hideInSearch && (e.dataIndex
|
|
5
|
+
import { useGlobalConfig as f } from "../../config-provider/hooks/use-global-config.mjs";
|
|
6
|
+
const P = (a) => {
|
|
7
|
+
let d = 0;
|
|
8
|
+
const n = f("valueTypeMap");
|
|
9
|
+
return p(() => (d++, a.columns?.filter(
|
|
10
|
+
(e) => !e.hideInSearch && (e.field ?? e.dataIndex ?? e.key) && (e.valueType || e.customRenderFormItem) && !s.includes(e.valueType)
|
|
11
11
|
)?.sort((e, o) => {
|
|
12
|
-
const r =
|
|
13
|
-
return
|
|
12
|
+
const r = t(e.order);
|
|
13
|
+
return t(o.order) - r;
|
|
14
14
|
})?.map((e) => {
|
|
15
15
|
const o = u(
|
|
16
16
|
e,
|
|
17
|
-
|
|
17
|
+
i(e.fieldProps, {})
|
|
18
18
|
), r = {
|
|
19
19
|
...e,
|
|
20
20
|
fieldProps: {
|
|
21
21
|
label: e.title,
|
|
22
|
-
name: e.dataIndex
|
|
22
|
+
name: e.field ?? e.dataIndex ?? e.key,
|
|
23
23
|
// tips: 在表格中的查询表单项默认是带边框的
|
|
24
24
|
bordered: !0,
|
|
25
25
|
...o || {},
|
|
26
|
-
_signal:
|
|
26
|
+
_signal: d
|
|
27
27
|
},
|
|
28
28
|
renderNode: void 0
|
|
29
29
|
};
|
|
30
|
-
return r.renderNode =
|
|
30
|
+
return r.renderNode = m(
|
|
31
31
|
r,
|
|
32
|
-
l(
|
|
32
|
+
l(n)
|
|
33
33
|
), r;
|
|
34
34
|
}) || []));
|
|
35
35
|
};
|