@aplus-frontend/ui 0.1.18 → 0.1.19

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 (35) hide show
  1. package/es/src/ap-download/ap-download.vue.mjs +34 -31
  2. package/es/src/ap-download/style/ap-download.css +1 -4
  3. package/es/src/ap-field/select/index.vue.mjs +5 -5
  4. package/es/src/ap-form/ap-form-item.vue.mjs +18 -17
  5. package/es/src/ap-table/ap-table.vue.d.ts +10 -3
  6. package/es/src/ap-table/ap-table.vue.mjs +129 -128
  7. package/es/src/ap-table/constants.d.ts +8 -31
  8. package/es/src/ap-table/constants.mjs +51 -41
  9. package/es/src/ap-table/interface.d.ts +5 -1
  10. package/es/src/ap-table/style/ap-table.css +0 -3
  11. package/es/src/ap-table/utils.d.ts +7 -1
  12. package/es/src/ap-table/utils.mjs +113 -86
  13. package/es/src/business/ap-image/ApImage.vue.d.ts +30 -28
  14. package/es/src/business/ap-image/ApImage.vue2.mjs +31 -28
  15. package/es/src/business/index.d.ts +29 -27
  16. package/es/src/theme/ap-download/ap-download.css +1 -4
  17. package/es/src/theme/ap-table/ap-table.css +0 -3
  18. package/lib/src/ap-download/ap-download.vue.js +1 -1
  19. package/lib/src/ap-download/style/ap-download.css +1 -4
  20. package/lib/src/ap-field/select/index.vue.js +1 -1
  21. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  22. package/lib/src/ap-table/ap-table.vue.d.ts +10 -3
  23. package/lib/src/ap-table/ap-table.vue.js +1 -1
  24. package/lib/src/ap-table/constants.d.ts +8 -31
  25. package/lib/src/ap-table/constants.js +1 -1
  26. package/lib/src/ap-table/interface.d.ts +5 -1
  27. package/lib/src/ap-table/style/ap-table.css +0 -3
  28. package/lib/src/ap-table/utils.d.ts +7 -1
  29. package/lib/src/ap-table/utils.js +1 -1
  30. package/lib/src/business/ap-image/ApImage.vue.d.ts +30 -28
  31. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  32. package/lib/src/business/index.d.ts +29 -27
  33. package/lib/src/theme/ap-download/ap-download.css +1 -4
  34. package/lib/src/theme/ap-table/ap-table.css +0 -3
  35. package/package.json +3 -3
@@ -1,30 +1,32 @@
1
- import { isVNode as m, createVNode as i, mergeProps as l, cloneVNode as p } from "vue";
2
- import { isObject as c, isArray as f, isUndefined as d, isFunction as b, omit as T, isBoolean as y } from "lodash-unified";
3
- import { apTableRenderItemMap as j, apTableFormItemMap as h } from "./constants.mjs";
4
- import { isType as g } from "@fruits-chain/utils";
1
+ import { isVNode as d, createVNode as s, mergeProps as f, cloneVNode as T, Fragment as l } from "vue";
2
+ import { isObject as c, isArray as a, isUndefined as b, isFunction as y, omit as g, isBoolean as h, isString as j } 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";
5
5
  import "../ap-form/index.mjs";
6
- import E from "../ap-form/ap-form-item.vue.mjs";
7
- function F(t) {
8
- return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !m(t);
6
+ import { Tooltip as N } from "ant-design-vue";
7
+ import { QuestionCircleOutlined as x } from "@ant-design/icons-vue";
8
+ import v from "../ap-form/ap-form-item.vue.mjs";
9
+ function I(t) {
10
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !d(t);
9
11
  }
10
- const O = (t, e, n) => {
11
- let r = {};
12
- return c(t) ? Object.keys(t).forEach((o) => {
13
- c(t[o]) ? r[o] = O(t[o], e[o], n) : r[o] = n(t[o], e);
14
- }) : r = n(t, e), r;
15
- }, _ = (t, e) => {
12
+ const C = (t, e, n) => {
13
+ let o = {};
14
+ return c(t) ? Object.keys(t).forEach((u) => {
15
+ c(t[u]) ? o[u] = C(t[u], e[u], n) : o[u] = n(t[u], e);
16
+ }) : o = n(t, e), o;
17
+ }, J = (t, e) => {
16
18
  switch (t) {
17
19
  case "dayjs":
18
20
  return e.valueOf();
19
21
  case "dayjsRange":
20
22
  return e.map((n) => n.valueOf());
21
23
  case "dayjsDayRange": {
22
- const [n, r] = e;
23
- return [n.startOf("day").valueOf(), r.endOf("day").valueOf()];
24
+ const [n, o] = e;
25
+ return [n.startOf("day").valueOf(), o.endOf("day").valueOf()];
24
26
  }
25
27
  case "multiple":
26
28
  case "multipleNumber":
27
- return f(e) ? e : [e];
29
+ return a(e) ? e : [e];
28
30
  case "boolean":
29
31
  return e;
30
32
  case "object":
@@ -33,113 +35,113 @@ const O = (t, e, n) => {
33
35
  return e;
34
36
  }
35
37
  };
36
- function C(t) {
37
- return f(t) ? t.join(".") : t;
38
+ function L(t) {
39
+ return a(t) ? t.join(".") : t;
38
40
  }
39
- function N(t) {
41
+ function P(t) {
40
42
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
41
43
  return e === "string" && typeof t == "object" ? "object" : t === null ? "null" : t === void 0 ? "undefined" : e;
42
44
  }
43
- const S = (t) => N(t) === "map" ? t : new Map(Object.entries(t || {})), a = (t) => {
44
- const e = [], n = S(t);
45
- return n.forEach((r, o) => {
46
- const u = n.get(o) || n.get(`${o}`);
47
- if (u) {
48
- if (typeof u == "object" && (u != null && u.text)) {
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, u) => {
48
+ const r = n.get(u) || n.get(`${u}`);
49
+ if (r) {
50
+ if (typeof r == "object" && (r != null && r.text)) {
49
51
  e.push({
50
- text: u == null ? void 0 : u.text,
51
- value: o,
52
- label: u == null ? void 0 : u.text,
53
- disabled: u.disabled
52
+ text: r == null ? void 0 : r.text,
53
+ value: u,
54
+ label: r == null ? void 0 : r.text,
55
+ disabled: r.disabled
54
56
  });
55
57
  return;
56
58
  }
57
59
  e.push({
58
- text: u,
59
- label: u,
60
- value: o
60
+ text: r,
61
+ label: r,
62
+ value: u
61
63
  });
62
64
  }
63
65
  }), e;
64
- }, R = (t) => d(t) || t < 0 ? 0 : t, $ = (t, e, n) => {
66
+ }, Q = (t) => b(t) || t < 0 ? 0 : t, U = (t, e, n) => {
65
67
  if (n)
66
68
  return n;
67
- const r = ["select", "date"], o = ["text", "textArea", "number"];
69
+ const o = ["select", "date"], u = ["text", "textArea", "number"];
68
70
  if (e === "dateRange")
69
71
  return [t("ap.common.chooseText"), t("ap.common.chooseText")];
70
- if (r.includes(e))
71
- return t("ap.common.chooseText");
72
72
  if (o.includes(e))
73
+ return t("ap.common.chooseText");
74
+ if (u.includes(e))
73
75
  return t("ap.common.inputText");
74
76
  };
75
- function x(t, e) {
76
- return !t || !b(t) ? t : t(e);
77
+ function w(t, e) {
78
+ return !t || !y(t) ? t : t(e);
77
79
  }
78
- function q(t) {
80
+ function z(t) {
79
81
  let e = t.valueType || "text";
80
82
  return t.valueEnum && (e = "status"), e;
81
83
  }
82
- function B(t, e, n, r) {
83
- var s;
84
- const o = j[t];
85
- if (o)
86
- return i(o, l(e, {
84
+ function G(t, e, n, o) {
85
+ var i;
86
+ const u = F[t];
87
+ if (u)
88
+ return s(u, f(e, {
87
89
  mode: "read"
88
90
  }), null);
89
- const u = r == null ? void 0 : r[t];
90
- return ((s = u == null ? void 0 : u.render) == null ? void 0 : s.call(u, e.value, n, e)) || e.value;
91
+ const r = o == null ? void 0 : o[t];
92
+ return ((i = r == null ? void 0 : r.render) == null ? void 0 : i.call(r, e.value, n, e)) || e.value;
91
93
  }
92
- function D(t, e) {
94
+ function K(t, e) {
93
95
  if (t.customRenderFormItem)
94
96
  return () => {
95
- const o = t.customRenderFormItem(t);
96
- return p(o, {
97
+ const u = t.customRenderFormItem(t);
98
+ return T(u, {
97
99
  ...t.fieldProps,
98
100
  span: t.span,
99
- ...o.props || {}
101
+ ...u.props || {}
100
102
  });
101
103
  };
102
- const n = h[t.valueType];
104
+ const n = O[t.valueType];
103
105
  if (n)
104
106
  return n;
105
- const r = e == null ? void 0 : e[t.valueType];
107
+ const o = e == null ? void 0 : e[t.valueType];
106
108
  return () => {
107
- var u;
108
- const o = (u = r == null ? void 0 : r.renderFormItem) == null ? void 0 : u.call(r, t.fieldProps.field);
109
- return o ? i(E, l(t.fieldProps, {
109
+ var r;
110
+ const u = (r = o == null ? void 0 : o.renderFormItem) == null ? void 0 : r.call(o, t.fieldProps.field);
111
+ return u ? s(v, f(t.fieldProps, {
110
112
  span: t.span
111
- }), F(o) ? o : {
112
- default: () => [o]
113
+ }), I(u) ? u : {
114
+ default: () => [u]
113
115
  }) : null;
114
116
  };
115
117
  }
116
- function J(t, e) {
117
- const n = x(t.fieldProps, e), r = (n == null ? void 0 : n.field) || n || {}, o = t.valueType === "switch", u = t.valueType === "index", s = o ? {
118
+ function W(t, e) {
119
+ const n = w(t.fieldProps, e), o = (n == null ? void 0 : n.field) || n || {}, u = t.valueType === "switch", r = t.valueType === "index", i = u ? {
118
120
  checked: e.value
119
121
  } : {
120
- value: u ? e.index + 1 : e.value
122
+ value: r ? e.index + 1 : e.value
121
123
  };
122
- return t.valueEnum && (r.valueEnum = t.valueEnum), {
123
- ...T(r, ["request"]),
124
- ...s
124
+ return t.valueEnum && (o.valueEnum = t.valueEnum), {
125
+ ...g(o, ["request"]),
126
+ ...i
125
127
  };
126
128
  }
127
- function L(t) {
129
+ function X(t) {
128
130
  const e = {
129
131
  ...t
130
132
  };
131
- return y(t.filters) && t.filters && t.valueEnum && (e.filters = a(t.valueEnum)), e;
133
+ return h(t.filters) && t.filters && t.valueEnum && (e.filters = p(t.valueEnum)), e;
132
134
  }
133
- function U(t, e) {
134
- var r;
135
+ function Y(t, e) {
136
+ var o;
135
137
  const n = e || {};
136
- return t.valueEnum && !((r = n.field) != null && r.options) && (n.field = {
138
+ return t.valueEnum && !((o = n.field) != null && o.options) && (n.field = {
137
139
  ...n.field,
138
- options: a(t.valueEnum)
140
+ options: p(t.valueEnum)
139
141
  }), n;
140
142
  }
141
- function z(t) {
142
- if (!g("Object")(t))
143
+ function Z(t) {
144
+ if (!S("Object")(t))
143
145
  return t;
144
146
  try {
145
147
  return JSON.stringify(t);
@@ -147,20 +149,45 @@ function z(t) {
147
149
  return t;
148
150
  }
149
151
  }
152
+ function k(t, e, n) {
153
+ const o = e == null ? void 0 : e({
154
+ title: t.title,
155
+ column: t
156
+ });
157
+ if (o && (o.length > 1 || o[0].children !== "v-if"))
158
+ return o;
159
+ const r = s("span", {
160
+ style: E,
161
+ title: t.title
162
+ }, [t.title]), i = t.tooltip ? j(t.tooltip) ? s(l, null, [t.tooltip]) : t.tooltip(t) : null, m = () => s(l, null, [r, s(N, {
163
+ title: i,
164
+ placement: "bottom"
165
+ }, {
166
+ default: () => [s(x, {
167
+ style: {
168
+ padding: "4px",
169
+ color: n,
170
+ verticalAlign: "middle"
171
+ }
172
+ }, null)]
173
+ })]);
174
+ return i ? m : r;
175
+ }
150
176
  export {
151
- L as apColumnToColumn,
152
- C as dataIndexToStr,
153
- O as formatParamsValueType,
154
- R as getColumnOrder,
155
- x as getFieldProps,
156
- $ as getPlaceholder,
157
- D as getSearchFormItemRenderNode,
158
- B as getTableCellRenderNode,
159
- J as getTableRenderProps,
160
- q as getTableRenderType,
161
- S as objectToMap,
162
- z as objectToString,
163
- _ as parseFieldValue,
164
- U as updateFormProps,
165
- a as valueEnumToArray
177
+ X as apColumnToColumn,
178
+ L as dataIndexToStr,
179
+ C as formatParamsValueType,
180
+ Q as getColumnOrder,
181
+ w as getFieldProps,
182
+ U as getPlaceholder,
183
+ K as getSearchFormItemRenderNode,
184
+ G as getTableCellRenderNode,
185
+ W as getTableRenderProps,
186
+ z as getTableRenderType,
187
+ k as getTableTitle,
188
+ V as objectToMap,
189
+ Z as objectToString,
190
+ J as parseFieldValue,
191
+ Y as updateFormProps,
192
+ p as valueEnumToArray
166
193
  };
@@ -1,62 +1,64 @@
1
1
  import { accessCreate } from '@aplus-frontend/oss';
2
2
  import { PropType, DefineComponent, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
3
- import { MouseEventHandler } from 'ant-design-vue/es/_util/EventInterface';
4
3
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
5
4
  import { ImagePreviewType } from 'ant-design-vue/es/vc-image';
5
+ import { MouseEventHandler } from 'ant-design-vue/es/_util/EventInterface';
6
6
  declare const _default: DefineComponent<{
7
7
  path: StringConstructor;
8
8
  getOssAccess: PropType<() => Promise<accessCreate>>;
9
- onClick: {
10
- type: PropType< MouseEventHandler>;
11
- };
12
- onError: {
13
- type: PropType<OnErrorEventHandlerNonNull>;
14
- };
15
- prefixCls: StringConstructor;
16
- placeholder: VueTypeValidableDef<any>;
17
- preview: {
18
- type: PropType<boolean | ImagePreviewType>;
19
- default: boolean | ImagePreviewType;
20
- };
21
- rootClassName: StringConstructor;
9
+ src: StringConstructor;
22
10
  wrapperClassName: StringConstructor;
23
- fallback: StringConstructor;
24
- previewPrefixCls: StringConstructor;
25
11
  wrapperStyle: {
26
12
  type: PropType< CSSProperties>;
27
13
  default: CSSProperties;
28
14
  };
15
+ rootClassName: StringConstructor;
16
+ prefixCls: StringConstructor;
17
+ previewPrefixCls: StringConstructor;
29
18
  previewMask: {
30
19
  type: PropType<false | (() => any)>;
31
20
  default: any;
32
21
  };
33
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
34
- path: StringConstructor;
35
- getOssAccess: PropType<() => Promise<accessCreate>>;
22
+ placeholder: VueTypeValidableDef<any>;
23
+ fallback: StringConstructor;
24
+ preview: {
25
+ type: PropType<boolean | ImagePreviewType>;
26
+ default: boolean | ImagePreviewType;
27
+ };
36
28
  onClick: {
37
29
  type: PropType< MouseEventHandler>;
38
30
  };
39
31
  onError: {
40
32
  type: PropType<OnErrorEventHandlerNonNull>;
41
33
  };
42
- prefixCls: StringConstructor;
43
- placeholder: VueTypeValidableDef<any>;
44
- preview: {
45
- type: PropType<boolean | ImagePreviewType>;
46
- default: boolean | ImagePreviewType;
47
- };
48
- rootClassName: StringConstructor;
34
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
35
+ path: StringConstructor;
36
+ getOssAccess: PropType<() => Promise<accessCreate>>;
37
+ src: StringConstructor;
49
38
  wrapperClassName: StringConstructor;
50
- fallback: StringConstructor;
51
- previewPrefixCls: StringConstructor;
52
39
  wrapperStyle: {
53
40
  type: PropType< CSSProperties>;
54
41
  default: CSSProperties;
55
42
  };
43
+ rootClassName: StringConstructor;
44
+ prefixCls: StringConstructor;
45
+ previewPrefixCls: StringConstructor;
56
46
  previewMask: {
57
47
  type: PropType<false | (() => any)>;
58
48
  default: any;
59
49
  };
50
+ placeholder: VueTypeValidableDef<any>;
51
+ fallback: StringConstructor;
52
+ preview: {
53
+ type: PropType<boolean | ImagePreviewType>;
54
+ default: boolean | ImagePreviewType;
55
+ };
56
+ onClick: {
57
+ type: PropType< MouseEventHandler>;
58
+ };
59
+ onError: {
60
+ type: PropType<OnErrorEventHandlerNonNull>;
61
+ };
60
62
  }>>, {
61
63
  preview: boolean | ImagePreviewType;
62
64
  wrapperStyle: CSSProperties;
@@ -1,56 +1,59 @@
1
- import { defineComponent as b, computed as s, ref as h, watchEffect as O, openBlock as _, createBlock as P, unref as w, normalizeProps as C, guardReactiveProps as F } from "vue";
1
+ import { defineComponent as b, computed as c, ref as h, watchEffect as O, openBlock as _, createBlock as P, unref as w, normalizeProps as C, guardReactiveProps as F } from "vue";
2
2
  import { Image as I } from "ant-design-vue";
3
3
  import { injectLocaleToOss as M, getOssInstance as S, getSignatureUrl as U } from "./hooks/useOss.mjs";
4
4
  import "../../config-provider/index.mjs";
5
5
  import { imageProps as x } from "ant-design-vue/es/image";
6
- import { omit as y } from "lodash-unified";
7
- import B from "./imgs/admin-fallback.jpg.mjs";
8
- import L from "./imgs/aplus-fallback.jpg.mjs";
9
- import { useGlobalConfig as p } from "../../config-provider/hooks/use-global-config.mjs";
10
- import { useLocale as j } from "../../config-provider/hooks/use-locale.mjs";
11
- const K = /* @__PURE__ */ b({
6
+ import y from "./imgs/admin-fallback.jpg.mjs";
7
+ import B from "./imgs/aplus-fallback.jpg.mjs";
8
+ import { useGlobalConfig as u } from "../../config-provider/hooks/use-global-config.mjs";
9
+ import { useLocale as L } from "../../config-provider/hooks/use-locale.mjs";
10
+ const H = /* @__PURE__ */ b({
12
11
  __name: "ApImage",
13
12
  props: {
14
- ...y(x(), ["src"]),
13
+ ...x(),
15
14
  path: String,
16
15
  getOssAccess: Function
17
16
  },
18
- setup(u) {
19
- const e = u, c = {
20
- aplus: L,
21
- admin: B
22
- }, i = p("uiMode"), m = p("apUpload"), { t: f, lang: g } = j(), r = s(() => e.path), v = s(
17
+ setup(i) {
18
+ const a = i, o = {
19
+ aplus: B,
20
+ admin: y
21
+ }, m = u("uiMode"), p = u("apUpload"), { t: f, lang: g } = L(), r = c(() => a.path), v = c(
23
22
  () => {
24
- var a;
25
- return e.getOssAccess || ((a = m.value) == null ? void 0 : a.getOssAccess);
23
+ var e;
24
+ return a.getOssAccess || ((e = p.value) == null ? void 0 : e.getOssAccess);
26
25
  }
27
- ), l = s(
28
- () => c[i.value] || c.aplus
29
- ), n = s(() => (e == null ? void 0 : e.fallback) || l.value), o = h(l.value);
26
+ ), l = c(
27
+ () => o[m.value] || o.aplus
28
+ ), n = c(() => (a == null ? void 0 : a.fallback) || l.value), s = h(l.value);
30
29
  M(f, g);
31
- function d(a) {
32
- const { path: t, getOssAccess: k, ...A } = a;
30
+ function d(e) {
31
+ const { path: t, getOssAccess: k, ...A } = e;
33
32
  return A;
34
33
  }
35
34
  return O(async () => {
35
+ if (a != null && a.src) {
36
+ s.value = a.src;
37
+ return;
38
+ }
36
39
  try {
37
40
  if (r.value) {
38
- const a = await S(v.value), t = await U({
39
- oss: a,
41
+ const e = await S(v.value), t = await U({
42
+ oss: e,
40
43
  fileName: r.value
41
44
  });
42
- t && (o.value = t);
45
+ t && (s.value = t);
43
46
  }
44
47
  } catch {
45
- o.value = n.value;
48
+ s.value = n.value;
46
49
  }
47
- }), (a, t) => (_(), P(w(I), C(F({
48
- ...d(e),
50
+ }), (e, t) => (_(), P(w(I), C(F({
51
+ ...d(a),
49
52
  fallback: n.value,
50
- src: o.value
53
+ src: s.value
51
54
  })), null, 16));
52
55
  }
53
56
  });
54
57
  export {
55
- K as default
58
+ H as default
56
59
  };
@@ -1907,57 +1907,59 @@ export declare const ApBatchActionGroup: DefineComponent<{
1907
1907
  export declare const ApImage: DefineComponent<{
1908
1908
  path: StringConstructor;
1909
1909
  getOssAccess: PropType<() => Promise< accessCreate>>;
1910
- onClick: {
1911
- type: PropType<MouseEventHandler>;
1912
- };
1913
- onError: {
1914
- type: PropType<OnErrorEventHandlerNonNull>;
1915
- };
1916
- prefixCls: StringConstructor;
1917
- placeholder: VueTypeValidableDef<any>;
1918
- preview: {
1919
- type: PropType<boolean | ImagePreviewType>;
1920
- default: boolean | ImagePreviewType;
1921
- };
1922
- rootClassName: StringConstructor;
1910
+ src: StringConstructor;
1923
1911
  wrapperClassName: StringConstructor;
1924
- fallback: StringConstructor;
1925
- previewPrefixCls: StringConstructor;
1926
1912
  wrapperStyle: {
1927
1913
  type: PropType<CSSProperties>;
1928
1914
  default: CSSProperties;
1929
1915
  };
1916
+ rootClassName: StringConstructor;
1917
+ prefixCls: StringConstructor;
1918
+ previewPrefixCls: StringConstructor;
1930
1919
  previewMask: {
1931
1920
  type: PropType<false | (() => any)>;
1932
1921
  default: any;
1933
1922
  };
1934
- }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
1935
- path: StringConstructor;
1936
- getOssAccess: PropType<() => Promise< accessCreate>>;
1923
+ placeholder: VueTypeValidableDef<any>;
1924
+ fallback: StringConstructor;
1925
+ preview: {
1926
+ type: PropType<boolean | ImagePreviewType>;
1927
+ default: boolean | ImagePreviewType;
1928
+ };
1937
1929
  onClick: {
1938
1930
  type: PropType<MouseEventHandler>;
1939
1931
  };
1940
1932
  onError: {
1941
1933
  type: PropType<OnErrorEventHandlerNonNull>;
1942
1934
  };
1943
- prefixCls: StringConstructor;
1944
- placeholder: VueTypeValidableDef<any>;
1945
- preview: {
1946
- type: PropType<boolean | ImagePreviewType>;
1947
- default: boolean | ImagePreviewType;
1948
- };
1949
- rootClassName: StringConstructor;
1935
+ }, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
1936
+ path: StringConstructor;
1937
+ getOssAccess: PropType<() => Promise< accessCreate>>;
1938
+ src: StringConstructor;
1950
1939
  wrapperClassName: StringConstructor;
1951
- fallback: StringConstructor;
1952
- previewPrefixCls: StringConstructor;
1953
1940
  wrapperStyle: {
1954
1941
  type: PropType<CSSProperties>;
1955
1942
  default: CSSProperties;
1956
1943
  };
1944
+ rootClassName: StringConstructor;
1945
+ prefixCls: StringConstructor;
1946
+ previewPrefixCls: StringConstructor;
1957
1947
  previewMask: {
1958
1948
  type: PropType<false | (() => any)>;
1959
1949
  default: any;
1960
1950
  };
1951
+ placeholder: VueTypeValidableDef<any>;
1952
+ fallback: StringConstructor;
1953
+ preview: {
1954
+ type: PropType<boolean | ImagePreviewType>;
1955
+ default: boolean | ImagePreviewType;
1956
+ };
1957
+ onClick: {
1958
+ type: PropType<MouseEventHandler>;
1959
+ };
1960
+ onError: {
1961
+ type: PropType<OnErrorEventHandlerNonNull>;
1962
+ };
1961
1963
  }>>, {
1962
1964
  preview: boolean | ImagePreviewType;
1963
1965
  wrapperStyle: CSSProperties;
@@ -1,7 +1,6 @@
1
1
  .aplus-ap-download-wrapper {
2
2
  text-wrap: nowrap;
3
3
  display: inline-block;
4
- display: flex;
5
4
  }
6
5
  .aplus-ap-download-inner-wrapper {
7
6
  display: inline-block;
@@ -13,9 +12,7 @@
13
12
  .aplus-ap-download-inner-wrapper .icon {
14
13
  position: relative;
15
14
  font-size: 18px;
16
- }
17
- .aplus-ap-download-inner-wrapper .text {
18
- margin-left: 5px;
15
+ margin-right: 5px;
19
16
  }
20
17
  .aplus-ap-download-inner-wrapper:hover {
21
18
  color: var(--download-main-color-opacity);
@@ -50,9 +50,6 @@
50
50
  .aplus-ap-table-table tr > th.ant-table-cell {
51
51
  background-color: var(--ap-table-header-bg, #F2F6F9);
52
52
  }
53
- .aplus-ap-table-table tr > th.ant-table-cell::before {
54
- display: none;
55
- }
56
53
  .aplus-ap-table .ant-table.ant-table-middle .ant-table-row .ant-table-cell {
57
54
  padding: 12px 16px;
58
55
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");const _=require("./hooks/index.js");require("./style/ap-download.css");const b=require("./utils/getFileInfo.js"),y=require("./hooks/useStyle.js"),F=require("../config-provider/hooks/use-locale.js"),o=require("../config-provider/hooks/use-global-config.js"),S={class:"icon"},q={class:"text"},z=e.defineComponent({name:"ApDownload",__name:"ap-download",props:{text:{},color:{default:"#0070FF"},size:{default:"middle"},disabled:{type:Boolean,default:!1},fileName:{},needName:{type:[Boolean,Object]},getOssAccess:{}},setup(n){const{lang:l}=F.useLocale(),a=e.computed(()=>l.value==="zh-cn"?"zh_CN":"en_US"),c=o.useGlobalConfig("uiMode"),s=n,r=o.useGlobalConfig("apUpload"),i=e.computed(()=>s.disabled),u=e.computed(()=>c.value==="aplus"?"#0070FF":"#1890FF"),d=e.computed(()=>s.size),{wrapperStyle:p,getWrapperClass:m,getInnerWrapperClass:f}=y.useStyle(u,d,i),g=e.computed(()=>{var t;return s.getOssAccess||((t=r.value)==null?void 0:t.getOssAccess)}),C=async()=>{s.disabled||await(await _.useOssInit(g.value,e.unref(a))).downloadFile(b.getFileInfo(s.needName,s.fileName))};return(t,N)=>(e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle(e.unref(p)),class:e.normalizeClass(e.unref(m)),onClick:C},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(f))},[e.createElementVNode("span",S,[e.renderSlot(t.$slots,"icon")]),e.createElementVNode("span",q,e.toDisplayString(t.text),1)],2)],6))}});exports.default=z;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../config-provider/index.js");const y=require("./hooks/index.js");require("./style/ap-download.css");const b=require("./utils/getFileInfo.js"),S=require("./hooks/useStyle.js"),F=require("../config-provider/hooks/use-locale.js"),t=require("../config-provider/hooks/use-global-config.js"),q={key:0,class:"icon"},z={class:"text"},N=e.defineComponent({name:"ApDownload",__name:"ap-download",props:{text:{},color:{default:"#0070FF"},size:{default:"middle"},disabled:{type:Boolean,default:!1},fileName:{},needName:{type:[Boolean,Object]},getOssAccess:{}},setup(n){const{lang:l}=F.useLocale(),a=e.useSlots(),c=e.computed(()=>l.value==="zh-cn"?"zh_CN":"en_US"),r=t.useGlobalConfig("uiMode"),s=n,u=t.useGlobalConfig("apUpload"),i=e.computed(()=>s.disabled),d=e.computed(()=>r.value==="aplus"?"#0070FF":"#1890FF"),p=e.computed(()=>s.size),{wrapperStyle:m,getWrapperClass:f,getInnerWrapperClass:g}=S.useStyle(d,p,i),C=e.computed(()=>{var o;return s.getOssAccess||((o=u.value)==null?void 0:o.getOssAccess)}),_=async()=>{s.disabled||await(await y.useOssInit(C.value,e.unref(c))).downloadFile(b.getFileInfo(s.needName,s.fileName))};return(o,v)=>(e.openBlock(),e.createElementBlock("span",{style:e.normalizeStyle(e.unref(m)),class:e.normalizeClass(e.unref(f)),onClick:_},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(g))},[e.unref(a).icon?(e.openBlock(),e.createElementBlock("span",q,[e.renderSlot(o.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("span",z,e.toDisplayString(o.text),1)],2)],6))}});exports.default=N;
@@ -1,7 +1,6 @@
1
1
  .aplus-ap-download-wrapper {
2
2
  text-wrap: nowrap;
3
3
  display: inline-block;
4
- display: flex;
5
4
  }
6
5
  .aplus-ap-download-inner-wrapper {
7
6
  display: inline-block;
@@ -13,9 +12,7 @@
13
12
  .aplus-ap-download-inner-wrapper .icon {
14
13
  position: relative;
15
14
  font-size: 18px;
16
- }
17
- .aplus-ap-download-inner-wrapper .text {
18
- margin-left: 5px;
15
+ margin-right: 5px;
19
16
  }
20
17
  .aplus-ap-download-inner-wrapper:hover {
21
18
  color: var(--download-main-color-opacity);
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),d=require("lodash-unified"),v=require("ant-design-vue");require("../../hooks/index.js");const P=require("../../utils/index.js"),V=require("../hooks/use-default-placeholder.js"),O=require("../../hooks/useControllableValue.js"),M={key:0},k=t.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},placeholder:{},onDeselect:{},loading:{type:Boolean,default:void 0},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["update:value"],setup(h,{expose:m,emit:y}){let a=0;const g=d.debounce(o=>{if(!d.isFunction(e.request))return;a+=1;const n=a;i.value=[],u.value=!0,e.request(o).then(l=>{a===n&&(i.value=l)}).finally(()=>{u.value=!1})},300),e=h,w=(o,n)=>{var r;const l=((r=e.fieldNames)==null?void 0:r.label)||"label";return typeof(n==null?void 0:n.label)=="string"&&n[l].indexOf(o)>-1},i=t.ref((e==null?void 0:e.options)||[]),s=t.ref(),u=t.ref((e==null?void 0:e.loading)||!1),S=y;async function c(o=!0){if(!d.isFunction(e.request))return;u.value=!0,a+=1;const n=a;try{o&&(i.value=[]);const l=await e.request();if(n!==a)return;i.value=l}finally{u.value=!1}}function B(o){var n;(n=e.onFocus)==null||n.call(e,o),e.refetchOnFocus&&a>0&&!u.value&&c(!0)}t.onMounted(()=>{if(e.lazy){a+=1;return}c()});const{value:p,updateValue:b}=O.useControllableValue(e,S),F=V.useDefaultPlaceholder("Select",e),C=t.computed(()=>{const o=t.unref(p);if(!o)return e.emptyText;if(d.isArray(o))return o.map(l=>{var r;return(r=t.unref(i).find(f=>f.value===l))==null?void 0:r.label}).filter(Boolean).join("、")||e.emptyText;const n=t.unref(i).find(l=>l.value===o);return(n==null?void 0:n.label)||e.emptyText}),q=t.computed(()=>{const o=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return o&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:g,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:d.isNil(e==null?void 0:e.filterOption)?w:e==null?void 0:e.filterOption}),{...P.omitUndefined(d.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus"])),placeholder:t.unref(F),...l}});function x(){var o;(o=s.value)==null||o.focus()}function I(){var o;(o=s.value)==null||o.blur()}return m({focus:x,blur:I,request:c}),(o,n)=>o.mode==="read"?(t.openBlock(),t.createElementBlock("span",M,t.toDisplayString(C.value),1)):(t.openBlock(),t.createBlock(t.unref(v.Select),t.mergeProps({key:1,"allow-clear":"",ref_key:"selectRef",ref:s},q.value,{mode:o.multiple?"multiple":void 0,value:t.unref(p),"onUpdate:value":t.unref(b),options:i.value,loading:u.value,onFocus:B}),t.createSlots({_:2},[t.renderList(o.$slots,(l,r)=>({name:r,fn:t.withCtx(f=>[t.renderSlot(o.$slots,r,t.normalizeProps(t.guardReactiveProps(f||{})))])})),u.value?{name:"notFoundContent",fn:t.withCtx(()=>[t.createVNode(t.unref(v.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","onUpdate:value","options","loading"]))}});exports.default=k;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),d=require("lodash-unified"),v=require("ant-design-vue");require("../../hooks/index.js");const P=require("../../utils/index.js"),V=require("../hooks/use-default-placeholder.js"),O=require("../../hooks/useControllableValue.js"),M={key:0},k=t.defineComponent({name:"ApFieldSelect",__name:"index",props:{mode:{default:"edit"},class:{},style:{},defaultValue:{},notFoundContent:{},suffixIcon:{},itemIcon:{},size:{},bordered:{type:Boolean,default:void 0},transitionName:{},choiceTransitionName:{},popupClassName:{},dropdownClassName:{},placement:{},status:{},children:{},listHeight:{},onMouseenter:{},onMouseleave:{},tabindex:{},onClick:{},onFocus:{},onBlur:{},onChange:{},onKeydown:{},onKeyup:{},onMousedown:{},onSelect:{},open:{type:Boolean,default:void 0},animation:{},direction:{},disabled:{type:Boolean,default:void 0},prefixCls:{},id:{},autofocus:{type:Boolean,default:void 0},getPopupContainer:{},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{},options:{},showAction:{},placeholder:{},onDeselect:{},loading:{type:Boolean,default:void 0},clearIcon:{},allowClear:{type:Boolean,default:!0},fieldNames:{},dropdownStyle:{},dropdownRender:{},dropdownAlign:{},showSearch:{type:Boolean,default:void 0},searchValue:{},onInputKeyDown:{},removeIcon:{},maxTagCount:{},maxTagTextLength:{},maxTagPlaceholder:{},tokenSeparators:{},tagRender:{},optionLabelRender:{},onClear:{},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{},showArrow:{type:Boolean,default:void 0},onPopupScroll:{},menuItemSelectedIcon:{},listItemHeight:{},inputValue:{},autoClearSearchValue:{type:Boolean,default:void 0},filterOption:{},filterSort:{},optionFilterProp:{},optionLabelProp:{},defaultActiveFirstOption:{type:Boolean,default:void 0},labelInValue:{type:Boolean,default:void 0},emptyText:{default:"--"},request:{},multiple:{type:Boolean,default:void 0},value:{},"onUpdate:value":{},searchMode:{default:"filter"},refetchOnFocus:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1}},emits:["update:value"],setup(h,{expose:m,emit:y}){let a=0;const g=d.debounce(o=>{if(!d.isFunction(e.request))return;a+=1;const n=a;i.value=[],u.value=!0,e.request(o).then(l=>{a===n&&(i.value=l)}).finally(()=>{u.value=!1})},300),e=h,w=(o,n)=>{var r;const l=((r=e.fieldNames)==null?void 0:r.label)||"label";return typeof(n==null?void 0:n[l])=="string"&&n[l].indexOf(o)>-1},i=t.ref((e==null?void 0:e.options)||[]),s=t.ref(),u=t.ref((e==null?void 0:e.loading)||!1),S=y;async function c(o=!0){if(!d.isFunction(e.request))return;u.value=!0,a+=1;const n=a;try{o&&(i.value=[]);const l=await e.request();if(n!==a)return;i.value=l}finally{u.value=!1}}function B(o){var n;(n=e.onFocus)==null||n.call(e,o),e.refetchOnFocus&&a>0&&!u.value&&c(!0)}t.onMounted(()=>{if(e.lazy){a+=1;return}c()});const{value:p,updateValue:F}=O.useControllableValue(e,S),b=V.useDefaultPlaceholder("Select",e),C=t.computed(()=>{const o=t.unref(p);if(!o)return e.emptyText;if(d.isArray(o))return o.map(l=>{var r;return(r=t.unref(i).find(f=>f.value===l))==null?void 0:r.label}).filter(Boolean).join("、")||e.emptyText;const n=t.unref(i).find(l=>l.value===o);return(n==null?void 0:n.label)||e.emptyText}),q=t.computed(()=>{const o=!!(e!=null&&e.showSearch),n=e.searchMode;let l={};return o&&(l=n==="request"?{showArrow:!1,defaultActiveFirstOption:!1,onSearch:g,notFoundContent:u.value?void 0:null}:{showArrow:!0,filterOption:d.isNil(e==null?void 0:e.filterOption)?w:e==null?void 0:e.filterOption}),{...P.omitUndefined(d.omit(e,["mode","value","onUpdate:value","onSearch","request","searchMode","onFocus"])),placeholder:t.unref(b),...l}});function x(){var o;(o=s.value)==null||o.focus()}function I(){var o;(o=s.value)==null||o.blur()}return m({focus:x,blur:I,request:c}),(o,n)=>o.mode==="read"?(t.openBlock(),t.createElementBlock("span",M,t.toDisplayString(C.value),1)):(t.openBlock(),t.createBlock(t.unref(v.Select),t.mergeProps({key:1,"allow-clear":"",ref_key:"selectRef",ref:s},q.value,{mode:o.multiple?"multiple":void 0,value:t.unref(p),"onUpdate:value":t.unref(F),options:i.value,loading:u.value,onFocus:B}),t.createSlots({_:2},[t.renderList(o.$slots,(l,r)=>({name:r,fn:t.withCtx(f=>[t.renderSlot(o.$slots,r,t.normalizeProps(t.guardReactiveProps(f||{})))])})),u.value?{name:"notFoundContent",fn:t.withCtx(()=>[t.createVNode(t.unref(v.Spin),{size:"small"})]),key:"0"}:void 0]),1040,["mode","value","onUpdate:value","options","loading"]))}});exports.default=k;