@aplus-frontend/ui 0.5.28 → 0.5.30

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 (69) hide show
  1. package/es/index.mjs +86 -82
  2. package/es/src/ap-field/interface.d.ts +3 -0
  3. package/es/src/ap-grid/editable/form-item.vue.mjs +20 -19
  4. package/es/src/ap-grid/editable/index.vue.mjs +23 -22
  5. package/es/src/ap-grid/index.vue.mjs +149 -138
  6. package/es/src/ap-grid/interface.d.ts +9 -0
  7. package/es/src/ap-grid/utils/col.mjs +92 -81
  8. package/es/src/ap-grid/utils/table.mjs +2 -2
  9. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +52 -52
  10. package/es/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
  11. package/es/src/business/ap-product-info/ApProductInfo.mjs +59 -0
  12. package/es/src/business/ap-product-info/constans.d.ts +11 -14
  13. package/es/src/business/ap-product-info/constans.mjs +21 -0
  14. package/es/src/business/ap-product-info/index.d.ts +86 -0
  15. package/es/src/business/ap-product-info/index.mjs +7 -0
  16. package/es/src/business/ap-product-info/interface.d.ts +9 -7
  17. package/es/src/business/ap-product-info/interface.mjs +1 -0
  18. package/es/src/business/ap-product-info/style/css.d.ts +0 -0
  19. package/es/src/business/ap-product-info/style/css.js +1 -0
  20. package/es/src/business/ap-product-info/style/index.d.ts +0 -0
  21. package/es/src/business/ap-product-info/style/index.js +1 -0
  22. package/es/src/business/hooks/index.d.ts +1 -0
  23. package/es/src/business/hooks/index.mjs +6 -4
  24. package/es/src/business/hooks/useGridRefresh.d.ts +17 -0
  25. package/es/src/business/hooks/useGridRefresh.mjs +17 -0
  26. package/es/src/business/index.d.ts +1 -0
  27. package/es/src/business/index.mjs +21 -19
  28. package/es/src/components.d.ts +1 -0
  29. package/es/src/full-screen/index.vue.mjs +17 -16
  30. package/es/src/full-screen/interface.d.ts +2 -1
  31. package/es/src/index.mjs +75 -71
  32. package/es/src/path-map.mjs +1 -0
  33. package/lib/index.js +1 -1
  34. package/lib/src/ap-field/interface.d.ts +3 -0
  35. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  36. package/lib/src/ap-grid/editable/index.vue.js +1 -1
  37. package/lib/src/ap-grid/index.vue.js +1 -1
  38. package/lib/src/ap-grid/interface.d.ts +9 -0
  39. package/lib/src/ap-grid/utils/col.js +1 -1
  40. package/lib/src/ap-grid/utils/table.js +1 -1
  41. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  42. package/lib/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
  43. package/lib/src/business/ap-product-info/ApProductInfo.js +1 -0
  44. package/lib/src/business/ap-product-info/constans.d.ts +11 -14
  45. package/lib/src/business/ap-product-info/constans.js +1 -0
  46. package/lib/src/business/ap-product-info/index.d.ts +86 -0
  47. package/lib/src/business/ap-product-info/index.js +1 -0
  48. package/lib/src/business/ap-product-info/interface.d.ts +9 -7
  49. package/lib/src/business/ap-product-info/interface.js +1 -0
  50. package/lib/src/business/ap-product-info/style/css.cjs +1 -0
  51. package/lib/src/business/ap-product-info/style/css.d.ts +0 -0
  52. package/lib/src/business/ap-product-info/style/index.cjs +1 -0
  53. package/lib/src/business/ap-product-info/style/index.d.ts +0 -0
  54. package/lib/src/business/hooks/index.d.ts +1 -0
  55. package/lib/src/business/hooks/index.js +1 -1
  56. package/lib/src/business/hooks/useGridRefresh.d.ts +17 -0
  57. package/lib/src/business/hooks/useGridRefresh.js +1 -0
  58. package/lib/src/business/index.d.ts +1 -0
  59. package/lib/src/business/index.js +1 -1
  60. package/lib/src/components.d.ts +1 -0
  61. package/lib/src/full-screen/index.vue.js +1 -1
  62. package/lib/src/full-screen/interface.d.ts +2 -1
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/path-map.js +1 -1
  65. package/package.json +1 -1
  66. package/theme/ap-product-info/ap-product-info.css +87 -0
  67. package/theme/ap-product-info/ap-product-info.less +100 -0
  68. package/theme/index.css +87 -0
  69. package/theme/index.less +1 -0
@@ -1,18 +1,18 @@
1
- import { createVNode as v, Fragment as S } from "vue";
2
- import { isUndefined as $, isArray as M, isString as x, isBoolean as c, isNumber as V, pick as A } from "lodash-unified";
3
- import { valueEnumToArray as j, objectToString as B, getTableTitle as R, getTableRenderType as N, getTableRenderProps as W, getTableCellRenderNode as _ } from "../../ap-table/utils.mjs";
4
- import { noRenderAsFormItemValueList as k } from "../../ap-table/constants.mjs";
1
+ import { createVNode as h, Fragment as x } from "vue";
2
+ import { isUndefined as j, isArray as B, isString as b, isBoolean as c, isNumber as N, pick as w } from "lodash-unified";
3
+ import { valueEnumToArray as W, objectToString as _, getTableTitle as E, getTableRenderType as k, getTableRenderProps as z, getTableCellRenderNode as G } from "../../ap-table/utils.mjs";
4
+ import { noRenderAsFormItemValueList as I } from "../../ap-table/constants.mjs";
5
5
  import "../../ap-table/components/paragraph-ellipsis/index.vue.mjs";
6
- import z from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
7
- function b(e) {
8
- if (!$(e))
9
- return M(e) ? e.reduce((r, t) => x(t) ? `${r}.${t}` : `${r}[${t}]`, "") : String(e);
6
+ import L from "../../ap-table/components/paragraph-ellipsis/index.vue2.mjs";
7
+ function O(e) {
8
+ if (!j(e))
9
+ return B(e) ? e.reduce((r, i) => b(i) ? `${r}.${i}` : `${r}[${i}]`, "") : String(e);
10
10
  }
11
- function w(e) {
11
+ function S(e) {
12
12
  if (e)
13
13
  return e === !0 ? "left" : e;
14
14
  }
15
- function G(e) {
15
+ function U(e) {
16
16
  return c(e) ? {
17
17
  sortable: e
18
18
  } : e ? {
@@ -23,19 +23,19 @@ function G(e) {
23
23
  sortable: !1
24
24
  };
25
25
  }
26
- function I(e) {
26
+ function q(e) {
27
27
  let r;
28
- return c(e.filters) && e.valueEnum ? r = j(e.valueEnum) : r = e.filters, r == null ? void 0 : r.map((t) => ({
29
- label: x(t.text) ? t.text : "",
30
- value: t.value
28
+ return c(e.filters) && e.valueEnum ? r = W(e.valueEnum) : r = e.filters, r == null ? void 0 : r.map((i) => ({
29
+ label: b(i.text) ? i.text : "",
30
+ value: i.value
31
31
  }));
32
32
  }
33
- function L(e) {
33
+ function D(e) {
34
34
  if (e)
35
35
  return (r) => e(r.value, r.row);
36
36
  }
37
- function U(e, r) {
38
- return e ? V(e) ? {
37
+ function H(e, r) {
38
+ return e ? N(e) ? {
39
39
  tooltip: r,
40
40
  rows: e
41
41
  } : e === !0 || e === "tooltip" ? {
@@ -47,91 +47,102 @@ function U(e, r) {
47
47
  htmlTitle: e === "title" ? r : ""
48
48
  } : !1;
49
49
  }
50
- function q(e, r, t) {
51
- if (k.includes(e.valueType))
52
- return t;
50
+ function A(e, r, i) {
51
+ if (I.includes(e.valueType))
52
+ return i;
53
53
  if (e.copyable || e.ellipsis) {
54
- const n = U(e.ellipsis, r), i = B(r);
55
- return v(z, {
56
- rawValue: i,
54
+ const n = H(e.ellipsis, r), t = _(r);
55
+ return h(L, {
56
+ rawValue: t,
57
57
  copyable: e.copyable,
58
58
  ellipsis: n,
59
- content: t
59
+ content: i
60
60
  }, null);
61
61
  }
62
- return t;
62
+ return i;
63
63
  }
64
- function y(e, r, t) {
65
- const n = A(e, ["width", "minWidth", "align"]);
66
- return n.field = b(e.dataIndex), n.fixed = w(e.fixed), n.slots = {
67
- header: () => R(e, t, void 0, r)
64
+ function R(e, r, i) {
65
+ const n = w(e, ["width", "minWidth", "align"]);
66
+ return n.field = O(e.dataIndex), n.fixed = S(e.fixed), n.slots = {
67
+ header: () => E(e, i, void 0, r)
68
68
  }, n.headerAlign = e.align, n.showOverflow = !1, n.showFooterOverflow = !1, n;
69
69
  }
70
- function F(e, r, t, n) {
71
- const i = A(e, ["width", "minWidth", "align", "resizable"]);
72
- i.field = b(e.dataIndex), i.fixed = w(e.fixed), i.headerAlign = e.align, i.footerAlign = e.align, i.showOverflow = !1, i.showFooterOverflow = !1, Object.assign(i, G(e.sorter)), i.filters = I(e), i.filterMultiple = e.filterMultiple, i.filterMethod = L(e.onFilter);
73
- const a = ({
74
- value: d,
75
- ...l
70
+ function v(e, r, i, n) {
71
+ const t = w(e, ["width", "minWidth", "align", "resizable"]);
72
+ t.field = O(e.dataIndex), t.fixed = S(e.fixed), t.headerAlign = e.align, t.footerAlign = e.align, t.showOverflow = !1, t.showFooterOverflow = !1, Object.assign(t, U(e.sorter)), t.filters = q(e), t.filterMultiple = e.filterMultiple, t.filterMethod = D(e.onFilter);
73
+ const u = ({
74
+ value: l,
75
+ _columnIndex: s,
76
+ footer: f,
77
+ ...d
76
78
  }) => {
77
- var T, o;
78
- const f = N(e), u = W({
79
+ var y, F;
80
+ if (f && s === 0)
81
+ return A(e, l, h(x, null, [l]));
82
+ const o = k(e), $ = z({
79
83
  ...e,
80
- valueType: f
84
+ valueType: o
81
85
  }, {
82
- value: d,
83
- ...l
84
- }), E = _(f, u, l.record, n), h = ((T = e.renderText) == null ? void 0 : T.call(e, {
85
- value: d,
86
- ...l
87
- })) || d, O = e.renderText ? v(S, null, [(o = e.renderText) == null ? void 0 : o.call(e, {
88
- value: d,
89
- ...l
90
- })]) : E;
91
- let p = q(e, h, O);
86
+ value: l,
87
+ ...d
88
+ }), M = G(o, $, d.record, n), T = ((y = e.renderText) == null ? void 0 : y.call(e, {
89
+ value: l,
90
+ ...d
91
+ })) || l, V = e.renderText ? h(x, null, [(F = e.renderText) == null ? void 0 : F.call(e, {
92
+ value: l,
93
+ ...d
94
+ })]) : M;
95
+ let p = A(e, T, V);
92
96
  return e.customRender && (p = e.customRender({
93
- value: d,
94
- ...l,
97
+ value: l,
98
+ ...d,
95
99
  column: e,
96
100
  originalNode: p,
97
- originalText: h
101
+ originalText: T
98
102
  })), p;
99
- }, s = ({
100
- row: d,
101
- rowIndex: l
102
- }) => a({
103
- value: d[i.field],
104
- text: d[i.field],
105
- record: d,
106
- index: l,
107
- renderIndex: l,
108
- column: e
103
+ }, a = ({
104
+ row: l,
105
+ rowIndex: s,
106
+ _columnIndex: f,
107
+ footer: d
108
+ }) => u({
109
+ value: l[t.field],
110
+ text: l[t.field],
111
+ record: l,
112
+ index: s,
113
+ renderIndex: s,
114
+ column: e,
115
+ _columnIndex: f,
116
+ footer: d
109
117
  });
110
- return i.slots = {
111
- header: () => R(e, t, void 0, r),
112
- default: s,
113
- footer: s
114
- }, i;
118
+ return t.slots = {
119
+ header: () => E(e, i, void 0, r),
120
+ default: a,
121
+ footer: (l) => a({
122
+ ...l,
123
+ footer: !0
124
+ })
125
+ }, e.html && (delete t.slots.default, delete t.slots.footer, t.type = "html"), t;
115
126
  }
116
- function Y(e, r, t, n) {
117
- var s;
118
- if (!((s = e.children) != null && s.length))
119
- return F(e, r, t, n);
120
- function i(d) {
121
- return d.map((l) => {
127
+ function P(e, r, i, n) {
128
+ var a;
129
+ if (!((a = e.children) != null && a.length))
130
+ return v(e, r, i, n);
131
+ function t(l) {
132
+ return l.map((s) => {
122
133
  var f;
123
- if ((f = l.children) != null && f.length) {
124
- const u = y(l, r, t);
125
- return u.children = i(l.children), u;
134
+ if ((f = s.children) != null && f.length) {
135
+ const d = R(s, r, i);
136
+ return d.children = t(s.children), d;
126
137
  }
127
- return F(l, r, t, n);
138
+ return v(s, r, i, n);
128
139
  });
129
140
  }
130
- const a = y(e, r, t);
131
- return a.children = i(e.children), a;
141
+ const u = R(e, r, i);
142
+ return u.children = t(e.children), u;
132
143
  }
133
144
  export {
134
- Y as transformCol,
135
- y as transformToColGroup,
136
- F as transformToColumn
145
+ P as transformCol,
146
+ R as transformToColGroup,
147
+ v as transformToColumn
137
148
  };
@@ -39,7 +39,7 @@ function m(e) {
39
39
  range: o.range || !1
40
40
  };
41
41
  }
42
- return t.border = e.bordered, e.expandable && (t.expandConfig = l(e.expandable, [
42
+ return t.border = e.bordered === !1 ? "inner" : !0, e.expandable && (t.expandConfig = l(e.expandable, [
43
43
  "renderContent",
44
44
  "width",
45
45
  "title"
@@ -47,7 +47,7 @@ function m(e) {
47
47
  enabled: !1
48
48
  }, t.virtualYConfig = {
49
49
  enabled: !1
50
- }) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t;
50
+ }) : (a(t, "X", e.virtual), a(t, "Y", e.virtual)), t.round = !0, t;
51
51
  }
52
52
  function a(e, t, i) {
53
53
  const o = t === "X", r = o ? "x" : "y", n = o ? "virtualXConfig" : "virtualYConfig", s = i == null ? void 0 : i[r], f = s !== !1, d = o ? w : x, c = b(s) && s >= 0 ? s : d;
@@ -1,4 +1,4 @@
1
- import { ref as ae, reactive as j, unref as h, nextTick as se, onMounted as ie, watch as ce, computed as A, createVNode as x } from "vue";
1
+ import { ref as ae, reactive as j, unref as m, nextTick as se, onMounted as ie, watch as ce, computed as A, createVNode as x } from "vue";
2
2
  import { useTableSortedAndFiltered as ue } from "./use-sorted-filtered.mjs";
3
3
  import "../../config-provider/index.mjs";
4
4
  import { parseFieldValue as le, dataIndexToStr as fe, isEqualCustom as ge } from "../utils.mjs";
@@ -6,8 +6,8 @@ import { isArray as q, isEqualWith as de, isUndefined as pe } from "lodash-unifi
6
6
  import { isDef as N } from "../../utils/index.mjs";
7
7
  import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
8
8
  import { useNamespace as he } from "../../config-provider/hooks/use-namespace.mjs";
9
- const S = 1, D = 10, B = {
10
- defaultCurrent: S,
9
+ const h = 1, D = 10, B = {
10
+ defaultCurrent: h,
11
11
  defaultPageSize: D,
12
12
  showLessItems: !1,
13
13
  showTotal: !0
@@ -20,7 +20,7 @@ function Se(s) {
20
20
  }
21
21
  function ze(s) {
22
22
  const f = {};
23
- return s === !1 || (s === !0 || s == null ? (f.current = S, f.pageSize = D) : (f.current = s.defaultCurrent || S, f.pageSize = s.defaultPageSize || D)), f;
23
+ return s === !1 || (s === !0 || s == null ? (f.current = h, f.pageSize = D) : (f.current = s.defaultCurrent || h, f.pageSize = s.defaultPageSize || D)), f;
24
24
  }
25
25
  const Ae = ({
26
26
  manual: s = !1,
@@ -33,10 +33,10 @@ const Ae = ({
33
33
  filterFields: J,
34
34
  sortFields: K,
35
35
  namespace: M = "ap-table",
36
- pagination: d
36
+ pagination: S
37
37
  }) => {
38
38
  let b = 0, i = {};
39
- const Q = Se(d), $ = (e) => y ? y(e) : e, z = ae(), c = j(ze(d)), {
39
+ const Q = Se(S), $ = (e) => y ? y(e) : e, z = ae(), c = j(ze(S)), {
40
40
  getColumnSFConfig: G,
41
41
  setSF: W,
42
42
  clearAll: Z,
@@ -54,34 +54,34 @@ const Ae = ({
54
54
  var e, t;
55
55
  return ((t = (e = z.value) == null ? void 0 : e.apForm) == null ? void 0 : t.getFieldsValueTransformed(!0)) || {};
56
56
  }, I = async (e) => {
57
- var n;
58
- const t = $(e), r = Date.now();
59
- b = r, a.loading = !0;
57
+ var r;
58
+ const t = $(e), n = Date.now();
59
+ b = n, a.loading = !0;
60
60
  try {
61
61
  const o = await f({
62
- ...h(L),
62
+ ...m(L),
63
63
  ...t
64
64
  });
65
- b === r && (a.total = o.total || ((n = o.data) == null ? void 0 : n.length) || 0, a.records = [...o.data || []]);
65
+ b === n && (a.total = o.total || ((r = o.data) == null ? void 0 : r.length) || 0, a.records = [...o.data || []]);
66
66
  } catch {
67
- b === r && (a.records = [], a.total = 0);
67
+ b === n && (a.records = [], a.total = 0);
68
68
  } finally {
69
69
  a.loading = !1;
70
70
  }
71
71
  }, V = (e) => {
72
72
  const t = {};
73
- return Object.entries(e).forEach(([r, n]) => {
74
- if (t[r] = n, O && n) {
75
- const o = O[r];
76
- o && (t[r] = le(o, n));
73
+ return Object.entries(e).forEach(([n, r]) => {
74
+ if (t[n] = r, O && r) {
75
+ const o = O[n];
76
+ o && (t[n] = le(o, r));
77
77
  }
78
78
  }), t;
79
79
  }, Y = async (e) => {
80
- var n, o, l, g, p;
81
- const t = w(), r = {};
82
- Object.entries(t).forEach(([m, F]) => {
83
- R && R.indexOf(m) > -1 && (r[m] = F);
84
- }), await ((o = (n = z.value) == null ? void 0 : n.apForm) == null ? void 0 : o.resetFields()), (p = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || p.call(g, r), se(() => {
80
+ var r, o, l, g, d;
81
+ const t = w(), n = {};
82
+ Object.entries(t).forEach(([p, F]) => {
83
+ R && R.indexOf(p) > -1 && (n[p] = F);
84
+ }), await ((o = (r = z.value) == null ? void 0 : r.apForm) == null ? void 0 : o.resetFields()), (d = (g = (l = z.value) == null ? void 0 : l.apForm) == null ? void 0 : g.setFieldsValue) == null || d.call(g, n), se(() => {
85
85
  e == null || e();
86
86
  });
87
87
  }, C = (e) => {
@@ -94,70 +94,70 @@ const Ae = ({
94
94
  ...e
95
95
  });
96
96
  }, E = () => {
97
- const e = w();
98
- d && (c.current = S), C({
97
+ const e = w(), t = S !== !1;
98
+ t && (c.current = h), C({
99
99
  ...e,
100
100
  filter: i.filter,
101
101
  sort: i.sort,
102
- current: d ? S : void 0,
103
- pageSize: d ? i.pageSize || c.pageSize : void 0
102
+ current: t ? h : void 0,
103
+ pageSize: t ? i.pageSize || c.pageSize : void 0
104
104
  });
105
105
  }, ee = () => {
106
106
  Z(), i.sort = {}, i.filter = {}, Y(E);
107
107
  }, U = () => {
108
108
  C(i);
109
109
  }, te = (e) => {
110
- if (!d)
110
+ if (S === !1)
111
111
  U();
112
112
  else {
113
113
  const {
114
114
  current: t,
115
- pageSize: r
116
- } = c, n = a.total - e, o = Math.ceil(n / r), l = t > o ? o : t;
115
+ pageSize: n
116
+ } = c, r = a.total - e, o = Math.ceil(r / n), l = t > o ? o : t;
117
117
  k({
118
118
  current: l > 0 ? l : 1
119
119
  });
120
120
  }
121
- }, _ = (e, t, r) => {
122
- var m, F;
123
- const n = w();
124
- c.current = e.current, c.pageSize = e.pageSize, W(t, r);
125
- const o = q(r) ? [...r] : [r], l = {};
121
+ }, _ = (e, t, n) => {
122
+ var p, F;
123
+ const r = w();
124
+ c.current = e.current, c.pageSize = e.pageSize, W(t, n);
125
+ const o = q(n) ? [...n] : [n], l = {};
126
126
  for (const u of o)
127
- (m = h(K)) != null && m.includes(u.columnKey || u.field) && u.order && (l[fe(u.columnKey || u.field)] = u.order);
127
+ (p = m(K)) != null && p.includes(u.columnKey || u.field) && u.order && (l[fe(u.columnKey || u.field)] = u.order);
128
128
  const g = {};
129
129
  for (const u of Object.keys(t))
130
- (F = h(J)) != null && F.includes(u) && t[u] && (g[u] = t[u]);
131
- const p = {
132
- ...n,
130
+ (F = m(J)) != null && F.includes(u) && t[u] && (g[u] = t[u]);
131
+ const d = {
132
+ ...r,
133
133
  filter: g,
134
134
  sort: l,
135
135
  current: e.current,
136
136
  pageSize: e.pageSize
137
137
  };
138
- de(i, p, ge) || C(p);
138
+ de(i, d, ge) || C(d);
139
139
  };
140
140
  ie(() => {
141
141
  const e = w(), {
142
142
  current: t,
143
- pageSize: r
143
+ pageSize: n
144
144
  } = c;
145
145
  if (i = {
146
146
  current: t,
147
- pageSize: r,
147
+ pageSize: n,
148
148
  filter: {},
149
149
  sort: {},
150
150
  ...e
151
151
  }, !s) {
152
- const n = V(i);
153
- I(n);
152
+ const r = V(i);
153
+ I(r);
154
154
  }
155
- }), ce(() => h(L), () => {
155
+ }), ce(() => m(L), () => {
156
156
  E();
157
157
  }, {
158
158
  deep: !0
159
159
  });
160
- const re = A(() => {
160
+ const ne = A(() => {
161
161
  if (a.total === 0)
162
162
  return "-";
163
163
  const {
@@ -166,15 +166,15 @@ const Ae = ({
166
166
  } = c;
167
167
  return `${e}/${Math.ceil(a.total / t)}`;
168
168
  });
169
- function ne(e) {
169
+ function re(e) {
170
170
  q(e) && (a.records = e, a.total = e.length);
171
171
  }
172
172
  const oe = A(() => {
173
173
  const {
174
174
  showLessItems: e,
175
175
  showTotal: t,
176
- showQuickJumper: r,
177
- showSizeChanger: n,
176
+ showQuickJumper: n,
177
+ showSizeChanger: r,
178
178
  pageSizeOptions: o
179
179
  } = Q;
180
180
  return {
@@ -183,8 +183,8 @@ const Ae = ({
183
183
  current: c.current,
184
184
  pageSize: c.pageSize,
185
185
  total: a.total,
186
- showSizeChanger: N(n) ? n : !e,
187
- showQuickJumper: N(r) ? r : !e,
186
+ showSizeChanger: N(r) ? r : !e,
187
+ showQuickJumper: N(n) ? n : !e,
188
188
  showLessItems: e,
189
189
  size: "default",
190
190
  pageSizeOptions: pe(o) ? ["10", "20", "50", "100"] : o,
@@ -196,7 +196,7 @@ const Ae = ({
196
196
  class: P("pagination--total-right")
197
197
  }, [T("ap.apTable.pagination.totalRightPrefix"), " ", x("span", {
198
198
  class: P("pagination-count-text")
199
- }, [h(re)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
199
+ }, [m(ne)]), " ", T("ap.apTable.pagination.totalRightSuffix")])]) : void 0
200
200
  },
201
201
  onChange: _,
202
202
  dataSource: a.records
@@ -214,14 +214,14 @@ const Ae = ({
214
214
  handleTableChange: _,
215
215
  tableProps: oe,
216
216
  dataSource: A(() => a.records),
217
- setDataSource: ne,
217
+ setDataSource: re,
218
218
  getColumnSFConfig: G,
219
219
  sortedInfo: H,
220
220
  filteredInfo: X
221
221
  };
222
222
  };
223
223
  export {
224
- S as DEFAULT_CURRENT,
224
+ h as DEFAULT_CURRENT,
225
225
  D as DEFAULT_PAGE_SIZE,
226
226
  Ae as useTablePaging
227
227
  };
@@ -1,46 +1,43 @@
1
1
  import { DefineComponent, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- import { ApProductInfoProps } from './interface';
2
+ import { ApProductInfoValue } from './interface';
3
3
  declare const _default: DefineComponent<ExtractPropTypes<{
4
- imgSrc: {
4
+ title: {
5
5
  type: StringConstructor;
6
6
  default: string;
7
7
  };
8
- title: {
8
+ imgSrc: {
9
9
  type: StringConstructor;
10
+ default: string;
10
11
  };
11
- asku: {
12
- type: StringConstructor;
12
+ preview: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
13
15
  };
14
- asin: {
15
- type: PropType< ApProductInfoProps["asin"]>;
16
+ values: {
17
+ type: PropType< ApProductInfoValue[]>;
18
+ default: () => never[];
16
19
  };
17
- msku: {
20
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
21
+ title: {
18
22
  type: StringConstructor;
23
+ default: string;
19
24
  };
20
- onTitleClick: {
21
- type: PropType< ApProductInfoProps["onTitleClick"]>;
22
- };
23
- }>, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
24
25
  imgSrc: {
25
26
  type: StringConstructor;
26
27
  default: string;
27
28
  };
28
- title: {
29
- type: StringConstructor;
30
- };
31
- asku: {
32
- type: StringConstructor;
33
- };
34
- asin: {
35
- type: PropType< ApProductInfoProps["asin"]>;
36
- };
37
- msku: {
38
- type: StringConstructor;
29
+ preview: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
39
32
  };
40
- onTitleClick: {
41
- type: PropType< ApProductInfoProps["onTitleClick"]>;
33
+ values: {
34
+ type: PropType< ApProductInfoValue[]>;
35
+ default: () => never[];
42
36
  };
43
37
  }>> & Readonly<{}>, {
38
+ values: ApProductInfoValue[];
39
+ title: string;
40
+ preview: boolean;
44
41
  imgSrc: string;
45
42
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
46
43
  export default _default;
@@ -0,0 +1,59 @@
1
+ import { defineComponent as s, createVNode as e, createTextVNode as a, Fragment as d } from "vue";
2
+ import { ApProductInfoProps as f } from "./constans.mjs";
3
+ import "../../config-provider/index.mjs";
4
+ import { Tooltip as v } from "@aplus-frontend/antdv";
5
+ import { ApImage as p } from "../ap-image/index.mjs";
6
+ import { useNamespace as m } from "../../config-provider/hooks/use-namespace.mjs";
7
+ import { useGlobalConfig as g } from "../../config-provider/hooks/use-global-config.mjs";
8
+ const P = /* @__PURE__ */ s({
9
+ name: "ApProductInfo",
10
+ props: f(),
11
+ setup(i) {
12
+ const {
13
+ b: u,
14
+ e: t,
15
+ m: o
16
+ } = m("ap-product-info"), c = g("uiMode", "aplus"), r = (l) => typeof l == "function" ? l() : l || "--";
17
+ return () => e("div", {
18
+ class: [u(), `${o(c.value)}`]
19
+ }, [e("div", {
20
+ class: t("img")
21
+ }, [e(p, {
22
+ src: i.imgSrc,
23
+ width: 44,
24
+ height: 44,
25
+ preview: i.preview
26
+ }, null)]), e("div", {
27
+ class: [t("content")]
28
+ }, [i.title ? e(v, null, {
29
+ default: () => [e("div", {
30
+ class: t("title")
31
+ }, [i.title])],
32
+ title: () => e("div", {
33
+ class: t("title-tip")
34
+ }, [i.title])
35
+ }) : e("div", {
36
+ class: t("title")
37
+ }, [a("--")]), i.values && e("div", {
38
+ class: t("row-divider")
39
+ }, [i.values.map((l, n) => e(d, null, [e("div", {
40
+ key: n,
41
+ class: [t("item"), l.col === 2 && o("full-width"), n % 2 === 0 || l.col == 2 ? o("left") : o("right")]
42
+ }, [l.label && e("div", {
43
+ class: t("label")
44
+ }, [l.label, e("span", null, [a(":")])]), e("div", {
45
+ class: [t("value"), l.link && o("link")],
46
+ title: typeof l.value != "function" ? r(l.value) : "",
47
+ onClick: () => {
48
+ l.link && window.open(l.link, "_blank");
49
+ }
50
+ }, [typeof l.value == "function" ? l.value() : r(l.value)])]), l.col == 1 && n % 2 == 0 ? e("div", {
51
+ class: t("divider")
52
+ }, [e("div", {
53
+ class: t("divider-vertical")
54
+ }, null)]) : null]))])])]);
55
+ }
56
+ });
57
+ export {
58
+ P as default
59
+ };
@@ -1,23 +1,20 @@
1
1
  import { PropType } from 'vue';
2
- import { ApProductInfoProps as _ApProductInfoProps } from './interface';
3
- export declare const ApAttachmentProps: () => {
4
- imgSrc: {
5
- type: StringConstructor;
6
- default: string;
7
- };
2
+ import { ApProductInfoValue } from './interface';
3
+ export declare const ApProductInfoProps: () => {
8
4
  title: {
9
5
  type: StringConstructor;
6
+ default: string;
10
7
  };
11
- asku: {
8
+ imgSrc: {
12
9
  type: StringConstructor;
10
+ default: string;
13
11
  };
14
- asin: {
15
- type: PropType<_ApProductInfoProps["asin"]>;
16
- };
17
- msku: {
18
- type: StringConstructor;
12
+ preview: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
19
15
  };
20
- onTitleClick: {
21
- type: PropType<_ApProductInfoProps["onTitleClick"]>;
16
+ values: {
17
+ type: PropType<ApProductInfoValue[]>;
18
+ default: () => never[];
22
19
  };
23
20
  };
@@ -0,0 +1,21 @@
1
+ const e = () => ({
2
+ title: {
3
+ type: String,
4
+ default: ""
5
+ },
6
+ imgSrc: {
7
+ type: String,
8
+ default: ""
9
+ },
10
+ preview: {
11
+ type: Boolean,
12
+ default: !1
13
+ },
14
+ values: {
15
+ type: Array,
16
+ default: () => []
17
+ }
18
+ });
19
+ export {
20
+ e as ApProductInfoProps
21
+ };