@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.
- package/es/index.mjs +86 -82
- package/es/src/ap-field/interface.d.ts +3 -0
- package/es/src/ap-grid/editable/form-item.vue.mjs +20 -19
- package/es/src/ap-grid/editable/index.vue.mjs +23 -22
- package/es/src/ap-grid/index.vue.mjs +149 -138
- package/es/src/ap-grid/interface.d.ts +9 -0
- package/es/src/ap-grid/utils/col.mjs +92 -81
- package/es/src/ap-grid/utils/table.mjs +2 -2
- package/es/src/ap-table/hooks/use-table-paging-ng.mjs +52 -52
- package/es/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
- package/es/src/business/ap-product-info/ApProductInfo.mjs +59 -0
- package/es/src/business/ap-product-info/constans.d.ts +11 -14
- package/es/src/business/ap-product-info/constans.mjs +21 -0
- package/es/src/business/ap-product-info/index.d.ts +86 -0
- package/es/src/business/ap-product-info/index.mjs +7 -0
- package/es/src/business/ap-product-info/interface.d.ts +9 -7
- package/es/src/business/ap-product-info/interface.mjs +1 -0
- package/es/src/business/ap-product-info/style/css.d.ts +0 -0
- package/es/src/business/ap-product-info/style/css.js +1 -0
- package/es/src/business/ap-product-info/style/index.d.ts +0 -0
- package/es/src/business/ap-product-info/style/index.js +1 -0
- package/es/src/business/hooks/index.d.ts +1 -0
- package/es/src/business/hooks/index.mjs +6 -4
- package/es/src/business/hooks/useGridRefresh.d.ts +17 -0
- package/es/src/business/hooks/useGridRefresh.mjs +17 -0
- package/es/src/business/index.d.ts +1 -0
- package/es/src/business/index.mjs +21 -19
- package/es/src/components.d.ts +1 -0
- package/es/src/full-screen/index.vue.mjs +17 -16
- package/es/src/full-screen/interface.d.ts +2 -1
- package/es/src/index.mjs +75 -71
- package/es/src/path-map.mjs +1 -0
- package/lib/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +3 -0
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-grid/interface.d.ts +9 -0
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/ap-grid/utils/table.js +1 -1
- package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
- package/lib/src/business/ap-product-info/ApProductInfo.d.ts +22 -25
- package/lib/src/business/ap-product-info/ApProductInfo.js +1 -0
- package/lib/src/business/ap-product-info/constans.d.ts +11 -14
- package/lib/src/business/ap-product-info/constans.js +1 -0
- package/lib/src/business/ap-product-info/index.d.ts +86 -0
- package/lib/src/business/ap-product-info/index.js +1 -0
- package/lib/src/business/ap-product-info/interface.d.ts +9 -7
- package/lib/src/business/ap-product-info/interface.js +1 -0
- package/lib/src/business/ap-product-info/style/css.cjs +1 -0
- package/lib/src/business/ap-product-info/style/css.d.ts +0 -0
- package/lib/src/business/ap-product-info/style/index.cjs +1 -0
- package/lib/src/business/ap-product-info/style/index.d.ts +0 -0
- package/lib/src/business/hooks/index.d.ts +1 -0
- package/lib/src/business/hooks/index.js +1 -1
- package/lib/src/business/hooks/useGridRefresh.d.ts +17 -0
- package/lib/src/business/hooks/useGridRefresh.js +1 -0
- package/lib/src/business/index.d.ts +1 -0
- package/lib/src/business/index.js +1 -1
- package/lib/src/components.d.ts +1 -0
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/full-screen/interface.d.ts +2 -1
- package/lib/src/index.js +1 -1
- package/lib/src/path-map.js +1 -1
- package/package.json +1 -1
- package/theme/ap-product-info/ap-product-info.css +87 -0
- package/theme/ap-product-info/ap-product-info.less +100 -0
- package/theme/index.css +87 -0
- package/theme/index.less +1 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { createVNode as
|
|
2
|
-
import { isUndefined as
|
|
3
|
-
import { valueEnumToArray as
|
|
4
|
-
import { noRenderAsFormItemValueList as
|
|
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
|
|
7
|
-
function
|
|
8
|
-
if (
|
|
9
|
-
return
|
|
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
|
|
11
|
+
function S(e) {
|
|
12
12
|
if (e)
|
|
13
13
|
return e === !0 ? "left" : e;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
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
|
|
26
|
+
function q(e) {
|
|
27
27
|
let r;
|
|
28
|
-
return c(e.filters) && e.valueEnum ? r =
|
|
29
|
-
label:
|
|
30
|
-
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
|
|
33
|
+
function D(e) {
|
|
34
34
|
if (e)
|
|
35
35
|
return (r) => e(r.value, r.row);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return 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
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
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 =
|
|
55
|
-
return
|
|
56
|
-
rawValue:
|
|
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:
|
|
59
|
+
content: i
|
|
60
60
|
}, null);
|
|
61
61
|
}
|
|
62
|
-
return
|
|
62
|
+
return i;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
const n =
|
|
66
|
-
return n.field =
|
|
67
|
-
header: () =>
|
|
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
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
value:
|
|
75
|
-
|
|
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
|
|
78
|
-
|
|
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:
|
|
84
|
+
valueType: o
|
|
81
85
|
}, {
|
|
82
|
-
value:
|
|
83
|
-
...
|
|
84
|
-
}),
|
|
85
|
-
value:
|
|
86
|
-
...
|
|
87
|
-
})) ||
|
|
88
|
-
value:
|
|
89
|
-
...
|
|
90
|
-
})]) :
|
|
91
|
-
let p =
|
|
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:
|
|
94
|
-
...
|
|
97
|
+
value: l,
|
|
98
|
+
...d,
|
|
95
99
|
column: e,
|
|
96
100
|
originalNode: p,
|
|
97
|
-
originalText:
|
|
101
|
+
originalText: T
|
|
98
102
|
})), p;
|
|
99
|
-
},
|
|
100
|
-
row:
|
|
101
|
-
rowIndex:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
|
111
|
-
header: () =>
|
|
112
|
-
default:
|
|
113
|
-
footer:
|
|
114
|
-
|
|
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
|
|
117
|
-
var
|
|
118
|
-
if (!((
|
|
119
|
-
return
|
|
120
|
-
function
|
|
121
|
-
return
|
|
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 =
|
|
124
|
-
const
|
|
125
|
-
return
|
|
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
|
|
138
|
+
return v(s, r, i, n);
|
|
128
139
|
});
|
|
129
140
|
}
|
|
130
|
-
const
|
|
131
|
-
return
|
|
141
|
+
const u = R(e, r, i);
|
|
142
|
+
return u.children = t(e.children), u;
|
|
132
143
|
}
|
|
133
144
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
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
|
|
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
|
|
10
|
-
defaultCurrent:
|
|
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 =
|
|
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:
|
|
36
|
+
pagination: S
|
|
37
37
|
}) => {
|
|
38
38
|
let b = 0, i = {};
|
|
39
|
-
const Q = Se(
|
|
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
|
|
58
|
-
const t = $(e),
|
|
59
|
-
b =
|
|
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
|
-
...
|
|
62
|
+
...m(L),
|
|
63
63
|
...t
|
|
64
64
|
});
|
|
65
|
-
b ===
|
|
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 ===
|
|
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(([
|
|
74
|
-
if (t[
|
|
75
|
-
const o = O[
|
|
76
|
-
o && (t[
|
|
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
|
|
81
|
-
const t = w(),
|
|
82
|
-
Object.entries(t).forEach(([
|
|
83
|
-
R && R.indexOf(
|
|
84
|
-
}), await ((o = (
|
|
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
|
-
|
|
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:
|
|
103
|
-
pageSize:
|
|
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 (!
|
|
110
|
+
if (S === !1)
|
|
111
111
|
U();
|
|
112
112
|
else {
|
|
113
113
|
const {
|
|
114
114
|
current: t,
|
|
115
|
-
pageSize:
|
|
116
|
-
} = c,
|
|
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,
|
|
122
|
-
var
|
|
123
|
-
const
|
|
124
|
-
c.current = e.current, c.pageSize = e.pageSize, W(t,
|
|
125
|
-
const o = q(
|
|
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
|
-
(
|
|
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 =
|
|
131
|
-
const
|
|
132
|
-
...
|
|
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,
|
|
138
|
+
de(i, d, ge) || C(d);
|
|
139
139
|
};
|
|
140
140
|
ie(() => {
|
|
141
141
|
const e = w(), {
|
|
142
142
|
current: t,
|
|
143
|
-
pageSize:
|
|
143
|
+
pageSize: n
|
|
144
144
|
} = c;
|
|
145
145
|
if (i = {
|
|
146
146
|
current: t,
|
|
147
|
-
pageSize:
|
|
147
|
+
pageSize: n,
|
|
148
148
|
filter: {},
|
|
149
149
|
sort: {},
|
|
150
150
|
...e
|
|
151
151
|
}, !s) {
|
|
152
|
-
const
|
|
153
|
-
I(
|
|
152
|
+
const r = V(i);
|
|
153
|
+
I(r);
|
|
154
154
|
}
|
|
155
|
-
}), ce(() =>
|
|
155
|
+
}), ce(() => m(L), () => {
|
|
156
156
|
E();
|
|
157
157
|
}, {
|
|
158
158
|
deep: !0
|
|
159
159
|
});
|
|
160
|
-
const
|
|
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
|
|
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:
|
|
177
|
-
showSizeChanger:
|
|
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(
|
|
187
|
-
showQuickJumper: N(
|
|
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
|
-
}, [
|
|
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:
|
|
217
|
+
setDataSource: re,
|
|
218
218
|
getColumnSFConfig: G,
|
|
219
219
|
sortedInfo: H,
|
|
220
220
|
filteredInfo: X
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
223
|
export {
|
|
224
|
-
|
|
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 {
|
|
2
|
+
import { ApProductInfoValue } from './interface';
|
|
3
3
|
declare const _default: DefineComponent<ExtractPropTypes<{
|
|
4
|
-
|
|
4
|
+
title: {
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
default: string;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
imgSrc: {
|
|
9
9
|
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
10
11
|
};
|
|
11
|
-
|
|
12
|
-
type:
|
|
12
|
+
preview: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
13
15
|
};
|
|
14
|
-
|
|
15
|
-
type: PropType<
|
|
16
|
+
values: {
|
|
17
|
+
type: PropType< ApProductInfoValue[]>;
|
|
18
|
+
default: () => never[];
|
|
16
19
|
};
|
|
17
|
-
|
|
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
|
-
|
|
29
|
-
type:
|
|
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
|
-
|
|
41
|
-
type: PropType<
|
|
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 {
|
|
3
|
-
export declare const
|
|
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
|
-
|
|
8
|
+
imgSrc: {
|
|
12
9
|
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
13
11
|
};
|
|
14
|
-
|
|
15
|
-
type:
|
|
16
|
-
|
|
17
|
-
msku: {
|
|
18
|
-
type: StringConstructor;
|
|
12
|
+
preview: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
default: boolean;
|
|
19
15
|
};
|
|
20
|
-
|
|
21
|
-
type: PropType<
|
|
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
|
+
};
|