@aplus-frontend/ui 0.4.11 → 0.4.13
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/ap-field/date-range/index.vue.mjs +65 -57
- package/es/src/ap-field/hooks/use-default-presets.d.ts +7 -4
- package/es/src/ap-field/hooks/use-default-presets.mjs +24 -13
- package/es/src/business/ap-ladder/ApLadder.vue.d.ts +2 -0
- package/es/src/business/ap-ladder/ApLadder.vue2.mjs +109 -127
- package/es/src/business/ap-ladder/index.d.ts +1 -0
- package/es/src/business/ap-ladder/useWatchEllipsis.d.ts +3 -0
- package/es/src/business/ap-ladder/useWatchEllipsis.mjs +35 -0
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +5 -2
- package/es/src/business/ap-table-modal/hooks/use-table-select-modal.mjs +31 -21
- package/es/src/business/ap-table-modal/interface.d.ts +3 -1
- package/es/src/business/ap-table-modal/table-layout/index.vue.d.ts +4 -2
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +53 -46
- package/es/src/business/ap-title/interface.d.ts +1 -1
- package/es/src/config-provider/hooks/use-locale.mjs +7 -7
- package/es/src/full-screen/index.vue.d.ts +2 -2
- package/es/src/full-screen/index.vue.mjs +19 -18
- package/es/src/hooks/useFullScreen.mjs +12 -11
- package/es/src/utils/data-range-persets.d.ts +23 -40
- package/es/src/utils/data-range-persets.mjs +95 -102
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/hooks/use-default-presets.d.ts +7 -4
- package/lib/src/ap-field/hooks/use-default-presets.js +1 -1
- package/lib/src/business/ap-ladder/ApLadder.vue.d.ts +2 -0
- package/lib/src/business/ap-ladder/ApLadder.vue2.js +1 -1
- package/lib/src/business/ap-ladder/index.d.ts +1 -0
- package/lib/src/business/ap-ladder/useWatchEllipsis.d.ts +3 -0
- package/lib/src/business/ap-ladder/useWatchEllipsis.js +1 -0
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +5 -2
- package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.js +1 -1
- package/lib/src/business/ap-table-modal/interface.d.ts +3 -1
- package/lib/src/business/ap-table-modal/table-layout/index.vue.d.ts +4 -2
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/ap-title/interface.d.ts +1 -1
- package/lib/src/config-provider/hooks/use-locale.js +1 -1
- package/lib/src/full-screen/index.vue.d.ts +2 -2
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/hooks/useFullScreen.js +1 -1
- package/lib/src/utils/data-range-persets.d.ts +23 -40
- package/lib/src/utils/data-range-persets.js +1 -1
- package/package.json +3 -3
- package/theme/ap-form/ap-form-item.css +8 -5
- package/theme/ap-form/ap-form-item.less +11 -8
- package/theme/ap-form/index.css +8 -5
- package/theme/ap-form/search-form.css +8 -5
- package/theme/ap-form/search-form.less +0 -1
- package/theme/ap-table/ap-table.css +8 -5
- package/theme/ap-table-modal/index.css +8 -5
- package/theme/editable-table/index.css +8 -5
- package/theme/index.css +8 -5
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Tooltip as
|
|
1
|
+
import { defineComponent as Q, useSlots as U, ref as N, computed as h, unref as o, openBlock as l, createElementBlock as r, normalizeClass as a, createBlock as y, normalizeProps as E, mergeProps as C, createSlots as R, withCtx as c, Fragment as k, createElementVNode as m, normalizeStyle as p, toDisplayString as n, renderSlot as T, createCommentVNode as S, renderList as D, createTextVNode as X, isVNode as V, resolveDynamicComponent as b, createVNode as v } from "vue";
|
|
2
|
+
import { Tooltip as j } from "@aplus-frontend/antdv";
|
|
3
3
|
import "../../config-provider/index.mjs";
|
|
4
|
-
import { locales as
|
|
4
|
+
import { locales as Y } from "./interface.mjs";
|
|
5
5
|
import "./HelpMessageIcon.vue.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
6
|
+
import { useWatchEllipsis as Z, ellipsisElementCls as A } from "./useWatchEllipsis.mjs";
|
|
7
|
+
import { useNamespace as x } from "../../config-provider/hooks/use-namespace.mjs";
|
|
8
|
+
import { useGlobalConfig as ee } from "../../config-provider/hooks/use-global-config.mjs";
|
|
9
|
+
import M from "./HelpMessageIcon.vue2.mjs";
|
|
10
|
+
const te = { key: 1 }, le = { key: 0 }, oe = { key: 1 }, re = { key: 0 }, ie = ["onClick"], ne = { key: 0 }, se = { key: 1 }, Se = /* @__PURE__ */ Q({
|
|
10
11
|
name: "ApLadder",
|
|
11
12
|
__name: "ApLadder",
|
|
12
13
|
props: {
|
|
@@ -45,30 +46,30 @@ const ne = { key: 1 }, ie = { key: 0 }, ae = { key: 1 }, ue = { key: 0 }, ye = [
|
|
|
45
46
|
tooltipValueStyles: { type: [Boolean, null, String, Object, Array], default: void 0 }
|
|
46
47
|
},
|
|
47
48
|
setup(F) {
|
|
48
|
-
const P =
|
|
49
|
-
function
|
|
50
|
-
var
|
|
51
|
-
const
|
|
52
|
-
return
|
|
49
|
+
const P = U(), i = F, { b: z, e: s, m: G } = x("ap-ladder"), W = ee("uiMode", "aplus"), g = N([]), w = N(), H = Z(w);
|
|
50
|
+
function I(t) {
|
|
51
|
+
var f;
|
|
52
|
+
const u = (f = g.value) == null ? void 0 : f[t];
|
|
53
|
+
return u ? getComputedStyle(u).color : void 0;
|
|
53
54
|
}
|
|
54
|
-
const
|
|
55
|
-
color: `${
|
|
56
|
-
} : {}),
|
|
57
|
-
color: `${
|
|
58
|
-
} : {}),
|
|
55
|
+
const q = h(() => i.labelValues.length === 0), J = h(() => i.labelValues.length > 0), B = h(() => i.majorColor ? {
|
|
56
|
+
color: `${i.majorColor}`
|
|
57
|
+
} : {}), $ = h(() => i.minorColor ? {
|
|
58
|
+
color: `${i.minorColor}`
|
|
59
|
+
} : {}), _ = (t) => t == null || typeof t == "string" && t.trim() === "", d = (t, u = {}) => {
|
|
59
60
|
const e = {
|
|
60
|
-
rawValue:
|
|
61
|
-
precision:
|
|
62
|
-
thousand:
|
|
63
|
-
thousandSeparator:
|
|
64
|
-
currency:
|
|
65
|
-
percent:
|
|
61
|
+
rawValue: u.rawValue,
|
|
62
|
+
precision: u.precision === void 0 ? 2 : u.precision,
|
|
63
|
+
thousand: u.thousand,
|
|
64
|
+
thousandSeparator: u.thousandSeparator || ",",
|
|
65
|
+
currency: u.currency,
|
|
66
|
+
percent: u.percent
|
|
66
67
|
};
|
|
67
68
|
if (t === null || typeof t == "object" || typeof t == "function" || typeof t > "u")
|
|
68
69
|
return "--";
|
|
69
70
|
if (typeof t == "boolean")
|
|
70
71
|
return t;
|
|
71
|
-
if (
|
|
72
|
+
if (_(t))
|
|
72
73
|
return "--";
|
|
73
74
|
if (e.rawValue)
|
|
74
75
|
return t;
|
|
@@ -76,194 +77,175 @@ const ne = { key: 1 }, ie = { key: 0 }, ae = { key: 1 }, ue = { key: 0 }, ye = [
|
|
|
76
77
|
if (e.percent)
|
|
77
78
|
return `${t.toFixed(e.precision)}%`;
|
|
78
79
|
if (e.currency)
|
|
79
|
-
return t.toLocaleString(
|
|
80
|
+
return t.toLocaleString(Y[e.currency], {
|
|
80
81
|
style: "currency",
|
|
81
82
|
currency: e.currency
|
|
82
83
|
});
|
|
83
84
|
if (e.thousand) {
|
|
84
|
-
const [
|
|
85
|
-
return `${
|
|
85
|
+
const [f, L] = t.toFixed(e.precision).split(".");
|
|
86
|
+
return `${f.replace(
|
|
86
87
|
/(\d)(?=(\d{3})+(?!\d))/g,
|
|
87
88
|
`$1${e.thousandSeparator}`
|
|
88
|
-
)}.${
|
|
89
|
+
)}.${L}`;
|
|
89
90
|
}
|
|
90
91
|
return t.toFixed(e.precision);
|
|
91
92
|
}
|
|
92
93
|
return t;
|
|
93
|
-
},
|
|
94
|
-
var e;
|
|
95
|
-
const t = document.getElementById(O);
|
|
96
|
-
if (!t)
|
|
97
|
-
return;
|
|
98
|
-
const a = t.querySelectorAll(`.${H}`);
|
|
99
|
-
_.value = new ResizeObserver((u) => {
|
|
100
|
-
u.forEach((M) => {
|
|
101
|
-
M.target === t && (h.value = !1, a.forEach((N) => {
|
|
102
|
-
N.clientWidth < N.scrollWidth && (h.value = !0);
|
|
103
|
-
}));
|
|
104
|
-
});
|
|
105
|
-
}), (e = o(_)) == null || e.observe(t), h.value = !1, a.forEach((u) => {
|
|
106
|
-
u.clientWidth < u.scrollWidth && (h.value = !0);
|
|
107
|
-
});
|
|
108
|
-
}, L = C(() => P.title ? !0 : s.tooltip && o(h)), X = (t) => {
|
|
94
|
+
}, O = h(() => P.title ? !0 : i.tooltip && o(H)), K = (t) => {
|
|
109
95
|
t.link && window.open(t.link, "_blank"), typeof t.handleClickLink == "function" && t.handleClickLink();
|
|
110
96
|
};
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
o(_) && ((t = o(_)) == null || t.disconnect());
|
|
116
|
-
}), (t, a) => (l(), r("div", {
|
|
117
|
-
id: O,
|
|
118
|
-
class: y([o(G)(), `${o(I)(o(q))}`])
|
|
97
|
+
return (t, u) => (l(), r("div", {
|
|
98
|
+
ref_key: "wrapperRef",
|
|
99
|
+
ref: w,
|
|
100
|
+
class: a([o(z)(), `${o(G)(o(W))}`])
|
|
119
101
|
}, [
|
|
120
|
-
|
|
121
|
-
default:
|
|
122
|
-
!
|
|
123
|
-
|
|
102
|
+
q.value ? (l(), y(o(j), E(C({ key: 0 }, { ...i.tooltipProps })), R({
|
|
103
|
+
default: c(() => [
|
|
104
|
+
!_(t.major) || !_(t.minor) ? (l(), r(k, { key: 0 }, [
|
|
105
|
+
i.layout === "vertical" ? (l(), r(k, { key: 0 }, [
|
|
124
106
|
m("div", {
|
|
125
|
-
class:
|
|
126
|
-
style:
|
|
127
|
-
},
|
|
107
|
+
class: a([o(s)("major"), o(s)("ellipsis"), o(A)]),
|
|
108
|
+
style: p([t.majorStyles, B.value])
|
|
109
|
+
}, n(d(t.major)), 7),
|
|
128
110
|
m("div", {
|
|
129
|
-
class:
|
|
130
|
-
style:
|
|
131
|
-
},
|
|
111
|
+
class: a([o(s)("minor"), o(s)("ellipsis"), o(A)]),
|
|
112
|
+
style: p([t.minorStyles, $.value])
|
|
113
|
+
}, n(d(t.minor)), 7)
|
|
132
114
|
], 64)) : (l(), r("div", {
|
|
133
115
|
key: 1,
|
|
134
|
-
class:
|
|
116
|
+
class: a([o(s)("ellipsis"), o(A)])
|
|
135
117
|
}, [
|
|
136
118
|
m("span", {
|
|
137
|
-
class:
|
|
138
|
-
style:
|
|
139
|
-
},
|
|
119
|
+
class: a([o(s)("major")]),
|
|
120
|
+
style: p([t.majorStyles, B.value])
|
|
121
|
+
}, n(d(t.major)), 7),
|
|
140
122
|
m("span", {
|
|
141
|
-
class:
|
|
142
|
-
style:
|
|
143
|
-
},
|
|
123
|
+
class: a([o(s)("minor")]),
|
|
124
|
+
style: p([t.minorStyles, $.value])
|
|
125
|
+
}, n(d(t.minor)), 7)
|
|
144
126
|
], 2))
|
|
145
|
-
], 64)) : (l(), r("div",
|
|
127
|
+
], 64)) : (l(), r("div", te, n("--")))
|
|
146
128
|
]),
|
|
147
129
|
_: 2
|
|
148
130
|
}, [
|
|
149
|
-
|
|
131
|
+
O.value ? {
|
|
150
132
|
name: "title",
|
|
151
|
-
fn:
|
|
152
|
-
P.title ?
|
|
153
|
-
|
|
154
|
-
m("div", null,
|
|
155
|
-
m("div", null,
|
|
133
|
+
fn: c(() => [
|
|
134
|
+
P.title ? T(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
|
|
135
|
+
i.tooltipProps.title ? (l(), r("div", le, n(i.tooltipProps.title), 1)) : (l(), r("div", oe, [
|
|
136
|
+
m("div", null, n(d(t.major)), 1),
|
|
137
|
+
m("div", null, n(d(t.minor)), 1)
|
|
156
138
|
]))
|
|
157
139
|
], 64))
|
|
158
140
|
]),
|
|
159
141
|
key: "0"
|
|
160
142
|
} : void 0
|
|
161
143
|
]), 1040)) : S("", !0),
|
|
162
|
-
|
|
163
|
-
default:
|
|
164
|
-
(l(!0), r(k, null, D(
|
|
165
|
-
key:
|
|
166
|
-
class:
|
|
144
|
+
J.value ? (l(), y(o(j), E(C({ key: 1 }, { ...i.tooltipProps })), R({
|
|
145
|
+
default: c(() => [
|
|
146
|
+
(l(!0), r(k, null, D(i.labelValues, (e, f) => (l(), r("div", {
|
|
147
|
+
key: f,
|
|
148
|
+
class: a([o(s)("cross-bar")])
|
|
167
149
|
}, [
|
|
168
150
|
m("div", {
|
|
169
|
-
class:
|
|
170
|
-
style:
|
|
151
|
+
class: a([o(s)("ellipsis"), o(A)]),
|
|
152
|
+
style: p({ color: I(f) })
|
|
171
153
|
}, [
|
|
172
154
|
m("span", {
|
|
173
|
-
class:
|
|
174
|
-
style:
|
|
155
|
+
class: a(o(s)("label")),
|
|
156
|
+
style: p([
|
|
175
157
|
t.labelStyles,
|
|
176
158
|
e.labelStyles,
|
|
177
159
|
e.labelColor ? { color: e.labelColor } : void 0,
|
|
178
160
|
{ textAlign: e.labelAlign || t.labelAlign }
|
|
179
161
|
])
|
|
180
162
|
}, [
|
|
181
|
-
|
|
182
|
-
e.label ? (l(), r("span",
|
|
163
|
+
X(n(e.label), 1),
|
|
164
|
+
e.label ? (l(), r("span", re, ":")) : S("", !0)
|
|
183
165
|
], 6),
|
|
184
|
-
V(e.value) ? (l(),
|
|
166
|
+
V(e.value) ? (l(), y(b(e.value), {
|
|
185
167
|
key: 0,
|
|
186
168
|
ref_for: !0,
|
|
187
169
|
ref_key: "valueRefs",
|
|
188
170
|
ref: g,
|
|
189
171
|
style: { display: "inline-block" }
|
|
190
|
-
}, null, 512)) : typeof e.value == "function" ? (l(),
|
|
172
|
+
}, null, 512)) : typeof e.value == "function" ? (l(), y(b(e.value()), {
|
|
191
173
|
key: 1,
|
|
192
174
|
ref_for: !0,
|
|
193
175
|
ref_key: "valueRefs",
|
|
194
176
|
ref: g,
|
|
195
177
|
style: { display: "inline-block" }
|
|
196
178
|
}, null, 512)) : (l(), r(k, { key: 2 }, [
|
|
197
|
-
|
|
179
|
+
_(e.link) ? (l(), r("span", {
|
|
198
180
|
key: 1,
|
|
199
181
|
ref_for: !0,
|
|
200
182
|
ref_key: "valueRefs",
|
|
201
183
|
ref: g,
|
|
202
|
-
class:
|
|
203
|
-
style:
|
|
184
|
+
class: a(o(s)("value")),
|
|
185
|
+
style: p([
|
|
204
186
|
t.valueStyles,
|
|
205
187
|
e.valueStyles,
|
|
206
188
|
e.valueColor ? { color: e.valueColor } : void 0
|
|
207
189
|
])
|
|
208
|
-
},
|
|
190
|
+
}, n(d(e.value, { ...e })), 7)) : (l(), r("span", {
|
|
209
191
|
key: 0,
|
|
210
192
|
ref_for: !0,
|
|
211
193
|
ref_key: "valueRefs",
|
|
212
194
|
ref: g,
|
|
213
|
-
class:
|
|
214
|
-
style:
|
|
195
|
+
class: a(o(s)("link")),
|
|
196
|
+
style: p([
|
|
215
197
|
t.linkStyles,
|
|
216
198
|
e.linkStyles,
|
|
217
199
|
e.linkColor ? { color: e.linkColor } : void 0
|
|
218
200
|
]),
|
|
219
|
-
onClick: (
|
|
220
|
-
},
|
|
201
|
+
onClick: (L) => K(e)
|
|
202
|
+
}, n(d(e.value, { ...e })), 15, ie))
|
|
221
203
|
], 64)),
|
|
222
204
|
e.unit ? (l(), r("span", {
|
|
223
205
|
key: 3,
|
|
224
|
-
class:
|
|
225
|
-
style:
|
|
206
|
+
class: a(o(s)("unit")),
|
|
207
|
+
style: p([
|
|
226
208
|
t.unitStyles,
|
|
227
209
|
e.unitStyles,
|
|
228
210
|
e.unitColor ? { color: e.unitColor } : void 0
|
|
229
211
|
])
|
|
230
|
-
},
|
|
212
|
+
}, n(e.unit), 7)) : S("", !0)
|
|
231
213
|
], 6),
|
|
232
214
|
e.helpMessage ? (l(), r("div", {
|
|
233
215
|
key: 0,
|
|
234
|
-
class:
|
|
216
|
+
class: a([o(s)("help-message")])
|
|
235
217
|
}, [
|
|
236
|
-
V(e.helpMessage) ? (l(),
|
|
218
|
+
V(e.helpMessage) ? (l(), y(o(j), C({
|
|
237
219
|
key: 0,
|
|
238
220
|
ref_for: !0
|
|
239
221
|
}, { ...e.helpMessageTooltipProps }), {
|
|
240
|
-
title:
|
|
241
|
-
(l(),
|
|
222
|
+
title: c(() => [
|
|
223
|
+
(l(), y(b(e.helpMessage)))
|
|
242
224
|
]),
|
|
243
|
-
default:
|
|
244
|
-
|
|
225
|
+
default: c(() => [
|
|
226
|
+
v(M, { lv: e }, null, 8, ["lv"])
|
|
245
227
|
]),
|
|
246
228
|
_: 2
|
|
247
|
-
}, 1040)) : typeof e.helpMessage == "function" ? (l(),
|
|
229
|
+
}, 1040)) : typeof e.helpMessage == "function" ? (l(), y(o(j), C({
|
|
248
230
|
key: 1,
|
|
249
231
|
ref_for: !0
|
|
250
232
|
}, { ...e.helpMessageTooltipProps }), {
|
|
251
|
-
title:
|
|
252
|
-
(l(),
|
|
233
|
+
title: c(() => [
|
|
234
|
+
(l(), y(b(e.helpMessage())))
|
|
253
235
|
]),
|
|
254
|
-
default:
|
|
255
|
-
|
|
236
|
+
default: c(() => [
|
|
237
|
+
v(M, { lv: e }, null, 8, ["lv"])
|
|
256
238
|
]),
|
|
257
239
|
_: 2
|
|
258
|
-
}, 1040)) : (l(),
|
|
240
|
+
}, 1040)) : (l(), y(o(j), C({
|
|
259
241
|
key: 2,
|
|
260
242
|
ref_for: !0
|
|
261
243
|
}, { ...e.helpMessageTooltipProps }, {
|
|
262
244
|
placement: "bottom",
|
|
263
245
|
title: e.helpMessage
|
|
264
246
|
}), {
|
|
265
|
-
default:
|
|
266
|
-
|
|
247
|
+
default: c(() => [
|
|
248
|
+
v(M, { lv: e }, null, 8, ["lv"])
|
|
267
249
|
]),
|
|
268
250
|
_: 2
|
|
269
251
|
}, 1040, ["title"]))
|
|
@@ -272,29 +254,29 @@ const ne = { key: 1 }, ie = { key: 0 }, ae = { key: 1 }, ue = { key: 0 }, ye = [
|
|
|
272
254
|
]),
|
|
273
255
|
_: 2
|
|
274
256
|
}, [
|
|
275
|
-
|
|
257
|
+
O.value ? {
|
|
276
258
|
name: "title",
|
|
277
|
-
fn:
|
|
278
|
-
P.title ?
|
|
279
|
-
|
|
280
|
-
(l(!0), r(k, null, D(
|
|
281
|
-
key:
|
|
259
|
+
fn: c(() => [
|
|
260
|
+
P.title ? T(t.$slots, "title", { key: 0 }) : (l(), r(k, { key: 1 }, [
|
|
261
|
+
i.tooltipProps.title ? (l(), r("div", ne, n(i.tooltipProps.title), 1)) : (l(), r("div", se, [
|
|
262
|
+
(l(!0), r(k, null, D(i.labelValues, (e, f) => (l(), r("div", {
|
|
263
|
+
key: f,
|
|
282
264
|
style: { "word-break": "break-all" }
|
|
283
265
|
}, [
|
|
284
266
|
e.label ? (l(), r("span", {
|
|
285
267
|
key: 0,
|
|
286
|
-
style:
|
|
287
|
-
},
|
|
288
|
-
V(e.value) ? (l(),
|
|
268
|
+
style: p([t.tooltipLabelStyles, e.tooltipLabelStyles])
|
|
269
|
+
}, n(e.label) + ":", 5)) : S("", !0),
|
|
270
|
+
V(e.value) ? (l(), y(b(e.value), {
|
|
289
271
|
key: 1,
|
|
290
272
|
style: { display: "inline-block" }
|
|
291
|
-
})) : typeof e.value == "function" ? (l(),
|
|
273
|
+
})) : typeof e.value == "function" ? (l(), y(b(e.value()), {
|
|
292
274
|
key: 2,
|
|
293
275
|
style: { display: "inline-block" }
|
|
294
276
|
})) : (l(), r("span", {
|
|
295
277
|
key: 3,
|
|
296
|
-
style:
|
|
297
|
-
},
|
|
278
|
+
style: p([t.tooltipValueStyles, e.tooltipValueStyles])
|
|
279
|
+
}, n(d(e.value, { ...e })), 5))
|
|
298
280
|
]))), 128))
|
|
299
281
|
]))
|
|
300
282
|
], 64))
|
|
@@ -306,5 +288,5 @@ const ne = { key: 1 }, ie = { key: 0 }, ae = { key: 1 }, ue = { key: 0 }, ye = [
|
|
|
306
288
|
}
|
|
307
289
|
});
|
|
308
290
|
export {
|
|
309
|
-
|
|
291
|
+
Se as default
|
|
310
292
|
};
|
|
@@ -88,6 +88,7 @@ declare const ApLadder: {
|
|
|
88
88
|
tooltipLabelStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
89
89
|
tooltipValueStyles: string | false | CSSProperties | StyleValue[] | null;
|
|
90
90
|
}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {
|
|
91
|
+
wrapperRef: HTMLDivElement;
|
|
91
92
|
valueRefs: HTMLSpanElement;
|
|
92
93
|
}, HTMLDivElement, ComponentProvideOptions, {
|
|
93
94
|
P: {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { isClient as a } from "@vueuse/core";
|
|
2
|
+
import { ref as c, watch as n } from "vue";
|
|
3
|
+
const r = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
let l;
|
|
5
|
+
const p = "ap-ladder-is-ellipsised";
|
|
6
|
+
function o(i) {
|
|
7
|
+
const t = i.querySelectorAll(`.${p}`);
|
|
8
|
+
let e = !1;
|
|
9
|
+
return t.forEach((s) => {
|
|
10
|
+
s.clientWidth < s.scrollWidth && (e = !0);
|
|
11
|
+
}), e;
|
|
12
|
+
}
|
|
13
|
+
a && (l = new ResizeObserver((i) => {
|
|
14
|
+
for (const t of i) {
|
|
15
|
+
const e = t.target;
|
|
16
|
+
if (r.has(e)) {
|
|
17
|
+
const s = o(e);
|
|
18
|
+
r.get(e).value = s;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
22
|
+
const h = (i) => {
|
|
23
|
+
const t = c(!1);
|
|
24
|
+
return n(
|
|
25
|
+
() => i.value,
|
|
26
|
+
(e, s) => {
|
|
27
|
+
e && l.observe(e), s && l.unobserve(s), e && r.set(e, t), s && r.delete(s), e && (t.value = o(e));
|
|
28
|
+
},
|
|
29
|
+
{ flush: "post", immediate: !0 }
|
|
30
|
+
), t;
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
p as ellipsisElementCls,
|
|
34
|
+
h as useWatchEllipsis
|
|
35
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OpenOptions, UseTableSelectModalProps
|
|
1
|
+
import { OpenOptions, UseTableSelectModalProps } from '../interface';
|
|
2
2
|
import { Recordable } from '../../../type';
|
|
3
3
|
import { TableColumnsType } from '@aplus-frontend/antdv';
|
|
4
4
|
export declare function useTableSelectModal<TableRowType = Record<string, any>>(props: UseTableSelectModalProps<TableRowType>): {
|
|
@@ -24,7 +24,10 @@ export declare function useTableSelectModal<TableRowType = Record<string, any>>(
|
|
|
24
24
|
getShownColumns: () => TableColumnsType<any>;
|
|
25
25
|
} | null | undefined;
|
|
26
26
|
isDestroyed: true;
|
|
27
|
-
open: (selected?: any[], options?: OpenOptions) => Promise<
|
|
27
|
+
open: (selected?: any[], options?: OpenOptions) => Promise<{
|
|
28
|
+
keys: any[];
|
|
29
|
+
rows: TableRowType[];
|
|
30
|
+
}>;
|
|
28
31
|
destroy: () => void;
|
|
29
32
|
close: () => void;
|
|
30
33
|
};
|
|
@@ -1,27 +1,37 @@
|
|
|
1
|
-
import { onUnmounted as
|
|
2
|
-
import { useCreateTableModal as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { onUnmounted as f } from "vue";
|
|
2
|
+
import { useCreateTableModal as i } from "./use-create-table-modal.mjs";
|
|
3
|
+
import { AsyncOpenResultError as d } from "../interface.mjs";
|
|
4
|
+
const p = (t) => t.id;
|
|
5
|
+
function K(t) {
|
|
6
|
+
const { finishCallback: n, getRowKey: e, ...u } = t, { destroy: a, openModal: y, closeModal: c, ...m } = i({
|
|
7
|
+
...u,
|
|
7
8
|
destroyOnUnmounted: !1,
|
|
8
|
-
getRowKey:
|
|
9
|
-
}),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
getRowKey: e || p
|
|
10
|
+
}), l = async (o = [], w = {}) => {
|
|
11
|
+
try {
|
|
12
|
+
const r = await y(o, w) || {
|
|
13
|
+
keys: [],
|
|
14
|
+
rows: []
|
|
15
|
+
};
|
|
16
|
+
return n == null || n(r), r;
|
|
17
|
+
} catch (r) {
|
|
18
|
+
if (r === d.ModalCancel)
|
|
19
|
+
return {
|
|
20
|
+
keys: o == null ? void 0 : o.map(e || p),
|
|
21
|
+
rows: o
|
|
22
|
+
};
|
|
23
|
+
throw r;
|
|
24
|
+
}
|
|
25
|
+
}, s = () => {
|
|
26
|
+
c();
|
|
17
27
|
};
|
|
18
|
-
return
|
|
19
|
-
|
|
28
|
+
return f(() => {
|
|
29
|
+
s(), a();
|
|
20
30
|
}), {
|
|
21
|
-
open:
|
|
22
|
-
destroy:
|
|
23
|
-
close:
|
|
24
|
-
...
|
|
31
|
+
open: l,
|
|
32
|
+
destroy: a,
|
|
33
|
+
close: s,
|
|
34
|
+
...m
|
|
25
35
|
};
|
|
26
36
|
}
|
|
27
37
|
export {
|
|
@@ -72,7 +72,9 @@ export interface ModalTitleSlots {
|
|
|
72
72
|
/** table-layout Props */
|
|
73
73
|
export interface TableLayoutConfig {
|
|
74
74
|
/** 左侧标题 */
|
|
75
|
-
leftTitle?: string;
|
|
75
|
+
leftTitle?: string | VNodeChild;
|
|
76
|
+
/** 右侧标题 */
|
|
77
|
+
rightTitle?: (selectedCount: number) => string | VNodeChild;
|
|
76
78
|
/** 已经选择item渲染, renderSelectedItem有值才为复杂布局 */
|
|
77
79
|
renderSelectedItem?: (record: any, actions: {
|
|
78
80
|
deleteItem: (record: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableLayoutConfig } from '../interface';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, VNodeArrayChildren, VNode, RendererNode, RendererElement, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = TableLayoutConfig & {
|
|
4
4
|
selectedList: any[];
|
|
5
5
|
};
|
|
@@ -20,7 +20,9 @@ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, Comp
|
|
|
20
20
|
onClear?: (() => any) | undefined;
|
|
21
21
|
onDeleteItem?: ((record: any) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
leftTitle: string
|
|
23
|
+
leftTitle: string | number | boolean | void | VNodeArrayChildren | VNode<RendererNode, RendererElement, {
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
}> | null;
|
|
24
26
|
selectedList: any[];
|
|
25
27
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
26
28
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|