@aplus-frontend/ui 7.0.0-beta.3 → 7.0.0
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/src/ag-grid/hooks/use-columns-def.mjs +71 -70
- package/es/src/ag-grid/index.vue.mjs +1 -0
- package/es/src/ag-grid/interface.d.ts +1 -0
- package/es/src/ag-grid/style/custom-header.d.ts +2 -2
- package/es/src/ag-grid/style/editable.d.ts +2 -2
- package/es/src/ag-grid/style/index.d.ts +2 -2
- package/es/src/ap-action/item-dropdown/index.vue.mjs +18 -17
- package/es/src/ap-action/style/dropdown-item.d.ts +2 -2
- package/es/src/ap-action/style/index.d.ts +2 -2
- package/es/src/ap-button/style/index.d.ts +2 -2
- package/es/src/ap-button/utils/index.mjs +16 -16
- package/es/src/ap-descriptions/style/index.d.ts +2 -2
- package/es/src/ap-download/ap-download.vue.d.ts +4 -4
- package/es/src/ap-download/ap-download.vue.mjs +27 -27
- package/es/src/ap-download/interface.d.ts +4 -0
- package/es/src/ap-download/style/index.d.ts +2 -2
- package/es/src/ap-drawer/style/index.d.ts +2 -2
- package/es/src/ap-field/style/index.d.ts +2 -2
- package/es/src/ap-form/style/drawer-form.d.ts +2 -2
- package/es/src/ap-form/style/item-group.d.ts +2 -2
- package/es/src/ap-form/style/item-text-group.d.ts +2 -2
- package/es/src/ap-form/style/item.d.ts +2 -2
- package/es/src/ap-form/style/modal-form.d.ts +2 -2
- package/es/src/ap-form/style/search-form-sorter.d.ts +2 -2
- package/es/src/ap-form/style/search-form.d.ts +2 -2
- package/es/src/ap-grid/style/editable.d.ts +2 -2
- package/es/src/ap-grid/style/index.d.ts +2 -2
- package/es/src/ap-grid/utils/col.mjs +33 -33
- package/es/src/ap-list/style/index.d.ts +2 -2
- package/es/src/ap-modal/interface.d.ts +31 -11
- package/es/src/ap-modal/utils/createModal.mjs +52 -45
- package/es/src/ap-pro-card/style/divider.d.ts +2 -2
- package/es/src/ap-pro-card/style/index.d.ts +2 -2
- package/es/src/ap-pro-card/style/operation.d.ts +2 -2
- package/es/src/ap-pro-card/style/statistic.d.ts +2 -2
- package/es/src/ap-pro-card/style/statistics-card.d.ts +2 -2
- package/es/src/ap-pro-card/style/title.d.ts +2 -2
- package/es/src/ap-table/style/ellipsis.d.ts +2 -2
- package/es/src/ap-table/style/index-comp.d.ts +2 -2
- package/es/src/ap-table/style/index.d.ts +2 -2
- package/es/src/ap-table/style/setting.d.ts +2 -2
- package/es/src/ap-tag/style/group.d.ts +2 -2
- package/es/src/ap-tag/style/index.d.ts +2 -2
- package/es/src/ap-upload/style/index.d.ts +2 -2
- package/es/src/business/ag-grid-modal/style/index.d.ts +2 -2
- package/es/src/business/ag-grid-modal/style/selected-items.d.ts +2 -2
- package/es/src/business/ag-grid-modal/utils.mjs +23 -23
- package/es/src/business/ap-appendix/style/index.d.ts +3 -3
- package/es/src/business/ap-appendix/style/index.mjs +1 -1
- package/es/src/business/ap-attachment/ApAttachment.mjs +70 -66
- package/es/src/business/ap-attachment/style/index.d.ts +2 -2
- package/es/src/business/ap-batch-action/style/index.d.ts +3 -3
- package/es/src/business/ap-batch-action/style/index.mjs +1 -1
- package/es/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.mjs +50 -56
- package/es/src/business/ap-batch-action-group/style/index.d.ts +3 -0
- package/es/src/business/ap-batch-action-group/style/index.mjs +14 -0
- package/es/src/business/ap-card/style/index.d.ts +3 -3
- package/es/src/business/ap-card/style/index.mjs +8 -8
- package/es/src/business/ap-copy/style/index.d.ts +2 -2
- package/es/src/business/ap-draggable-grid/style/index.d.ts +2 -2
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -2
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue2.mjs +57 -49
- package/es/src/business/ap-expand-alert/index.d.ts +5 -2
- package/es/src/business/ap-expand-alert/interface.d.ts +1 -1
- package/es/src/business/ap-expand-alert/style/index.d.ts +2 -2
- package/es/src/business/ap-image/style/index.d.ts +3 -3
- package/es/src/business/ap-image/style/index.mjs +6 -6
- package/es/src/business/ap-input-radio/style/index.d.ts +2 -2
- package/es/src/business/ap-label/style/index.d.ts +2 -2
- package/es/src/business/ap-ladder/style/index.d.ts +2 -2
- package/es/src/business/ap-product-info/style/index.d.ts +2 -2
- package/es/src/business/ap-radio-group/style/index.d.ts +2 -2
- package/es/src/business/ap-select-layout/style/index.d.ts +2 -2
- package/es/src/business/ap-size-input/style/index.d.ts +2 -2
- package/es/src/business/ap-status/style/index.d.ts +2 -2
- package/es/src/business/ap-summary/style/index.d.ts +2 -2
- package/es/src/business/ap-table-modal/style/index.d.ts +2 -2
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +23 -23
- package/es/src/business/ap-title/style/index.d.ts +2 -2
- package/es/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +2 -2
- package/es/src/business/ap-value-select-card/style/index.d.ts +2 -2
- package/es/src/business/ap-view/style/index.d.ts +3 -3
- package/es/src/business/ap-view/style/index.mjs +1 -1
- package/es/src/business/batch-input-group/style/index.d.ts +2 -2
- package/es/src/business/hooks/usePageListAgGrid.mjs +7 -6
- package/es/src/check-card/style/index.d.ts +2 -2
- package/es/src/editable-table/style/index.d.ts +2 -2
- package/es/src/full-screen/style/index.d.ts +2 -2
- package/es/src/mask/style/index.d.ts +2 -2
- package/es/src/scroll-bar/style/index.d.ts +2 -2
- package/es/src/scroll-view/style/index.d.ts +2 -2
- package/es/src/splitter/style/index.d.ts +2 -2
- package/es/src/text/style/group.d.ts +2 -2
- package/es/src/text/style/index.d.ts +2 -2
- package/es/src/utils/cssinjs/index.d.ts +2 -2
- package/es/src/utils/cssinjs/index.mjs +41 -35
- package/es/src/utils/cssinjs/plugin-specificity.mjs +13 -0
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/hooks/use-columns-def.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +1 -0
- package/lib/src/ag-grid/style/custom-header.d.ts +2 -2
- package/lib/src/ag-grid/style/editable.d.ts +2 -2
- package/lib/src/ag-grid/style/index.d.ts +2 -2
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-action/style/dropdown-item.d.ts +2 -2
- package/lib/src/ap-action/style/index.d.ts +2 -2
- package/lib/src/ap-button/style/index.d.ts +2 -2
- package/lib/src/ap-button/utils/index.js +1 -1
- package/lib/src/ap-descriptions/style/index.d.ts +2 -2
- package/lib/src/ap-download/ap-download.vue.d.ts +4 -4
- package/lib/src/ap-download/ap-download.vue.js +1 -1
- package/lib/src/ap-download/interface.d.ts +4 -0
- package/lib/src/ap-download/style/index.d.ts +2 -2
- package/lib/src/ap-drawer/style/index.d.ts +2 -2
- package/lib/src/ap-field/style/index.d.ts +2 -2
- package/lib/src/ap-form/style/drawer-form.d.ts +2 -2
- package/lib/src/ap-form/style/item-group.d.ts +2 -2
- package/lib/src/ap-form/style/item-text-group.d.ts +2 -2
- package/lib/src/ap-form/style/item.d.ts +2 -2
- package/lib/src/ap-form/style/modal-form.d.ts +2 -2
- package/lib/src/ap-form/style/search-form-sorter.d.ts +2 -2
- package/lib/src/ap-form/style/search-form.d.ts +2 -2
- package/lib/src/ap-grid/style/editable.d.ts +2 -2
- package/lib/src/ap-grid/style/index.d.ts +2 -2
- package/lib/src/ap-grid/utils/col.js +1 -1
- package/lib/src/ap-list/style/index.d.ts +2 -2
- package/lib/src/ap-modal/interface.d.ts +31 -11
- package/lib/src/ap-modal/utils/createModal.js +1 -1
- package/lib/src/ap-pro-card/style/divider.d.ts +2 -2
- package/lib/src/ap-pro-card/style/index.d.ts +2 -2
- package/lib/src/ap-pro-card/style/operation.d.ts +2 -2
- package/lib/src/ap-pro-card/style/statistic.d.ts +2 -2
- package/lib/src/ap-pro-card/style/statistics-card.d.ts +2 -2
- package/lib/src/ap-pro-card/style/title.d.ts +2 -2
- package/lib/src/ap-table/style/ellipsis.d.ts +2 -2
- package/lib/src/ap-table/style/index-comp.d.ts +2 -2
- package/lib/src/ap-table/style/index.d.ts +2 -2
- package/lib/src/ap-table/style/setting.d.ts +2 -2
- package/lib/src/ap-tag/style/group.d.ts +2 -2
- package/lib/src/ap-tag/style/index.d.ts +2 -2
- package/lib/src/ap-upload/style/index.d.ts +2 -2
- package/lib/src/business/ag-grid-modal/style/index.d.ts +2 -2
- package/lib/src/business/ag-grid-modal/style/selected-items.d.ts +2 -2
- package/lib/src/business/ag-grid-modal/utils.js +1 -1
- package/lib/src/business/ap-appendix/style/index.d.ts +3 -3
- package/lib/src/business/ap-appendix/style/index.js +1 -1
- package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
- package/lib/src/business/ap-attachment/style/index.d.ts +2 -2
- package/lib/src/business/ap-batch-action/style/index.d.ts +3 -3
- package/lib/src/business/ap-batch-action/style/index.js +1 -1
- package/lib/src/business/ap-batch-action-group/ApBatchActionGroup.vue2.js +1 -1
- package/lib/src/business/ap-batch-action-group/style/index.d.ts +3 -0
- package/lib/src/business/ap-batch-action-group/style/index.js +1 -0
- package/lib/src/business/ap-card/style/index.d.ts +3 -3
- package/lib/src/business/ap-card/style/index.js +1 -1
- package/lib/src/business/ap-copy/style/index.d.ts +2 -2
- package/lib/src/business/ap-draggable-grid/style/index.d.ts +2 -2
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +3 -2
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue2.js +1 -1
- package/lib/src/business/ap-expand-alert/index.d.ts +5 -2
- package/lib/src/business/ap-expand-alert/interface.d.ts +1 -1
- package/lib/src/business/ap-expand-alert/style/index.d.ts +2 -2
- package/lib/src/business/ap-image/style/index.d.ts +3 -3
- package/lib/src/business/ap-image/style/index.js +1 -1
- package/lib/src/business/ap-input-radio/style/index.d.ts +2 -2
- package/lib/src/business/ap-label/style/index.d.ts +2 -2
- package/lib/src/business/ap-ladder/style/index.d.ts +2 -2
- package/lib/src/business/ap-product-info/style/index.d.ts +2 -2
- package/lib/src/business/ap-radio-group/style/index.d.ts +2 -2
- package/lib/src/business/ap-select-layout/style/index.d.ts +2 -2
- package/lib/src/business/ap-size-input/style/index.d.ts +2 -2
- package/lib/src/business/ap-status/style/index.d.ts +2 -2
- package/lib/src/business/ap-summary/style/index.d.ts +2 -2
- package/lib/src/business/ap-table-modal/style/index.d.ts +2 -2
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-title/style/index.d.ts +2 -2
- package/lib/src/business/ap-upload-file/ap-upload-single/style/index.d.ts +2 -2
- package/lib/src/business/ap-value-select-card/style/index.d.ts +2 -2
- package/lib/src/business/ap-view/style/index.d.ts +3 -3
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/business/batch-input-group/style/index.d.ts +2 -2
- package/lib/src/business/hooks/usePageListAgGrid.js +1 -1
- package/lib/src/check-card/style/index.d.ts +2 -2
- package/lib/src/editable-table/style/index.d.ts +2 -2
- package/lib/src/full-screen/style/index.d.ts +2 -2
- package/lib/src/mask/style/index.d.ts +2 -2
- package/lib/src/scroll-bar/style/index.d.ts +2 -2
- package/lib/src/scroll-view/style/index.d.ts +2 -2
- package/lib/src/splitter/style/index.d.ts +2 -2
- package/lib/src/text/style/group.d.ts +2 -2
- package/lib/src/text/style/index.d.ts +2 -2
- package/lib/src/utils/cssinjs/index.d.ts +2 -2
- package/lib/src/utils/cssinjs/index.js +1 -1
- package/lib/src/utils/cssinjs/plugin-specificity.js +1 -0
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getTableRenderProps as
|
|
2
|
-
import { rendererMap as
|
|
3
|
-
import { isNumber as
|
|
4
|
-
import { ref as
|
|
1
|
+
import { getTableRenderProps as c, objectToString as D } from "../../ap-table/utils.mjs";
|
|
2
|
+
import { rendererMap as x } from "../renderer/index.mjs";
|
|
3
|
+
import { isNumber as u, isFunction as m } from "lodash-unified";
|
|
4
|
+
import { ref as P, unref as v, computed as y } from "vue";
|
|
5
5
|
import "../components/body-cell/index.vue.mjs";
|
|
6
6
|
import "../components/header-cell/index.vue.mjs";
|
|
7
7
|
import "../components/tooltip/index.vue.mjs";
|
|
@@ -12,24 +12,24 @@ import { useGlobalConfig as _ } from "../../config-provider/hooks/use-global-con
|
|
|
12
12
|
import { useNamespace as G } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
13
|
import W from "../components/body-cell/index.vue2.mjs";
|
|
14
14
|
import z from "../components/tooltip/index.vue2.mjs";
|
|
15
|
-
import
|
|
15
|
+
import h from "../components/header-cell/index.vue2.mjs";
|
|
16
16
|
function F(t) {
|
|
17
|
-
return
|
|
17
|
+
return u(t) && t > 1;
|
|
18
18
|
}
|
|
19
|
-
function M(t,
|
|
20
|
-
if (
|
|
21
|
-
return m(
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
19
|
+
function M(t, a) {
|
|
20
|
+
if (a.bodyCellTooltip)
|
|
21
|
+
return m(a.bodyCellTooltip) ? a.bodyCellTooltip(t.value, t.data) : a.bodyCellTooltip;
|
|
22
|
+
if (a.renderText)
|
|
23
|
+
return a.renderText({
|
|
24
24
|
value: t.value,
|
|
25
25
|
record: t.data,
|
|
26
|
-
column:
|
|
26
|
+
column: a,
|
|
27
27
|
text: t.value
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
const
|
|
32
|
-
{ ...
|
|
29
|
+
const d = a.valueType || "text", p = x[d];
|
|
30
|
+
if (p) {
|
|
31
|
+
const f = c(
|
|
32
|
+
{ ...a, valueType: d },
|
|
33
33
|
{
|
|
34
34
|
value: t.value,
|
|
35
35
|
text: t.value,
|
|
@@ -39,61 +39,61 @@ function M(t, o) {
|
|
|
39
39
|
pinned: t.node?.rowPinned
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
return
|
|
42
|
+
return p(f);
|
|
43
43
|
}
|
|
44
|
-
return
|
|
44
|
+
return D(t.value);
|
|
45
45
|
}
|
|
46
|
-
const X = (t,
|
|
47
|
-
const
|
|
48
|
-
const
|
|
46
|
+
const X = (t, a, d) => {
|
|
47
|
+
const p = _("valueTypeMap"), C = P(), { em: f } = G("ag-grid"), b = (r) => {
|
|
48
|
+
const i = {
|
|
49
49
|
cellRenderer: W,
|
|
50
50
|
cellRendererParams: {
|
|
51
51
|
column: r,
|
|
52
|
-
extraValueType:
|
|
53
|
-
rowKey:
|
|
52
|
+
extraValueType: v(p),
|
|
53
|
+
rowKey: a.rowKey
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
if (r.customRender)
|
|
57
|
-
return
|
|
57
|
+
return i;
|
|
58
58
|
if (r.renderText)
|
|
59
59
|
return {
|
|
60
|
-
valueFormatter: (
|
|
61
|
-
value:
|
|
62
|
-
record:
|
|
60
|
+
valueFormatter: (o) => r.renderText({
|
|
61
|
+
value: o.value,
|
|
62
|
+
record: o.data,
|
|
63
63
|
column: r,
|
|
64
|
-
text:
|
|
64
|
+
text: o.value
|
|
65
65
|
})
|
|
66
66
|
};
|
|
67
|
-
const
|
|
67
|
+
const s = r.valueType || "text", e = x[s];
|
|
68
68
|
return e ? {
|
|
69
|
-
valueFormatter: (
|
|
70
|
-
const
|
|
71
|
-
{ ...r, valueType:
|
|
69
|
+
valueFormatter: (o) => {
|
|
70
|
+
const l = c(
|
|
71
|
+
{ ...r, valueType: s },
|
|
72
72
|
{
|
|
73
|
-
value:
|
|
74
|
-
text:
|
|
75
|
-
record:
|
|
76
|
-
column:
|
|
77
|
-
rowIndex:
|
|
78
|
-
pinned:
|
|
73
|
+
value: o.value,
|
|
74
|
+
text: o.value,
|
|
75
|
+
record: o.data,
|
|
76
|
+
column: o.column,
|
|
77
|
+
rowIndex: o.node?.rowIndex,
|
|
78
|
+
pinned: o.node?.rowPinned
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
return e(
|
|
81
|
+
return e(l);
|
|
82
82
|
}
|
|
83
|
-
} :
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
return
|
|
87
|
-
"--ag-grid-line-clamp":
|
|
88
|
-
},
|
|
89
|
-
lineClamp:
|
|
90
|
-
gridWrapperRef:
|
|
91
|
-
},
|
|
92
|
-
}, g =
|
|
93
|
-
const r =
|
|
94
|
-
function
|
|
95
|
-
return
|
|
96
|
-
const
|
|
83
|
+
} : i;
|
|
84
|
+
}, w = (r) => {
|
|
85
|
+
const i = r.valueType || "text", s = x[i], e = {}, o = r.bodyCellTooltip || !r.customRender && s && (r.ellipsis === !0 || r.ellipsis === "tooltip" || u(r.ellipsis)), l = u(r.ellipsis) && r.ellipsis > 1, n = u(r.ellipsis) ? r.ellipsis : 1;
|
|
86
|
+
return e.tooltipValueGetter = o ? (T) => M(T, r) : void 0, e.wrapText = !r.ellipsis || l, e.cellStyle = {
|
|
87
|
+
"--ag-grid-line-clamp": n
|
|
88
|
+
}, e.tooltipComponent = z, e.tooltipComponentParams = {
|
|
89
|
+
lineClamp: n,
|
|
90
|
+
gridWrapperRef: C
|
|
91
|
+
}, e;
|
|
92
|
+
}, g = y(() => {
|
|
93
|
+
const r = v(t);
|
|
94
|
+
function i(s) {
|
|
95
|
+
return s.map((e) => {
|
|
96
|
+
const o = {
|
|
97
97
|
field: S(e.dataIndex),
|
|
98
98
|
colId: I(e.key) ? String(e.key) : void 0,
|
|
99
99
|
sortable: !!e.sorter,
|
|
@@ -110,44 +110,45 @@ const X = (t, o, n) => {
|
|
|
110
110
|
pinned: e.fixed || null,
|
|
111
111
|
// undefined to null
|
|
112
112
|
colSpan: e.colSpan,
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
spanRows: e.spanRows,
|
|
114
|
+
cellClass: d((l) => {
|
|
115
|
+
const n = e.cellClass || "", T = m(n) ? n(l.data, l.node) : n;
|
|
115
116
|
return [
|
|
116
|
-
`${
|
|
117
|
-
F(e.ellipsis) ?
|
|
118
|
-
|
|
117
|
+
`${f("cell", e.align || "left")}`,
|
|
118
|
+
F(e.ellipsis) ? f("cell", "multiline") : null,
|
|
119
|
+
T
|
|
119
120
|
].flat().filter(Boolean);
|
|
120
121
|
}),
|
|
121
122
|
headerStyle: e.headerStyle,
|
|
122
123
|
headerClass: e.headerClass,
|
|
123
124
|
autoHeight: !0,
|
|
124
125
|
// 设置自动计算高度以自适应多行换行的场景
|
|
125
|
-
...
|
|
126
|
-
...
|
|
126
|
+
...w(e),
|
|
127
|
+
...b(e)
|
|
127
128
|
};
|
|
128
129
|
return e.children?.length ? {
|
|
129
|
-
...
|
|
130
|
-
headerGroupComponent:
|
|
130
|
+
...o,
|
|
131
|
+
headerGroupComponent: h,
|
|
131
132
|
headerGroupComponentParams: {
|
|
132
133
|
column: e
|
|
133
134
|
},
|
|
134
|
-
children:
|
|
135
|
-
} :
|
|
135
|
+
children: i(e.children)
|
|
136
|
+
} : o;
|
|
136
137
|
});
|
|
137
138
|
}
|
|
138
|
-
return
|
|
139
|
-
}),
|
|
139
|
+
return i(r);
|
|
140
|
+
}), R = y(
|
|
140
141
|
() => ({
|
|
141
|
-
headerComponent:
|
|
142
|
-
resizable:
|
|
142
|
+
headerComponent: h,
|
|
143
|
+
resizable: a.columnResizable,
|
|
143
144
|
suppressMovable: !0,
|
|
144
145
|
cellDataType: !1
|
|
145
146
|
})
|
|
146
147
|
);
|
|
147
148
|
return {
|
|
148
149
|
columnDefs: g,
|
|
149
|
-
defaultColDef:
|
|
150
|
-
gridWrapperRef:
|
|
150
|
+
defaultColDef: R,
|
|
151
|
+
gridWrapperRef: C
|
|
151
152
|
};
|
|
152
153
|
};
|
|
153
154
|
export {
|
|
@@ -509,6 +509,7 @@ const Ft = /* @__PURE__ */ uo({
|
|
|
509
509
|
"row-class-rules": e.rowClassRules,
|
|
510
510
|
"no-rows-overlay-component": $o,
|
|
511
511
|
"suppress-cell-focus": "",
|
|
512
|
+
"enable-cell-span": "",
|
|
512
513
|
"dom-layout": e.autoHeight ? "autoHeight" : "normal",
|
|
513
514
|
onSortChanged: Be,
|
|
514
515
|
onGridReady: r[0] || (r[0] = (a) => s.value = a.api),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genAgGridCustomHeaderCellStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genEditableAgGridStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export type AgGridToken = {
|
|
4
4
|
/**
|
|
5
5
|
* 卡片模式下表单容器的下边距尺寸
|
|
@@ -28,5 +28,5 @@ export type AgGridToken = {
|
|
|
28
28
|
};
|
|
29
29
|
export declare const defaultToken: AgGridToken;
|
|
30
30
|
export declare const genAgGridStyle: GenStyleFunc<AgGridToken>;
|
|
31
|
-
declare const _default: (prefixCls: string) =>
|
|
31
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
32
32
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as w, ref as B, computed as A, createBlock as n, openBlock as r, unref as o, normalizeClass as s, withCtx as l, createElementVNode as u, createVNode as c, normalizeProps as b, guardReactiveProps as I, renderSlot as h, createCommentVNode as C, createElementBlock as P, Fragment as D, renderList as N, mergeProps as p } from "vue";
|
|
2
2
|
import { Dropdown as $, Menu as L, MenuItem as V } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../item/index.vue.mjs";
|
|
4
4
|
import "../item-modal/index.vue2.mjs";
|
|
@@ -8,10 +8,10 @@ import "../../config-provider/index.mjs";
|
|
|
8
8
|
import { isUndefined as E, omit as F } from "lodash-unified";
|
|
9
9
|
import M from "../style/dropdown-item.mjs";
|
|
10
10
|
import { useNamespace as S } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
-
import
|
|
11
|
+
import d from "../item/index.vue2.mjs";
|
|
12
12
|
import U from "../item-modal/index.vue.mjs";
|
|
13
13
|
import x from "../item-popconfirm/index.vue.mjs";
|
|
14
|
-
const Z = /* @__PURE__ */
|
|
14
|
+
const Z = /* @__PURE__ */ w({
|
|
15
15
|
name: "ApActionItemDropDown",
|
|
16
16
|
__name: "index",
|
|
17
17
|
props: {
|
|
@@ -29,8 +29,8 @@ const Z = /* @__PURE__ */ k({
|
|
|
29
29
|
iconFirst: { type: Boolean },
|
|
30
30
|
tooltip: {}
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const m =
|
|
32
|
+
setup(y) {
|
|
33
|
+
const m = y, i = B(!1), { e: f, b: g } = S("action-item-dropdown"), _ = M("action-item-dropdown"), v = A(() => m.actions.filter((e) => e.visible || E(e.visible)).map((e) => ({
|
|
34
34
|
...e,
|
|
35
35
|
onAction: async (a) => {
|
|
36
36
|
try {
|
|
@@ -45,13 +45,13 @@ const Z = /* @__PURE__ */ k({
|
|
|
45
45
|
"onUpdate:open": a[0] || (a[0] = (t) => i.value = t),
|
|
46
46
|
trigger: e.trigger,
|
|
47
47
|
placement: e.placement,
|
|
48
|
-
class: s(o(
|
|
48
|
+
class: s(o(_))
|
|
49
49
|
}, {
|
|
50
50
|
overlay: l(() => [
|
|
51
|
-
|
|
51
|
+
c(o(L), null, {
|
|
52
52
|
default: l(() => [
|
|
53
|
-
(r(!0), P(D, null, N(
|
|
54
|
-
key:
|
|
53
|
+
(r(!0), P(D, null, N(v.value, (t, k) => (r(), n(o(V), {
|
|
54
|
+
key: k,
|
|
55
55
|
class: s(o(f)("item"))
|
|
56
56
|
}, {
|
|
57
57
|
default: l(() => [
|
|
@@ -61,7 +61,7 @@ const Z = /* @__PURE__ */ k({
|
|
|
61
61
|
}, t), null, 16)) : t.popconfirmProps ? (r(), n(x, p({
|
|
62
62
|
key: 1,
|
|
63
63
|
ref_for: !0
|
|
64
|
-
}, t), null, 16)) : (r(), n(
|
|
64
|
+
}, t), null, 16)) : (r(), n(d, p({
|
|
65
65
|
key: 2,
|
|
66
66
|
ref_for: !0
|
|
67
67
|
}, t), null, 16))
|
|
@@ -73,19 +73,20 @@ const Z = /* @__PURE__ */ k({
|
|
|
73
73
|
})
|
|
74
74
|
]),
|
|
75
75
|
default: l(() => [
|
|
76
|
-
|
|
77
|
-
class: s(o(
|
|
76
|
+
u("span", {
|
|
77
|
+
class: s(o(g)())
|
|
78
78
|
}, [
|
|
79
|
-
|
|
79
|
+
c(d, b(I(o(F)(m, ["actions", "trigger", "placement"]))), {
|
|
80
80
|
default: l(() => [
|
|
81
|
-
|
|
81
|
+
h(e.$slots, "default")
|
|
82
82
|
]),
|
|
83
83
|
_: 3
|
|
84
84
|
}, 16),
|
|
85
|
-
|
|
86
|
-
key: 0,
|
|
85
|
+
u("span", {
|
|
87
86
|
class: s(o(f)("icon"))
|
|
88
|
-
},
|
|
87
|
+
}, [
|
|
88
|
+
e.showIcon ? (r(), n(o(z), { key: 0 })) : C("", !0)
|
|
89
|
+
], 2)
|
|
89
90
|
], 2)
|
|
90
91
|
]),
|
|
91
92
|
_: 3
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genActionDropdownItemStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export type ActionToken = {
|
|
4
4
|
/**
|
|
5
5
|
* 加载中时的组件透明度
|
|
@@ -7,5 +7,5 @@ export type ActionToken = {
|
|
|
7
7
|
loadingOpacity: number;
|
|
8
8
|
};
|
|
9
9
|
export declare const genActionItemStyle: GenStyleFunc<ActionToken>;
|
|
10
|
-
declare const _default: (prefixCls: string) =>
|
|
10
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
11
11
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: (prefixCls: string) =>
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
3
3
|
export default _default;
|
|
@@ -3,42 +3,42 @@ import { omit as a } from "lodash-unified";
|
|
|
3
3
|
function f(o) {
|
|
4
4
|
return typeof o == "object" && typeof o.then == "function" ? o : !1;
|
|
5
5
|
}
|
|
6
|
-
const m = (o) => typeof o == "function" && f(o?.()), h = (o,
|
|
6
|
+
const m = (o) => typeof o == "function" && f(o?.()), h = (o, c = "0.7") => {
|
|
7
7
|
try {
|
|
8
8
|
let t = o?.toLowerCase();
|
|
9
9
|
if (t && /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t)) {
|
|
10
10
|
if (t.length === 4) {
|
|
11
|
-
let
|
|
11
|
+
let e = "#";
|
|
12
12
|
for (let n = 1; n < 4; n += 1)
|
|
13
|
-
|
|
14
|
-
t =
|
|
13
|
+
e += t.slice(n, n + 1).concat(t.slice(n, n + 1));
|
|
14
|
+
t = e;
|
|
15
15
|
}
|
|
16
|
-
const
|
|
17
|
-
for (let
|
|
18
|
-
|
|
19
|
-
return "rgba(" +
|
|
16
|
+
const r = [];
|
|
17
|
+
for (let e = 1; e < 7; e += 2)
|
|
18
|
+
r.push(parseInt("0x" + t.slice(e, e + 2)));
|
|
19
|
+
return "rgba(" + r.join(",") + "," + c + ")";
|
|
20
20
|
}
|
|
21
21
|
if (t && t.startsWith("rgb")) {
|
|
22
|
-
let
|
|
23
|
-
return
|
|
22
|
+
let r = t.match(/(\d(\.\d+)?)+/g);
|
|
23
|
+
return r = r?.slice(0, 3)?.concat(c), "rgba(" + r.join(",") + ")";
|
|
24
24
|
}
|
|
25
25
|
return t;
|
|
26
26
|
} catch {
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
}, p = (o) => {
|
|
30
|
-
const { onOk:
|
|
31
|
-
return new Promise((t,
|
|
30
|
+
const { onOk: c = () => ({}) } = o;
|
|
31
|
+
return new Promise((t, s) => {
|
|
32
32
|
i.confirm({
|
|
33
33
|
onOk: async () => {
|
|
34
34
|
try {
|
|
35
|
-
await
|
|
36
|
-
} catch {
|
|
37
|
-
|
|
35
|
+
await c(), t(!0);
|
|
36
|
+
} catch (r) {
|
|
37
|
+
s(r);
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
onCancel: () => {
|
|
41
|
-
|
|
41
|
+
t(!1);
|
|
42
42
|
},
|
|
43
43
|
...a(o, ["onOk"])
|
|
44
44
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: (prefixCls: string) =>
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
3
3
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ApDownLoadProps } from './interface';
|
|
1
|
+
import { ApDownLoadProps, downloadCallbackResponse } from './interface';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
import { ButtonType } from '@aplus-frontend/antdv/es/button';
|
|
4
4
|
type __VLS_Props = ApDownLoadProps;
|
|
@@ -11,10 +11,10 @@ declare function __VLS_template(): {
|
|
|
11
11
|
rootEl: any;
|
|
12
12
|
};
|
|
13
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
|
-
downloadCallback: (
|
|
14
|
+
declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
15
|
+
downloadCallback: (res?: downloadCallbackResponse | undefined) => any;
|
|
16
16
|
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
onDownloadCallback?: ((
|
|
17
|
+
onDownloadCallback?: ((res?: downloadCallbackResponse | undefined) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
19
|
size: "small" | "large" | "middle";
|
|
20
20
|
type: ButtonType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as F, ref as A, useSlots as L, computed as
|
|
1
|
+
import { defineComponent as F, ref as A, useSlots as L, computed as s, unref as t, createBlock as S, openBlock as i, mergeProps as x, withCtx as j, createElementVNode as u, normalizeClass as I, createElementBlock as f, createCommentVNode as g, createVNode as M, renderSlot as T, toDisplayString as U } from "vue";
|
|
2
2
|
import { Button as V } from "@aplus-frontend/antdv";
|
|
3
3
|
import { LoadingOutlined as D } from "@ant-design/icons-vue";
|
|
4
4
|
import "../config-provider/index.mjs";
|
|
5
5
|
import { useOssInit as E } from "./hooks/index.mjs";
|
|
6
|
-
import { getFileInfo as
|
|
6
|
+
import { getFileInfo as y } from "./utils/getFileInfo.mjs";
|
|
7
7
|
import { useStyle as P } from "./hooks/useStyle.mjs";
|
|
8
8
|
import { omit as G } from "lodash-unified";
|
|
9
9
|
import { useLocale as R } from "../config-provider/hooks/use-locale.mjs";
|
|
@@ -44,58 +44,58 @@ const W = {
|
|
|
44
44
|
getOssAccess: {}
|
|
45
45
|
},
|
|
46
46
|
emits: ["downloadCallback"],
|
|
47
|
-
setup(
|
|
48
|
-
const
|
|
47
|
+
setup(C, { emit: N }) {
|
|
48
|
+
const c = N, l = A(!1), { lang: b } = R(), v = L(), w = s(() => b.value === "zh-cn" ? "zh_CN" : "en_US"), h = r("uiMode"), e = C, n = r("apUpload"), d = r(
|
|
49
49
|
"downloadCenterTriggerConfig"
|
|
50
|
-
),
|
|
50
|
+
), p = s(() => e.disabled), _ = s(() => e.color ? e.color : h.value === "aplus" ? "#0070FF" : "#1890FF"), k = s(() => e.size), { getInnerWrapperClass: B } = P(_, k, p), O = s(() => e.getOssAccess || n.value?.getOssAccess), z = async () => {
|
|
51
51
|
if (!e.disabled) {
|
|
52
|
-
|
|
52
|
+
l.value = !0;
|
|
53
53
|
try {
|
|
54
|
-
if (
|
|
55
|
-
let
|
|
56
|
-
e.needName ??
|
|
54
|
+
if (d.value?.trigger) {
|
|
55
|
+
let a = y(
|
|
56
|
+
e.needName ?? n?.value?.needName,
|
|
57
57
|
e.fileName
|
|
58
|
-
).map((
|
|
59
|
-
objectName:
|
|
60
|
-
fileName:
|
|
58
|
+
).map((m) => ({
|
|
59
|
+
objectName: m.path,
|
|
60
|
+
fileName: m.fileName
|
|
61
61
|
}));
|
|
62
|
-
await
|
|
62
|
+
await d.value?.trigger(a), c("downloadCallback", a);
|
|
63
63
|
} else {
|
|
64
|
-
const
|
|
64
|
+
const a = await (await E(
|
|
65
65
|
O.value,
|
|
66
|
-
t(
|
|
66
|
+
t(w)
|
|
67
67
|
)).downloadFile(
|
|
68
|
-
|
|
69
|
-
e.needName ??
|
|
68
|
+
y(
|
|
69
|
+
e.needName ?? n?.value?.needName,
|
|
70
70
|
e.fileName
|
|
71
71
|
)
|
|
72
72
|
);
|
|
73
|
-
|
|
73
|
+
c("downloadCallback", a);
|
|
74
74
|
}
|
|
75
75
|
} catch (o) {
|
|
76
76
|
console.error(o);
|
|
77
77
|
} finally {
|
|
78
|
-
|
|
78
|
+
l.value = !1;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
-
return (o,
|
|
82
|
+
return (o, a) => (i(), S(t(V), x(t(G)(e, ["getOssAccess", "fileName", "needName"]), {
|
|
83
83
|
type: e.type,
|
|
84
84
|
size: e.size,
|
|
85
|
-
disabled:
|
|
85
|
+
disabled: p.value,
|
|
86
86
|
onClick: z
|
|
87
87
|
}), {
|
|
88
88
|
default: j(() => [
|
|
89
|
-
|
|
89
|
+
u("div", {
|
|
90
90
|
class: I(t(B))
|
|
91
91
|
}, [
|
|
92
|
-
|
|
92
|
+
l.value ? (i(), f("span", W, [
|
|
93
93
|
M(t(D), { spin: !0 })
|
|
94
|
-
])) :
|
|
95
|
-
t(v).icon ? (i(),
|
|
94
|
+
])) : g("", !0),
|
|
95
|
+
t(v).icon ? (i(), f("span", $, [
|
|
96
96
|
T(o.$slots, "icon")
|
|
97
|
-
])) :
|
|
98
|
-
|
|
97
|
+
])) : g("", !0),
|
|
98
|
+
u("span", q, U(o.text), 1)
|
|
99
99
|
], 2)
|
|
100
100
|
]),
|
|
101
101
|
_: 3
|
|
@@ -38,4 +38,8 @@ export declare enum ApDownLoadNeedNameKeyDefault {
|
|
|
38
38
|
pathKey = "path"
|
|
39
39
|
}
|
|
40
40
|
export type actionResponse = Awaited<ReturnType<typeof client.downloadFile>>;
|
|
41
|
+
export type downloadCallbackResponse = {
|
|
42
|
+
objectName: string;
|
|
43
|
+
fileName: string;
|
|
44
|
+
}[] | actionResponse;
|
|
41
45
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: (prefixCls: string) =>
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: (prefixCls: string) =>
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
3
3
|
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: (prefixCls: string) =>
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
3
3
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genDrawerFormStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genItemGroupStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genFormItemTextGroupStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
|
-
import {
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
export declare const genApFormItemStyle: GenStyleFunc;
|
|
4
|
-
declare const _default: (prefixCls: string) =>
|
|
4
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
5
5
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GenStyleFunc } from '../../design-token/interface';
|
|
2
2
|
import { ApFormToken } from './token';
|
|
3
|
-
import {
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
4
|
export declare const genModalFormStyle: GenStyleFunc<ApFormToken>;
|
|
5
|
-
declare const _default: (prefixCls: string) =>
|
|
5
|
+
declare const _default: (prefixCls: string) => ComputedRef<string>;
|
|
6
6
|
export default _default;
|