@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,12 +1,15 @@
1
- import { defineComponent as y, computed as s, unref as t, openBlock as w, createElementBlock as z, normalizeStyle as b, normalizeClass as n, createElementVNode as a, renderSlot as N, toDisplayString as O } from "vue";
1
+ import { defineComponent as S, useSlots as b, computed as s, unref as t, openBlock as n, createElementBlock as a, normalizeStyle as O, normalizeClass as l, createElementVNode as r, renderSlot as h, createCommentVNode as A, toDisplayString as k } from "vue";
2
2
  import "../config-provider/index.mjs";
3
- import { useOssInit as S } from "./hooks/index.mjs";
3
+ import { useOssInit as v } from "./hooks/index.mjs";
4
4
  import "./style/ap-download.css";
5
- import { getFileInfo as h } from "./utils/getFileInfo.mjs";
6
- import { useStyle as A } from "./hooks/useStyle.mjs";
7
- import { useLocale as B } from "../config-provider/hooks/use-locale.mjs";
8
- import { useGlobalConfig as F } from "../config-provider/hooks/use-global-config.mjs";
9
- const k = { class: "icon" }, v = { class: "text" }, V = /* @__PURE__ */ y({
5
+ import { getFileInfo as B } from "./utils/getFileInfo.mjs";
6
+ import { useStyle as x } from "./hooks/useStyle.mjs";
7
+ import { useLocale as I } from "../config-provider/hooks/use-locale.mjs";
8
+ import { useGlobalConfig as c } from "../config-provider/hooks/use-global-config.mjs";
9
+ const U = {
10
+ key: 0,
11
+ class: "icon"
12
+ }, D = { class: "text" }, H = /* @__PURE__ */ S({
10
13
  name: "ApDownload",
11
14
  __name: "ap-download",
12
15
  props: {
@@ -18,36 +21,36 @@ const k = { class: "icon" }, v = { class: "text" }, V = /* @__PURE__ */ y({
18
21
  needName: { type: [Boolean, Object] },
19
22
  getOssAccess: {}
20
23
  },
21
- setup(l) {
22
- const { lang: r } = B(), c = s(() => r.value === "zh-cn" ? "zh_CN" : "en_US"), e = l, i = F("apUpload"), p = s(() => e.disabled), d = s(() => e.color), m = s(() => e.size), { wrapperStyle: f, getWrapperClass: u, getInnerWrapperClass: g } = A(
23
- d,
24
- m,
25
- p
26
- ), _ = s(() => {
24
+ setup(i) {
25
+ const { lang: p } = I(), d = b(), m = s(() => p.value === "zh-cn" ? "zh_CN" : "en_US"), u = c("uiMode"), e = i, f = c("apUpload"), g = s(() => e.disabled), C = s(() => u.value === "aplus" ? "#0070FF" : "#1890FF"), _ = s(() => e.size), { wrapperStyle: y, getWrapperClass: F, getInnerWrapperClass: w } = x(
26
+ C,
27
+ _,
28
+ g
29
+ ), z = s(() => {
27
30
  var o;
28
- return e.getOssAccess || ((o = i.value) == null ? void 0 : o.getOssAccess);
29
- }), C = async () => {
30
- e.disabled || await (await S(
31
- _.value,
32
- t(c)
33
- )).downloadFile(h(e.needName, e.fileName));
31
+ return e.getOssAccess || ((o = f.value) == null ? void 0 : o.getOssAccess);
32
+ }), N = async () => {
33
+ e.disabled || await (await v(
34
+ z.value,
35
+ t(m)
36
+ )).downloadFile(B(e.needName, e.fileName));
34
37
  };
35
- return (o, x) => (w(), z("span", {
36
- style: b(t(f)),
37
- class: n(t(u)),
38
- onClick: C
38
+ return (o, E) => (n(), a("span", {
39
+ style: O(t(y)),
40
+ class: l(t(F)),
41
+ onClick: N
39
42
  }, [
40
- a("span", {
41
- class: n(t(g))
43
+ r("span", {
44
+ class: l(t(w))
42
45
  }, [
43
- a("span", k, [
44
- N(o.$slots, "icon")
45
- ]),
46
- a("span", v, O(o.text), 1)
46
+ t(d).icon ? (n(), a("span", U, [
47
+ h(o.$slots, "icon")
48
+ ])) : A("", !0),
49
+ r("span", D, k(o.text), 1)
47
50
  ], 2)
48
51
  ], 6));
49
52
  }
50
53
  });
51
54
  export {
52
- V as default
55
+ H as default
53
56
  };
@@ -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);
@@ -108,8 +108,8 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
108
108
  }, 300), e = w, F = (o, t) => {
109
109
  var r;
110
110
  const l = ((r = e.fieldNames) == null ? void 0 : r.label) || "label";
111
- return typeof (t == null ? void 0 : t.label) == "string" && t[l].indexOf(o) > -1;
112
- }, i = f((e == null ? void 0 : e.options) || []), d = f(), a = f((e == null ? void 0 : e.loading) || !1), b = g;
111
+ return typeof (t == null ? void 0 : t[l]) == "string" && t[l].indexOf(o) > -1;
112
+ }, i = f((e == null ? void 0 : e.options) || []), d = f(), a = f((e == null ? void 0 : e.loading) || !1), C = g;
113
113
  async function s(o = !0) {
114
114
  if (!y(e.request))
115
115
  return;
@@ -125,7 +125,7 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
125
125
  a.value = !1;
126
126
  }
127
127
  }
128
- function C(o) {
128
+ function b(o) {
129
129
  var t;
130
130
  (t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && n > 0 && !a.value && s(!0);
131
131
  }
@@ -136,7 +136,7 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
136
136
  }
137
137
  s();
138
138
  });
139
- const { value: p, updateValue: x } = X(e, b), I = Q("Select", e), O = m(() => {
139
+ const { value: p, updateValue: x } = X(e, C), I = Q("Select", e), O = m(() => {
140
140
  const o = u(p);
141
141
  if (!o)
142
142
  return e.emptyText;
@@ -199,7 +199,7 @@ const Y = { key: 0 }, re = /* @__PURE__ */ k({
199
199
  "onUpdate:value": u(x),
200
200
  options: i.value,
201
201
  loading: a.value,
202
- onFocus: C
202
+ onFocus: b
203
203
  }), R({ _: 2 }, [
204
204
  z(o.$slots, (l, r) => ({
205
205
  name: r,
@@ -1,4 +1,4 @@
1
- import { defineComponent as q, useSlots as D, ref as f, onMounted as E, computed as h, unref as l, watch as K, cloneVNode as O, openBlock as C, createBlock as k, mergeProps as Q, createSlots as U, withCtx as i, resolveDynamicComponent as w, createCommentVNode as G, createElementVNode as H, normalizeClass as J, createVNode as p, normalizeStyle as M, renderList as W, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
1
+ import { defineComponent as q, useSlots as w, ref as f, onMounted as D, computed as g, unref as l, watch as E, cloneVNode as K, openBlock as C, createBlock as k, mergeProps as O, createSlots as Q, withCtx as i, resolveDynamicComponent as U, createCommentVNode as G, createElementVNode as H, normalizeClass as J, createVNode as p, normalizeStyle as M, renderList as W, renderSlot as X, normalizeProps as Y, guardReactiveProps as Z } from "vue";
2
2
  import { Form as ee, Tooltip as oe, Typography as le } from "ant-design-vue";
3
3
  import { useToken as te } from "ant-design-vue/es/theme/internal";
4
4
  import { isArray as ae, omit as V } from "lodash-unified";
@@ -8,7 +8,7 @@ import "../config-provider/index.mjs";
8
8
  import { useInjectForm as ie } from "./context.mjs";
9
9
  import "./style/ap-form-item.css";
10
10
  import { useNamespace as ue } from "../config-provider/hooks/use-namespace.mjs";
11
- const Be = /* @__PURE__ */ q({
11
+ const he = /* @__PURE__ */ q({
12
12
  name: "ApFormItem",
13
13
  __name: "ap-form-item",
14
14
  props: {
@@ -52,16 +52,16 @@ const Be = /* @__PURE__ */ q({
52
52
  _signal: {}
53
53
  },
54
54
  setup(N, { expose: P }) {
55
- var F, B;
56
- const o = N, t = D(), { model: u, updateModel: s, internalInstance: d } = ie(), { m: c, b: S } = ue("ap-form-item"), m = f(!1), a = f(), [, x] = te();
57
- E(() => {
55
+ var F, h;
56
+ const o = N, t = w(), { model: u, updateModel: s, internalInstance: d } = ie(), { m: c, b: S } = ue("ap-form-item"), m = f(!1), a = f(), [, x] = te();
57
+ D(() => {
58
58
  d == null || d.registerField({
59
59
  name: o.name,
60
60
  initialValue: o.initialValue
61
61
  });
62
62
  });
63
- const y = h(() => o.name ? ae(o.name) ? o.name.reduce((e, r) => e == null ? void 0 : e[r], l(u)) : u == null ? void 0 : u.value[o.name] : null), v = f((B = (F = t.default) == null ? void 0 : F.call(t)) == null ? void 0 : B[0]);
64
- K(
63
+ const y = g(() => o.name ? ae(o.name) ? o.name.reduce((e, r) => e == null ? void 0 : e[r], l(u)) : u == null ? void 0 : u.value[o.name] : null), v = f((h = (F = t.default) == null ? void 0 : F.call(t)) == null ? void 0 : h[0]);
64
+ E(
65
65
  () => {
66
66
  var e;
67
67
  return (e = t.default) == null ? void 0 : e.call(t);
@@ -79,12 +79,12 @@ const Be = /* @__PURE__ */ q({
79
79
  function z() {
80
80
  m.value = !1;
81
81
  }
82
- const b = h(() => {
82
+ const b = g(() => {
83
83
  var r, n;
84
84
  if (!o.name)
85
85
  return (r = t.default()) == null ? void 0 : r[0];
86
86
  const e = l(v);
87
- return e ? O(e, {
87
+ return e ? K(e, {
88
88
  [o.valuePropName]: l(y),
89
89
  [`onUpdate:${o.valuePropName}`]: I,
90
90
  bordered: o.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
@@ -117,7 +117,7 @@ const Be = /* @__PURE__ */ q({
117
117
  clearValidate: _,
118
118
  resetField: L,
119
119
  getFieldValue: $
120
- }), (e, r) => (C(), k(l(ee).Item, Q({
120
+ }), (e, r) => (C(), k(l(ee).Item, O({
121
121
  ref_key: "formItemRef",
122
122
  ref: a
123
123
  }, l(V)(o, [...l(re), "tooltip", "label"]), {
@@ -127,9 +127,9 @@ const Be = /* @__PURE__ */ q({
127
127
  [l(S)()]: !0
128
128
  },
129
129
  colon: e.bordered ? !1 : o.colon
130
- }), U({
130
+ }), Q({
131
131
  default: i(() => [
132
- b.value ? (C(), k(w(b.value), { key: 0 })) : G("", !0)
132
+ b.value ? (C(), k(U(b.value), { key: 0 })) : G("", !0)
133
133
  ]),
134
134
  _: 2
135
135
  }, [
@@ -158,20 +158,21 @@ const Be = /* @__PURE__ */ q({
158
158
  fn: i(() => [
159
159
  p(l(le).Text, {
160
160
  ellipsis: { tooltip: e.label },
161
- content: e.label
161
+ content: e.label,
162
+ style: { overflow: "hidden" }
162
163
  }, null, 8, ["ellipsis", "content"])
163
164
  ]),
164
165
  key: "1"
165
166
  } : void 0,
166
- W(l(V)(t, "default"), (n, g) => ({
167
- name: g,
167
+ W(l(V)(t, "default"), (n, B) => ({
168
+ name: B,
168
169
  fn: i((j) => [
169
- X(e.$slots, g, Y(Z(j || {})))
170
+ X(e.$slots, B, Y(Z(j || {})))
170
171
  ])
171
172
  }))
172
173
  ]), 1040, ["class", "colon"]));
173
174
  }
174
175
  });
175
176
  export {
176
- Be as default
177
+ he as default
177
178
  };
@@ -1,6 +1,7 @@
1
1
  import { ApColumnType, ApTableProps } from './interface';
2
- import { ComputedRef, VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
2
+ import { ColumnType } from 'ant-design-vue/es/table';
3
3
  import { RowSelectionReturnType } from './hooks/use-table-row-selection';
4
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, ExtractPropTypes, PublicProps, ShallowUnwrapRef, ComputedRef, VNode, RendererNode, RendererElement } from 'vue';
4
5
  declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
6
  props: __VLS_Prettify<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly< ExtractPropTypes<{}>>, never>, never> & ApTableProps<RecordType>> & PublicProps;
6
7
  expose(exposed: ShallowUnwrapRef<{
@@ -30,7 +31,10 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
30
31
  selectedRowKeys: (string | number)[];
31
32
  }) => any;
32
33
  footer?: any;
33
- summary?: any;
34
+ summary?: (params: {
35
+ columns: ColumnType<RecordType>[];
36
+ records: RecordType[];
37
+ }) => any;
34
38
  expandedRowRender?: any;
35
39
  expandColumnTitle?: any;
36
40
  customFilterIcon?: any;
@@ -49,7 +53,10 @@ declare const _default: <RecordType>(__VLS_props: NonNullable<Awaited<typeof __V
49
53
  selectedRowKeys: (string | number)[];
50
54
  }) => any;
51
55
  footer?: any;
52
- summary?: any;
56
+ summary?: (params: {
57
+ columns: ColumnType<RecordType>[];
58
+ records: RecordType[];
59
+ }) => any;
53
60
  expandedRowRender?: any;
54
61
  expandColumnTitle?: any;
55
62
  customFilterIcon?: any;