@aplus-frontend/ui 0.3.0 → 0.3.1

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 (129) hide show
  1. package/es/src/ap-action/item/index.vue2.mjs +11 -11
  2. package/es/src/ap-action/item-popconfirm/index.vue.mjs +2 -2
  3. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +24 -24
  4. package/es/src/ap-drawer/utils/createDrawer.mjs +10 -10
  5. package/es/src/ap-field/checkbox/index.vue.mjs +3 -3
  6. package/es/src/ap-field/date/index.vue.mjs +2 -2
  7. package/es/src/ap-field/date-range/index.vue.mjs +2 -2
  8. package/es/src/ap-field/number/index.vue.mjs +3 -3
  9. package/es/src/ap-field/radio/index.vue.mjs +5 -5
  10. package/es/src/ap-field/rate/index.vue.mjs +4 -4
  11. package/es/src/ap-field/segmented/index.vue.mjs +3 -3
  12. package/es/src/ap-field/select/index.vue.mjs +4 -4
  13. package/es/src/ap-field/slider/index.vue.mjs +3 -3
  14. package/es/src/ap-field/switch/index.vue.mjs +4 -4
  15. package/es/src/ap-field/text-area/index.vue.mjs +3 -3
  16. package/es/src/ap-form/ap-form.vue2.mjs +2 -2
  17. package/es/src/ap-form/drawer-form/index.vue.mjs +2 -2
  18. package/es/src/ap-form/modal-form/index.vue.mjs +3 -3
  19. package/es/src/ap-form/search-form/index.vue.mjs +2 -2
  20. package/es/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.mjs +6 -6
  21. package/es/src/ap-list/index.vue.mjs +27 -27
  22. package/es/src/ap-modal/utils/createModal.mjs +10 -10
  23. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +3 -3
  24. package/es/src/ap-table/ap-table.vue2.mjs +3 -3
  25. package/es/src/ap-table/components/index/index.vue2.mjs +3 -3
  26. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +4 -4
  27. package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +2 -2
  28. package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +3 -3
  29. package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +8 -8
  30. package/es/src/ap-table/components/setting/sorter/index.vue2.mjs +6 -6
  31. package/es/src/ap-table/components/status/index.vue2.mjs +4 -4
  32. package/es/src/ap-table/hooks/use-table-content-height.mjs +13 -11
  33. package/es/src/ap-tag/ap-tag-group.vue.mjs +1 -1
  34. package/es/src/ap-upload/apUpload.vue.d.ts +57 -8
  35. package/es/src/ap-upload/apUpload.vue.mjs +56 -37
  36. package/es/src/ap-upload/components/MultipleFile.vue2.mjs +10 -10
  37. package/es/src/ap-upload/components/Picture.vue2.mjs +26 -26
  38. package/es/src/ap-upload/components/SingleFile.vue2.mjs +27 -27
  39. package/es/src/business/ap-appendix/ap-appendix.vue2.mjs +49 -49
  40. package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +10 -10
  41. package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +5 -5
  42. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +11 -11
  43. package/es/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
  44. package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +26 -26
  45. package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +15 -15
  46. package/es/src/business/ap-group-search/index.d.ts +1 -1
  47. package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
  48. package/es/src/business/ap-image/ApImage.vue2.mjs +28 -28
  49. package/es/src/business/ap-summary/ap-summary.vue2.mjs +1 -1
  50. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -9
  51. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
  52. package/es/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.mjs +74 -70
  53. package/es/src/business/ap-upload-file/hook/useProps.mjs +8 -8
  54. package/es/src/business/ap-upload-file/icon/file-icon.vue.mjs +1 -1
  55. package/es/src/business/ap-upload-file/interface.d.ts +2 -0
  56. package/es/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  57. package/es/src/business/ap-upload-file/utils/fileList.mjs +12 -12
  58. package/es/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  59. package/es/src/business/ap-upload-file/utils/upload.mjs +23 -23
  60. package/es/src/business/batch-input-group/index.vue.mjs +5 -5
  61. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +15 -15
  62. package/es/src/editable-table/form-item.vue.mjs +3 -3
  63. package/es/src/editable-table/index.vue.mjs +6 -6
  64. package/es/src/work-order-modal/work-order-modal.vue.mjs +28 -28
  65. package/lib/src/ap-action/item/index.vue2.js +1 -1
  66. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -1
  67. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  68. package/lib/src/ap-drawer/utils/createDrawer.js +1 -1
  69. package/lib/src/ap-field/checkbox/index.vue.js +1 -1
  70. package/lib/src/ap-field/date/index.vue.js +1 -1
  71. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  72. package/lib/src/ap-field/number/index.vue.js +1 -1
  73. package/lib/src/ap-field/radio/index.vue.js +1 -1
  74. package/lib/src/ap-field/rate/index.vue.js +1 -1
  75. package/lib/src/ap-field/segmented/index.vue.js +1 -1
  76. package/lib/src/ap-field/select/index.vue.js +1 -1
  77. package/lib/src/ap-field/slider/index.vue.js +1 -1
  78. package/lib/src/ap-field/switch/index.vue.js +1 -1
  79. package/lib/src/ap-field/text-area/index.vue.js +1 -1
  80. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  81. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  82. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  83. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  84. package/lib/src/ap-info-layout/ap-info-layout-admin/ApInfoLayoutAdmin.vue2.js +1 -1
  85. package/lib/src/ap-list/index.vue.js +1 -1
  86. package/lib/src/ap-modal/utils/createModal.js +1 -1
  87. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +1 -1
  88. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  89. package/lib/src/ap-table/components/index/index.vue2.js +1 -1
  90. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  91. package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
  92. package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
  93. package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
  94. package/lib/src/ap-table/components/setting/sorter/index.vue2.js +1 -1
  95. package/lib/src/ap-table/components/status/index.vue2.js +1 -1
  96. package/lib/src/ap-table/hooks/use-table-content-height.js +1 -1
  97. package/lib/src/ap-tag/ap-tag-group.vue.js +1 -1
  98. package/lib/src/ap-upload/apUpload.vue.d.ts +57 -8
  99. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  100. package/lib/src/ap-upload/components/MultipleFile.vue2.js +1 -1
  101. package/lib/src/ap-upload/components/Picture.vue2.js +1 -1
  102. package/lib/src/ap-upload/components/SingleFile.vue2.js +1 -1
  103. package/lib/src/business/ap-appendix/ap-appendix.vue2.js +1 -1
  104. package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
  105. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
  106. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  107. package/lib/src/business/ap-group-search/ap-group-search.vue.d.ts +1 -1
  108. package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
  109. package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
  110. package/lib/src/business/ap-group-search/index.d.ts +1 -1
  111. package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
  112. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  113. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  114. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  115. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.d.ts +5 -2
  116. package/lib/src/business/ap-upload-file/ap-upload-single/ap-upload-single.vue.js +1 -1
  117. package/lib/src/business/ap-upload-file/hook/useProps.js +1 -1
  118. package/lib/src/business/ap-upload-file/icon/file-icon.vue.js +1 -1
  119. package/lib/src/business/ap-upload-file/interface.d.ts +2 -0
  120. package/lib/src/business/ap-upload-file/utils/fileList.d.ts +2 -2
  121. package/lib/src/business/ap-upload-file/utils/fileList.js +1 -1
  122. package/lib/src/business/ap-upload-file/utils/upload.d.ts +3 -0
  123. package/lib/src/business/ap-upload-file/utils/upload.js +1 -1
  124. package/lib/src/business/batch-input-group/index.vue.js +1 -1
  125. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
  126. package/lib/src/editable-table/form-item.vue.js +1 -1
  127. package/lib/src/editable-table/index.vue.js +1 -1
  128. package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
  129. package/package.json +4 -4
@@ -31,6 +31,16 @@ const V = (d) => {
31
31
  props: d
32
32
  };
33
33
  },
34
+ created() {
35
+ n = (e) => {
36
+ this.open = e;
37
+ }, t = (e) => {
38
+ this.props = {
39
+ ...this.props,
40
+ ...e
41
+ };
42
+ };
43
+ },
34
44
  methods: {
35
45
  async handleCancel() {
36
46
  var e, o, s, i, p;
@@ -59,16 +69,6 @@ const V = (d) => {
59
69
  }
60
70
  }
61
71
  },
62
- created() {
63
- n = (e) => {
64
- this.open = e;
65
- }, t = (e) => {
66
- this.props = {
67
- ...this.props,
68
- ...e
69
- };
70
- };
71
- },
72
72
  render() {
73
73
  const e = L(this.props, ["onCancel", "onOk", "open", "onUpdate:open", "getContainer", "icon"]);
74
74
  return f(P, b.value, {
@@ -92,12 +92,12 @@ const ve = /* @__PURE__ */ O({
92
92
  em: I
93
93
  } = ce("ap-scroll-bar");
94
94
  return (e, l) => (te(), le("div", {
95
+ ref_key: "containerRef",
96
+ ref: r,
95
97
  class: N(`${u(V)()} ${o.type === "horizontal" ? u(D)("horizontal") : u(D)("vertical")}`),
96
98
  style: U({
97
99
  display: w.value ? "none" : "block"
98
- }),
99
- ref_key: "containerRef",
100
- ref: r
100
+ })
101
101
  }, [oe("div", {
102
102
  id: "bar",
103
103
  class: N(`${u(G)("bar")} ${o.type === "horizontal" ? u(I)("bar", "horizontal") : u(I)("bar", "vertical")}`),
@@ -362,9 +362,9 @@ const wa = /* @__PURE__ */ Te({
362
362
  ref_key: "formRef",
363
363
  ref: k,
364
364
  "custom-reset": "",
365
+ "submit-loading": r(V).loading,
365
366
  onSubmit: r(A),
366
- onReset: r(D),
367
- "submit-loading": r(V).loading
367
+ onReset: r(D)
368
368
  }), _({
369
369
  default: F(() => [(p(!0), T(U, null, J(O.value, (t) => (p(), Q(Be(t.renderNode), w({
370
370
  key: t.dataIndex,
@@ -377,7 +377,7 @@ const wa = /* @__PURE__ */ Te({
377
377
  name: "extra",
378
378
  fn: F(() => [h(e.$slots, "searchFormExtra")]),
379
379
  key: "0"
380
- } : void 0]), 1040, ["onSubmit", "onReset", "submit-loading"])], 6)) : X("", !0), I("div", {
380
+ } : void 0]), 1040, ["submit-loading", "onSubmit", "onReset"])], 6)) : X("", !0), I("div", {
381
381
  ref_key: "contentRef",
382
382
  ref: ne,
383
383
  class: f([r(x)("table-wrapper"), e.card ? r(x)("table-wrapper-card") : null]),
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as n, computed as l, openBlock as s, createElementBlock as p, normalizeClass as d, toDisplayString as m } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
3
  import { useNamespace as c } from "../../../config-provider/hooks/use-namespace.mjs";
4
- const b = /* @__PURE__ */ n({
5
- name: "_ApTableIndex",
4
+ const _ = /* @__PURE__ */ n({
5
+ name: "ApTableIndex",
6
6
  __name: "index",
7
7
  props: {
8
8
  bordered: { type: Boolean, default: !1 },
@@ -16,5 +16,5 @@ const b = /* @__PURE__ */ n({
16
16
  }
17
17
  });
18
18
  export {
19
- b as default
19
+ _ as default
20
20
  };
@@ -65,15 +65,15 @@ const ie = {
65
65
  return (p, t) => (y(), M(q, null, [e(k) ? (y(), J(K(e(k)), {
66
66
  key: 0
67
67
  })) : P("", !0), l(e(W), {
68
- title: e(a)("ap.apTable.setting.title"),
69
68
  open: u.value,
70
69
  "onUpdate:open": t[2] || (t[2] = (o) => u.value = o),
70
+ title: e(a)("ap.apTable.setting.title"),
71
71
  width: 900,
72
- onOk: F,
73
72
  "body-style": {
74
73
  padding: "0px !important",
75
74
  height: "450px"
76
- }
75
+ },
76
+ onOk: F
77
77
  }, {
78
78
  default: s(() => [i("div", {
79
79
  class: r(e(g)("wrapper"))
@@ -126,7 +126,7 @@ const ie = {
126
126
  onReset: j
127
127
  }, null, 8, ["value"])], 2)], 2)]),
128
128
  _: 1
129
- }, 8, ["title", "open"])], 64));
129
+ }, 8, ["open", "title"])], 64));
130
130
  }
131
131
  });
132
132
  export {
@@ -58,8 +58,8 @@ const K = /* @__PURE__ */ E({
58
58
  u(r(w), {
59
59
  indeterminate: c.value,
60
60
  checked: (n = o.value) == null ? void 0 : n.show,
61
- "onUpdate:checked": g,
62
- disabled: B.value
61
+ disabled: B.value,
62
+ "onUpdate:checked": g
63
63
  }, {
64
64
  default: i(() => [
65
65
  (s(), h(k(r(b)(m.value.title))))
@@ -18,10 +18,10 @@ const w = /* @__PURE__ */ f({
18
18
  class: m(r(d)())
19
19
  }, [
20
20
  i(s, {
21
- value: l.value,
22
21
  open: a.value,
23
- "onUpdate:open": o[0] || (o[0] = (e) => a.value = e)
24
- }, null, 8, ["value", "open"]),
22
+ "onUpdate:open": o[0] || (o[0] = (e) => a.value = e),
23
+ value: l.value
24
+ }, null, 8, ["open", "value"]),
25
25
  (t = l.value.children) != null && t.length ? (n(), u("div", {
26
26
  key: 0,
27
27
  class: m(r(v)("hidden", a.value))
@@ -83,8 +83,8 @@ const G = ["src"], le = /* @__PURE__ */ E({
83
83
  default: d(() => [
84
84
  c(e(k), {
85
85
  rotate: 270,
86
- onClick: _,
87
- class: t(e(a)("action-icon"))
86
+ class: t(e(a)("action-icon")),
87
+ onClick: _
88
88
  }, null, 8, ["class"])
89
89
  ]),
90
90
  _: 1
@@ -95,8 +95,8 @@ const G = ["src"], le = /* @__PURE__ */ E({
95
95
  }, {
96
96
  default: d(() => [
97
97
  c(e(z), {
98
- onClick: L,
99
- class: t(e(a)("action-icon"))
98
+ class: t(e(a)("action-icon")),
99
+ onClick: L
100
100
  }, null, 8, ["class"])
101
101
  ]),
102
102
  _: 1
@@ -108,8 +108,8 @@ const G = ["src"], le = /* @__PURE__ */ E({
108
108
  default: d(() => [
109
109
  c(e(k), {
110
110
  rotate: 90,
111
- onClick: F,
112
- class: t(e(a)("action-icon"))
111
+ class: t(e(a)("action-icon")),
112
+ onClick: F
113
113
  }, null, 8, ["class"])
114
114
  ]),
115
115
  _: 1
@@ -120,8 +120,8 @@ const G = ["src"], le = /* @__PURE__ */ E({
120
120
  }, {
121
121
  default: d(() => [
122
122
  c(e(A), {
123
- onClick: R,
124
- class: t(e(a)("action-icon"))
123
+ class: t(e(a)("action-icon")),
124
+ onClick: R
125
125
  }, null, 8, ["class"])
126
126
  ]),
127
127
  _: 1
@@ -140,8 +140,8 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
140
140
  }, k(n(h)("ap.apTable.setting.fixToLeft")), 3),
141
141
  m(n(N), {
142
142
  "model-value": i.value,
143
- "onUpdate:modelValue": D,
144
- "item-key": "key"
143
+ "item-key": "key",
144
+ "onUpdate:modelValue": D
145
145
  }, {
146
146
  item: v(({ element: o }) => [
147
147
  C(o) ? (c(), b(R, {
@@ -158,8 +158,8 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
158
158
  }, k(n(h)("ap.apTable.setting.unFixed")), 3),
159
159
  m(n(N), {
160
160
  "model-value": s.value,
161
- "onUpdate:modelValue": E,
162
- "item-key": "key"
161
+ "item-key": "key",
162
+ "onUpdate:modelValue": E
163
163
  }, {
164
164
  item: v(({ element: o }) => [
165
165
  C(o) ? (c(), b(R, {
@@ -176,8 +176,8 @@ const W = { key: 0 }, X = { key: 1 }, Y = { key: 2 }, re = /* @__PURE__ */ A({
176
176
  }, k(n(h)("ap.apTable.setting.fixToRight")), 3),
177
177
  m(n(N), {
178
178
  "model-value": u.value,
179
- "onUpdate:modelValue": j,
180
- "item-key": "key"
179
+ "item-key": "key",
180
+ "onUpdate:modelValue": j
181
181
  }, {
182
182
  item: v(({ element: o }) => [
183
183
  C(o) ? (c(), b(R, {
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as n, computed as o, openBlock as u, createBlock as a, unref as m, normalizeProps as p, mergeProps as l, createCommentVNode as c } from "vue";
2
2
  import { Badge as s } from "@aplus-frontend/antdv";
3
- const v = /* @__PURE__ */ n({
4
- name: "_ApTableStatus",
3
+ const _ = /* @__PURE__ */ n({
4
+ name: "ApTableStatus",
5
5
  __name: "index",
6
6
  props: {
7
7
  valueEnum: {},
@@ -9,9 +9,9 @@ const v = /* @__PURE__ */ n({
9
9
  },
10
10
  setup(t) {
11
11
  const e = t, r = o(() => e.valueEnum[e.value]);
12
- return (_, d) => r.value ? (u(), a(m(s), p(l({ key: 0 }, r.value)), null, 16)) : c("", !0);
12
+ return (d, f) => r.value ? (u(), a(m(s), p(l({ key: 0 }, r.value)), null, 16)) : c("", !0);
13
13
  }
14
14
  });
15
15
  export {
16
- v as default
16
+ _ as default
17
17
  };
@@ -1,5 +1,7 @@
1
- import { useElementSize as b } from "@vueuse/core";
2
- import { ref as s, computed as y, unref as f, onUpdated as v } from "vue";
1
+ import "../../config-provider/index.mjs";
2
+ import { useElementSize as y } from "@vueuse/core";
3
+ import { ref as f, computed as v, unref as h, onUpdated as q } from "vue";
4
+ import { useGlobalConfig as N } from "../../config-provider/hooks/use-global-config.mjs";
3
5
  function p(t) {
4
6
  if (!t)
5
7
  return 0;
@@ -12,17 +14,17 @@ function m(t) {
12
14
  const e = getComputedStyle(t);
13
15
  return t.clientHeight + p(e.marginTop) + p(e.marginBottom);
14
16
  }
15
- const T = (t) => {
16
- const e = s(), { height: d } = b(e), a = s();
17
+ const _ = (t) => {
18
+ const e = f(), { height: d } = y(e), H = N("namespace"), a = f();
17
19
  let i = !1;
18
- const H = y(() => {
19
- var u, c, l, g, h;
20
- const n = ((c = (u = e.value) == null ? void 0 : u.querySelector(".aplus-ap-table-header-wrapper")) == null ? void 0 : c.clientHeight) || 0, r = ((g = (l = e.value) == null ? void 0 : l.querySelector(".ant-table-header")) == null ? void 0 : g.clientHeight) || 47, o = (h = e.value) == null ? void 0 : h.querySelector(".ant-pagination"), S = o ? m(o) : f(a);
20
+ const S = v(() => {
21
+ var u, c, l, g, s;
22
+ const n = ((c = (u = e.value) == null ? void 0 : u.querySelector(`.${H}-ap-table-header-wrapper`)) == null ? void 0 : c.clientHeight) || 0, r = ((g = (l = e.value) == null ? void 0 : l.querySelector(".ant-table-header")) == null ? void 0 : g.clientHeight) || 47, o = (s = e.value) == null ? void 0 : s.querySelector(".ant-pagination"), b = o ? m(o) : h(a);
21
23
  return o && (i = !0), Math.ceil(
22
- f(d) - r - n - (S || 0) - ((t == null ? void 0 : t.offset) || 0)
24
+ h(d) - r - n - (b || 0) - ((t == null ? void 0 : t.offset) || 0)
23
25
  );
24
26
  });
25
- return v(() => {
27
+ return q(() => {
26
28
  var r;
27
29
  if (i)
28
30
  return;
@@ -32,8 +34,8 @@ const T = (t) => {
32
34
  return;
33
35
  }
34
36
  a.value = m(n), i = !0;
35
- }), { contentRef: e, height: H };
37
+ }), { contentRef: e, height: S };
36
38
  };
37
39
  export {
38
- T as default
40
+ _ as default
39
41
  };
@@ -85,9 +85,9 @@ const ue = /* @__PURE__ */ D({
85
85
  ]),
86
86
  default: g(() => [
87
87
  o("div", {
88
- class: W(M.value),
89
88
  ref_key: "container",
90
89
  ref: u,
90
+ class: W(M.value),
91
91
  style: _({
92
92
  pointerEvents: p.value ? "auto" : "none"
93
93
  // opacity: isUpdating ? '0' : '1'
@@ -15,6 +15,7 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
15
  declare const __VLS_component: DefineComponent<ExtractPropTypes<{
16
16
  dirName: {
17
17
  type: StringConstructor;
18
+ default: undefined;
18
19
  };
19
20
  type: {
20
21
  type: PropType<FileUploadType>;
@@ -30,9 +31,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
30
31
  };
31
32
  accept: {
32
33
  type: StringConstructor;
34
+ default: undefined;
33
35
  };
34
36
  maxSize: {
35
37
  type: NumberConstructor;
38
+ default: undefined;
36
39
  };
37
40
  title: {
38
41
  type: StringConstructor;
@@ -44,20 +47,36 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
44
47
  };
45
48
  maxCount: {
46
49
  type: NumberConstructor;
50
+ default: undefined;
47
51
  };
48
52
  beforeUpload: {
49
53
  type: PropType<BeforeUpload>;
54
+ default: undefined;
50
55
  };
51
56
  customRequest: {
52
57
  type: PropType<CustomRequest>;
58
+ default: undefined;
53
59
  };
54
60
  getOssAccess: {
55
61
  type: PropType<GetOssAccess>;
62
+ default: undefined;
63
+ };
64
+ onChange: {
65
+ type: FunctionConstructor;
66
+ default: undefined;
67
+ };
68
+ maxSizeErrorMsg: {
69
+ type: StringConstructor;
70
+ default: undefined;
71
+ };
72
+ maxCountErrorMsg: {
73
+ type: StringConstructor;
74
+ default: undefined;
75
+ };
76
+ acceptErrorMsg: {
77
+ type: StringConstructor;
78
+ default: undefined;
56
79
  };
57
- onChange: FunctionConstructor;
58
- maxSizeErrorMsg: StringConstructor;
59
- maxCountErrorMsg: StringConstructor;
60
- acceptErrorMsg: StringConstructor;
61
80
  }>, {
62
81
  done: ComputedRef<boolean>;
63
82
  clear: typeof clear;
@@ -67,6 +86,7 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
67
86
  }, string, PublicProps, Readonly< ExtractPropTypes<{
68
87
  dirName: {
69
88
  type: StringConstructor;
89
+ default: undefined;
70
90
  };
71
91
  type: {
72
92
  type: PropType<FileUploadType>;
@@ -82,9 +102,11 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
82
102
  };
83
103
  accept: {
84
104
  type: StringConstructor;
105
+ default: undefined;
85
106
  };
86
107
  maxSize: {
87
108
  type: NumberConstructor;
109
+ default: undefined;
88
110
  };
89
111
  title: {
90
112
  type: StringConstructor;
@@ -96,30 +118,57 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
96
118
  };
97
119
  maxCount: {
98
120
  type: NumberConstructor;
121
+ default: undefined;
99
122
  };
100
123
  beforeUpload: {
101
124
  type: PropType<BeforeUpload>;
125
+ default: undefined;
102
126
  };
103
127
  customRequest: {
104
128
  type: PropType<CustomRequest>;
129
+ default: undefined;
105
130
  };
106
131
  getOssAccess: {
107
132
  type: PropType<GetOssAccess>;
133
+ default: undefined;
134
+ };
135
+ onChange: {
136
+ type: FunctionConstructor;
137
+ default: undefined;
138
+ };
139
+ maxSizeErrorMsg: {
140
+ type: StringConstructor;
141
+ default: undefined;
142
+ };
143
+ maxCountErrorMsg: {
144
+ type: StringConstructor;
145
+ default: undefined;
146
+ };
147
+ acceptErrorMsg: {
148
+ type: StringConstructor;
149
+ default: undefined;
108
150
  };
109
- onChange: FunctionConstructor;
110
- maxSizeErrorMsg: StringConstructor;
111
- maxCountErrorMsg: StringConstructor;
112
- acceptErrorMsg: StringConstructor;
113
151
  }>> & Readonly<{
114
152
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
115
153
  }>, {
116
154
  type: FileUploadType;
117
155
  title: string;
156
+ onChange: Function;
118
157
  value: string | unknown[] | Record<string, any>;
158
+ getOssAccess: GetOssAccess;
159
+ dirName: string;
119
160
  needName: boolean | Record<string, any>;
161
+ accept: string;
162
+ maxSize: number;
120
163
  subTitle: string | VNode< RendererNode, RendererElement, {
121
164
  [key: string]: any;
122
165
  }>;
166
+ beforeUpload: BeforeUpload;
167
+ customRequest: CustomRequest;
168
+ maxSizeErrorMsg: string;
169
+ acceptErrorMsg: string;
170
+ maxCount: number;
171
+ maxCountErrorMsg: string;
123
172
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
124
173
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
125
174
  export default _default;
@@ -1,4 +1,4 @@
1
- import { defineComponent as A, ref as f, computed as v, provide as t, openBlock as y, createElementBlock as U, normalizeClass as $, unref as k, createBlock as T, resolveDynamicComponent as B, mergeProps as L, createSlots as R, renderList as q, withCtx as P, renderSlot as V, normalizeProps as w, guardReactiveProps as D } from "vue";
1
+ import { defineComponent as A, ref as g, computed as v, provide as t, openBlock as y, createElementBlock as U, normalizeClass as $, unref as k, createBlock as T, resolveDynamicComponent as B, mergeProps as L, createSlots as R, renderList as q, withCtx as P, renderSlot as V, normalizeProps as w, guardReactiveProps as D } from "vue";
2
2
  import "../config-provider/index.mjs";
3
3
  import "./components/SingleFile.vue.mjs";
4
4
  import "./components/MultipleFile.vue.mjs";
@@ -12,12 +12,13 @@ import Q from "./components/SingleFile.vue2.mjs";
12
12
  import W from "./components/MultipleFile.vue2.mjs";
13
13
  import X from "./components/Picture.vue2.mjs";
14
14
  import { useGlobalConfig as C } from "../config-provider/hooks/use-global-config.mjs";
15
- const ue = /* @__PURE__ */ A({
15
+ const me = /* @__PURE__ */ A({
16
16
  name: "AplusFileUpload",
17
17
  __name: "apUpload",
18
18
  props: {
19
19
  dirName: {
20
- type: String
20
+ type: String,
21
+ default: void 0
21
22
  },
22
23
  type: {
23
24
  type: String,
@@ -32,10 +33,12 @@ const ue = /* @__PURE__ */ A({
32
33
  default: void 0
33
34
  },
34
35
  accept: {
35
- type: String
36
+ type: String,
37
+ default: void 0
36
38
  },
37
39
  maxSize: {
38
- type: Number
40
+ type: Number,
41
+ default: void 0
39
42
  },
40
43
  title: {
41
44
  type: String,
@@ -46,71 +49,87 @@ const ue = /* @__PURE__ */ A({
46
49
  default: ""
47
50
  },
48
51
  maxCount: {
49
- type: Number
52
+ type: Number,
53
+ default: void 0
50
54
  },
51
55
  beforeUpload: {
52
- type: Function
56
+ type: Function,
57
+ default: void 0
53
58
  },
54
59
  customRequest: {
55
- type: Function
60
+ type: Function,
61
+ default: void 0
56
62
  },
57
63
  getOssAccess: {
58
- type: Function
64
+ type: Function,
65
+ default: void 0
66
+ },
67
+ onChange: {
68
+ type: Function,
69
+ default: void 0
70
+ },
71
+ maxSizeErrorMsg: {
72
+ type: String,
73
+ default: void 0
74
+ },
75
+ maxCountErrorMsg: {
76
+ type: String,
77
+ default: void 0
59
78
  },
60
- onChange: Function,
61
- maxSizeErrorMsg: String,
62
- maxCountErrorMsg: String,
63
- acceptErrorMsg: String
79
+ acceptErrorMsg: {
80
+ type: String,
81
+ default: void 0
82
+ }
64
83
  },
65
84
  emits: ["update:value"],
66
85
  setup(S, { expose: b, emit: x }) {
67
- var p, u, d, g;
68
- const { t: c, lang: M } = J();
69
- G(c), I(c, M);
70
- const { b: N } = K("ap-upload"), n = f(null), e = S, _ = x, E = {
86
+ var p, m, d, f;
87
+ const { t: l, lang: M } = J();
88
+ G(l), I(l, M);
89
+ const { b: N } = K("ap-upload"), n = g(null), e = S, _ = x, E = {
71
90
  singleFile: Q,
72
91
  multipleFile: W,
73
92
  picture: X
74
- }, i = H.useInjectFormItemContext(), F = v({
93
+ }, s = H.useInjectFormItemContext(), F = v({
75
94
  get() {
76
95
  return e.value;
77
96
  },
78
97
  set(o) {
79
- var r;
80
- _("update:value", o), i == null || i.onFieldChange(), (r = e.onChange) == null || r.call(e, o);
98
+ var a;
99
+ _("update:value", o), s == null || s.onFieldChange(), (a = e.onChange) == null || a.call(e, o);
81
100
  }
82
- }), O = C("uiMode"), s = C("apUpload");
83
- t("theme", O.value), t("value", F), t("dirName", e.dirName ?? ((p = s.value) == null ? void 0 : p.dirName)), t(
101
+ }), O = C("uiMode"), i = C("apUpload");
102
+ t("theme", O.value), t("value", F), t("dirName", e.dirName ?? ((p = i.value) == null ? void 0 : p.dirName)), t(
84
103
  "needName",
85
- e.needName ?? ((u = s.value) == null ? void 0 : u.needName) ?? !1
86
- ), t("accept", e.accept ?? ((d = s.value) == null ? void 0 : d.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(
104
+ e.needName ?? ((m = i.value) == null ? void 0 : m.needName) ?? !1
105
+ ), t("accept", e.accept ?? ((d = i.value) == null ? void 0 : d.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(
87
106
  "getOssAccess",
88
- e.getOssAccess ?? ((g = s.value) == null ? void 0 : g.getOssAccess)
107
+ e.getOssAccess ?? ((f = i.value) == null ? void 0 : f.getOssAccess)
89
108
  ), t("maxSizeErrorMsg", e.maxSizeErrorMsg), t("maxCountErrorMsg", e.maxCountErrorMsg), t("acceptErrorMsg", e.acceptErrorMsg);
90
- const z = v(() => m.value === 0), m = f(0);
91
- t("uploadingCount", m);
109
+ const z = v(() => u.value === 0), u = g(0);
110
+ t("uploadingCount", u);
92
111
  function h() {
93
- l(void 0);
112
+ c(void 0);
94
113
  }
95
- function l(o) {
96
- var r, a;
97
- (a = (r = n == null ? void 0 : n.value) == null ? void 0 : r.setValue) == null || a.call(r, o);
114
+ function c(o) {
115
+ var a, r;
116
+ (r = (a = n == null ? void 0 : n.value) == null ? void 0 : a.setValue) == null || r.call(a, o);
98
117
  }
99
118
  return b({
100
119
  done: z,
101
120
  clear: h,
102
- setValue: l
103
- }), (o, r) => (y(), U("div", {
121
+ setValue: c
122
+ }), (o, a) => (y(), U("div", {
104
123
  class: $(k(N)())
105
124
  }, [
106
125
  (y(), T(B(E[e.type]), L(o.$attrs, {
107
126
  ref_key: "uploadRef",
108
127
  ref: n
109
128
  }), R({ _: 2 }, [
110
- q(Object.keys(o.$slots), (a) => ({
111
- name: a,
129
+ q(Object.keys(o.$slots), (r) => ({
130
+ name: r,
112
131
  fn: P((j) => [
113
- V(o.$slots, a, w(D(j || {})))
132
+ V(o.$slots, r, w(D(j || {})))
114
133
  ])
115
134
  }))
116
135
  ]), 1040))
@@ -118,5 +137,5 @@ const ue = /* @__PURE__ */ A({
118
137
  }
119
138
  });
120
139
  export {
121
- ue as default
140
+ me as default
122
141
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as W, inject as s, ref as G, watch as H, nextTick as J, openBlock as x, createElementBlock as C, normalizeClass as K, unref as n, createVNode as k, withCtx as T, createElementVNode as b, createTextVNode as Q, toDisplayString as S, withModifiers as X, createBlock as Y, resolveDynamicComponent as Z, createCommentVNode as ee } from "vue";
1
+ import { defineComponent as W, inject as s, ref as G, watch as H, nextTick as J, openBlock as x, createElementBlock as k, normalizeClass as K, unref as n, createVNode as C, withCtx as T, createElementVNode as b, createTextVNode as Q, toDisplayString as S, withModifiers as X, createBlock as Y, resolveDynamicComponent as Z, createCommentVNode as ee } from "vue";
2
2
  import "../../config-provider/index.mjs";
3
3
  import { getPath as te, getName as oe, getReturnData as L } from "../utils/returnData.mjs";
4
4
  import { useOss as ae, getOssInstance as se } from "../hooks/useOss.mjs";
@@ -165,32 +165,32 @@ const me = { class: "multiple-file-context" }, de = { key: 0 }, fe = { key: 1 },
165
165
  );
166
166
  return p.splice(t, 1), Promise.resolve(!0);
167
167
  }
168
- return (e, t) => (x(), C("div", {
168
+ return (e, t) => (x(), k("div", {
169
169
  class: K({
170
170
  [n(U)()]: !0,
171
171
  [n(U)("admin")]: n(R) === "admin"
172
172
  })
173
173
  }, [
174
- k(n(ne), {
174
+ C(n(ne), {
175
175
  ref_key: "uploadRef",
176
176
  ref: l,
177
177
  accept: n(h),
178
178
  multiple: "",
179
- maxCount: n(i),
179
+ "max-count": n(i),
180
180
  progress: {
181
181
  strokeWidth: 3,
182
182
  showInfo: !1,
183
183
  strokeColor: "#0070FF"
184
184
  },
185
- beforeUpload: $,
186
- customRequest: j,
185
+ "before-upload": $,
186
+ "custom-request": j,
187
187
  onRemove: V
188
188
  }, {
189
189
  default: T(() => [
190
190
  b("div", me, [
191
- k(n(re), { class: "file-btn" }, {
191
+ C(n(re), { class: "file-btn" }, {
192
192
  default: T(() => [
193
- k(n(ie)),
193
+ C(n(ie)),
194
194
  Q(" " + S(n(I)), 1)
195
195
  ]),
196
196
  _: 1
@@ -200,14 +200,14 @@ const me = { class: "multiple-file-context" }, de = { key: 0 }, fe = { key: 1 },
200
200
  onClick: t[0] || (t[0] = X(() => {
201
201
  }, ["stop"]))
202
202
  }, [
203
- typeof n(f) == "string" ? (x(), C("div", de, S(n(f) || `${n(r)("ap.apUpload.supportExtension")}:${n(ue)(n(h))}`), 1)) : n(f) ? (x(), C("div", fe, [
203
+ typeof n(f) == "string" ? (x(), k("div", de, S(n(f) || `${n(r)("ap.apUpload.supportExtension")}:${n(ue)(n(h))}`), 1)) : n(f) ? (x(), k("div", fe, [
204
204
  (x(), Y(Z(n(f))))
205
205
  ])) : ee("", !0)
206
206
  ])
207
207
  ])
208
208
  ]),
209
209
  _: 1
210
- }, 8, ["accept", "maxCount"])
210
+ }, 8, ["accept", "max-count"])
211
211
  ], 2));
212
212
  }
213
213
  });