@aplus-frontend/ui 0.1.26 → 0.1.28

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 (137) hide show
  1. package/es/src/ap-download/ap-download.vue.d.ts +12 -4
  2. package/es/src/ap-download/ap-download.vue.mjs +72 -37
  3. package/es/src/ap-download/interface.d.ts +5 -12
  4. package/es/src/ap-download/style/ap-download.css +6 -0
  5. package/es/src/ap-field/select/index.vue.mjs +65 -63
  6. package/es/src/ap-table/ap-table.vue.mjs +231 -183
  7. package/es/src/ap-table/components/interface.d.ts +33 -1
  8. package/es/src/ap-table/components/setting/images/icon_carst_down.svg.mjs +4 -0
  9. package/es/src/ap-table/components/setting/images/icon_fill_right.svg.mjs +4 -0
  10. package/es/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  11. package/es/src/ap-table/components/setting/modal/index.vue.mjs +4 -0
  12. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +152 -0
  13. package/es/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  14. package/es/src/ap-table/components/setting/select-group/index.vue.mjs +4 -0
  15. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +96 -0
  16. package/es/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  17. package/es/src/ap-table/components/setting/sortable/index.vue.mjs +4 -0
  18. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +51 -0
  19. package/es/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  20. package/es/src/ap-table/components/setting/sortable/item.vue.mjs +4 -0
  21. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +140 -0
  22. package/es/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  23. package/es/src/ap-table/components/setting/sorter/context.mjs +20 -0
  24. package/es/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  25. package/es/src/ap-table/components/setting/sorter/index.vue.mjs +4 -0
  26. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +199 -0
  27. package/es/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  28. package/es/src/ap-table/components/setting/tree-select/index.vue.mjs +4 -0
  29. package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +75 -0
  30. package/es/src/ap-table/components/setting/utils.d.ts +17 -0
  31. package/es/src/ap-table/components/setting/utils.mjs +48 -0
  32. package/es/src/ap-table/components/style/setting/modal.css +39 -0
  33. package/es/src/ap-table/components/style/setting/select-group.css +7 -0
  34. package/es/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  35. package/es/src/ap-table/components/style/setting/sortable-item.css +3 -0
  36. package/es/src/ap-table/components/style/setting/sorter.css +26 -0
  37. package/es/src/ap-table/constants.d.ts +31 -8
  38. package/es/src/ap-table/constants.mjs +41 -53
  39. package/es/src/ap-table/context.d.ts +31 -0
  40. package/es/src/ap-table/context.mjs +20 -0
  41. package/es/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  42. package/es/src/ap-table/hooks/use-table-column-state.mjs +46 -0
  43. package/es/src/ap-table/hooks/use-table-content-height.mjs +19 -19
  44. package/es/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  45. package/es/src/ap-table/hooks/use-table-paging.mjs +87 -82
  46. package/es/src/ap-table/interface.d.ts +51 -1
  47. package/es/src/ap-table/style/ap-table.css +29 -1
  48. package/es/src/ap-table/utils.d.ts +1 -1
  49. package/es/src/ap-table/utils.mjs +82 -82
  50. package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  51. package/es/src/business/ap-attachment/ApAttachment.mjs +89 -66
  52. package/es/src/business/ap-attachment/interface.d.ts +1 -1
  53. package/es/src/business/ap-attachment/style.css +6 -0
  54. package/es/src/business/ap-input-radio/interface.d.ts +1 -1
  55. package/es/src/business/hooks/usePageListApTable.d.ts +2 -2
  56. package/es/src/business/index.d.ts +1 -3
  57. package/es/src/editable-table/interface.d.ts +1 -1
  58. package/es/src/locale/lang/en.mjs +14 -0
  59. package/es/src/locale/lang/zh-cn.mjs +14 -0
  60. package/es/src/theme/ap-attachment/ap-attachment.css +6 -0
  61. package/es/src/theme/ap-download/ap-download.css +6 -0
  62. package/es/src/theme/ap-table/ap-table.css +29 -1
  63. package/es/src/theme/ap-table/setting/modal.css +39 -0
  64. package/es/src/theme/ap-table/setting/select-group.css +7 -0
  65. package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  66. package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
  67. package/es/src/theme/ap-table/setting/sorter.css +26 -0
  68. package/es/src/theme/css-var/index.mjs +22 -12
  69. package/lib/src/ap-download/ap-download.vue.d.ts +12 -4
  70. package/lib/src/ap-download/ap-download.vue.js +1 -1
  71. package/lib/src/ap-download/interface.d.ts +5 -12
  72. package/lib/src/ap-download/style/ap-download.css +6 -0
  73. package/lib/src/ap-field/select/index.vue.js +1 -1
  74. package/lib/src/ap-table/ap-table.vue.js +1 -1
  75. package/lib/src/ap-table/components/interface.d.ts +33 -1
  76. package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
  77. package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
  78. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  79. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
  80. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
  81. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  82. package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
  83. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
  84. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  85. package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
  86. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
  87. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  88. package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
  89. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
  90. package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  91. package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
  92. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  93. package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
  94. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
  95. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  96. package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
  97. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
  98. package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
  99. package/lib/src/ap-table/components/setting/utils.js +1 -0
  100. package/lib/src/ap-table/components/style/setting/modal.css +39 -0
  101. package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
  102. package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  103. package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
  104. package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
  105. package/lib/src/ap-table/constants.d.ts +31 -8
  106. package/lib/src/ap-table/constants.js +1 -1
  107. package/lib/src/ap-table/context.d.ts +31 -0
  108. package/lib/src/ap-table/context.js +1 -0
  109. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  110. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
  111. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  112. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  113. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  114. package/lib/src/ap-table/interface.d.ts +51 -1
  115. package/lib/src/ap-table/style/ap-table.css +29 -1
  116. package/lib/src/ap-table/utils.d.ts +1 -1
  117. package/lib/src/ap-table/utils.js +1 -1
  118. package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  119. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  120. package/lib/src/business/ap-attachment/interface.d.ts +1 -1
  121. package/lib/src/business/ap-attachment/style.css +6 -0
  122. package/lib/src/business/ap-input-radio/interface.d.ts +1 -1
  123. package/lib/src/business/hooks/usePageListApTable.d.ts +2 -2
  124. package/lib/src/business/index.d.ts +1 -3
  125. package/lib/src/editable-table/interface.d.ts +1 -1
  126. package/lib/src/locale/lang/en.js +1 -1
  127. package/lib/src/locale/lang/zh-cn.js +1 -1
  128. package/lib/src/theme/ap-attachment/ap-attachment.css +6 -0
  129. package/lib/src/theme/ap-download/ap-download.css +6 -0
  130. package/lib/src/theme/ap-table/ap-table.css +29 -1
  131. package/lib/src/theme/ap-table/setting/modal.css +39 -0
  132. package/lib/src/theme/ap-table/setting/select-group.css +7 -0
  133. package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  134. package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
  135. package/lib/src/theme/ap-table/setting/sorter.css +26 -0
  136. package/lib/src/theme/css-var/index.js +1 -1
  137. 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,82 +1,105 @@
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";
2
- import { Tooltip as V, Popover as b } from "ant-design-vue";
1
+ import { defineComponent as S, ref as A, useSlots as V, computed as o, cloneVNode as z, unref as I, toRaw as f, createVNode as l, createTextVNode as M } from "vue";
2
+ import { Tooltip as U, Popover as _ } from "ant-design-vue";
3
3
  import "../../config-provider/index.mjs";
4
- import { ApAttachmentProps as z } from "./constans.mjs";
5
- import { getHexWithOpacity as I, getFileInfo as M } from "../../ap-download/utils/getFileInfo.mjs";
4
+ import { ApAttachmentProps as B } from "./constans.mjs";
5
+ import { getHexWithOpacity as G, getFileInfo as H } from "../../ap-download/utils/getFileInfo.mjs";
6
6
  import "./style.css";
7
- import { useOssInit as U } from "../../ap-download/hooks/index.mjs";
8
- import { isArray as _ } from "lodash-unified";
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";
11
- import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
12
- const Y = /* @__PURE__ */ O({
7
+ import { useOssInit as R } from "../../ap-download/hooks/index.mjs";
8
+ import { isArray as W } from "lodash-unified";
9
+ import { LoadingOutlined as v } from "@ant-design/icons-vue";
10
+ import { useNamespace as j } from "../../config-provider/hooks/use-namespace.mjs";
11
+ import { useGlobalConfig as y } from "../../config-provider/hooks/use-global-config.mjs";
12
+ import { useLocale as q } from "../../config-provider/hooks/use-locale.mjs";
13
+ const at = /* @__PURE__ */ S({
13
14
  name: "ApAttachment",
14
- props: z(),
15
+ props: B(),
15
16
  setup(t) {
16
17
  const {
17
- b: p,
18
- e: l
19
- } = B("ap-attachment"), A = h("uiMode"), g = h("apUpload"), {
20
- lang: w,
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(() => ({
23
- width: n.value ? "auto" : "266px"
24
- })), v = a(() => ({
25
- "--download-main-color": f.value,
26
- "--download-main-color-opacity": I(f.value, 0.6)
27
- })), F = a(() => {
18
+ b: L,
19
+ e: a
20
+ } = j("ap-attachment"), w = y("uiMode"), C = y("apUpload"), {
21
+ lang: F,
22
+ t: r
23
+ } = q(), c = A(!1), s = A(""), m = V(), N = o(() => F.value === "zh-cn" ? "zh_CN" : "en_US"), u = o(() => t.attachmentList.length === 1), p = o(() => t.attachmentList.length > 0 ? t.attachmentList[0].fileName : ""), O = o(() => u.value ? p.value : r("ap.apAttachment.downloadall")), h = o(() => t.color ? t.color : w.value === "aplus" ? "#0070FF" : "#1890FF"), T = o(() => ({
24
+ width: u.value ? "auto" : "266px"
25
+ })), g = o(() => ({
26
+ "--download-main-color": h.value,
27
+ "--download-main-color-opacity": G(h.value, 0.6)
28
+ })), b = o(() => {
28
29
  var e;
29
- return t.getOssAccess || ((e = g.value) == null ? void 0 : e.getOssAccess);
30
- }), L = a(() => {
31
- const e = s.default ? s.default()[0] : null;
32
- return e ? P(e, {
30
+ return t.getOssAccess || ((e = C.value) == null ? void 0 : e.getOssAccess);
31
+ }), x = o(() => {
32
+ const e = m.default ? m.default()[0] : null;
33
+ return e ? z(e, {
33
34
  style: {
34
35
  "font-size": "16px"
35
36
  }
36
37
  }) : null;
37
- }), r = async (e) => {
38
+ }), d = async (e, i) => {
38
39
  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));
40
+ c.value = !0, i && (s.value = i);
41
+ try {
42
+ const n = await R(b.value, I(N)), k = W(f(e)) ? f(e) : [f(e)];
43
+ await n.downloadFile(H(t.needName, k));
44
+ } catch (n) {
45
+ console.error(n);
46
+ } finally {
47
+ c.value = !1, s.value = "";
48
+ }
41
49
  }
42
- }, x = (e) => e && e.length > 0 ? o("ul", {
43
- class: [l("file-list")],
44
- style: v.value
45
- }, [e.map((c, m) => o("li", {
46
- key: m,
47
- class: [l("file-item")],
48
- onClick: () => r(c)
49
- }, [c.fileName])), o("li", {
50
- class: [l("down-load-all")],
51
- onClick: () => r(t.attachmentList)
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
- })]);
50
+ }, P = (e) => e && e.length > 0 ? l("ul", {
51
+ class: [a("file-list")],
52
+ style: g.value
53
+ }, [e.map((i, n) => l("li", {
54
+ key: n,
55
+ class: [a("file-item")],
56
+ onClick: () => d(i, n + 1)
57
+ }, [c.value && s.value === n + 1 ? l("span", {
58
+ class: [a("spin")]
59
+ }, [l(v, {
60
+ spin: !0
61
+ }, null)]) : null, i.fileName])), l("li", {
62
+ class: [a("down-load-all")],
63
+ onClick: () => d(t.attachmentList, "all")
64
+ }, [c.value && s.value === "all" ? l("span", {
65
+ class: [a("spin")]
66
+ }, [l(v, {
67
+ spin: !0
68
+ }, null)]) : null, r("ap.apAttachment.downloadall")])]) : null;
69
+ return () => {
70
+ var e;
71
+ return ((e = t.attachmentList) == null ? void 0 : e.length) > 0 && l("div", {
72
+ class: [L()],
73
+ style: [T.value, g.value]
74
+ }, [l(U, {
75
+ title: O.value,
76
+ placement: t.textToolTipPlacement,
77
+ color: t.toolTipBgColor
78
+ }, {
79
+ default: () => [l("div", {
80
+ class: [a("content")],
81
+ onClick: () => d(u.value ? t.attachmentList[0] : t.attachmentList, "global")
82
+ }, [c.value && s.value === "global" ? l("div", {
83
+ class: [a("spin")]
84
+ }, [l(v, {
85
+ spin: !0
86
+ }, null)]) : null, m.default ? l("div", {
87
+ class: [a("text-render")]
88
+ }, [x.value, M(" ")]) : null, l("div", {
89
+ class: [a("text-inner")]
90
+ }, [p.value])])]
91
+ }), l(_, {
92
+ content: P(t.attachmentList),
93
+ placement: t.fileMorePopoverPlacement,
94
+ color: "#fff"
95
+ }, {
96
+ default: () => [!u.value && l("div", {
97
+ class: [a("more")]
98
+ }, [r("ap.apAttachment.more")])]
99
+ })]);
100
+ };
78
101
  }
79
102
  });
80
103
  export {
81
- Y as default
104
+ at as default
82
105
  };
@@ -1,5 +1,5 @@
1
1
  import { ApDownLoadProps } from '../../ap-download/interface';
2
- import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
2
+ import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
3
3
  export type AttachmentItemProps = {
4
4
  fileName: string;
5
5
  filePath: string;
@@ -13,6 +13,10 @@
13
13
  .aplus-ap-attachment__text-render:hover {
14
14
  color: var(--download-main-color-opacity);
15
15
  }
16
+ .aplus-ap-attachment__spin {
17
+ float: left;
18
+ margin-right: 5px;
19
+ }
16
20
  .aplus-ap-attachment__text-inner {
17
21
  max-width: 190px;
18
22
  display: inline-block;
@@ -39,6 +43,8 @@
39
43
  max-width: 312px;
40
44
  display: flex;
41
45
  flex-direction: column;
46
+ margin: 0;
47
+ padding: 0;
42
48
  }
43
49
  .aplus-ap-attachment__file-item {
44
50
  flex: 1;
@@ -1,7 +1,7 @@
1
1
  import { InputNumberProps } from 'ant-design-vue/es/input-number';
2
2
  type ApInputProps = Pick<InputNumberProps, 'disabled' | 'stringMode' | 'precision' | 'max' | 'min' | 'step' | 'bordered' | 'autofocus' | 'decimalSeparator' | 'controls' | 'formatter' | 'onInput' | 'onChange' | 'onPressEnter' | 'onStep' | 'onBlur' | 'onFocus'>;
3
3
  export type ApInputValType = {
4
- value: {
4
+ value?: {
5
5
  inputVal: string | number;
6
6
  radioVal: string | number;
7
7
  };
@@ -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;
@@ -1110,7 +1110,6 @@ export declare const ApInputRadio: DefineComponent<{
1110
1110
  inputVal: string | number;
1111
1111
  radioVal: string | number;
1112
1112
  }>;
1113
- required: true;
1114
1113
  };
1115
1114
  disabled: {
1116
1115
  type: PropType<boolean>;
@@ -1194,7 +1193,6 @@ export declare const ApInputRadio: DefineComponent<{
1194
1193
  inputVal: string | number;
1195
1194
  radioVal: string | number;
1196
1195
  }>;
1197
- required: true;
1198
1196
  };
1199
1197
  disabled: {
1200
1198
  type: PropType<boolean>;
@@ -2748,7 +2746,7 @@ export declare const ApAttachment: DefineComponent<{
2748
2746
  toolTipBgColor: {
2749
2747
  type: StringConstructor;
2750
2748
  };
2751
- }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2749
+ }, () => false | import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
2752
2750
  attachmentList: {
2753
2751
  type: PropType<Array< AttachmentItemProps>>;
2754
2752
  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: {
@@ -13,6 +13,10 @@
13
13
  .aplus-ap-attachment__text-render:hover {
14
14
  color: var(--download-main-color-opacity);
15
15
  }
16
+ .aplus-ap-attachment__spin {
17
+ float: left;
18
+ margin-right: 5px;
19
+ }
16
20
  .aplus-ap-attachment__text-inner {
17
21
  max-width: 190px;
18
22
  display: inline-block;
@@ -39,6 +43,8 @@
39
43
  max-width: 312px;
40
44
  display: flex;
41
45
  flex-direction: column;
46
+ margin: 0;
47
+ padding: 0;
42
48
  }
43
49
  .aplus-ap-attachment__file-item {
44
50
  flex: 1;
@@ -9,11 +9,17 @@
9
9
  display: flex;
10
10
  align-items: center;
11
11
  }
12
+ .aplus-ap-download-inner-wrapper .spin {
13
+ margin-right: 5px;
14
+ }
12
15
  .aplus-ap-download-inner-wrapper .icon {
13
16
  position: relative;
14
17
  font-size: 18px;
15
18
  margin-right: 5px;
16
19
  }
20
+ .aplus-ap-download-inner-wrapper .text {
21
+ color: var(--download-main-color);
22
+ }
17
23
  .aplus-ap-download-inner-wrapper:hover {
18
24
  color: var(--download-main-color-opacity);
19
25
  }