@aplus-frontend/ui 7.10.4 → 7.10.6

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 (59) hide show
  1. package/es/src/ap-field/interface.d.ts +1 -1
  2. package/es/src/ap-field/slider/index.vue.d.ts +196 -412
  3. package/es/src/ap-field/slider/index.vue.mjs +50 -39
  4. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +68 -67
  5. package/es/src/business/ap-attachment/ApAttachment.d.ts +2 -8
  6. package/es/src/business/ap-attachment/ApAttachment.mjs +46 -40
  7. package/es/src/business/ap-attachment/constans.d.ts +1 -4
  8. package/es/src/business/ap-attachment/constans.mjs +3 -6
  9. package/es/src/business/ap-attachment/index.d.ts +3 -12
  10. package/es/src/business/ap-ladder/components/RenderValue.mjs +25 -22
  11. package/es/src/business/ap-ladder/utils.d.ts +1 -0
  12. package/es/src/business/ap-ladder/utils.mjs +10 -9
  13. package/es/src/business/ap-title/ApTitle.vue.d.ts +1 -1
  14. package/es/src/business/ap-title/index.d.ts +3 -3
  15. package/es/src/business/ap-title/interface.d.ts +1 -1
  16. package/es/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  17. package/es/src/business/ap-upload/apUpload.vue.mjs +22 -18
  18. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +128 -123
  19. package/es/src/business/ap-upload/components/Picture.vue2.mjs +150 -147
  20. package/es/src/business/ap-upload/components/SingleFile.vue2.mjs +130 -127
  21. package/es/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  22. package/es/src/business/ap-upload/hooks/useOss.mjs +52 -51
  23. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +11 -10
  24. package/es/src/business/ap-upload-file/hook/useOss.d.ts +6 -1
  25. package/es/src/business/ap-upload-file/hook/useOss.mjs +19 -16
  26. package/es/src/business/ap-upload-file/interface.d.ts +3 -1
  27. package/es/src/business/ap-upload-file/utils/upload.mjs +22 -20
  28. package/es/src/version.d.ts +1 -1
  29. package/es/src/version.mjs +1 -1
  30. package/lib/src/ap-field/interface.d.ts +1 -1
  31. package/lib/src/ap-field/slider/index.vue.d.ts +196 -412
  32. package/lib/src/ap-field/slider/index.vue.js +1 -1
  33. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  34. package/lib/src/business/ap-attachment/ApAttachment.d.ts +2 -8
  35. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  36. package/lib/src/business/ap-attachment/constans.d.ts +1 -4
  37. package/lib/src/business/ap-attachment/constans.js +1 -1
  38. package/lib/src/business/ap-attachment/index.d.ts +3 -12
  39. package/lib/src/business/ap-ladder/components/RenderValue.js +1 -1
  40. package/lib/src/business/ap-ladder/utils.d.ts +1 -0
  41. package/lib/src/business/ap-ladder/utils.js +1 -1
  42. package/lib/src/business/ap-title/ApTitle.vue.d.ts +1 -1
  43. package/lib/src/business/ap-title/index.d.ts +3 -3
  44. package/lib/src/business/ap-title/interface.d.ts +1 -1
  45. package/lib/src/business/ap-upload/apUpload.vue.d.ts +9 -0
  46. package/lib/src/business/ap-upload/apUpload.vue.js +1 -1
  47. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  48. package/lib/src/business/ap-upload/components/Picture.vue2.js +1 -1
  49. package/lib/src/business/ap-upload/components/SingleFile.vue2.js +1 -1
  50. package/lib/src/business/ap-upload/hooks/useOss.d.ts +2 -1
  51. package/lib/src/business/ap-upload/hooks/useOss.js +1 -1
  52. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  53. package/lib/src/business/ap-upload-file/hook/useOss.d.ts +6 -1
  54. package/lib/src/business/ap-upload-file/hook/useOss.js +1 -1
  55. package/lib/src/business/ap-upload-file/interface.d.ts +3 -1
  56. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  57. package/lib/src/version.d.ts +1 -1
  58. package/lib/src/version.js +1 -1
  59. package/package.json +3 -3
@@ -1,8 +1,9 @@
1
- import { defineComponent as c, createVNode as e, Fragment as t } from "vue";
1
+ import { defineComponent as p, createVNode as e, Fragment as o } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
- import { convertValue as n, renderValue as p, isVNodeOrFunction as d } from "../utils.mjs";
4
- import { useNamespace as v } from "../../../config-provider/hooks/use-namespace.mjs";
5
- const f = /* @__PURE__ */ c({
3
+ import { ApCopy as d } from "../../ap-copy/index.mjs";
4
+ import { isConstLabel as v, convertValue as n, renderValue as C, isVNodeOrFunction as k } from "../utils.mjs";
5
+ import { useNamespace as V } from "../../../config-provider/hooks/use-namespace.mjs";
6
+ const h = /* @__PURE__ */ p({
6
7
  name: "ApLadderValues",
7
8
  props: {
8
9
  labelValue: {
@@ -21,24 +22,30 @@ const f = /* @__PURE__ */ c({
21
22
  }
22
23
  }
23
24
  },
24
- setup(o, {
25
- emit: r
25
+ setup(r, {
26
+ emit: i
26
27
  }) {
27
28
  return () => {
28
29
  const {
29
30
  labelValue: l,
30
- labelValues: i
31
- } = o, {
31
+ labelValues: s
32
+ } = r, u = v(l.label) ? e(d, {
33
+ text: n(l.value, {
34
+ ...l
35
+ })
36
+ }, null) : n(l.value, {
37
+ ...l
38
+ }), {
32
39
  e: a
33
- } = v("ap-ladder"), s = (u) => {
34
- r("handleClick", u);
40
+ } = V("ap-ladder"), c = (t) => {
41
+ i("handleClick", t);
35
42
  };
36
- return e(t, null, [e("span", {
43
+ return e(o, null, [e("span", {
37
44
  class: a("value-group-value"),
38
45
  title: String(n(l.value, {
39
46
  ...l
40
47
  }))
41
- }, [d(l.value) ? p(l.value) : l.link ? e("a", {
48
+ }, [k(l.value) ? C(l.value) : l.link ? e("a", {
42
49
  href: l.link,
43
50
  target: "_blank",
44
51
  class: a("value-group-link"),
@@ -46,23 +53,19 @@ const f = /* @__PURE__ */ c({
46
53
  style: l.linkColor ? {
47
54
  color: l.linkColor
48
55
  } : null,
49
- onClick: (u) => {
50
- u.preventDefault(), s(l);
56
+ onClick: (t) => {
57
+ t.preventDefault(), c(l);
51
58
  }
52
- }, [n(l.value, {
53
- ...l
54
- })]) : e(t, null, [e("span", {
59
+ }, [u]) : e(o, null, [e("span", {
55
60
  class: [l.handleValueClick ? a("value-group-link") : null],
56
61
  title: String(l.value),
57
62
  style: l.valueColor ? {
58
63
  color: l.valueColor
59
64
  } : null,
60
65
  onClick: () => {
61
- l.handleValueClick && l.handleValueClick(i);
66
+ l.handleValueClick && l.handleValueClick(s);
62
67
  }
63
- }, [n(l.value, {
64
- ...l
65
- })]), l.unit && e("span", {
68
+ }, [u]), l.unit && e("span", {
66
69
  class: a("value-group-unit"),
67
70
  title: String(n(l.value, {
68
71
  ...l
@@ -75,5 +78,5 @@ const f = /* @__PURE__ */ c({
75
78
  }
76
79
  });
77
80
  export {
78
- f as default
81
+ h as default
79
82
  };
@@ -9,3 +9,4 @@ export declare const isVNodeOrFunction: (value: any) => boolean;
9
9
  export declare const renderValue: (value: any) => VNode< RendererNode, RendererElement, {
10
10
  [key: string]: any;
11
11
  }> | null;
12
+ export declare const isConstLabel: (label: string) => boolean;
@@ -1,6 +1,6 @@
1
- import { isVNode as c, h as e } from "vue";
1
+ import { isVNode as n, h as e } from "vue";
2
2
  import { locales as o } from "./interface.mjs";
3
- const y = (r) => r == null || typeof r == "string" && r.trim() === "", d = (r, t = {}) => typeof r == "string" || typeof r == "number" ? String(r) + JSON.stringify(t) : "complex-value", p = (r, t = {
3
+ const s = (r) => r == null || typeof r == "string" && r.trim() === "", y = (r, t = {}) => typeof r == "string" || typeof r == "number" ? String(r) + JSON.stringify(t) : "complex-value", d = (r, t = {
4
4
  rawValue: !0,
5
5
  precision: 2,
6
6
  thousand: !0,
@@ -24,8 +24,8 @@ const y = (r) => r == null || typeof r == "string" && r.trim() === "", d = (r, t
24
24
  }
25
25
  );
26
26
  if (t.thousand) {
27
- const [n, i] = r.toFixed(t.precision ? t.precision : 2).split(".");
28
- return `${n.replace(
27
+ const [c, i] = r.toFixed(t.precision ? t.precision : 2).split(".");
28
+ return `${c.replace(
29
29
  /(\d)(?=(\d{3})+(?!\d))/g,
30
30
  `$1${t.thousandSeparator ? t.thousandSeparator : ","}`
31
31
  )}.${i}`;
@@ -33,11 +33,12 @@ const y = (r) => r == null || typeof r == "string" && r.trim() === "", d = (r, t
33
33
  return r.toFixed(t.precision ? t.precision : 2);
34
34
  }
35
35
  return r;
36
- }, s = (r) => c(r) || typeof r == "function", a = (r) => c(r) ? e(r) : typeof r == "function" ? e(r()) : null;
36
+ }, p = (r) => n(r) || typeof r == "function", a = (r) => n(r) ? e(r) : typeof r == "function" ? e(r()) : null, l = (r) => ["ASIN", "MSKU", "aSKU", "SKU"].includes(r);
37
37
  export {
38
- p as convertValue,
39
- d as createMemoizeKey,
40
- y as isNull,
41
- s as isVNodeOrFunction,
38
+ d as convertValue,
39
+ y as createMemoizeKey,
40
+ l as isConstLabel,
41
+ s as isNull,
42
+ p as isVNodeOrFunction,
42
43
  a as renderValue
43
44
  };
@@ -14,7 +14,7 @@ declare const __VLS_component: DefineComponent<ApTitleProps, {}, {}, {}, {}, Com
14
14
  title: string;
15
15
  placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
16
16
  trigger: "hover" | "focus" | "click" | "contextmenu";
17
- helpMessage: string;
17
+ helpMessage: any;
18
18
  helpIconColor: string;
19
19
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
20
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -6,7 +6,7 @@ declare const ApTitle: {
6
6
  title: string;
7
7
  placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
8
8
  trigger: "hover" | "focus" | "click" | "contextmenu";
9
- helpMessage: string;
9
+ helpMessage: any;
10
10
  helpIconColor: string;
11
11
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
12
12
  P: {};
@@ -19,7 +19,7 @@ declare const ApTitle: {
19
19
  title: string;
20
20
  placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
21
21
  trigger: "hover" | "focus" | "click" | "contextmenu";
22
- helpMessage: string;
22
+ helpMessage: any;
23
23
  helpIconColor: string;
24
24
  }>;
25
25
  __isFragment?: never;
@@ -29,7 +29,7 @@ declare const ApTitle: {
29
29
  title: string;
30
30
  placement: "top" | "left" | "right" | "bottom" | "topLeft" | "topRight" | "bottomLeft" | "bottomRight" | "leftTop" | "leftBottom" | "rightTop" | "rightBottom";
31
31
  trigger: "hover" | "focus" | "click" | "contextmenu";
32
- helpMessage: string;
32
+ helpMessage: any;
33
33
  helpIconColor: string;
34
34
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
35
35
  $slots: {
@@ -10,7 +10,7 @@ export interface ApTitleProps {
10
10
  /**
11
11
  * 帮助消息
12
12
  */
13
- helpMessage?: string;
13
+ helpMessage?: any;
14
14
  /**
15
15
  * 帮助消息图标颜色
16
16
  */
@@ -89,6 +89,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
89
89
  type: StringConstructor;
90
90
  default: string;
91
91
  };
92
+ bucket: {
93
+ type: StringConstructor;
94
+ default: undefined;
95
+ };
92
96
  }>, {
93
97
  done: ComputedRef<boolean>;
94
98
  clear: typeof clear;
@@ -172,6 +176,10 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
172
176
  type: StringConstructor;
173
177
  default: string;
174
178
  };
179
+ bucket: {
180
+ type: StringConstructor;
181
+ default: undefined;
182
+ };
175
183
  }>> & Readonly<{
176
184
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
177
185
  }>, {
@@ -187,6 +195,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
187
195
  beforeUpload: BeforeUpload;
188
196
  onRemove: Function;
189
197
  customRequest: CustomRequest;
198
+ bucket: string;
190
199
  dirName: string;
191
200
  maxSizeErrorMsg: string;
192
201
  acceptErrorMsg: string;
@@ -1,4 +1,4 @@
1
- import { defineComponent as _, ref as m, computed as d, provide as t, createElementBlock as U, openBlock as c, normalizeClass as h, unref as r, createBlock as O, resolveDynamicComponent as R, mergeProps as z, createSlots as j, renderList as A, withCtx as $, renderSlot as k, normalizeProps as B, guardReactiveProps as T } from "vue";
1
+ import { defineComponent as _, ref as m, computed as d, provide as t, createElementBlock as U, openBlock as c, normalizeClass as h, unref as r, createBlock as O, resolveDynamicComponent as R, mergeProps as k, createSlots as z, renderList as j, withCtx as A, renderSlot as $, normalizeProps as B, guardReactiveProps as T } from "vue";
2
2
  import { Form as w } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
4
  import "./components/MultipleFile.vue.mjs";
@@ -92,22 +92,26 @@ const K = ["id"], me = /* @__PURE__ */ _({
92
92
  baseDirName: {
93
93
  type: String,
94
94
  default: "Frontend-Upload"
95
+ },
96
+ bucket: {
97
+ type: String,
98
+ default: void 0
95
99
  }
96
100
  },
97
101
  emits: ["update:value"],
98
102
  setup(f, { expose: g, emit: v }) {
99
103
  const { t: n, lang: y } = q();
100
104
  L(n), D(n, y);
101
- const { b: C } = P("ap-upload"), S = I("ap-upload"), s = m(null), e = f, b = v, x = {
105
+ const { b } = P("ap-upload"), C = I("ap-upload"), i = m(null), e = f, S = v, x = {
102
106
  singleFile: H,
103
107
  multipleFile: G,
104
108
  picture: V
105
- }, i = w.useInjectFormItemContext(), F = d({
109
+ }, s = w.useInjectFormItemContext(), F = d({
106
110
  get() {
107
111
  return e.value;
108
112
  },
109
113
  set(o) {
110
- b("update:value", o), i?.onFieldChange(), e.onChange?.(o);
114
+ S("update:value", o), s?.onFieldChange(), e.onChange?.(o);
111
115
  }
112
116
  }), a = J("apUpload");
113
117
  t("value", F), t("dirName", e.dirName ?? a.value?.dirName), t(
@@ -116,31 +120,31 @@ const K = ["id"], me = /* @__PURE__ */ _({
116
120
  ), t("accept", e.accept ?? a.value?.accept ?? ""), t("maxSize", e.maxSize), t("title", e.title), t("subTitle", e.subTitle), t("maxCount", e.maxCount), t("beforeUpload", e.beforeUpload), t("customRequest", e.customRequest), t("baseDirName", e.baseDirName ?? "Frontend-Upload"), t(
117
121
  "getOssAccess",
118
122
  e.getOssAccess ?? a.value?.getOssAccess
119
- ), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg);
123
+ ), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg), t("onRemove", e.onRemove), t("showUploadErrorMsg", e.showUploadErrorMsg), t("bucket", e.bucket);
120
124
  const N = d(() => l.value === 0), l = m(0);
121
125
  t("uploadingCount", l);
122
126
  function E() {
123
- p(void 0);
127
+ u(void 0);
124
128
  }
125
- function p(o) {
126
- s?.value?.setValue?.(o);
129
+ function u(o) {
130
+ i?.value?.setValue?.(o);
127
131
  }
128
132
  return g({
129
133
  done: N,
130
134
  clear: E,
131
- setValue: p
135
+ setValue: u
132
136
  }), (o, Q) => (c(), U("div", {
133
- id: r(i)?.id.value,
134
- class: h([r(C)(), r(S)])
137
+ id: r(s)?.id.value,
138
+ class: h([r(b)(), r(C)])
135
139
  }, [
136
- (c(), O(R(x[e.type]), z(o.$attrs, {
140
+ (c(), O(R(x[e.type]), k(o.$attrs, {
137
141
  ref_key: "uploadRef",
138
- ref: s
139
- }), j({ _: 2 }, [
140
- A(Object.keys(o.$slots), (u) => ({
141
- name: u,
142
- fn: $((M) => [
143
- k(o.$slots, u, B(T(M || {})))
142
+ ref: i
143
+ }), z({ _: 2 }, [
144
+ j(Object.keys(o.$slots), (p) => ({
145
+ name: p,
146
+ fn: A((M) => [
147
+ $(o.$slots, p, B(T(M || {})))
144
148
  ])
145
149
  }))
146
150
  ]), 1040))