@aplus-frontend/ui 0.4.33 → 0.5.0-beta.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.
Files changed (123) hide show
  1. package/es/index.mjs +121 -117
  2. package/es/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
  3. package/es/src/ap-button/ap-confirm-button.vue.mjs +56 -0
  4. package/es/src/ap-button/ap-confirm-button.vue2.mjs +4 -0
  5. package/es/src/ap-button/index.d.ts +2 -1
  6. package/es/src/ap-button/index.mjs +1 -0
  7. package/es/src/ap-button/interface.d.ts +6 -1
  8. package/es/src/ap-button/utils/index.d.ts +2 -0
  9. package/es/src/ap-button/utils/index.mjs +36 -16
  10. package/es/src/ap-grid/constants.d.ts +9 -0
  11. package/es/src/ap-grid/constants.mjs +12 -0
  12. package/es/src/ap-grid/hooks/use-inner-params.d.ts +10 -0
  13. package/es/src/ap-grid/hooks/use-inner-params.mjs +41 -0
  14. package/es/src/ap-grid/hooks/use-render-columns.d.ts +6 -0
  15. package/es/src/ap-grid/hooks/use-render-columns.mjs +29 -0
  16. package/es/src/ap-grid/index.d.ts +3 -0
  17. package/es/src/ap-grid/index.mjs +2 -0
  18. package/es/src/ap-grid/index.vue.mjs +399 -0
  19. package/es/src/ap-grid/index.vue2.mjs +4 -0
  20. package/es/src/ap-grid/interface.d.ts +279 -0
  21. package/es/src/ap-grid/interface.mjs +1 -0
  22. package/es/src/ap-grid/style/css.d.ts +0 -0
  23. package/es/src/ap-grid/style/css.js +1 -0
  24. package/es/src/ap-grid/style/index.d.ts +0 -0
  25. package/es/src/ap-grid/style/index.js +1 -0
  26. package/es/src/ap-grid/utils/col.d.ts +20 -0
  27. package/es/src/ap-grid/utils/col.mjs +106 -0
  28. package/es/src/ap-grid/utils/renderer.d.ts +3 -0
  29. package/es/src/ap-grid/utils/renderer.mjs +21 -0
  30. package/es/src/ap-grid/utils/table.d.ts +13 -0
  31. package/es/src/ap-grid/utils/table.mjs +64 -0
  32. package/es/src/ap-modal/utils/createModal.mjs +28 -28
  33. package/es/src/ap-table/ap-table.vue.d.ts +2 -0
  34. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +38 -38
  35. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +9 -9
  36. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +21 -21
  37. package/es/src/ap-table/components/setting/utils.d.ts +15 -3
  38. package/es/src/ap-table/components/setting/utils.mjs +49 -38
  39. package/es/src/ap-table/context.d.ts +2 -1
  40. package/es/src/ap-table/context.mjs +8 -7
  41. package/es/src/ap-table/hooks/use-table-column-state.mjs +79 -70
  42. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +8 -2
  43. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +43 -40
  44. package/es/src/ap-table/hooks/use-table-row-selection.d.ts +12 -0
  45. package/es/src/ap-table/hooks/use-table-row-selection.mjs +41 -27
  46. package/es/src/ap-table/interface.d.ts +4 -0
  47. package/es/src/ap-table/utils.d.ts +1 -1
  48. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +2 -0
  49. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +2 -0
  50. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +2 -0
  51. package/es/src/business/ap-table-modal/index.d.ts +8 -0
  52. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +4 -0
  53. package/es/src/business/hooks/usePageListApTable.d.ts +2 -0
  54. package/es/src/index.d.ts +1 -0
  55. package/es/src/index.mjs +242 -237
  56. package/es/src/path-map.mjs +2 -1
  57. package/lib/index.js +1 -1
  58. package/lib/src/ap-button/ap-confirm-button.vue.d.ts +20 -0
  59. package/lib/src/ap-button/ap-confirm-button.vue.js +1 -0
  60. package/lib/src/ap-button/ap-confirm-button.vue2.js +1 -0
  61. package/lib/src/ap-button/index.d.ts +2 -1
  62. package/lib/src/ap-button/index.js +1 -1
  63. package/lib/src/ap-button/interface.d.ts +6 -1
  64. package/lib/src/ap-button/utils/index.d.ts +2 -0
  65. package/lib/src/ap-button/utils/index.js +1 -1
  66. package/lib/src/ap-grid/constants.d.ts +9 -0
  67. package/lib/src/ap-grid/constants.js +1 -0
  68. package/lib/src/ap-grid/hooks/use-inner-params.d.ts +10 -0
  69. package/lib/src/ap-grid/hooks/use-inner-params.js +1 -0
  70. package/lib/src/ap-grid/hooks/use-render-columns.d.ts +6 -0
  71. package/lib/src/ap-grid/hooks/use-render-columns.js +1 -0
  72. package/lib/src/ap-grid/index.d.ts +3 -0
  73. package/lib/src/ap-grid/index.js +1 -0
  74. package/lib/src/ap-grid/index.vue.js +1 -0
  75. package/lib/src/ap-grid/index.vue2.js +1 -0
  76. package/lib/src/ap-grid/interface.d.ts +279 -0
  77. package/lib/src/ap-grid/interface.js +1 -0
  78. package/lib/src/ap-grid/style/css.cjs +1 -0
  79. package/lib/src/ap-grid/style/css.d.ts +0 -0
  80. package/lib/src/ap-grid/style/index.cjs +1 -0
  81. package/lib/src/ap-grid/style/index.d.ts +0 -0
  82. package/lib/src/ap-grid/utils/col.d.ts +20 -0
  83. package/lib/src/ap-grid/utils/col.js +1 -0
  84. package/lib/src/ap-grid/utils/renderer.d.ts +3 -0
  85. package/lib/src/ap-grid/utils/renderer.js +1 -0
  86. package/lib/src/ap-grid/utils/table.d.ts +13 -0
  87. package/lib/src/ap-grid/utils/table.js +1 -0
  88. package/lib/src/ap-modal/utils/createModal.js +1 -1
  89. package/lib/src/ap-table/ap-table.vue.d.ts +2 -0
  90. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  91. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  92. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
  93. package/lib/src/ap-table/components/setting/utils.d.ts +15 -3
  94. package/lib/src/ap-table/components/setting/utils.js +1 -1
  95. package/lib/src/ap-table/context.d.ts +2 -1
  96. package/lib/src/ap-table/context.js +1 -1
  97. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -1
  98. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +8 -2
  99. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  100. package/lib/src/ap-table/hooks/use-table-row-selection.d.ts +12 -0
  101. package/lib/src/ap-table/hooks/use-table-row-selection.js +1 -1
  102. package/lib/src/ap-table/interface.d.ts +4 -0
  103. package/lib/src/ap-table/utils.d.ts +1 -1
  104. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +2 -0
  105. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +2 -0
  106. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +2 -0
  107. package/lib/src/business/ap-table-modal/index.d.ts +8 -0
  108. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +4 -0
  109. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -0
  110. package/lib/src/index.d.ts +1 -0
  111. package/lib/src/index.js +1 -1
  112. package/lib/src/path-map.js +1 -1
  113. package/package.json +3 -1
  114. package/theme/antd-global-overwrite/admin/index.css +8 -1
  115. package/theme/antd-global-overwrite/admin/modal.css +8 -1
  116. package/theme/antd-global-overwrite/admin/modal.less +10 -1
  117. package/theme/antd-global-overwrite/aplus/index.css +8 -1
  118. package/theme/antd-global-overwrite/aplus/modal.css +8 -1
  119. package/theme/antd-global-overwrite/aplus/modal.less +10 -1
  120. package/theme/ap-grid/index.css +302 -0
  121. package/theme/ap-grid/index.less +65 -0
  122. package/theme/index.css +51 -0
  123. package/theme/index.less +1 -0
@@ -0,0 +1,20 @@
1
+ import { ApGridColumnType, ColConfigType } from '../interface';
2
+ import { ValueTypeRenderConfig } from '../../config-provider';
3
+ /**
4
+ * 转换分组页
5
+ * @param columnConfig
6
+ * @returns
7
+ */
8
+ export declare function transformToColGroup<RecordType>(columnConfig: ApGridColumnType<RecordType>, color: string, className: string): ColConfigType;
9
+ /**
10
+ * 转换渲染列
11
+ * @param columnConfig
12
+ * @returns
13
+ */
14
+ export declare function transformToColumn<RecordType>(columnConfig: ApGridColumnType<RecordType>, color: string, className: string, extraValueType?: Record<string, ValueTypeRenderConfig>): ColConfigType;
15
+ /**
16
+ * 将ApColumn风格的列配置转换成适合VxeTable渲染的数据结构
17
+ * @param rawColumn
18
+ * @returns
19
+ */
20
+ export declare function transformCol<RecordType>(rawColumn: ApGridColumnType<RecordType>, color: string, className: string, extraValueType?: Record<string, ValueTypeRenderConfig>): ColConfigType;
@@ -0,0 +1,106 @@
1
+ import { createVNode as E, Fragment as M } from "vue";
2
+ import { isUndefined as S, isArray as B, isString as v, isBoolean as F, pick as w } from "lodash-unified";
3
+ import { valueEnumToArray as W, getTableTitle as A, getTableRenderType as j, getTableRenderProps as k, getTableCellRenderNode as z } from "../../ap-table/utils.mjs";
4
+ function O(e) {
5
+ if (!S(e))
6
+ return B(e) ? e.reduce((r, i) => v(i) ? `${r}.${i}` : `${r}[${i}]`, "") : String(e);
7
+ }
8
+ function R(e) {
9
+ if (e)
10
+ return e === !0 ? "left" : e;
11
+ }
12
+ function G(e) {
13
+ return F(e) ? {
14
+ sortable: e
15
+ } : e ? {
16
+ sortable: !0,
17
+ sortType: e == null ? void 0 : e.type,
18
+ sortBy: e == null ? void 0 : e.by
19
+ } : {
20
+ sortable: !1
21
+ };
22
+ }
23
+ function H(e) {
24
+ let r;
25
+ return F(e.filters) && e.valueEnum ? r = W(e.valueEnum) : r = e.filters, r == null ? void 0 : r.map((i) => ({
26
+ label: v(i.text) ? i.text : "",
27
+ value: i.value
28
+ }));
29
+ }
30
+ function N(e) {
31
+ if (e)
32
+ return (r) => e(r.value, r.row);
33
+ }
34
+ function u(e, r, i) {
35
+ const d = w(e, ["width", "minWidth", "align"]);
36
+ return d.field = O(e.dataIndex), d.fixed = R(e.fixed), d.title = e.title, d.slots = {
37
+ header: () => A(e, i, void 0, r)
38
+ }, d.headerAlign = e.align, d.showOverflow = e.ellipsis, d.showHeaderOverflow = e.ellipsis, d;
39
+ }
40
+ function y(e, r, i, d) {
41
+ const t = w(e, ["width", "minWidth", "align", "resizable"]);
42
+ t.field = O(e.dataIndex), t.fixed = R(e.fixed), t.headerAlign = e.align, t.footerAlign = e.align, t.showOverflow = e.ellipsis, t.showFooterOverflow = e.ellipsis, Object.assign(t, G(e.sorter)), t.filters = H(e), t.filterMultiple = e.filterMultiple, t.filterMethod = N(e.onFilter), t.title = e.title;
43
+ const h = ({
44
+ value: s,
45
+ ...n
46
+ }) => {
47
+ var p, x;
48
+ const l = j(e), a = k({
49
+ ...e,
50
+ valueType: l
51
+ }, {
52
+ value: s,
53
+ ...n
54
+ }), f = z(l, a, n.record, d), $ = ((p = e.renderText) == null ? void 0 : p.call(e, {
55
+ value: s,
56
+ ...n
57
+ })) || s;
58
+ let T = e.renderText ? E(M, null, [(x = e.renderText) == null ? void 0 : x.call(e, {
59
+ value: s,
60
+ ...n
61
+ })]) : f;
62
+ return e.customRender && (T = e.customRender({
63
+ value: s,
64
+ ...n,
65
+ column: e,
66
+ originalNode: T,
67
+ originalText: $
68
+ })), T;
69
+ };
70
+ return t.slots = {
71
+ header: () => A(e, i, void 0, r),
72
+ default: ({
73
+ row: s,
74
+ rowIndex: n
75
+ }) => h({
76
+ value: s[t.field],
77
+ text: s[t.field],
78
+ record: s,
79
+ index: n,
80
+ renderIndex: n,
81
+ column: e
82
+ })
83
+ }, t;
84
+ }
85
+ function I(e, r, i, d) {
86
+ var s;
87
+ if (!((s = e.children) != null && s.length))
88
+ return y(e, r, i, d);
89
+ function t(n) {
90
+ return n.map((l) => {
91
+ var a;
92
+ if ((a = l.children) != null && a.length) {
93
+ const f = u(l, r, i);
94
+ return f.children = t(l.children), f;
95
+ }
96
+ return y(l, r, i, d);
97
+ });
98
+ }
99
+ const h = u(e, r, i);
100
+ return h.children = t(e.children), h;
101
+ }
102
+ export {
103
+ I as transformCol,
104
+ u as transformToColGroup,
105
+ y as transformToColumn
106
+ };
@@ -0,0 +1,3 @@
1
+ import { ApGridColumnType } from '../interface';
2
+ import { ValueTypeRenderConfig } from '../../config-provider';
3
+ export declare function renderWithColumns<RecordType>(columns: ApGridColumnType<RecordType>[], color: string, className: string, extraValueType?: Record<string, ValueTypeRenderConfig>): import("vue/jsx-runtime").JSX.Element[];
@@ -0,0 +1,21 @@
1
+ import { createVNode as m } from "vue";
2
+ import { VxeColumn as u, VxeColgroup as p } from "vxe-table";
3
+ import { transformCol as d } from "./col.mjs";
4
+ function n(r) {
5
+ var e;
6
+ return (e = r.children) != null && e.length ? m(p, r, {
7
+ ...r.slots || {},
8
+ default: () => {
9
+ var t;
10
+ return (t = r.children) == null ? void 0 : t.map((o) => n(o));
11
+ }
12
+ }) : m(u, r, {
13
+ ...r.slots || {}
14
+ });
15
+ }
16
+ function C(r, e, t, o) {
17
+ return r.map((l) => n(d(l, e, t, o)));
18
+ }
19
+ export {
20
+ C as renderWithColumns
21
+ };
@@ -0,0 +1,13 @@
1
+ import { VxeTableEventProps, VxeTableProps } from 'vxe-table';
2
+ import { ApGridProps, ApGridRowSelection } from '../interface';
3
+ import { RowSelectionType } from '@aplus-frontend/antdv/es/table/interface';
4
+ export declare function toVxeProps<RecordType>(props: any): VxeTableProps<RecordType> & VxeTableEventProps<RecordType>;
5
+ export declare function getRowSelectionProps(rowSelection: ApGridRowSelection<any> | true): {
6
+ type: RowSelectionType;
7
+ width: string | number;
8
+ };
9
+ export declare function getRowExpandProps(config: ApGridProps['expandable']): {
10
+ readonly type: "expand";
11
+ readonly title: string | undefined;
12
+ readonly width: string | number;
13
+ };
@@ -0,0 +1,64 @@
1
+ import { isUndefined as d, omit as a, isFunction as c, isNumber as f } from "lodash-unified";
2
+ const h = 30, b = 50;
3
+ function y(e) {
4
+ var i, l, n;
5
+ const t = {
6
+ ...e
7
+ };
8
+ if (e.columnResizable && (t.columnConfig ? t.columnConfig.resizable = !0 : t.columnConfig = {
9
+ resizable: !0
10
+ }), e.rowSelection) {
11
+ const o = e.rowSelection === !0 ? {} : e.rowSelection;
12
+ o.type === "radio" ? t.radioConfig = {
13
+ highlight: !0,
14
+ checkMethod({ row: r }) {
15
+ return o.disabled ? !o.disabled(r) : !0;
16
+ },
17
+ checkRowKey: (i = o.defaultSelectedRowKeys) == null ? void 0 : i[0],
18
+ reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
19
+ } : t.checkboxConfig = {
20
+ highlight: !0,
21
+ checkMethod({ row: r }) {
22
+ return o.disabled ? !o.disabled(r) : !0;
23
+ },
24
+ checkRowKeys: o.defaultSelectedRowKeys,
25
+ reserve: d(o.preserveSelectedRowKeys) ? !0 : o.preserveSelectedRowKeys
26
+ };
27
+ }
28
+ return t.border = e.bordered, e.expandable && (t.expandConfig = a(e.expandable, [
29
+ "renderContent",
30
+ "width",
31
+ "title"
32
+ ])), e.footer && (t.showFooter = !0, c(e.footer) ? t.footerMethod = e.footer : t.footerData = e.footer), e.virtual === !1 ? (t.virtualXConfig = {
33
+ enabled: !1
34
+ }, t.virtualYConfig = {
35
+ enabled: !1
36
+ }) : (u(t, "X", (l = e.virtual) == null ? void 0 : l.x), u(t, "Y", (n = e.virtual) == null ? void 0 : n.y)), t;
37
+ }
38
+ function u(e, t, i) {
39
+ const l = t === "X", n = l ? "virtualXConfig" : "virtualYConfig", o = i !== !1, r = l ? h : b, s = f(i) && i >= 0 ? i : r;
40
+ e[n] = {
41
+ enabled: o,
42
+ gt: s
43
+ };
44
+ }
45
+ function C(e) {
46
+ const t = e === !0 || !e.type ? "checkbox" : e.type, i = e === !0 ? 60 : e.columnWidth || 60;
47
+ return {
48
+ type: t,
49
+ width: i
50
+ };
51
+ }
52
+ function R(e) {
53
+ const t = (e == null ? void 0 : e.width) || "auto";
54
+ return {
55
+ type: "expand",
56
+ title: e == null ? void 0 : e.title,
57
+ width: t
58
+ };
59
+ }
60
+ export {
61
+ R as getRowExpandProps,
62
+ C as getRowSelectionProps,
63
+ y as toVxeProps
64
+ };
@@ -1,4 +1,4 @@
1
- import { render as u, defineComponent as w, createVNode as f, mergeProps as y, h as k } from "vue";
1
+ import { render as u, defineComponent as x, createVNode as h, mergeProps as k, h as v } from "vue";
2
2
  import { Modal as b } from "@aplus-frontend/antdv";
3
3
  import { ConfigProvider as P, globalConfigCached as N } from "../../config-provider/config-provider.mjs";
4
4
  import { omit as L } from "lodash-unified";
@@ -11,9 +11,9 @@ const z = (d) => {
11
11
  destroyOnClose: c = !0,
12
12
  wrapperOffset: r = !1
13
13
  } = d, {
14
- b: h
14
+ b: l
15
15
  } = H("ap-modal");
16
- function l() {
16
+ function m() {
17
17
  n && n(!1), setTimeout(() => {
18
18
  var e;
19
19
  u(null, s), (e = s.parentElement) == null || e.removeChild(s);
@@ -22,13 +22,13 @@ const z = (d) => {
22
22
  function C() {
23
23
  n && n(!0);
24
24
  }
25
- function m() {
25
+ function f() {
26
26
  n && n(!1);
27
27
  }
28
28
  function g(e) {
29
29
  t && t(e);
30
30
  }
31
- const O = /* @__PURE__ */ w({
31
+ const O = /* @__PURE__ */ x({
32
32
  data() {
33
33
  return {
34
34
  open: c,
@@ -47,25 +47,25 @@ const z = (d) => {
47
47
  },
48
48
  methods: {
49
49
  async handleCancel() {
50
- var e, o, a, i, p;
50
+ var e, o, a, p, i;
51
51
  if ((e = this.props) != null && e.onCancel) {
52
- const v = ((i = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : i.exposed) ?? void 0;
53
- await ((p = this.props) == null ? void 0 : p.onCancel(v));
52
+ const w = ((p = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : p.exposed) ?? void 0;
53
+ await ((i = this.props) == null ? void 0 : i.onCancel(w));
54
54
  }
55
- c ? l() : m();
55
+ c ? m() : f();
56
56
  },
57
57
  async handleOk() {
58
- var e, o, a, i;
58
+ var e, o, a, p;
59
59
  try {
60
60
  if (t({
61
61
  confirmLoading: !0
62
62
  }), (e = this.props) != null && e.onOk) {
63
- const p = ((i = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : i.exposed) ?? void 0;
64
- await this.props.onOk(p);
63
+ const i = ((p = (a = (o = this.props) == null ? void 0 : o.content) == null ? void 0 : a.component) == null ? void 0 : p.exposed) ?? void 0;
64
+ await this.props.onOk(i);
65
65
  }
66
66
  t({
67
67
  confirmLoading: !1
68
- }), c ? l() : m();
68
+ }), c ? m() : f();
69
69
  } catch {
70
70
  t({
71
71
  confirmLoading: !1
@@ -75,11 +75,11 @@ const z = (d) => {
75
75
  },
76
76
  render() {
77
77
  const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
78
- return f(P, N.value, {
79
- default: () => [f(b, y({
78
+ return h(P, N.value, {
79
+ default: () => [h(b, k({
80
80
  class: {
81
- [h()]: !0,
82
- [h("wrapper")]: r
81
+ [l()]: !0,
82
+ [l("wrapper")]: r
83
83
  },
84
84
  open: this.open,
85
85
  onCancel: this.handleCancel,
@@ -87,24 +87,24 @@ const z = (d) => {
87
87
  }, e), {
88
88
  default: () => {
89
89
  var o;
90
- return [f("div", {
91
- style: Object.assign({
92
- padding: "0 20px"
93
- }, r === !1 ? {} : {
94
- maxHeight: `${window.innerHeight - (r === !0 ? 100 : E(r) ? Number(r) : 100) * 2}px`,
95
- overflow: "hidden auto"
96
- })
90
+ return [h("div", {
91
+ class: {
92
+ [l("body-wrapper")]: r
93
+ },
94
+ style: r === !1 ? {} : {
95
+ maxHeight: `${window.innerHeight - (r === !0 ? 100 : E(r) ? Number(r) : 100) * 2}px`
96
+ }
97
97
  }, [(o = this.props) == null ? void 0 : o.content])];
98
98
  }
99
99
  })]
100
100
  });
101
101
  }
102
- }), x = d.getContainer || document.body, s = document.createElement("div");
103
- return x.appendChild(s), u(k(O), s), {
104
- destroy: l,
102
+ }), y = d.getContainer || document.body, s = document.createElement("div");
103
+ return y.appendChild(s), u(v(O), s), {
104
+ destroy: m,
105
105
  update: g,
106
106
  open: C,
107
- close: m
107
+ close: f
108
108
  };
109
109
  };
110
110
  export {
@@ -20,6 +20,8 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
20
20
  unSelectAll: () => void;
21
21
  clearAll: () => void;
22
22
  toggleSelect: (item: RecordType) => void;
23
+ selectMulti: (items: RecordType[]) => void;
24
+ unSelectMulti: (items: RecordType[]) => void;
23
25
  selectedRows: ComputedRef<RecordType[]>;
24
26
  };
25
27
  scrollBar: {
@@ -1,21 +1,21 @@
1
- import { defineComponent as E, ref as P, computed as f, unref as r, watch as U, createElementBlock as p, openBlock as s, createElementVNode as v, normalizeClass as x, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as k, Fragment as D, renderList as L, mergeProps as j } from "vue";
2
- import { Checkbox as w, Row as z, Col as F } from "@aplus-frontend/antdv";
1
+ import { defineComponent as P, ref as U, computed as p, unref as l, watch as x, createElementBlock as v, openBlock as s, createElementVNode as k, normalizeClass as D, createVNode as u, withCtx as i, createBlock as h, resolveDynamicComponent as w, Fragment as L, renderList as j, mergeProps as z } from "vue";
2
+ import { Checkbox as b, Row as F, Col as I } from "@aplus-frontend/antdv";
3
3
  import "../../../../config-provider/index.mjs";
4
- import { useInjectApTable as I } from "../../../context.mjs";
5
- import { cloneLabelNode as b } from "../utils.mjs";
6
- import { useNamespace as R } from "../../../../config-provider/hooks/use-namespace.mjs";
7
- const K = /* @__PURE__ */ E({
4
+ import { useInjectApTable as R } from "../../../context.mjs";
5
+ import { getLabelNode as C } from "../utils.mjs";
6
+ import { useNamespace as T } from "../../../../config-provider/hooks/use-namespace.mjs";
7
+ const M = /* @__PURE__ */ P({
8
8
  __name: "index",
9
9
  props: {
10
10
  value: {}
11
11
  },
12
12
  setup(y) {
13
- const t = y, { b: C } = R("select-group"), c = P(!1), { columnsBackup: _ } = I(), m = f(() => {
13
+ const t = y, { b: _ } = T("select-group"), d = U(!1), { columnsBackup: g, renderConfig: m } = R(), f = p(() => {
14
14
  var e;
15
- return (e = r(_)) == null ? void 0 : e.find(
15
+ return (e = l(g)) == null ? void 0 : e.find(
16
16
  (n) => {
17
- var l;
18
- return n.key === ((l = t.value) == null ? void 0 : l.key);
17
+ var r;
18
+ return n.key === ((r = t.value) == null ? void 0 : r.key);
19
19
  }
20
20
  );
21
21
  });
@@ -26,24 +26,24 @@ const K = /* @__PURE__ */ E({
26
26
  disabled: t.value.disabled || (e == null ? void 0 : e.disabled)
27
27
  };
28
28
  }
29
- function g(o) {
29
+ function A(o) {
30
30
  const e = t.value;
31
- e.children.forEach((n) => n.show = o), e.show = o, c.value = !1;
31
+ e.children.forEach((n) => n.show = o), e.show = o, d.value = !1;
32
32
  }
33
- function A(o, e) {
34
- const n = t.value, l = n.children.find((a) => a.key === o);
35
- if (!l)
33
+ function B(o, e) {
34
+ const n = t.value, r = n.children.find((a) => a.key === o);
35
+ if (!r)
36
36
  return;
37
- l.show = e;
38
- const d = n.children.every((a) => a.show), N = n.children.some((a) => a.show);
39
- n.show = d, c.value = N && !d;
37
+ r.show = e;
38
+ const c = n.children.every((a) => a.show), E = n.children.some((a) => a.show);
39
+ n.show = c, d.value = E && !c;
40
40
  }
41
- const B = f(() => t.value.disabled || t.value.children.every((o) => o.disabled));
42
- return U(
41
+ const N = p(() => t.value.disabled || t.value.children.every((o) => o.disabled));
42
+ return x(
43
43
  () => t.value,
44
44
  (o) => {
45
- const e = o.children.every((l) => l.show), n = o.children.some((l) => l.show);
46
- c.value = n && !e, o.show !== e && (o.show = e);
45
+ const e = o.children.every((r) => r.show), n = o.children.some((r) => r.show);
46
+ d.value = n && !e, o.show !== e && (o.show = e);
47
47
  },
48
48
  {
49
49
  deep: !0,
@@ -51,35 +51,35 @@ const K = /* @__PURE__ */ E({
51
51
  }
52
52
  ), (o, e) => {
53
53
  var n;
54
- return s(), p("div", null, [
55
- v("div", {
56
- class: x(r(C)("header"))
54
+ return s(), v("div", null, [
55
+ k("div", {
56
+ class: D(l(_)("header"))
57
57
  }, [
58
- u(r(w), {
59
- indeterminate: c.value,
58
+ u(l(b), {
59
+ indeterminate: d.value,
60
60
  checked: (n = o.value) == null ? void 0 : n.show,
61
- disabled: B.value,
62
- "onUpdate:checked": g
61
+ disabled: N.value,
62
+ "onUpdate:checked": A
63
63
  }, {
64
64
  default: i(() => [
65
- (s(), h(k(r(b)(m.value.title))))
65
+ (s(), h(w(l(C)(f.value, l(m)))))
66
66
  ]),
67
67
  _: 1
68
68
  }, 8, ["indeterminate", "checked", "disabled"])
69
69
  ], 2),
70
- v("div", null, [
71
- u(r(z), { align: "middle" }, {
70
+ k("div", null, [
71
+ u(l(F), { align: "middle" }, {
72
72
  default: i(() => [
73
- (s(!0), p(D, null, L(m.value.children, (l) => (s(), h(r(F), {
74
- key: l.key,
73
+ (s(!0), v(L, null, j(f.value.children, (r) => (s(), h(l(I), {
74
+ key: r.key,
75
75
  span: 8
76
76
  }, {
77
77
  default: i(() => [
78
- u(r(w), j({ ref_for: !0 }, S(l), {
79
- "onUpdate:checked": (d) => A(l.key, d)
78
+ u(l(b), z({ ref_for: !0 }, S(r), {
79
+ "onUpdate:checked": (c) => B(r.key, c)
80
80
  }), {
81
81
  default: i(() => [
82
- (s(), h(k(r(b)(l.title))))
82
+ (s(), h(w(l(C)(r, l(m)))))
83
83
  ]),
84
84
  _: 2
85
85
  }, 1040, ["onUpdate:checked"])
@@ -95,5 +95,5 @@ const K = /* @__PURE__ */ E({
95
95
  }
96
96
  });
97
97
  export {
98
- K as default
98
+ M as default
99
99
  };
@@ -5,7 +5,7 @@ import "../../../../config-provider/index.mjs";
5
5
  import { useInjectSorterMethods as M } from "../sorter/context.mjs";
6
6
  import S from "../images/icon_carst_down.svg.mjs";
7
7
  import U from "../images/icon_fill_right.svg.mjs";
8
- import { cloneLabelNode as j } from "../utils.mjs";
8
+ import { getLabelRenderNode as j } from "../utils.mjs";
9
9
  import { useNamespace as H } from "../../../../config-provider/hooks/use-namespace.mjs";
10
10
  import { useLocale as q } from "../../../../config-provider/hooks/use-locale.mjs";
11
11
  const G = ["src"], le = /* @__PURE__ */ E({
@@ -28,18 +28,18 @@ const G = ["src"], le = /* @__PURE__ */ E({
28
28
  const l = v("left");
29
29
  w(l);
30
30
  }
31
- function F() {
31
+ function R() {
32
32
  const l = v("right");
33
33
  V(l);
34
34
  }
35
- function L() {
35
+ function F() {
36
36
  const l = v(void 0);
37
37
  y(l);
38
38
  }
39
- function N() {
39
+ function L() {
40
40
  C("update:open", !o.open);
41
41
  }
42
- function R() {
42
+ function N() {
43
43
  var n;
44
44
  const l = o.value;
45
45
  l.show = !1, (n = l.children) == null || n.forEach((i) => i.show = !1);
@@ -58,7 +58,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
58
58
  }, null, 8, ["class"]),
59
59
  p("span", {
60
60
  class: t(e(h)("left", "indicator")),
61
- onClick: N
61
+ onClick: L
62
62
  }, [
63
63
  (i = l.value.children) != null && i.length ? (s(), g("img", {
64
64
  key: 0,
@@ -96,7 +96,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
96
96
  default: d(() => [
97
97
  c(e(z), {
98
98
  class: t(e(a)("action-icon")),
99
- onClick: L
99
+ onClick: F
100
100
  }, null, 8, ["class"])
101
101
  ]),
102
102
  _: 1
@@ -109,7 +109,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
109
109
  c(e(k), {
110
110
  rotate: 90,
111
111
  class: t(e(a)("action-icon")),
112
- onClick: F
112
+ onClick: R
113
113
  }, null, 8, ["class"])
114
114
  ]),
115
115
  _: 1
@@ -121,7 +121,7 @@ const G = ["src"], le = /* @__PURE__ */ E({
121
121
  default: d(() => [
122
122
  c(e(A), {
123
123
  class: t(e(a)("action-icon")),
124
- onClick: R
124
+ onClick: N
125
125
  }, null, 8, ["class"])
126
126
  ]),
127
127
  _: 1
@@ -1,64 +1,64 @@
1
- import { defineComponent as b, computed as x, unref as l, createElementBlock as i, openBlock as c, createVNode as s, withCtx as d, Fragment as m, renderList as w, createBlock as u, mergeProps as B, resolveDynamicComponent as I } from "vue";
2
- import { Row as L, Col as k, Checkbox as N } from "@aplus-frontend/antdv";
1
+ import { defineComponent as x, computed as w, unref as o, createElementBlock as i, openBlock as c, createVNode as s, withCtx as d, Fragment as m, renderList as B, createBlock as u, mergeProps as I, resolveDynamicComponent as L } from "vue";
2
+ import { Row as N, Col as k, Checkbox as P } from "@aplus-frontend/antdv";
3
3
  import "../select-group/index.vue.mjs";
4
- import { useInjectApTable as P } from "../../../context.mjs";
5
- import { cloneLabelNode as U } from "../utils.mjs";
6
- import j from "../select-group/index.vue2.mjs";
7
- const $ = /* @__PURE__ */ b({
4
+ import { useInjectApTable as U } from "../../../context.mjs";
5
+ import { getLabelNode as j } from "../utils.mjs";
6
+ import A from "../select-group/index.vue2.mjs";
7
+ const q = /* @__PURE__ */ x({
8
8
  __name: "index",
9
9
  props: {
10
10
  value: {}
11
11
  },
12
12
  setup(_) {
13
- const a = _, { columnsBackup: g } = P(), y = x(() => [...l(g) || []].sort((e, n) => {
14
- var t, o, p, h;
15
- return (t = e.children) != null && t.length && !((o = n.children) != null && o.length) ? 1 : !((p = e.children) != null && p.length) && ((h = n.children) != null && h.length) ? -1 : 0;
13
+ const a = _, { columnsBackup: g, renderConfig: y } = U(), C = w(() => [...o(g) || []].sort((e, n) => {
14
+ var t, l, p, h;
15
+ return (t = e.children) != null && t.length && !((l = n.children) != null && l.length) ? 1 : !((p = e.children) != null && p.length) && ((h = n.children) != null && h.length) ? -1 : 0;
16
16
  }));
17
17
  function f(r) {
18
18
  return a.value.find((e) => e.key === r.key);
19
19
  }
20
- function C(r) {
20
+ function v(r) {
21
21
  const e = f(r);
22
22
  return {
23
23
  checked: e == null ? void 0 : e.show,
24
24
  disabled: e == null ? void 0 : e.disabled
25
25
  };
26
26
  }
27
- function v(r, e) {
28
- const n = a.value, t = n == null ? void 0 : n.find((o) => o.key === r);
27
+ function b(r, e) {
28
+ const n = a.value, t = n == null ? void 0 : n.find((l) => l.key === r);
29
29
  t && (t.show = e);
30
30
  }
31
31
  return (r, e) => (c(), i("div", null, [
32
- s(l(L), {
32
+ s(o(N), {
33
33
  gutter: [24, 16],
34
34
  align: "middle"
35
35
  }, {
36
36
  default: d(() => [
37
- (c(!0), i(m, null, w(y.value, (n) => {
37
+ (c(!0), i(m, null, B(C.value, (n) => {
38
38
  var t;
39
39
  return c(), i(m, {
40
40
  key: n.key
41
41
  }, [
42
- (t = n.children) != null && t.length ? (c(), u(l(k), {
42
+ (t = n.children) != null && t.length ? (c(), u(o(k), {
43
43
  key: 1,
44
44
  span: 24
45
45
  }, {
46
46
  default: d(() => [
47
- s(j, {
47
+ s(A, {
48
48
  value: f(n)
49
49
  }, null, 8, ["value"])
50
50
  ]),
51
51
  _: 2
52
- }, 1024)) : (c(), u(l(k), {
52
+ }, 1024)) : (c(), u(o(k), {
53
53
  key: 0,
54
54
  span: 8
55
55
  }, {
56
56
  default: d(() => [
57
- s(l(N), B({ ref_for: !0 }, C(n), {
58
- "onUpdate:checked": (o) => v(n.key, o)
57
+ s(o(P), I({ ref_for: !0 }, v(n), {
58
+ "onUpdate:checked": (l) => b(n.key, l)
59
59
  }), {
60
60
  default: d(() => [
61
- (c(), u(I(l(U)(n.title))))
61
+ (c(), u(L(o(j)(n, o(y)))))
62
62
  ]),
63
63
  _: 2
64
64
  }, 1040, ["onUpdate:checked"])
@@ -74,5 +74,5 @@ const $ = /* @__PURE__ */ b({
74
74
  }
75
75
  });
76
76
  export {
77
- $ as default
77
+ q as default
78
78
  };