@aplus-frontend/ui 7.14.5 → 7.15.1
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/editable/form-item.vue.mjs +8 -7
- package/es/src/ag-grid/editable/index.vue.mjs +19 -18
- package/es/src/ag-grid/index.vue.mjs +110 -105
- package/es/src/ag-grid/interface.d.ts +7 -0
- package/es/src/ap-field/checkbox/index.vue.d.ts +1 -1
- package/es/src/ap-field/date/index.vue.d.ts +1086 -6
- package/es/src/ap-field/date/index.vue.mjs +63 -57
- package/es/src/ap-field/date-range/index.vue.d.ts +1155 -4
- package/es/src/ap-field/date-range/index.vue.mjs +70 -63
- package/es/src/ap-field/interface.d.ts +25 -29
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/radio/index.vue.d.ts +1 -1
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-field/second/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.d.ts +3 -2
- package/es/src/ap-field/select/index.vue.mjs +116 -104
- package/es/src/ap-field/select/read.vue2.mjs +4 -3
- package/es/src/ap-field/slider/index.vue.d.ts +1 -1
- package/es/src/ap-field/switch/index.vue.d.ts +232 -4
- package/es/src/ap-field/switch/index.vue.mjs +48 -42
- package/es/src/ap-field/text/password.vue.d.ts +1 -1
- package/es/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/es/src/ap-form/drawer-form/index.vue.d.ts +1 -0
- package/es/src/ap-form/drawer-form/index.vue.mjs +107 -116
- package/es/src/ap-form/interface.d.ts +1 -1
- package/es/src/ap-form/item-group/index.vue.d.ts +2 -4
- package/es/src/ap-form/item-group/index.vue.mjs +37 -42
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
- package/es/src/ap-form/items/checkbox/index.vue.mjs +20 -14
- package/es/src/ap-form/items/date/index.vue.d.ts +1497 -5
- package/es/src/ap-form/items/date/index.vue.mjs +25 -19
- package/es/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
- package/es/src/ap-form/items/date-range/index.vue.mjs +25 -19
- package/es/src/ap-form/items/number/index.vue.d.ts +4 -4
- package/es/src/ap-form/items/radio/index.vue.d.ts +5 -5
- package/es/src/ap-form/items/radio/index.vue.mjs +2 -3
- package/es/src/ap-form/items/select/index.vue.d.ts +18 -12
- package/es/src/ap-form/items/switch/index.vue.d.ts +436 -5
- package/es/src/ap-form/items/switch/index.vue.mjs +24 -17
- package/es/src/ap-form/items/text/password.vue.d.ts +5 -5
- package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +27 -26
- package/es/src/ap-table/constants.d.ts +1923 -107
- package/es/src/time-ago/index.vue.mjs +21 -17
- package/es/src/time-ago/interface.d.ts +8 -0
- package/es/src/time-ago/useTimeAgo.d.ts +21 -0
- package/es/src/time-ago/useTimeAgo.mjs +36 -34
- package/es/src/time-ago/utils.d.ts +11 -0
- package/es/src/time-ago/utils.mjs +41 -9
- package/es/src/utils/index.d.ts +1 -0
- package/es/src/utils/index.mjs +18 -14
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ag-grid/editable/index.vue.js +1 -1
- package/lib/src/ag-grid/index.vue.js +1 -1
- package/lib/src/ag-grid/interface.d.ts +7 -0
- package/lib/src/ap-field/checkbox/index.vue.d.ts +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +1086 -6
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1155 -4
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +25 -29
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/radio/index.vue.d.ts +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-field/second/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +3 -2
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-field/slider/index.vue.d.ts +1 -1
- package/lib/src/ap-field/switch/index.vue.d.ts +232 -4
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/password.vue.d.ts +1 -1
- package/lib/src/ap-field/text-area/index.vue.d.ts +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.d.ts +1 -0
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/interface.d.ts +1 -1
- package/lib/src/ap-form/item-group/index.vue.d.ts +2 -4
- package/lib/src/ap-form/item-group/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +66 -5
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/date/index.vue.d.ts +1497 -5
- package/lib/src/ap-form/items/date/index.vue.js +1 -1
- package/lib/src/ap-form/items/date-range/index.vue.d.ts +1607 -5
- package/lib/src/ap-form/items/date-range/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +4 -4
- package/lib/src/ap-form/items/radio/index.vue.d.ts +5 -5
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +18 -12
- package/lib/src/ap-form/items/switch/index.vue.d.ts +436 -5
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.d.ts +5 -5
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +1923 -107
- package/lib/src/time-ago/index.vue.js +1 -1
- package/lib/src/time-ago/interface.d.ts +8 -0
- package/lib/src/time-ago/useTimeAgo.d.ts +21 -0
- package/lib/src/time-ago/useTimeAgo.js +1 -1
- package/lib/src/time-ago/utils.d.ts +11 -0
- package/lib/src/time-ago/utils.js +1 -1
- package/lib/src/utils/index.d.ts +1 -0
- package/lib/src/utils/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +5 -5
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Select as
|
|
3
|
-
import { debounce as
|
|
1
|
+
import { defineComponent as pe, useSlots as fe, ref as k, shallowRef as me, computed as s, onMounted as he, watch as ve, unref as n, createVNode as f, createElementBlock as M, createBlock as C, openBlock as m, toDisplayString as B, mergeProps as ye, h as ge, createSlots as Ce, withCtx as h, createElementVNode as N, normalizeClass as v, createCommentVNode as P, resolveDynamicComponent as T, withModifiers as be, renderList as we, renderSlot as Se, normalizeProps as Fe, guardReactiveProps as Oe } from "vue";
|
|
2
|
+
import { Select as ke, Flex as q, Checkbox as L, Spin as Be } from "@aplus-frontend/antdv";
|
|
3
|
+
import { debounce as Ne, isFunction as R, isArray as xe, isNil as Ae, omit as z, isNumber as Ve } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../utils/index.mjs";
|
|
6
|
+
import { useDevWarning as Ie } from "../../utils/warning.mjs";
|
|
6
7
|
import "../../hooks/index.mjs";
|
|
7
|
-
import { useDefaultPlaceholder as
|
|
8
|
-
import
|
|
9
|
-
import { useSelectOptions as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
const
|
|
8
|
+
import { useDefaultPlaceholder as _e } from "../hooks/use-default-placeholder.mjs";
|
|
9
|
+
import De from "../style/index.mjs";
|
|
10
|
+
import { useSelectOptions as Me } from "./use-select-options.mjs";
|
|
11
|
+
import { isDef as x } from "../../utils/is.mjs";
|
|
12
|
+
import { useNamespace as E } from "../../config-provider/hooks/use-namespace.mjs";
|
|
13
|
+
import { useLocale as Pe } from "../../config-provider/hooks/use-locale.mjs";
|
|
14
|
+
import { useControllableValue as Te } from "../../hooks/useControllableValue.mjs";
|
|
15
|
+
const qe = {
|
|
15
16
|
key: 0
|
|
16
|
-
},
|
|
17
|
+
}, Le = ["onClick"], Ze = /* @__PURE__ */ pe({
|
|
17
18
|
name: "ApFieldSelect",
|
|
18
19
|
__name: "index",
|
|
19
20
|
props: {
|
|
@@ -154,8 +155,12 @@ const Me = {
|
|
|
154
155
|
type: Boolean,
|
|
155
156
|
default: !1
|
|
156
157
|
},
|
|
157
|
-
|
|
158
|
+
fetchOnFocus: {
|
|
158
159
|
type: Boolean,
|
|
160
|
+
default: void 0
|
|
161
|
+
},
|
|
162
|
+
lazy: {
|
|
163
|
+
type: [Boolean, String],
|
|
159
164
|
default: !1
|
|
160
165
|
},
|
|
161
166
|
addAll: {
|
|
@@ -172,194 +177,201 @@ const Me = {
|
|
|
172
177
|
}
|
|
173
178
|
},
|
|
174
179
|
emits: ["update:value"],
|
|
175
|
-
setup(
|
|
176
|
-
expose:
|
|
177
|
-
emit:
|
|
180
|
+
setup(U, {
|
|
181
|
+
expose: $,
|
|
182
|
+
emit: K
|
|
178
183
|
}) {
|
|
179
184
|
let r = 0;
|
|
180
|
-
const
|
|
185
|
+
const A = fe(), e = U, {
|
|
186
|
+
deprecated: j
|
|
187
|
+
} = Ie("ApFieldSelect");
|
|
188
|
+
j(!x(e.refetchOnFocus), "refetchOnFocus", "fetchOnFocus");
|
|
189
|
+
const {
|
|
181
190
|
b
|
|
182
|
-
} =
|
|
183
|
-
b:
|
|
184
|
-
} =
|
|
185
|
-
t:
|
|
186
|
-
} =
|
|
187
|
-
if (!
|
|
191
|
+
} = E("field-select"), {
|
|
192
|
+
b: c
|
|
193
|
+
} = E("field-select-popup-option"), H = De("field"), V = k(!1), I = k(!1), {
|
|
194
|
+
t: _
|
|
195
|
+
} = Pe(), W = Ne((t) => {
|
|
196
|
+
if (!R(e.request))
|
|
188
197
|
return;
|
|
189
198
|
r += 1;
|
|
190
199
|
const o = r;
|
|
191
|
-
|
|
192
|
-
r === o && (
|
|
200
|
+
g([]), u.value = !0, e.request(t).then((l) => {
|
|
201
|
+
r === o && (g(l), u.value = !1);
|
|
193
202
|
});
|
|
194
|
-
}, e.searchDelay),
|
|
203
|
+
}, e.searchDelay), G = (t, o) => {
|
|
195
204
|
const l = e.fieldNames?.label || "label";
|
|
196
205
|
return typeof o?.[l] == "string" && o[l].toLowerCase().indexOf(t.toLowerCase()) > -1;
|
|
197
206
|
}, {
|
|
198
|
-
options:
|
|
199
|
-
updateOptions:
|
|
200
|
-
} =
|
|
207
|
+
options: d,
|
|
208
|
+
updateOptions: g
|
|
209
|
+
} = Me(e), w = me(), u = k(e?.loading || !1), J = K, Q = s(() => e.fetchOnFocus ?? e.refetchOnFocus), X = s(() => {
|
|
201
210
|
if (e.multiple)
|
|
202
211
|
return e.tokenSeparators ? "tags" : "multiple";
|
|
203
212
|
});
|
|
204
|
-
async function
|
|
205
|
-
if (!
|
|
213
|
+
async function y(t = !0) {
|
|
214
|
+
if (!R(e.request))
|
|
206
215
|
return;
|
|
207
216
|
u.value = !0, r += 1;
|
|
208
217
|
const o = r;
|
|
209
218
|
try {
|
|
210
|
-
t &&
|
|
219
|
+
t && g([]);
|
|
211
220
|
const l = await e.request(void 0, e.params);
|
|
212
221
|
if (o !== r)
|
|
213
222
|
return;
|
|
214
|
-
|
|
223
|
+
g(l);
|
|
215
224
|
} finally {
|
|
216
225
|
u.value = !1;
|
|
217
226
|
}
|
|
218
227
|
}
|
|
219
|
-
function
|
|
220
|
-
|
|
228
|
+
function Y(t) {
|
|
229
|
+
!I.value && r === 0 && e.lazy === "first-focus" ? y() : Q.value && !u.value && y(!0), e.onFocus?.(t), I.value = !0;
|
|
221
230
|
}
|
|
222
|
-
|
|
223
|
-
e.lazy
|
|
224
|
-
|
|
225
|
-
|
|
231
|
+
he(() => {
|
|
232
|
+
if (!e.lazy) {
|
|
233
|
+
y();
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
}), ve(() => e.params, () => {
|
|
237
|
+
y();
|
|
226
238
|
}, {
|
|
227
239
|
deep: !0
|
|
228
240
|
});
|
|
229
241
|
const {
|
|
230
242
|
value: p,
|
|
231
243
|
updateValue: S
|
|
232
|
-
} =
|
|
244
|
+
} = Te(e, J), Z = _e("Select", e), ee = s(() => {
|
|
233
245
|
const t = n(p);
|
|
234
246
|
if (!t)
|
|
235
247
|
return e.emptyText;
|
|
236
248
|
const o = e.fieldNames?.label || "label", l = e.fieldNames?.value || "value";
|
|
237
|
-
return
|
|
238
|
-
}),
|
|
249
|
+
return xe(t) ? t.map((a) => n(d).find((de) => de[l] === a)?.[o]).filter(Boolean).join("、") || e.emptyText : n(d).find((a) => a[l] === t)?.[o] || e.emptyText;
|
|
250
|
+
}), te = s(() => {
|
|
239
251
|
const t = !!e?.showSearch, o = e.searchMode;
|
|
240
252
|
let l = {};
|
|
241
253
|
return t && (l = o === "request" ? {
|
|
242
254
|
defaultActiveFirstOption: !1,
|
|
243
|
-
onSearch:
|
|
255
|
+
onSearch: W,
|
|
244
256
|
notFoundContent: u.value ? void 0 : null,
|
|
245
257
|
filterOption: !1,
|
|
246
258
|
suffixIcon: null
|
|
247
259
|
} : {
|
|
248
|
-
filterOption:
|
|
260
|
+
filterOption: Ae(e?.filterOption) ? G : e?.filterOption
|
|
249
261
|
}), {
|
|
250
|
-
...
|
|
251
|
-
placeholder: n(
|
|
262
|
+
...z(e, ["mode", "value", "onUpdate:value", "onSearch", "request", "searchMode", "onFocus", "onBeforeSelect"]),
|
|
263
|
+
placeholder: n(Z),
|
|
252
264
|
...l
|
|
253
265
|
};
|
|
254
|
-
}),
|
|
255
|
-
function
|
|
266
|
+
}), oe = s(() => d.value.map((t) => t[e.fieldNames?.value || "value"])), F = s(() => d.value.filter((t) => !t.disabled).map((t) => t[e.fieldNames?.value || "value"])), D = s(() => !e.multiple || x(e.maxCount) ? !1 : Ve(e.addAll) ? oe.value.length >= e.addAll : !!e.addAll), le = s(() => e.multiple && e.allowOnlySelect && (!x(e.maxCount) || e.maxCount >= 1));
|
|
267
|
+
function ne() {
|
|
256
268
|
w.value?.focus();
|
|
257
269
|
}
|
|
258
|
-
function
|
|
270
|
+
function ae() {
|
|
259
271
|
w.value?.blur();
|
|
260
272
|
}
|
|
261
|
-
function
|
|
273
|
+
function O(t, o) {
|
|
262
274
|
const l = e.fieldNames?.[o] ?? o;
|
|
263
275
|
return t[l];
|
|
264
276
|
}
|
|
265
|
-
function
|
|
266
|
-
const o =
|
|
277
|
+
function se(t) {
|
|
278
|
+
const o = O(t, "value");
|
|
267
279
|
S(e.multiple ? [o] : o), e.onChange?.([o], [t]);
|
|
268
280
|
}
|
|
269
|
-
function
|
|
270
|
-
return
|
|
271
|
-
class:
|
|
272
|
-
}, [
|
|
273
|
-
class:
|
|
274
|
-
}, [
|
|
281
|
+
function ue(t) {
|
|
282
|
+
return A.option ? f("div", {
|
|
283
|
+
class: c("custom")
|
|
284
|
+
}, [A.option(t)]) : f("span", {
|
|
285
|
+
class: c("label")
|
|
286
|
+
}, [O(t, "label")]);
|
|
275
287
|
}
|
|
276
|
-
const
|
|
277
|
-
const t = n(p) || [], o =
|
|
288
|
+
const re = s(() => {
|
|
289
|
+
const t = n(p) || [], o = F.value;
|
|
278
290
|
return o.length > 0 && o.every((l) => t.includes(l));
|
|
279
|
-
}),
|
|
280
|
-
const t = n(p) || [], o =
|
|
291
|
+
}), ie = s(() => {
|
|
292
|
+
const t = n(p) || [], o = F.value, l = o.filter((i) => t.includes(i)).length;
|
|
281
293
|
return l > 0 && l < o.length;
|
|
282
294
|
});
|
|
283
|
-
function
|
|
284
|
-
const t = new Set(n(p) || []), o =
|
|
295
|
+
function ce() {
|
|
296
|
+
const t = new Set(n(p) || []), o = F.value;
|
|
285
297
|
o.length > 0 && o.every((a) => t.has(a)) ? o.forEach((a) => t.delete(a)) : o.forEach((a) => t.add(a));
|
|
286
|
-
const i =
|
|
298
|
+
const i = d.value.filter((a) => t.has(a[e.fieldNames?.value || "value"]));
|
|
287
299
|
S([...t]), e.onChange?.([...t], i);
|
|
288
300
|
}
|
|
289
|
-
return
|
|
290
|
-
focus:
|
|
291
|
-
blur:
|
|
292
|
-
request:
|
|
293
|
-
}), (t, o) => t.mode === "read" ? (m(),
|
|
301
|
+
return $({
|
|
302
|
+
focus: ne,
|
|
303
|
+
blur: ae,
|
|
304
|
+
request: y
|
|
305
|
+
}), (t, o) => t.mode === "read" ? (m(), M("span", qe, B(ee.value), 1)) : (m(), C(n(ke), ye({
|
|
294
306
|
key: 1,
|
|
295
307
|
ref_key: "selectRef",
|
|
296
308
|
ref: w,
|
|
297
309
|
"allow-clear": ""
|
|
298
|
-
},
|
|
299
|
-
mode:
|
|
310
|
+
}, te.value, {
|
|
311
|
+
mode: X.value,
|
|
300
312
|
value: n(p),
|
|
301
|
-
options: n(
|
|
313
|
+
options: n(d),
|
|
302
314
|
loading: u.value,
|
|
303
|
-
"menu-item-selected-icon":
|
|
304
|
-
"popup-class-name": `${n(b)("popup")} ${n(
|
|
305
|
-
open:
|
|
315
|
+
"menu-item-selected-icon": ge("span"),
|
|
316
|
+
"popup-class-name": `${n(b)("popup")} ${n(H)}`,
|
|
317
|
+
open: V.value,
|
|
306
318
|
"onUpdate:value": n(S),
|
|
307
|
-
onFocus:
|
|
308
|
-
onDropdownVisibleChange: o[0] || (o[0] = (l) =>
|
|
309
|
-
}),
|
|
310
|
-
option: h((l) => [
|
|
311
|
-
class: v(n(
|
|
312
|
-
}, [f(n(
|
|
319
|
+
onFocus: Y,
|
|
320
|
+
onDropdownVisibleChange: o[0] || (o[0] = (l) => V.value = l)
|
|
321
|
+
}), Ce({
|
|
322
|
+
option: h((l) => [N("div", {
|
|
323
|
+
class: v(n(c)("outter"))
|
|
324
|
+
}, [f(n(q), {
|
|
313
325
|
justify: "space-between",
|
|
314
326
|
align: "center",
|
|
315
|
-
class: v(n(
|
|
327
|
+
class: v(n(c)("wrapper")),
|
|
316
328
|
gap: 8
|
|
317
329
|
}, {
|
|
318
|
-
default: h(() => [f(n(
|
|
330
|
+
default: h(() => [f(n(q), {
|
|
319
331
|
gap: 8,
|
|
320
332
|
align: "center",
|
|
321
|
-
class: v(n(
|
|
333
|
+
class: v(n(c)("content-wrapper"))
|
|
322
334
|
}, {
|
|
323
|
-
default: h(() => [
|
|
335
|
+
default: h(() => [D.value ? (m(), C(n(L), {
|
|
324
336
|
key: 0,
|
|
325
|
-
checked: n(p)?.includes(
|
|
326
|
-
}, null, 8, ["checked"])) :
|
|
337
|
+
checked: n(p)?.includes(O(l, "value"))
|
|
338
|
+
}, null, 8, ["checked"])) : P("", !0), (m(), C(T(ue(l))))]),
|
|
327
339
|
_: 2
|
|
328
|
-
}, 1032, ["class"]),
|
|
340
|
+
}, 1032, ["class"]), le.value && !l?.disabled ? (m(), M("span", {
|
|
329
341
|
key: 0,
|
|
330
|
-
class: v(n(
|
|
331
|
-
onClick:
|
|
332
|
-
},
|
|
342
|
+
class: v(n(c)("action")),
|
|
343
|
+
onClick: be(() => se(l), ["stop"])
|
|
344
|
+
}, B(n(_)("ap.field.chooseOnly")), 11, Le)) : P("", !0)]),
|
|
333
345
|
_: 2
|
|
334
346
|
}, 1032, ["class"])], 2)]),
|
|
335
347
|
_: 2
|
|
336
|
-
}, [
|
|
348
|
+
}, [we(n(z)(t.$slots, ["option"]), (l, i) => ({
|
|
337
349
|
name: i,
|
|
338
|
-
fn: h((a) => [
|
|
350
|
+
fn: h((a) => [Se(t.$slots, i, Fe(Oe(a || {})))])
|
|
339
351
|
})), u.value ? {
|
|
340
352
|
name: "notFoundContent",
|
|
341
|
-
fn: h(() => [f(n(
|
|
353
|
+
fn: h(() => [f(n(Be), {
|
|
342
354
|
size: "small"
|
|
343
355
|
})]),
|
|
344
356
|
key: "0"
|
|
345
|
-
} : void 0,
|
|
357
|
+
} : void 0, D.value ? {
|
|
346
358
|
name: "dropdownRender",
|
|
347
359
|
fn: h(({
|
|
348
360
|
menuNode: l
|
|
349
|
-
}) => [
|
|
361
|
+
}) => [N("div", {
|
|
350
362
|
tabindex: -1,
|
|
351
363
|
class: v(n(b)("popup-all-option")),
|
|
352
|
-
onClick:
|
|
353
|
-
}, [f(n(
|
|
354
|
-
checked:
|
|
355
|
-
indeterminate:
|
|
356
|
-
}, null, 8, ["checked", "indeterminate"]),
|
|
364
|
+
onClick: ce
|
|
365
|
+
}, [f(n(L), {
|
|
366
|
+
checked: re.value,
|
|
367
|
+
indeterminate: ie.value
|
|
368
|
+
}, null, 8, ["checked", "indeterminate"]), N("span", {
|
|
357
369
|
class: v(n(b)("popup-all-option-label"))
|
|
358
|
-
},
|
|
370
|
+
}, B(n(_)("ap.field.selectAll")), 3)], 2), (m(), C(T(l)))]),
|
|
359
371
|
key: "1"
|
|
360
372
|
} : void 0]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "open", "onUpdate:value"]));
|
|
361
373
|
}
|
|
362
374
|
});
|
|
363
375
|
export {
|
|
364
|
-
|
|
376
|
+
Ze as default
|
|
365
377
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as i, computed as s, createElementBlock as
|
|
1
|
+
import { defineComponent as i, computed as s, createElementBlock as c, createCommentVNode as d, openBlock as u, toDisplayString as m } from "vue";
|
|
2
2
|
import { isArray as y } from "lodash-unified";
|
|
3
3
|
const f = { key: 0 }, C = /* @__PURE__ */ i({
|
|
4
4
|
name: "ApFieldSelectRead",
|
|
@@ -90,7 +90,8 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
|
|
|
90
90
|
"onUpdate:value": {},
|
|
91
91
|
searchMode: {},
|
|
92
92
|
refetchOnFocus: { type: Boolean },
|
|
93
|
-
|
|
93
|
+
fetchOnFocus: { type: Boolean },
|
|
94
|
+
lazy: { type: [Boolean, String] },
|
|
94
95
|
addAll: { type: [Boolean, Number] },
|
|
95
96
|
params: {},
|
|
96
97
|
searchDelay: {},
|
|
@@ -108,7 +109,7 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
|
|
|
108
109
|
(n) => n[a] === o
|
|
109
110
|
)?.[t] || e.emptyText;
|
|
110
111
|
});
|
|
111
|
-
return (o, t) => o.mode === "read" ? (u(),
|
|
112
|
+
return (o, t) => o.mode === "read" ? (u(), c("span", f, m(r.value), 1)) : d("", !0);
|
|
112
113
|
}
|
|
113
114
|
});
|
|
114
115
|
export {
|
|
@@ -169,8 +169,8 @@ declare function __VLS_template(): {
|
|
|
169
169
|
};
|
|
170
170
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
171
171
|
declare const __VLS_component: DefineComponent<ApFieldSliderProps, {
|
|
172
|
-
focus: () => void;
|
|
173
172
|
blur: () => void;
|
|
173
|
+
focus: () => void;
|
|
174
174
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
175
175
|
"update:value": (...args: any[]) => void;
|
|
176
176
|
}, string, PublicProps, Readonly<ApFieldSliderProps> & Readonly<{
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ApFieldSwitchProps } from '../interface';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent } from 'vue';
|
|
3
|
+
import { VueTypeDef, VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
4
|
+
import { FocusEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
|
|
5
|
+
import { VueNode, CustomSlotsType } from '@aplus-frontend/antdv/es/_util/type';
|
|
3
6
|
type ApFieldSwitchSlots = {
|
|
4
7
|
checkedChildren: any;
|
|
5
8
|
unCheckedChildren: any;
|
|
@@ -8,11 +11,125 @@ type ApFieldSwitchSlots = {
|
|
|
8
11
|
declare function __VLS_template(): {
|
|
9
12
|
attrs: Partial<{}>;
|
|
10
13
|
slots: Readonly<ApFieldSwitchSlots> & ApFieldSwitchSlots;
|
|
11
|
-
refs: {
|
|
14
|
+
refs: {
|
|
15
|
+
switchRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
16
|
+
id: StringConstructor;
|
|
17
|
+
prefixCls: StringConstructor;
|
|
18
|
+
size: VueTypeDef<"default" | "small">;
|
|
19
|
+
disabled: {
|
|
20
|
+
type: BooleanConstructor;
|
|
21
|
+
default: any;
|
|
22
|
+
};
|
|
23
|
+
checkedChildren: VueTypeValidableDef<any>;
|
|
24
|
+
unCheckedChildren: VueTypeValidableDef<any>;
|
|
25
|
+
tabindex: VueTypeDef<string | number>;
|
|
26
|
+
autofocus: {
|
|
27
|
+
type: BooleanConstructor;
|
|
28
|
+
default: any;
|
|
29
|
+
};
|
|
30
|
+
loading: {
|
|
31
|
+
type: BooleanConstructor;
|
|
32
|
+
default: any;
|
|
33
|
+
};
|
|
34
|
+
checked: VueTypeDef<string | number | boolean>;
|
|
35
|
+
checkedValue: VueTypeDef<string | number | boolean> & {
|
|
36
|
+
default: string | number | boolean;
|
|
37
|
+
};
|
|
38
|
+
unCheckedValue: VueTypeDef<string | number | boolean> & {
|
|
39
|
+
default: string | number | boolean;
|
|
40
|
+
};
|
|
41
|
+
onChange: {
|
|
42
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
43
|
+
};
|
|
44
|
+
onClick: {
|
|
45
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
46
|
+
};
|
|
47
|
+
onKeydown: {
|
|
48
|
+
type: PropType<(e: Event) => void>;
|
|
49
|
+
};
|
|
50
|
+
onMouseup: {
|
|
51
|
+
type: PropType<(e: Event) => void>;
|
|
52
|
+
};
|
|
53
|
+
'onUpdate:checked': {
|
|
54
|
+
type: PropType<(checked: string | number | boolean) => void>;
|
|
55
|
+
};
|
|
56
|
+
onBlur: PropType<FocusEventHandler>;
|
|
57
|
+
onFocus: PropType<FocusEventHandler>;
|
|
58
|
+
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
59
|
+
disabled: boolean;
|
|
60
|
+
autofocus: boolean;
|
|
61
|
+
loading: boolean;
|
|
62
|
+
checkedValue: string | number | boolean;
|
|
63
|
+
unCheckedValue: string | number | boolean;
|
|
64
|
+
}, true, {}, CustomSlotsType<{
|
|
65
|
+
checkedChildren: any;
|
|
66
|
+
unCheckedChildren: any;
|
|
67
|
+
default: any;
|
|
68
|
+
}>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
69
|
+
P: {};
|
|
70
|
+
B: {};
|
|
71
|
+
D: {};
|
|
72
|
+
C: {};
|
|
73
|
+
M: {};
|
|
74
|
+
Defaults: {};
|
|
75
|
+
}, Readonly< ExtractPropTypes<{
|
|
76
|
+
id: StringConstructor;
|
|
77
|
+
prefixCls: StringConstructor;
|
|
78
|
+
size: VueTypeDef<"default" | "small">;
|
|
79
|
+
disabled: {
|
|
80
|
+
type: BooleanConstructor;
|
|
81
|
+
default: any;
|
|
82
|
+
};
|
|
83
|
+
checkedChildren: VueTypeValidableDef<any>;
|
|
84
|
+
unCheckedChildren: VueTypeValidableDef<any>;
|
|
85
|
+
tabindex: VueTypeDef<string | number>;
|
|
86
|
+
autofocus: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: any;
|
|
89
|
+
};
|
|
90
|
+
loading: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: any;
|
|
93
|
+
};
|
|
94
|
+
checked: VueTypeDef<string | number | boolean>;
|
|
95
|
+
checkedValue: VueTypeDef<string | number | boolean> & {
|
|
96
|
+
default: string | number | boolean;
|
|
97
|
+
};
|
|
98
|
+
unCheckedValue: VueTypeDef<string | number | boolean> & {
|
|
99
|
+
default: string | number | boolean;
|
|
100
|
+
};
|
|
101
|
+
onChange: {
|
|
102
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
103
|
+
};
|
|
104
|
+
onClick: {
|
|
105
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
106
|
+
};
|
|
107
|
+
onKeydown: {
|
|
108
|
+
type: PropType<(e: Event) => void>;
|
|
109
|
+
};
|
|
110
|
+
onMouseup: {
|
|
111
|
+
type: PropType<(e: Event) => void>;
|
|
112
|
+
};
|
|
113
|
+
'onUpdate:checked': {
|
|
114
|
+
type: PropType<(checked: string | number | boolean) => void>;
|
|
115
|
+
};
|
|
116
|
+
onBlur: PropType<FocusEventHandler>;
|
|
117
|
+
onFocus: PropType<FocusEventHandler>;
|
|
118
|
+
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
119
|
+
disabled: boolean;
|
|
120
|
+
autofocus: boolean;
|
|
121
|
+
loading: boolean;
|
|
122
|
+
checkedValue: string | number | boolean;
|
|
123
|
+
unCheckedValue: string | number | boolean;
|
|
124
|
+
}> | null;
|
|
125
|
+
};
|
|
12
126
|
rootEl: any;
|
|
13
127
|
};
|
|
14
128
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
-
declare const __VLS_component: DefineComponent<ApFieldSwitchProps, {
|
|
129
|
+
declare const __VLS_component: DefineComponent<ApFieldSwitchProps, {
|
|
130
|
+
blur: () => void;
|
|
131
|
+
focus: () => void;
|
|
132
|
+
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
16
133
|
"update:checked": (...args: any[]) => void;
|
|
17
134
|
}, string, PublicProps, Readonly<ApFieldSwitchProps> & Readonly<{
|
|
18
135
|
"onUpdate:checked"?: ((...args: any[]) => any) | undefined;
|
|
@@ -23,7 +140,118 @@ declare const __VLS_component: DefineComponent<ApFieldSwitchProps, {}, {}, {}, {
|
|
|
23
140
|
emptyText: string;
|
|
24
141
|
checkedValue: string | number | boolean;
|
|
25
142
|
unCheckedValue: string | number | boolean;
|
|
26
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
143
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
144
|
+
switchRef: CreateComponentPublicInstanceWithMixins<Readonly< ExtractPropTypes<{
|
|
145
|
+
id: StringConstructor;
|
|
146
|
+
prefixCls: StringConstructor;
|
|
147
|
+
size: VueTypeDef<"default" | "small">;
|
|
148
|
+
disabled: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: any;
|
|
151
|
+
};
|
|
152
|
+
checkedChildren: VueTypeValidableDef<any>;
|
|
153
|
+
unCheckedChildren: VueTypeValidableDef<any>;
|
|
154
|
+
tabindex: VueTypeDef<string | number>;
|
|
155
|
+
autofocus: {
|
|
156
|
+
type: BooleanConstructor;
|
|
157
|
+
default: any;
|
|
158
|
+
};
|
|
159
|
+
loading: {
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
default: any;
|
|
162
|
+
};
|
|
163
|
+
checked: VueTypeDef<string | number | boolean>;
|
|
164
|
+
checkedValue: VueTypeDef<string | number | boolean> & {
|
|
165
|
+
default: string | number | boolean;
|
|
166
|
+
};
|
|
167
|
+
unCheckedValue: VueTypeDef<string | number | boolean> & {
|
|
168
|
+
default: string | number | boolean;
|
|
169
|
+
};
|
|
170
|
+
onChange: {
|
|
171
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
172
|
+
};
|
|
173
|
+
onClick: {
|
|
174
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
175
|
+
};
|
|
176
|
+
onKeydown: {
|
|
177
|
+
type: PropType<(e: Event) => void>;
|
|
178
|
+
};
|
|
179
|
+
onMouseup: {
|
|
180
|
+
type: PropType<(e: Event) => void>;
|
|
181
|
+
};
|
|
182
|
+
'onUpdate:checked': {
|
|
183
|
+
type: PropType<(checked: string | number | boolean) => void>;
|
|
184
|
+
};
|
|
185
|
+
onBlur: PropType<FocusEventHandler>;
|
|
186
|
+
onFocus: PropType<FocusEventHandler>;
|
|
187
|
+
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
|
|
188
|
+
disabled: boolean;
|
|
189
|
+
autofocus: boolean;
|
|
190
|
+
loading: boolean;
|
|
191
|
+
checkedValue: string | number | boolean;
|
|
192
|
+
unCheckedValue: string | number | boolean;
|
|
193
|
+
}, true, {}, CustomSlotsType<{
|
|
194
|
+
checkedChildren: any;
|
|
195
|
+
unCheckedChildren: any;
|
|
196
|
+
default: any;
|
|
197
|
+
}>, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
|
|
198
|
+
P: {};
|
|
199
|
+
B: {};
|
|
200
|
+
D: {};
|
|
201
|
+
C: {};
|
|
202
|
+
M: {};
|
|
203
|
+
Defaults: {};
|
|
204
|
+
}, Readonly< ExtractPropTypes<{
|
|
205
|
+
id: StringConstructor;
|
|
206
|
+
prefixCls: StringConstructor;
|
|
207
|
+
size: VueTypeDef<"default" | "small">;
|
|
208
|
+
disabled: {
|
|
209
|
+
type: BooleanConstructor;
|
|
210
|
+
default: any;
|
|
211
|
+
};
|
|
212
|
+
checkedChildren: VueTypeValidableDef<any>;
|
|
213
|
+
unCheckedChildren: VueTypeValidableDef<any>;
|
|
214
|
+
tabindex: VueTypeDef<string | number>;
|
|
215
|
+
autofocus: {
|
|
216
|
+
type: BooleanConstructor;
|
|
217
|
+
default: any;
|
|
218
|
+
};
|
|
219
|
+
loading: {
|
|
220
|
+
type: BooleanConstructor;
|
|
221
|
+
default: any;
|
|
222
|
+
};
|
|
223
|
+
checked: VueTypeDef<string | number | boolean>;
|
|
224
|
+
checkedValue: VueTypeDef<string | number | boolean> & {
|
|
225
|
+
default: string | number | boolean;
|
|
226
|
+
};
|
|
227
|
+
unCheckedValue: VueTypeDef<string | number | boolean> & {
|
|
228
|
+
default: string | number | boolean;
|
|
229
|
+
};
|
|
230
|
+
onChange: {
|
|
231
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
232
|
+
};
|
|
233
|
+
onClick: {
|
|
234
|
+
type: PropType<(checked: string | number | boolean, e: Event) => void>;
|
|
235
|
+
};
|
|
236
|
+
onKeydown: {
|
|
237
|
+
type: PropType<(e: Event) => void>;
|
|
238
|
+
};
|
|
239
|
+
onMouseup: {
|
|
240
|
+
type: PropType<(e: Event) => void>;
|
|
241
|
+
};
|
|
242
|
+
'onUpdate:checked': {
|
|
243
|
+
type: PropType<(checked: string | number | boolean) => void>;
|
|
244
|
+
};
|
|
245
|
+
onBlur: PropType<FocusEventHandler>;
|
|
246
|
+
onFocus: PropType<FocusEventHandler>;
|
|
247
|
+
}>> & Readonly<{}>, () => VueNode, {}, {}, {}, {
|
|
248
|
+
disabled: boolean;
|
|
249
|
+
autofocus: boolean;
|
|
250
|
+
loading: boolean;
|
|
251
|
+
checkedValue: string | number | boolean;
|
|
252
|
+
unCheckedValue: string | number | boolean;
|
|
253
|
+
}> | null;
|
|
254
|
+
}, any>;
|
|
27
255
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
256
|
export default _default;
|
|
29
257
|
type __VLS_WithTemplateSlots<T, S> = T & {
|