@aplus-frontend/ui 0.1.25 → 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 (151) 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-form/ap-form-item.vue.mjs +26 -26
  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/ap-upload/components/MultipleFile.vue2.mjs +91 -89
  51. package/es/src/ap-upload/components/Picture.vue2.mjs +114 -112
  52. package/es/src/ap-upload/components/SingleFile.vue2.mjs +10 -7
  53. package/es/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  54. package/es/src/business/ap-attachment/ApAttachment.mjs +45 -42
  55. package/es/src/business/ap-attachment/style.css +2 -0
  56. package/es/src/business/ap-ladder/ApLadder.vue2.mjs +114 -84
  57. package/es/src/business/ap-ladder/interface.d.ts +42 -0
  58. package/es/src/business/ap-ladder/interface.mjs +10 -0
  59. package/es/src/business/hooks/usePageListApTable.d.ts +8 -3
  60. package/es/src/business/hooks/usePageListApTable.mjs +27 -17
  61. package/es/src/business/hooks/useTableRefresh.d.ts +3 -4
  62. package/es/src/business/hooks/useTableRefresh.mjs +9 -9
  63. package/es/src/business/index.d.ts +4 -4
  64. package/es/src/editable-table/interface.d.ts +1 -1
  65. package/es/src/locale/lang/en.mjs +14 -0
  66. package/es/src/locale/lang/zh-cn.mjs +14 -0
  67. package/es/src/theme/ap-attachment/ap-attachment.css +2 -0
  68. package/es/src/theme/ap-download/ap-download.css +3 -0
  69. package/es/src/theme/ap-table/ap-table.css +29 -1
  70. package/es/src/theme/ap-table/setting/modal.css +39 -0
  71. package/es/src/theme/ap-table/setting/select-group.css +7 -0
  72. package/es/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  73. package/es/src/theme/ap-table/setting/sortable-item.css +3 -0
  74. package/es/src/theme/ap-table/setting/sorter.css +26 -0
  75. package/es/src/theme/css-var/index.mjs +22 -12
  76. package/lib/src/ap-download/ap-download.vue.d.ts +7 -3
  77. package/lib/src/ap-download/ap-download.vue.js +1 -1
  78. package/lib/src/ap-download/interface.d.ts +3 -11
  79. package/lib/src/ap-download/style/ap-download.css +3 -0
  80. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  81. package/lib/src/ap-table/ap-table.vue.js +1 -1
  82. package/lib/src/ap-table/components/interface.d.ts +33 -1
  83. package/lib/src/ap-table/components/setting/images/icon_carst_down.svg.js +1 -0
  84. package/lib/src/ap-table/components/setting/images/icon_fill_right.svg.js +1 -0
  85. package/lib/src/ap-table/components/setting/modal/index.vue.d.ts +28 -0
  86. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -0
  87. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -0
  88. package/lib/src/ap-table/components/setting/select-group/index.vue.d.ts +13 -0
  89. package/lib/src/ap-table/components/setting/select-group/index.vue.js +1 -0
  90. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -0
  91. package/lib/src/ap-table/components/setting/sortable/index.vue.d.ts +13 -0
  92. package/lib/src/ap-table/components/setting/sortable/index.vue.js +1 -0
  93. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -0
  94. package/lib/src/ap-table/components/setting/sortable/item.vue.d.ts +20 -0
  95. package/lib/src/ap-table/components/setting/sortable/item.vue.js +1 -0
  96. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -0
  97. package/lib/src/ap-table/components/setting/sorter/context.d.ts +11 -0
  98. package/lib/src/ap-table/components/setting/sorter/context.js +1 -0
  99. package/lib/src/ap-table/components/setting/sorter/index.vue.d.ts +18 -0
  100. package/lib/src/ap-table/components/setting/sorter/index.vue.js +1 -0
  101. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -0
  102. package/lib/src/ap-table/components/setting/tree-select/index.vue.d.ts +13 -0
  103. package/lib/src/ap-table/components/setting/tree-select/index.vue.js +1 -0
  104. package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -0
  105. package/lib/src/ap-table/components/setting/utils.d.ts +17 -0
  106. package/lib/src/ap-table/components/setting/utils.js +1 -0
  107. package/lib/src/ap-table/components/style/setting/modal.css +39 -0
  108. package/lib/src/ap-table/components/style/setting/select-group.css +7 -0
  109. package/lib/src/ap-table/components/style/setting/sortable-item-meta.css +50 -0
  110. package/lib/src/ap-table/components/style/setting/sortable-item.css +3 -0
  111. package/lib/src/ap-table/components/style/setting/sorter.css +26 -0
  112. package/lib/src/ap-table/constants.d.ts +31 -8
  113. package/lib/src/ap-table/constants.js +1 -1
  114. package/lib/src/ap-table/context.d.ts +31 -0
  115. package/lib/src/ap-table/context.js +1 -0
  116. package/lib/src/ap-table/hooks/use-table-column-state.d.ts +18 -0
  117. package/lib/src/ap-table/hooks/use-table-column-state.js +1 -0
  118. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  119. package/lib/src/ap-table/hooks/use-table-paging.d.ts +1 -0
  120. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  121. package/lib/src/ap-table/interface.d.ts +51 -1
  122. package/lib/src/ap-table/style/ap-table.css +29 -1
  123. package/lib/src/ap-table/utils.d.ts +1 -1
  124. package/lib/src/ap-table/utils.js +1 -1
  125. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  126. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  127. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  128. package/lib/src/business/ap-attachment/ApAttachment.d.ts +1 -1
  129. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  130. package/lib/src/business/ap-attachment/style.css +2 -0
  131. package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
  132. package/lib/src/business/ap-ladder/interface.d.ts +42 -0
  133. package/lib/src/business/ap-ladder/interface.js +1 -0
  134. package/lib/src/business/hooks/usePageListApTable.d.ts +8 -3
  135. package/lib/src/business/hooks/usePageListApTable.js +1 -1
  136. package/lib/src/business/hooks/useTableRefresh.d.ts +3 -4
  137. package/lib/src/business/hooks/useTableRefresh.js +1 -1
  138. package/lib/src/business/index.d.ts +4 -4
  139. package/lib/src/editable-table/interface.d.ts +1 -1
  140. package/lib/src/locale/lang/en.js +1 -1
  141. package/lib/src/locale/lang/zh-cn.js +1 -1
  142. package/lib/src/theme/ap-attachment/ap-attachment.css +2 -0
  143. package/lib/src/theme/ap-download/ap-download.css +3 -0
  144. package/lib/src/theme/ap-table/ap-table.css +29 -1
  145. package/lib/src/theme/ap-table/setting/modal.css +39 -0
  146. package/lib/src/theme/ap-table/setting/select-group.css +7 -0
  147. package/lib/src/theme/ap-table/setting/sortable-item-meta.css +50 -0
  148. package/lib/src/theme/ap-table/setting/sortable-item.css +3 -0
  149. package/lib/src/theme/ap-table/setting/sorter.css +26 -0
  150. package/lib/src/theme/css-var/index.js +1 -1
  151. 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
  };
@@ -1,81 +1,83 @@
1
- import { defineComponent as D, inject as n, ref as M, watch as $, nextTick as j, openBlock as v, createElementBlock as C, normalizeClass as W, unref as s, createVNode as _, withCtx as E, createElementVNode as b, createTextVNode as G, toDisplayString as L, withModifiers as H, createBlock as J, resolveDynamicComponent as K, createCommentVNode as Q } from "vue";
1
+ import { defineComponent as $, inject as n, ref as j, watch as W, nextTick as G, openBlock as x, createElementBlock as C, normalizeClass as H, unref as s, createVNode as _, withCtx as b, createElementVNode as L, createTextVNode as J, toDisplayString as S, withModifiers as K, createBlock as Q, resolveDynamicComponent as V, createCommentVNode as X } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
- import { getPath as V, getName as X, getReturnData as x } from "../utils/returnData.mjs";
4
- import { useOss as Y, getOssInstance as Z } from "../hooks/useOss.mjs";
5
- import { message as p, Upload as ee, Button as te } from "ant-design-vue";
6
- import { UploadOutlined as oe } from "@ant-design/icons-vue";
7
- import { fileMatchesAccept as ae, getAcceptText as se } from "../utils/accept.mjs";
3
+ import { getPath as Y, getName as Z, getReturnData as y } from "../utils/returnData.mjs";
4
+ import { useOss as ee, getOssInstance as te } from "../hooks/useOss.mjs";
5
+ import { message as c, Upload as oe, Button as ae } from "ant-design-vue";
6
+ import { UploadOutlined as se } from "@ant-design/icons-vue";
7
+ import { fileMatchesAccept as ne, getAcceptText as ie } from "../utils/accept.mjs";
8
8
  import "../styles/multiple-file.css";
9
- import { useLocale as ne } from "../../config-provider/hooks/use-locale.mjs";
10
- import { useNamespace as ie } from "../../config-provider/hooks/use-namespace.mjs";
11
- const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 }, ke = /* @__PURE__ */ D({
9
+ import { useLocale as re } from "../../config-provider/hooks/use-locale.mjs";
10
+ import { useNamespace as le } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const ue = { class: "multiple-file-context" }, pe = { key: 0 }, ce = { key: 1 }, _e = /* @__PURE__ */ $({
12
12
  __name: "MultipleFile",
13
- setup(ue) {
14
- const { t: i } = ne(), { b: U } = ie("ap-upload-multiple-file"), { put: R } = Y(), S = n("theme"), B = n("dirName"), y = n("accept") || "*", A = n("maxSize") ?? 500, I = n("title") || i("ap.apUpload.uploadFile"), g = n("subTitle"), l = n("maxCount") ?? 10, u = n("uploadingCount"), F = n("beforeUpload"), N = n("customRequest"), P = n("getOssAccess"), a = n("value"), d = [], c = n("needName"), f = M(null);
15
- $(
13
+ setup(me) {
14
+ const { t: i } = re(), { b: U } = le("ap-upload-multiple-file"), { put: B } = ee(), I = n("theme"), P = n("dirName"), w = n("accept") || "*", A = n("maxSize") ?? 500, z = n("title") || i("ap.apUpload.uploadFile"), h = n("subTitle"), r = n("maxCount") ?? 10, m = n("uploadingCount"), F = n("beforeUpload"), N = n("customRequest"), R = n("getOssAccess"), a = n("value"), g = [], d = n("needName"), p = j(null);
15
+ W(
16
16
  () => a == null ? void 0 : a.value,
17
17
  function(e) {
18
- !f.value.fileList.length && e && j(() => {
19
- const t = e.map((o) => {
20
- const r = V(c, o), w = X(c, o), k = new File(
21
- [o],
22
- w,
18
+ var t, o;
19
+ !((o = (t = p == null ? void 0 : p.value) == null ? void 0 : t.fileList) != null && o.length) && e && G(() => {
20
+ const l = e.map((u) => {
21
+ const E = Y(d, u), M = Z(d, u), k = new File(
22
+ [u],
23
+ M,
23
24
  {}
24
25
  );
25
- return k.response = r, k.uid = r, k;
26
+ return k.response = E, k.uid = E, k;
26
27
  });
27
- if (l && t.length > l) {
28
- p.warning(
28
+ if (r && l.length > r) {
29
+ c.warning(
29
30
  i("ap.apUpload.fileInitializationException", {
30
- maxCount: l
31
+ maxCount: r
31
32
  })
32
33
  );
33
34
  return;
34
35
  }
35
- t.forEach((o) => {
36
- m.push(o), d.push({
37
- uid: o.uid,
38
- path: o.response
36
+ l.forEach((u) => {
37
+ f.push(u), g.push({
38
+ uid: u.uid,
39
+ path: u.response
39
40
  });
40
- }), f.value.fileList = t;
41
+ }), p.value.fileList = l;
41
42
  });
42
- }
43
+ },
44
+ { immediate: !0 }
43
45
  );
44
- let m = [], T;
45
- function h(e) {
46
+ let f = [], T;
47
+ function v(e) {
46
48
  setTimeout(() => {
47
- const t = f.value.fileList.findIndex(
49
+ const t = p.value.fileList.findIndex(
48
50
  (o) => o.uid === e.uid
49
51
  );
50
- t >= 0 && f.value.fileList.splice(t, 1);
52
+ t >= 0 && p.value.fileList.splice(t, 1);
51
53
  });
52
54
  }
53
- function z(e) {
54
- if (l && l > 1 && m.length >= l)
55
+ function O(e) {
56
+ if (r && r > 1 && f.length >= r)
55
57
  return clearTimeout(T), T = setTimeout(() => {
56
- p.warning(
58
+ c.warning(
57
59
  i("ap.apUpload.maxUploadFiles", {
58
- maxCount: l
60
+ maxCount: r
59
61
  })
60
62
  );
61
- }), h(e), !1;
63
+ }), v(e), !1;
62
64
  if (typeof F == "function") {
63
65
  if (F(e) === !1)
64
- return h(e), !1;
66
+ return v(e), !1;
65
67
  } else {
66
68
  if (e.size > A * 1024 * 1024)
67
- return p.warning(
69
+ return c.warning(
68
70
  i("ap.apUpload.maxUploadFileSize", {
69
71
  maxSize: A
70
72
  })
71
- ), h(e), !1;
72
- if (!ae(e, y))
73
- return p.warning(i("ap.apUpload.fileFormatNotSupported")), h(e), !1;
73
+ ), v(e), !1;
74
+ if (!ne(e, w))
75
+ return c.warning(i("ap.apUpload.fileFormatNotSupported")), v(e), !1;
74
76
  }
75
- l && l === 1 && (m = [], a.value = void 0), m.push(e);
77
+ r && r === 1 && (f = [], a.value = void 0), f.push(e);
76
78
  }
77
- async function O(e) {
78
- if (u.value++, typeof N == "function") {
79
+ async function q(e) {
80
+ if (m.value++, typeof N == "function") {
79
81
  N({
80
82
  onProgress: (t) => {
81
83
  setTimeout(() => {
@@ -85,50 +87,50 @@ const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 },
85
87
  });
86
88
  },
87
89
  onError: (t) => {
88
- p.warning(t || i("ap.apUpload.networkAnomaly")), setTimeout(() => {
90
+ c.warning(t || i("ap.apUpload.networkAnomaly")), setTimeout(() => {
89
91
  e.onError({
90
92
  name: t,
91
93
  message: t
92
94
  });
93
- }), u.value--;
95
+ }), m.value--;
94
96
  },
95
97
  onSuccess: (t) => {
96
98
  setTimeout(() => {
97
99
  e.onSuccess(t);
98
100
  }), a.value ? a.value.push(
99
- x(c, t, e.file.name)
101
+ y(d, t, e.file.name)
100
102
  ) : a.value = [
101
- x(c, t, e.file.name)
102
- ], d.push({
103
+ y(d, t, e.file.name)
104
+ ], g.push({
103
105
  uid: e.file.uid,
104
106
  path: t
105
- }), u.value--;
107
+ }), m.value--;
106
108
  },
107
109
  file: e.file
108
110
  });
109
111
  return;
110
112
  }
111
113
  try {
112
- const t = await Z(P);
113
- e.file.oss = t, R({
114
+ const t = await te(R);
115
+ e.file.oss = t, B({
114
116
  file: e.file,
115
- dirName: B,
117
+ dirName: P,
116
118
  oss: t,
117
119
  successCallBack(o) {
118
120
  e.onSuccess(o), a.value ? a.value.push(
119
- x(c, o, e.file.name)
121
+ y(d, o, e.file.name)
120
122
  ) : a.value = [
121
- x(c, o, e.file.name)
122
- ], d.push({
123
+ y(d, o, e.file.name)
124
+ ], g.push({
123
125
  uid: e.file.uid,
124
126
  path: o
125
- }), u.value--;
127
+ }), m.value--;
126
128
  },
127
129
  errorCallBack(o) {
128
- p.warning(o || i("ap.apUpload.networkAnomaly")), e.onError({
130
+ c.warning(o || i("ap.apUpload.networkAnomaly")), e.onError({
129
131
  name: o,
130
132
  message: o
131
- }), u.value--;
133
+ }), m.value--;
132
134
  },
133
135
  progressCallBack(o) {
134
136
  e.onProgress({
@@ -137,66 +139,66 @@ const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 },
137
139
  }
138
140
  });
139
141
  } catch (t) {
140
- p.warning(
142
+ c.warning(
141
143
  typeof (t == null ? void 0 : t.message) == "string" ? t.message : i("ap.apUpload.networkAnomaly")
142
144
  ), e.onError({
143
145
  name: (t == null ? void 0 : t.message) || i("ap.apUpload.networkAnomaly"),
144
146
  message: (t == null ? void 0 : t.message) || i("ap.apUpload.networkAnomaly")
145
- }), u.value--;
147
+ }), m.value--;
146
148
  }
147
149
  }
148
- function q(e) {
150
+ function D(e) {
149
151
  var o;
150
152
  if (e.response) {
151
153
  if (Array.isArray(a.value)) {
152
- const r = d.findIndex((w) => w.uid === e.uid);
153
- r >= 0 && (a == null || a.value.splice(r, 1), d.splice(r, 1)), a.value.length === 0 && (a.value = void 0);
154
+ const l = g.findIndex((u) => u.uid === e.uid);
155
+ l >= 0 && (a == null || a.value.splice(l, 1), g.splice(l, 1)), a.value.length === 0 && (a.value = void 0);
154
156
  }
155
157
  } else
156
158
  (o = e == null ? void 0 : e.oss) == null || o.pauseUpload();
157
- const t = m.findIndex(
158
- (r) => r.uid === e.uid
159
+ const t = f.findIndex(
160
+ (l) => l.uid === e.uid
159
161
  );
160
- return m.splice(t, 1), Promise.resolve(!0);
162
+ return f.splice(t, 1), Promise.resolve(!0);
161
163
  }
162
- return (e, t) => (v(), C("div", {
163
- class: W({
164
+ return (e, t) => (x(), C("div", {
165
+ class: H({
164
166
  [s(U)()]: !0,
165
- [s(U)("admin")]: s(S) === "admin"
167
+ [s(U)("admin")]: s(I) === "admin"
166
168
  })
167
169
  }, [
168
- _(s(ee), {
170
+ _(s(oe), {
169
171
  ref_key: "uploadRef",
170
- ref: f,
171
- accept: s(y),
172
+ ref: p,
173
+ accept: s(w),
172
174
  multiple: "",
173
- maxCount: s(l),
175
+ maxCount: s(r),
174
176
  progress: {
175
177
  strokeWidth: 3,
176
178
  showInfo: !1,
177
179
  strokeColor: "#0070FF"
178
180
  },
179
- beforeUpload: z,
180
- customRequest: O,
181
- onRemove: q
181
+ beforeUpload: O,
182
+ customRequest: q,
183
+ onRemove: D
182
184
  }, {
183
- default: E(() => [
184
- b("div", le, [
185
- _(s(te), { class: "file-btn" }, {
186
- default: E(() => [
187
- _(s(oe)),
188
- G(" " + L(s(I)), 1)
185
+ default: b(() => [
186
+ L("div", ue, [
187
+ _(s(ae), { class: "file-btn" }, {
188
+ default: b(() => [
189
+ _(s(se)),
190
+ J(" " + S(s(z)), 1)
189
191
  ]),
190
192
  _: 1
191
193
  }),
192
- b("div", {
194
+ L("div", {
193
195
  class: "sub-title",
194
- onClick: t[0] || (t[0] = H(() => {
196
+ onClick: t[0] || (t[0] = K(() => {
195
197
  }, ["stop"]))
196
198
  }, [
197
- typeof s(g) == "string" ? (v(), C("div", re, L(s(g) || `${s(i)("ap.apUpload.supportExtension")}:${s(se)(s(y))}`), 1)) : s(g) ? (v(), C("div", pe, [
198
- (v(), J(K(s(g))))
199
- ])) : Q("", !0)
199
+ typeof s(h) == "string" ? (x(), C("div", pe, S(s(h) || `${s(i)("ap.apUpload.supportExtension")}:${s(ie)(s(w))}`), 1)) : s(h) ? (x(), C("div", ce, [
200
+ (x(), Q(V(s(h))))
201
+ ])) : X("", !0)
200
202
  ])
201
203
  ])
202
204
  ]),
@@ -206,5 +208,5 @@ const le = { class: "multiple-file-context" }, re = { key: 0 }, pe = { key: 1 },
206
208
  }
207
209
  });
208
210
  export {
209
- ke as default
211
+ _e as default
210
212
  };