@aplus-frontend/ui 0.1.17 → 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 (61) hide show
  1. package/es/src/ap-download/ap-download.vue.mjs +33 -30
  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 +135 -134
  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-batch-action-group/interface.d.ts +1 -1
  14. package/es/src/business/ap-image/ApImage.vue.d.ts +31 -29
  15. package/es/src/business/ap-image/ApImage.vue2.mjs +32 -29
  16. package/es/src/business/ap-label/ApLabel.d.ts +141 -0
  17. package/es/src/business/ap-label/ApLabel.mjs +49 -0
  18. package/es/src/business/ap-label/ApLabelGroup.mjs +11 -12
  19. package/es/src/business/ap-label/constans.d.ts +65 -1
  20. package/es/src/business/ap-label/constans.mjs +33 -2
  21. package/es/src/business/ap-label/index.d.ts +1 -1
  22. package/es/src/business/ap-label/interface.d.ts +2 -1
  23. package/es/src/business/index.d.ts +195 -201
  24. package/es/src/business/index.mjs +18 -19
  25. package/es/src/pro-form/hooks/use-label-width.d.ts +1 -1
  26. package/es/src/theme/ap-download/ap-download.css +1 -4
  27. package/es/src/theme/ap-table/ap-table.css +0 -3
  28. package/lib/src/ap-download/ap-download.vue.js +1 -1
  29. package/lib/src/ap-download/style/ap-download.css +1 -4
  30. package/lib/src/ap-field/select/index.vue.js +1 -1
  31. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  32. package/lib/src/ap-table/ap-table.vue.d.ts +10 -3
  33. package/lib/src/ap-table/ap-table.vue.js +1 -1
  34. package/lib/src/ap-table/constants.d.ts +8 -31
  35. package/lib/src/ap-table/constants.js +1 -1
  36. package/lib/src/ap-table/interface.d.ts +5 -1
  37. package/lib/src/ap-table/style/ap-table.css +0 -3
  38. package/lib/src/ap-table/utils.d.ts +7 -1
  39. package/lib/src/ap-table/utils.js +1 -1
  40. package/lib/src/business/ap-batch-action-group/interface.d.ts +1 -1
  41. package/lib/src/business/ap-image/ApImage.vue.d.ts +31 -29
  42. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  43. package/lib/src/business/ap-label/ApLabel.d.ts +141 -0
  44. package/lib/src/business/ap-label/ApLabel.js +1 -0
  45. package/lib/src/business/ap-label/ApLabelGroup.js +1 -1
  46. package/lib/src/business/ap-label/constans.d.ts +65 -1
  47. package/lib/src/business/ap-label/constans.js +1 -1
  48. package/lib/src/business/ap-label/index.d.ts +1 -1
  49. package/lib/src/business/ap-label/interface.d.ts +2 -1
  50. package/lib/src/business/index.d.ts +195 -201
  51. package/lib/src/business/index.js +1 -1
  52. package/lib/src/pro-form/hooks/use-label-width.d.ts +1 -1
  53. package/lib/src/theme/ap-download/ap-download.css +1 -4
  54. package/lib/src/theme/ap-table/ap-table.css +0 -3
  55. package/package.json +1 -1
  56. package/es/src/business/ap-label/ApLabel.vue.d.ts +0 -56
  57. package/es/src/business/ap-label/ApLabel.vue.mjs +0 -4
  58. package/es/src/business/ap-label/ApLabel.vue2.mjs +0 -85
  59. package/lib/src/business/ap-label/ApLabel.vue.d.ts +0 -56
  60. package/lib/src/business/ap-label/ApLabel.vue.js +0 -1
  61. package/lib/src/business/ap-label/ApLabel.vue2.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { ApColumnType, ApTableValueFields, ValueEnum, ValueEnumType } from './interface';
2
2
  import { Translator, ValueTypeRenderConfig } from '../config-provider';
3
3
  import { apTableRenderItemMap } from './constants';
4
- import { CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, VNode } from 'vue';
4
+ import { VNode, CreateComponentPublicInstance, ExtractPropTypes, PropType, HTMLAttributes, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, RendererNode, RendererElement } from 'vue';
5
5
  import { ColSize } from 'ant-design-vue/es/grid';
6
6
  import { ApFieldTextPasswordProps, ApFieldTextProps, ApFieldTextAreaProps, ApFieldNumberProps, ApFieldDateProps, ApFieldDateRangeProps, ApFieldRadioProps, ApFieldSelectProps, ApFieldSwitchProps, ApFieldCheckboxProps } from '..';
7
7
  import { RuleObject } from 'ant-design-vue/es/form';
@@ -8422,4 +8422,10 @@ export declare function updateFormProps(item: ApColumnType<any, any>, fieldProps
8422
8422
  * @returns
8423
8423
  */
8424
8424
  export declare function objectToString(value: any): any;
8425
+ export declare function getTableTitle(column: ApColumnType<any>, slot?: (props: {
8426
+ title: any;
8427
+ column: ApColumnType<any>;
8428
+ }) => any, tooltipColor?: string): VNode< RendererNode, RendererElement, {
8429
+ [key: string]: any;
8430
+ }>[] | import("vue/jsx-runtime").JSX.Element | (() => import("vue/jsx-runtime").JSX.Element);
8425
8431
  export {};
@@ -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,5 +1,5 @@
1
1
  import { ButtonProps, MenuItemProps } from 'ant-design-vue';
2
- import { DropdownButtonProps } from 'ant-design-vue/lib/dropdown';
2
+ import { DropdownButtonProps } from 'ant-design-vue/es/dropdown';
3
3
  import { VNodeChild } from 'vue';
4
4
  type ApBatchActionGroupButtonType = ButtonProps['type'] | 'borderLink';
5
5
  type MixinButton<T> = Omit<T, 'type'> & {
@@ -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/lib/_util/EventInterface';
4
3
  import { VueTypeValidableDef } from '../../../node_modules/vue-types';
5
- import { ImagePreviewType } from 'ant-design-vue/lib/vc-image';
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
- import { imageProps as x } from "ant-design-vue/lib/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({
5
+ import { imageProps as x } from "ant-design-vue/es/image";
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
  };
@@ -0,0 +1,141 @@
1
+ import { VNode, DefineComponent, PropType, CSSProperties, ComponentOptionsMixin, PublicProps, ExtractPropTypes, RendererNode, RendererElement } from 'vue';
2
+ import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
3
+ import { VueTypeValidableDef } from '../../../node_modules/vue-types';
4
+ import { LiteralUnion } from 'ant-design-vue/es/_util/type';
5
+ declare const _default: DefineComponent<{
6
+ helpMessage: {
7
+ type: PropType<VNode | string | undefined>;
8
+ default: undefined;
9
+ };
10
+ placement: {
11
+ type: PropType<TooltipPlacement>;
12
+ default: string;
13
+ };
14
+ iconColor: {
15
+ type: PropType<string>;
16
+ default: string;
17
+ };
18
+ iconType: {
19
+ type: PropType<"question" | "warning" | "ellipsis" | "success">;
20
+ default: string;
21
+ };
22
+ iconSize: {
23
+ type: PropType<number>;
24
+ default: number;
25
+ };
26
+ show: {
27
+ type: BooleanConstructor;
28
+ default: boolean;
29
+ };
30
+ toolTipBgColor: {
31
+ type: PropType<string>;
32
+ };
33
+ count: VueTypeValidableDef<any> & {
34
+ default: any;
35
+ };
36
+ showZero: {
37
+ type: BooleanConstructor;
38
+ default: any;
39
+ };
40
+ overflowCount: {
41
+ type: NumberConstructor;
42
+ default: number;
43
+ };
44
+ dot: {
45
+ type: BooleanConstructor;
46
+ default: any;
47
+ };
48
+ prefixCls: StringConstructor;
49
+ scrollNumberPrefixCls: StringConstructor;
50
+ status: {
51
+ type: PropType<"error" | "default" | "success" | "processing" | "warning">;
52
+ };
53
+ size: {
54
+ type: PropType<"default" | "small">;
55
+ default: string;
56
+ };
57
+ color: PropType<LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
58
+ text: VueTypeValidableDef<any>;
59
+ offset: PropType<[string | number, string | number]>;
60
+ numberStyle: {
61
+ type: PropType<CSSProperties>;
62
+ default: CSSProperties;
63
+ };
64
+ title: StringConstructor;
65
+ }, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
66
+ helpMessage: {
67
+ type: PropType<VNode | string | undefined>;
68
+ default: undefined;
69
+ };
70
+ placement: {
71
+ type: PropType<TooltipPlacement>;
72
+ default: string;
73
+ };
74
+ iconColor: {
75
+ type: PropType<string>;
76
+ default: string;
77
+ };
78
+ iconType: {
79
+ type: PropType<"question" | "warning" | "ellipsis" | "success">;
80
+ default: string;
81
+ };
82
+ iconSize: {
83
+ type: PropType<number>;
84
+ default: number;
85
+ };
86
+ show: {
87
+ type: BooleanConstructor;
88
+ default: boolean;
89
+ };
90
+ toolTipBgColor: {
91
+ type: PropType<string>;
92
+ };
93
+ count: VueTypeValidableDef<any> & {
94
+ default: any;
95
+ };
96
+ showZero: {
97
+ type: BooleanConstructor;
98
+ default: any;
99
+ };
100
+ overflowCount: {
101
+ type: NumberConstructor;
102
+ default: number;
103
+ };
104
+ dot: {
105
+ type: BooleanConstructor;
106
+ default: any;
107
+ };
108
+ prefixCls: StringConstructor;
109
+ scrollNumberPrefixCls: StringConstructor;
110
+ status: {
111
+ type: PropType<"error" | "default" | "success" | "processing" | "warning">;
112
+ };
113
+ size: {
114
+ type: PropType<"default" | "small">;
115
+ default: string;
116
+ };
117
+ color: PropType<LiteralUnion<"blue" | "cyan" | "gold" | "green" | "lime" | "magenta" | "orange" | "pink" | "purple" | "red" | "yellow" | "volcano" | "geekblue">>;
118
+ text: VueTypeValidableDef<any>;
119
+ offset: PropType<[string | number, string | number]>;
120
+ numberStyle: {
121
+ type: PropType<CSSProperties>;
122
+ default: CSSProperties;
123
+ };
124
+ title: StringConstructor;
125
+ }>>, {
126
+ size: "small" | "default";
127
+ placement: TooltipPlacement;
128
+ iconType: "ellipsis" | "success" | "warning" | "question";
129
+ iconSize: number;
130
+ show: boolean;
131
+ dot: boolean;
132
+ helpMessage: string | VNode< RendererNode, RendererElement, {
133
+ [key: string]: any;
134
+ }> | undefined;
135
+ count: any;
136
+ showZero: boolean;
137
+ overflowCount: number;
138
+ numberStyle: CSSProperties;
139
+ iconColor: string;
140
+ }, {}>;
141
+ export default _default;