@aplus-frontend/ui 0.1.26 → 0.1.27

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 (131) hide show
  1. package/es/src/ap-download/ap-download.vue.d.ts +7 -3
  2. package/es/src/ap-download/ap-download.vue.mjs +50 -35
  3. package/es/src/ap-download/interface.d.ts +3 -11
  4. package/es/src/ap-download/style/ap-download.css +3 -0
  5. package/es/src/ap-table/ap-table.vue.mjs +231 -183
  6. package/es/src/ap-table/components/interface.d.ts +33 -1
  7. package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
  8. package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
  9. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  10. package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
  11. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
  12. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  13. package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
  14. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
  15. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  16. package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
  17. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
  18. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  19. package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
  20. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
  21. package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  22. package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
  23. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  24. package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
  25. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
  26. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  27. package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
  28. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
  29. package/es/src/ap-table/components/setting/utils.d.ts +17 -0
  30. package/es/src/ap-table/components/setting/utils.mjs +48 -0
  31. package/es/src/ap-table/components/style/setting/modal.css +39 -0
  32. package/es/src/ap-table/components/style/setting/select-group.css +7 -0
  33. package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  34. package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
  35. package/es/src/ap-table/components/style/setting/sorter.css +26 -0
  36. package/es/src/ap-table/constants.d.ts +31 -8
  37. package/es/src/ap-table/constants.mjs +41 -53
  38. package/es/src/ap-table/context.d.ts +31 -0
  39. package/es/src/ap-table/context.mjs +20 -0
  40. package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  41. package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
  42. package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
  43. package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  44. package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
  45. package/es/src/ap-table/interface.d.ts +51 -1
  46. package/es/src/ap-table/style/ap-table.css +29 -1
  47. package/es/src/ap-table/utils.d.ts +1 -1
  48. package/es/src/ap-table/utils.mjs +82 -82
  49. package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  50. package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
  51. package/es/src/business/ap-attachment/style.css +2 -0
  52. package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
  53. package/es/src/business/index.d.ts +1 -1
  54. package/es/src/editable-table/interface.d.ts +1 -1
  55. package/es/src/locale/lang/en.mjs +14 -0
  56. package/es/src/locale/lang/zh-cn.mjs +14 -0
  57. package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
  58. package/es/src/theme/ap-download/ap-download.css +3 -0
  59. package/es/src/theme/ap-table/ap-table.css +29 -1
  60. package/es/src/theme/ap-table/setting/modal.css +39 -0
  61. package/es/src/theme/ap-table/setting/select-group.css +7 -0
  62. package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  63. package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
  64. package/es/src/theme/ap-table/setting/sorter.css +26 -0
  65. package/es/src/theme/css-var/index.mjs +22 -12
  66. package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
  67. package/lib/src/ap-download/ap-download.vue.js +1 -1
  68. package/lib/src/ap-download/interface.d.ts +3 -11
  69. package/lib/src/ap-download/style/ap-download.css +3 -0
  70. package/lib/src/ap-table/ap-table.vue.js +1 -1
  71. package/lib/src/ap-table/components/interface.d.ts +33 -1
  72. package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
  73. package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
  74. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  75. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
  76. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
  77. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  78. package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
  79. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
  80. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  81. package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
  82. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
  83. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  84. package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
  85. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
  86. package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  87. package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
  88. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  89. package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
  90. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
  91. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  92. package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
  93. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
  94. package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
  95. package/lib/src/ap-table/components/setting/utils.js +1 -0
  96. package/lib/src/ap-table/components/style/setting/modal.css +39 -0
  97. package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
  98. package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  99. package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
  100. package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
  101. package/lib/src/ap-table/constants.d.ts +31 -8
  102. package/lib/src/ap-table/constants.js +1 -1
  103. package/lib/src/ap-table/context.d.ts +31 -0
  104. package/lib/src/ap-table/context.js +1 -0
  105. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  106. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
  107. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  108. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  109. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  110. package/lib/src/ap-table/interface.d.ts +51 -1
  111. package/lib/src/ap-table/style/ap-table.css +29 -1
  112. package/lib/src/ap-table/utils.d.ts +1 -1
  113. package/lib/src/ap-table/utils.js +1 -1
  114. package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  115. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  116. package/lib/src/business/ap-attachment/style.css +2 -0
  117. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
  118. package/lib/src/business/index.d.ts +1 -1
  119. package/lib/src/editable-table/interface.d.ts +1 -1
  120. package/lib/src/locale/lang/en.js +1 -1
  121. package/lib/src/locale/lang/zh-cn.js +1 -1
  122. package/lib/src/theme/ap-attachment/ap-attachment.css +2 -0
  123. package/lib/src/theme/ap-download/ap-download.css +3 -0
  124. package/lib/src/theme/ap-table/ap-table.css +29 -1
  125. package/lib/src/theme/ap-table/setting/modal.css +39 -0
  126. package/lib/src/theme/ap-table/setting/select-group.css +7 -0
  127. package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  128. package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
  129. package/lib/src/theme/ap-table/setting/sorter.css +26 -0
  130. package/lib/src/theme/css-var/index.js +1 -1
  131. package/package.json +3 -2
@@ -8423,7 +8423,7 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
8423
8423
  * @returns
8424
8424
  */
8425
8425
  export declare function objectToString(value: any): any;
8426
- export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
8426
+ export declare function getTableTitle(column: ApColumnType<any>, titleNodeClassName: string, slot?: (props: {
8427
8427
  title: any;
8428
8428
  column: ApColumnType<any>;
8429
8429
  }) => any, tooltipColor?: string): number | boolean | void | VNodeArrayChildren | import("vue/jsx-runtime").JSX.Element | ((props: ColumnTitleProps<any>) => VNodeArrayChildren | VueNode) | null;
@@ -1,19 +1,19 @@
1
- import { isVNode as d, createVNode as u, mergeProps as a, cloneVNode as T, Fragment as b } from "vue";
2
- import { isObject as l, isArray as f, isUndefined as y, isFunction as g, omit as h, isBoolean as j, isString as c } from "lodash-unified";
3
- import { apTableRenderItemMap as F, apTableFormItemMap as O, ellipsisTitleStyle as E } from "./constants.mjs";
4
- import { isType as S } from "@fruits-chain/utils";
1
+ import { isVNode as T, createVNode as u, mergeProps as f, cloneVNode as b, Fragment as y } from "vue";
2
+ import { isObject as c, isArray as p, isUndefined as g, isFunction as h, omit as j, isBoolean as F, isString as a } from "lodash-unified";
3
+ import { apTableRenderItemMap as O, apTableFormItemMap as E } from "./constants.mjs";
4
+ import { isType as x } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
6
- import { Tooltip as x } from "ant-design-vue";
7
- import { QuestionCircleOutlined as N } from "@ant-design/icons-vue";
6
+ import { Tooltip as N } from "ant-design-vue";
7
+ import { QuestionCircleOutlined as S } from "@ant-design/icons-vue";
8
8
  import I from "../ap-form/ap-form-item.vue.mjs";
9
9
  function v(t) {
10
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !d(t);
10
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !T(t);
11
11
  }
12
- const C = (t, e, n) => {
13
- let o = {};
14
- return l(t) ? Object.keys(t).forEach((i) => {
15
- l(t[i]) ? o[i] = C(t[i], e[i], n) : o[i] = n(t[i], e);
16
- }) : o = n(t, e), o;
12
+ const P = (t, e, n) => {
13
+ let r = {};
14
+ return c(t) ? Object.keys(t).forEach((o) => {
15
+ c(t[o]) ? r[o] = P(t[o], e[o], n) : r[o] = n(t[o], e);
16
+ }) : r = n(t, e), r;
17
17
  }, J = (t, e) => {
18
18
  switch (t) {
19
19
  case "dayjs":
@@ -21,12 +21,12 @@ const C = (t, e, n) => {
21
21
  case "dayjsRange":
22
22
  return e.map((n) => n.valueOf());
23
23
  case "dayjsDayRange": {
24
- const [n, o] = e;
25
- return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
24
+ const [n, r] = e;
25
+ return [n.startOf("day").valueOf(), r.endOf("day").valueOf()];
26
26
  }
27
27
  case "multiple":
28
28
  case "multipleNumber":
29
- return f(e) ? e : [e];
29
+ return p(e) ? e : [e];
30
30
  case "boolean":
31
31
  return e;
32
32
  case "object":
@@ -36,93 +36,93 @@ const C = (t, e, n) => {
36
36
  }
37
37
  };
38
38
  function L(t) {
39
- return f(t) ? t.join(".") : t;
39
+ return p(t) ? t.join(".") : t;
40
40
  }
41
- function P(t) {
41
+ function V(t) {
42
42
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
43
43
  return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
44
44
  }
45
- const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), p = (t) => {
46
- const e = [], n = V(t);
47
- return n.forEach((o, i) => {
48
- const r = n.get(i) || n.get(`${i}`);
49
- if (r) {
50
- if (typeof r == "object" && (r != null && r.text)) {
45
+ const w = (t) => V(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t) => {
46
+ const e = [], n = w(t);
47
+ return n.forEach((r, o) => {
48
+ const i = n.get(o) || n.get(`${o}`);
49
+ if (i) {
50
+ if (typeof i == "object" && (i != null && i.text)) {
51
51
  e.push({
52
- text: r == null ? void 0 : r.text,
53
- value: i,
54
- label: r == null ? void 0 : r.text,
55
- disabled: r.disabled
52
+ text: i == null ? void 0 : i.text,
53
+ value: o,
54
+ label: i == null ? void 0 : i.text,
55
+ disabled: i.disabled
56
56
  });
57
57
  return;
58
58
  }
59
59
  e.push({
60
- text: r,
61
- label: r,
62
- value: i
60
+ text: i,
61
+ label: i,
62
+ value: o
63
63
  });
64
64
  }
65
65
  }), e;
66
- }, Q = (t) => y(t) || t < 0 ? 0 : t, U = (t, e, n) => {
66
+ }, Q = (t) => g(t) || t < 0 ? 0 : t, U = (t, e, n) => {
67
67
  if (n)
68
68
  return n;
69
- const o = ["select", "date"], i = ["text", "textArea", "number"];
69
+ const r = ["select", "date"], o = ["text", "textArea", "number"];
70
70
  if (e === "dateRange")
71
71
  return [t("ap.common.chooseText"), t("ap.common.chooseText")];
72
- if (o.includes(e))
72
+ if (r.includes(e))
73
73
  return t("ap.common.chooseText");
74
- if (i.includes(e))
74
+ if (o.includes(e))
75
75
  return t("ap.common.inputText");
76
76
  };
77
- function w(t, e) {
78
- return !t || !g(t) ? t : t(e);
77
+ function A(t, e) {
78
+ return !t || !h(t) ? t : t(e);
79
79
  }
80
- function z(t) {
80
+ function W(t) {
81
81
  let e = t.valueType || "text";
82
82
  return t.valueEnum && (e = "status"), e;
83
83
  }
84
- function G(t, e, n, o) {
84
+ function z(t, e, n, r) {
85
85
  var s;
86
- const i = F[t];
87
- if (i)
88
- return u(i, a(e, {
86
+ const o = O[t];
87
+ if (o)
88
+ return u(o, f(e, {
89
89
  mode: "read"
90
90
  }), null);
91
- const r = o == null ? void 0 : o[t];
92
- return ((s = r == null ? void 0 : r.render) == null ? void 0 : s.call(r, e.value, n, e)) || e.value;
91
+ const i = r == null ? void 0 : r[t];
92
+ return ((s = i == null ? void 0 : i.render) == null ? void 0 : s.call(i, e.value, n, e)) || e.value;
93
93
  }
94
- function K(t, e) {
94
+ function G(t, e) {
95
95
  if (t.customRenderFormItem)
96
96
  return () => {
97
- const i = t.customRenderFormItem(t);
98
- return T(i, {
97
+ const o = t.customRenderFormItem(t);
98
+ return b(o, {
99
99
  ...t.fieldProps,
100
100
  span: t.span,
101
- ...i.props || {}
101
+ ...o.props || {}
102
102
  });
103
103
  };
104
- const n = O[t.valueType];
104
+ const n = E[t.valueType];
105
105
  if (n)
106
106
  return n;
107
- const o = e == null ? void 0 : e[t.valueType];
107
+ const r = e == null ? void 0 : e[t.valueType];
108
108
  return () => {
109
- var r;
110
- const i = (r = o == null ? void 0 : o.renderFormItem) == null ? void 0 : r.call(o, t.fieldProps.field);
111
- return i ? u(I, a(t.fieldProps, {
109
+ var i;
110
+ const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
111
+ return o ? u(I, f(t.fieldProps, {
112
112
  span: t.span
113
- }), v(i) ? i : {
114
- default: () => [i]
113
+ }), v(o) ? o : {
114
+ default: () => [o]
115
115
  }) : null;
116
116
  };
117
117
  }
118
- function W(t, e) {
119
- const n = w(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, i = t.valueType === "switch", r = t.valueType === "index", s = i ? {
118
+ function K(t, e) {
119
+ const n = A(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", i = t.valueType === "index", s = o ? {
120
120
  checked: e.value
121
121
  } : {
122
- value: r ? e.index + 1 : e.value
122
+ value: i ? e.index + 1 : e.value
123
123
  };
124
- return t.valueEnum && (o.valueEnum = t.valueEnum), {
125
- ...h(o, ["request"]),
124
+ return t.valueEnum && (r.valueEnum = t.valueEnum), {
125
+ ...j(r, ["request"]),
126
126
  ...s
127
127
  };
128
128
  }
@@ -130,18 +130,18 @@ function X(t) {
130
130
  const e = {
131
131
  ...t
132
132
  };
133
- return j(t.filters) && t.filters && t.valueEnum && (e.filters = p(t.valueEnum)), e;
133
+ return F(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
134
134
  }
135
135
  function Y(t, e) {
136
- var o;
136
+ var r;
137
137
  const n = e || {};
138
- return t.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
138
+ return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
139
139
  ...n.field,
140
- options: p(t.valueEnum)
140
+ options: d(t.valueEnum)
141
141
  }), n;
142
142
  }
143
143
  function Z(t) {
144
- if (!S("Object")(t))
144
+ if (!x("Object")(t))
145
145
  return t;
146
146
  try {
147
147
  return JSON.stringify(t);
@@ -149,50 +149,50 @@ function Z(t) {
149
149
  return t;
150
150
  }
151
151
  }
152
- function k(t, e, n) {
153
- const o = e == null ? void 0 : e({
152
+ function k(t, e, n, r) {
153
+ const o = n == null ? void 0 : n({
154
154
  title: t.title,
155
155
  column: t
156
156
  });
157
157
  if (o && (o.length > 1 || o[0].children && o[0].children !== "v-if"))
158
158
  return o;
159
- const r = c(t.title) ? u("span", {
160
- style: E,
159
+ const s = a(t.title) ? u("span", {
160
+ class: e,
161
161
  title: t.title
162
- }, [t.title]) : t.title, s = t.tooltip ? c(t.tooltip) ? u(b, null, [t.tooltip]) : t.tooltip(t) : null, m = () => u("span", {
162
+ }, [t.title]) : t.title, l = t.tooltip ? a(t.tooltip) ? u(y, null, [t.tooltip]) : t.tooltip(t) : null, m = u("span", {
163
163
  style: {
164
164
  display: "inline-flex",
165
165
  alignItems: "center"
166
166
  }
167
- }, [r, u(x, {
168
- title: s,
167
+ }, [s, u(N, {
168
+ title: l,
169
169
  placement: "bottom"
170
170
  }, {
171
- default: () => [u(N, {
171
+ default: () => [u(S, {
172
172
  style: {
173
173
  padding: "4px",
174
- color: n,
174
+ color: r,
175
175
  verticalAlign: "middle"
176
176
  }
177
177
  }, null)]
178
178
  })]);
179
- return s ? m : r;
179
+ return l ? m : s;
180
180
  }
181
181
  export {
182
182
  X as apColumnToColumn,
183
183
  L as dataIndexToStr,
184
- C as formatParamsValueType,
184
+ P as formatParamsValueType,
185
185
  Q as getColumnOrder,
186
- w as getFieldProps,
186
+ A as getFieldProps,
187
187
  U as getPlaceholder,
188
- K as getSearchFormItemRenderNode,
189
- G as getTableCellRenderNode,
190
- W as getTableRenderProps,
191
- z as getTableRenderType,
188
+ G as getSearchFormItemRenderNode,
189
+ z as getTableCellRenderNode,
190
+ K as getTableRenderProps,
191
+ W as getTableRenderType,
192
192
  k as getTableTitle,
193
- V as objectToMap,
193
+ w as objectToMap,
194
194
  Z as objectToString,
195
195
  J as parseFieldValue,
196
196
  Y as updateFormProps,
197
- p as valueEnumToArray
197
+ d as valueEnumToArray
198
198
  };
@@ -42,7 +42,7 @@ declare const _default: DefineComponent<{
42
42
  toolTipBgColor: {
43
43
  type: StringConstructor;
44
44
  };
45
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
45
+ }, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
46
46
  attachmentList: {
47
47
  type: PropType<Array<AttachmentItemProps>>;
48
48
  default: never[];
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, useSlots as T, computed as a, cloneVNode as P, unref as k, toRaw as u, createVNode as o, createTextVNode as S } from "vue";
1
+ import { defineComponent as O, useSlots as T, computed as o, cloneVNode as P, unref as k, toRaw as u, createVNode as a, createTextVNode as S } from "vue";
2
2
  import { Tooltip as V, Popover as b } from "ant-design-vue";
3
3
  import "../../config-provider/index.mjs";
4
4
  import { ApAttachmentProps as z } from "./constans.mjs";
@@ -7,7 +7,7 @@ import "./style.css";
7
7
  import { useOssInit as U } from "../../ap-download/hooks/index.mjs";
8
8
  import { isArray as _ } from "lodash-unified";
9
9
  import { useNamespace as B } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useGlobalConfig as h } from "../../config-provider/hooks/use-global-config.mjs";
10
+ import { useGlobalConfig as v } from "../../config-provider/hooks/use-global-config.mjs";
11
11
  import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
12
12
  const Y = /* @__PURE__ */ O({
13
13
  name: "ApAttachment",
@@ -16,65 +16,68 @@ const Y = /* @__PURE__ */ O({
16
16
  const {
17
17
  b: p,
18
18
  e: l
19
- } = B("ap-attachment"), A = h("uiMode"), g = h("apUpload"), {
19
+ } = B("ap-attachment"), A = v("uiMode"), g = v("apUpload"), {
20
20
  lang: w,
21
21
  t: i
22
- } = G(), s = T(), C = a(() => w.value === "zh-cn" ? "zh_CN" : "en_US"), n = a(() => t.attachmentList.length === 1), d = a(() => t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), N = a(() => n.value ? d.value : i("ap.apAttachment.downloadall")), f = a(() => t.color ? t.color : A.value === "aplus" ? "#0070FF" : "#1890FF"), y = a(() => ({
22
+ } = G(), s = T(), C = o(() => w.value === "zh-cn" ? "zh_CN" : "en_US"), n = o(() => t.attachmentList.length === 1), d = o(() => t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), L = o(() => n.value ? d.value : i("ap.apAttachment.downloadall")), f = o(() => t.color ? t.color : A.value === "aplus" ? "#0070FF" : "#1890FF"), N = o(() => ({
23
23
  width: n.value ? "auto" : "266px"
24
- })), v = a(() => ({
24
+ })), h = o(() => ({
25
25
  "--download-main-color": f.value,
26
26
  "--download-main-color-opacity": I(f.value, 0.6)
27
- })), F = a(() => {
27
+ })), y = o(() => {
28
28
  var e;
29
29
  return t.getOssAccess || ((e = g.value) == null ? void 0 : e.getOssAccess);
30
- }), L = a(() => {
30
+ }), F = o(() => {
31
31
  const e = s.default ? s.default()[0] : null;
32
32
  return e ? P(e, {
33
33
  style: {
34
34
  "font-size": "16px"
35
35
  }
36
36
  }) : null;
37
- }), r = async (e) => {
37
+ }), m = async (e) => {
38
38
  if (!t.disabled) {
39
- const c = await U(F.value, k(C)), m = _(u(e)) ? u(e) : [u(e)];
40
- await c.downloadFile(M(t.needName, m));
39
+ const c = await U(y.value, k(C)), r = _(u(e)) ? u(e) : [u(e)];
40
+ await c.downloadFile(M(t.needName, r));
41
41
  }
42
- }, x = (e) => e && e.length > 0 ? o("ul", {
42
+ }, x = (e) => e && e.length > 0 ? a("ul", {
43
43
  class: [l("file-list")],
44
- style: v.value
45
- }, [e.map((c, m) => o("li", {
46
- key: m,
44
+ style: h.value
45
+ }, [e.map((c, r) => a("li", {
46
+ key: r,
47
47
  class: [l("file-item")],
48
- onClick: () => r(c)
49
- }, [c.fileName])), o("li", {
48
+ onClick: () => m(c)
49
+ }, [c.fileName])), a("li", {
50
50
  class: [l("down-load-all")],
51
- onClick: () => r(t.attachmentList)
51
+ onClick: () => m(t.attachmentList)
52
52
  }, [i("ap.apAttachment.downloadall")])]) : null;
53
- return () => o("div", {
54
- class: [p()],
55
- style: [y.value, v.value]
56
- }, [o(V, {
57
- title: N.value,
58
- placement: t.textToolTipPlacement,
59
- color: t.toolTipBgColor
60
- }, {
61
- default: () => [o("div", {
62
- class: [l("content")],
63
- onClick: () => r(n.value ? t.attachmentList[0] : t.attachmentList)
64
- }, [s.default ? o("div", {
65
- class: [l("text-render")]
66
- }, [L.value, S(" ")]) : null, o("div", {
67
- class: [l("text-inner")]
68
- }, [d.value])])]
69
- }), o(b, {
70
- content: x(t.attachmentList),
71
- placement: t.fileMorePopoverPlacement,
72
- color: "#fff"
73
- }, {
74
- default: () => [!n.value && o("div", {
75
- class: [l("more")]
76
- }, [i("ap.apAttachment.more")])]
77
- })]);
53
+ return () => {
54
+ var e;
55
+ return ((e = t.attachmentList) == null ? void 0 : e.length) > 0 && a("div", {
56
+ class: [p()],
57
+ style: [N.value, h.value]
58
+ }, [a(V, {
59
+ title: L.value,
60
+ placement: t.textToolTipPlacement,
61
+ color: t.toolTipBgColor
62
+ }, {
63
+ default: () => [a("div", {
64
+ class: [l("content")],
65
+ onClick: () => m(n.value ? t.attachmentList[0] : t.attachmentList)
66
+ }, [s.default ? a("div", {
67
+ class: [l("text-render")]
68
+ }, [F.value, S(" ")]) : null, a("div", {
69
+ class: [l("text-inner")]
70
+ }, [d.value])])]
71
+ }), a(b, {
72
+ content: x(t.attachmentList),
73
+ placement: t.fileMorePopoverPlacement,
74
+ color: "#fff"
75
+ }, {
76
+ default: () => [!n.value && a("div", {
77
+ class: [l("more")]
78
+ }, [i("ap.apAttachment.more")])]
79
+ })]);
80
+ };
78
81
  }
79
82
  });
80
83
  export {
@@ -39,6 +39,8 @@
39
39
  max-width: 312px;
40
40
  display: flex;
41
41
  flex-direction: column;
42
+ margin: 0;
43
+ padding: 0;
42
44
  }
43
45
  .aplus-ap-attachment__file-item {
44
46
  flex: 1;
@@ -38,11 +38,11 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
38
38
  dataSource: any;
39
39
  rowSelection?: {
40
40
  select: (item: any) => void;
41
+ selectAll: () => void;
42
+ unSelectAll: () => void;
41
43
  selectedRows: any[];
42
44
  unSelect: (item: any) => void;
43
45
  isSelected: (item: any) => boolean;
44
- selectAll: () => void;
45
- unSelectAll: () => void;
46
46
  clearAll: () => void;
47
47
  toggleSelect: (item: any) => void;
48
48
  } | undefined;
@@ -2748,7 +2748,7 @@ export declare const ApAttachment: DefineComponent<{
2748
2748
  toolTipBgColor: {
2749
2749
  type: StringConstructor;
2750
2750
  };
2751
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2751
+ }, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2752
2752
  attachmentList: {
2753
2753
  type: PropType<Array< AttachmentItemProps>>;
2754
2754
  default: never[];
@@ -12,7 +12,7 @@ export type EditableColumnType<RecordType = any, ExtraValueType = 'text', ValueT
12
12
  /**
13
13
  * 在title之后展示一个icon并触发tooltip
14
14
  */
15
- tooltip?: string;
15
+ tooltip?: any;
16
16
  /**
17
17
  * 是否可以复制(不可编辑模式下可用)
18
18
  */
@@ -85,6 +85,20 @@ const e = {
85
85
  totalLeftSuffix: "items",
86
86
  totalRightPrefix: "Page",
87
87
  totalRightSuffix: ""
88
+ },
89
+ setting: {
90
+ title: "Custom Table",
91
+ selectAll: "Select All",
92
+ unSelectAll: "Deselect All",
93
+ selectAllTip: "Please select the columns to display in the table.",
94
+ sizeSmall: "Small",
95
+ sizeNormal: "Normal",
96
+ selectCount: "Selected fields ({count})",
97
+ reset: "Reset",
98
+ fixToLeft: "Fixed on the left",
99
+ fixToRight: "Fixed on the right",
100
+ unFixed: "Not fixed",
101
+ delete: "Delete"
88
102
  }
89
103
  },
90
104
  apUpload: {
@@ -85,6 +85,20 @@ const e = {
85
85
  totalLeftSuffix: "条记录",
86
86
  totalRightPrefix: "第",
87
87
  totalRightSuffix: "页"
88
+ },
89
+ setting: {
90
+ title: "自定义表格",
91
+ selectAll: "全选",
92
+ unSelectAll: "取消全选",
93
+ selectAllTip: "请选择需要展示在表格的字段",
94
+ sizeSmall: "紧凑",
95
+ sizeNormal: "正常",
96
+ selectCount: "已选字段({count})",
97
+ reset: "重置",
98
+ fixToLeft: "固定在左侧",
99
+ fixToRight: "固定在右侧",
100
+ unFixed: "不固定",
101
+ delete: "删除"
88
102
  }
89
103
  },
90
104
  apUpload: {
@@ -39,6 +39,8 @@
39
39
  max-width: 312px;
40
40
  display: flex;
41
41
  flex-direction: column;
42
+ margin: 0;
43
+ padding: 0;
42
44
  }
43
45
  .aplus-ap-attachment__file-item {
44
46
  flex: 1;
@@ -14,6 +14,9 @@
14
14
  font-size: 18px;
15
15
  margin-right: 5px;
16
16
  }
17
+ .aplus-ap-download-inner-wrapper .text {
18
+ color: var(--download-main-color);
19
+ }
17
20
  .aplus-ap-download-inner-wrapper:hover {
18
21
  color: var(--download-main-color-opacity);
19
22
  }
@@ -7,7 +7,9 @@
7
7
  display: flex;
8
8
  flex-direction: column;
9
9
  }
10
- .aplus-ap-table-adaptive .ant-table-wrapper,
10
+ .aplus-ap-table-adaptive .ant-table-wrapper {
11
+ flex: 1;
12
+ }
11
13
  .aplus-ap-table-adaptive .ant-spin-nested-loading,
12
14
  .aplus-ap-table-adaptive .ant-spin-container {
13
15
  height: 100%;
@@ -35,6 +37,8 @@
35
37
  .aplus-ap-table__table-wrapper {
36
38
  flex: 1;
37
39
  max-height: 100%;
40
+ display: flex;
41
+ flex-direction: column;
38
42
  }
39
43
  .aplus-ap-table__table-wrapper-card {
40
44
  padding: 16px;
@@ -98,3 +102,27 @@
98
102
  .aplus-ap-table-pagination-total-wrapper {
99
103
  color: var(--ap-table-pagination-total-color, #526A90);
100
104
  }
105
+ .aplus-ap-table-header {
106
+ padding-bottom: 16px;
107
+ display: flex;
108
+ justify-content: space-between;
109
+ align-items: center;
110
+ flex-wrap: nowrap;
111
+ }
112
+ .aplus-ap-table-header__title {
113
+ flex: 1;
114
+ flex-shrink: 1;
115
+ min-width: 0;
116
+ }
117
+ .aplus-ap-table-table-header__title {
118
+ display: -webkit-inline-box;
119
+ -webkit-line-clamp: 2;
120
+ -webkit-box-orient: vertical;
121
+ overflow: hidden;
122
+ text-overflow: ellipsis;
123
+ white-space: normal;
124
+ max-width: 100%;
125
+ vertical-align: middle;
126
+ word-break: break-all;
127
+ flex: 1;
128
+ }
@@ -0,0 +1,39 @@
1
+ .aplus-ap-column-setting-wrapper {
2
+ display: flex;
3
+ flex-direction: row;
4
+ flex-wrap: nowrap;
5
+ height: 100%;
6
+ }
7
+ .aplus-ap-column-setting-left {
8
+ flex: 1;
9
+ flex-shrink: 1;
10
+ min-width: 0;
11
+ padding-inline: 20px;
12
+ display: flex;
13
+ flex-direction: column;
14
+ }
15
+ .aplus-ap-column-setting-left__header {
16
+ display: flex;
17
+ flex-direction: row;
18
+ flex-wrap: nowrap;
19
+ justify-content: space-between;
20
+ align-items: center;
21
+ padding: 12px;
22
+ }
23
+ .aplus-ap-column-setting-left__content {
24
+ flex: 1;
25
+ padding-inline: 12px;
26
+ padding-block: 16px;
27
+ overflow-y: auto;
28
+ }
29
+ .aplus-ap-column-setting-left__content .ant-checkbox-wrapper {
30
+ max-width: 100%;
31
+ }
32
+ .aplus-ap-column-setting-left__content .ant-checkbox-wrapper > span:last-child {
33
+ white-space: nowrap;
34
+ overflow: hidden;
35
+ text-overflow: ellipsis;
36
+ }
37
+ .aplus-ap-column-setting-right {
38
+ width: 240px;
39
+ }
@@ -0,0 +1,7 @@
1
+ .aplus-select-group-header {
2
+ background-color: #F2F6F9;
3
+ padding: 4px 12px;
4
+ border-radius: 4px;
5
+ margin-bottom: 16px;
6
+ margin-inline: -12px;
7
+ }