@aplus-frontend/ui 0.4.2 → 0.4.3
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/helper.d.ts +1 -1
- package/es/src/ap-field/date/helper.mjs +9 -9
- package/es/src/ap-field/date/index.vue.mjs +33 -25
- package/es/src/ap-field/date-range/index.vue.mjs +44 -43
- package/es/src/ap-field/interface.d.ts +0 -6
- package/es/src/ap-field/segmented/index.vue.d.ts +7 -1
- package/es/src/ap-field/select/index.vue.d.ts +4 -20
- package/es/src/ap-field/select/index.vue.mjs +11 -11
- package/es/src/ap-field/text/index.vue.d.ts +13 -1
- package/es/src/ap-form/items/text/index.vue.d.ts +26 -2
- package/es/src/ap-table/constants.d.ts +28 -12
- package/es/src/ap-table/utils.d.ts +13 -1
- package/es/src/business/ap-batch-action/ApBatchAction.vue.d.ts +8 -4
- package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +45 -55
- package/es/src/business/ap-batch-action/index.d.ts +5 -3
- package/es/src/business/ap-group-search/ap-group-search.vue2.mjs +12 -12
- package/es/src/business/ap-group-search/extension-select/index.vue2.mjs +7 -7
- package/es/src/business/ap-group-search/index.d.ts +8 -34
- package/es/src/business/ap-group-search/popover-select/index.vue.d.ts +2 -10
- package/es/src/business/ap-group-search/popover-select/index.vue2.mjs +15 -15
- package/es/src/business/batch-input-group/index.vue.d.ts +13 -1
- package/lib/src/ap-field/date/helper.d.ts +1 -1
- package/lib/src/ap-field/date/helper.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +0 -6
- package/lib/src/ap-field/segmented/index.vue.d.ts +7 -1
- package/lib/src/ap-field/select/index.vue.d.ts +4 -20
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/text/index.vue.d.ts +13 -1
- package/lib/src/ap-form/items/text/index.vue.d.ts +26 -2
- package/lib/src/ap-table/constants.d.ts +28 -12
- package/lib/src/ap-table/utils.d.ts +13 -1
- package/lib/src/business/ap-batch-action/ApBatchAction.vue.d.ts +8 -4
- package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
- package/lib/src/business/ap-batch-action/index.d.ts +5 -3
- package/lib/src/business/ap-group-search/ap-group-search.vue2.js +1 -1
- package/lib/src/business/ap-group-search/extension-select/index.vue2.js +1 -1
- package/lib/src/business/ap-group-search/index.d.ts +8 -34
- package/lib/src/business/ap-group-search/popover-select/index.vue.d.ts +2 -10
- package/lib/src/business/ap-group-search/popover-select/index.vue2.js +2 -2
- package/lib/src/business/batch-input-group/index.vue.d.ts +13 -1
- package/package.json +3 -3
|
@@ -7,5 +7,5 @@ export declare const formatDay: (d: Dayjs, f: string, begin?: boolean) => number
|
|
|
7
7
|
* @param timezone
|
|
8
8
|
* @returns
|
|
9
9
|
*/
|
|
10
|
-
export declare function formatDayWithTimezone(timezone?: ZoneAlias): (d: Dayjs, f
|
|
10
|
+
export declare function formatDayWithTimezone(timezone?: ZoneAlias): (d: Dayjs, f?: string, begin?: boolean) => number | null;
|
|
11
11
|
export declare const formatValue: (v: EventValue<Dayjs>) => number | null;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { getUtcTimestamp as m } from "@aplus-frontend/utils";
|
|
2
2
|
import n from "dayjs";
|
|
3
|
-
const i = (
|
|
4
|
-
if (!
|
|
3
|
+
const i = (e, r, o = !0) => {
|
|
4
|
+
if (!e)
|
|
5
5
|
return null;
|
|
6
|
-
let t =
|
|
7
|
-
return t = t.millisecond(0),
|
|
6
|
+
let t = e.clone();
|
|
7
|
+
return t = t.millisecond(0), r.indexOf("ss") === -1 && (t = t.second(o ? 0 : 59)), r.indexOf("mm") === -1 && (t = t.minute(o ? 0 : 59)), r.indexOf("HH") === -1 && (t = t.hour(o ? 0 : 23)), r.indexOf("DD") === -1 && (t = t.date(o ? 1 : 0), o || (t = t.month(t.month() + 1))), r.indexOf("MM") === -1 && (t = t.month(o ? 0 : 12)), t.valueOf();
|
|
8
8
|
};
|
|
9
|
-
function d(
|
|
10
|
-
return (
|
|
11
|
-
const f = i(
|
|
12
|
-
return
|
|
9
|
+
function d(e) {
|
|
10
|
+
return (r, o, t = !0) => {
|
|
11
|
+
const f = o ? i(r, o, t) : r.valueOf();
|
|
12
|
+
return e ? m(n(f), e) : f;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
const l = (
|
|
15
|
+
const l = (e) => e && e.valueOf();
|
|
16
16
|
export {
|
|
17
17
|
i as formatDay,
|
|
18
18
|
d as formatDayWithTimezone,
|
|
@@ -87,20 +87,20 @@ const le = /* @__PURE__ */ b({
|
|
|
87
87
|
},
|
|
88
88
|
emits: ["update:value"],
|
|
89
89
|
setup(h, { emit: B }) {
|
|
90
|
-
const e = h, k = B, { value: p, updateValue:
|
|
90
|
+
const e = h, k = B, { value: p, updateValue: c } = Z(
|
|
91
91
|
e,
|
|
92
92
|
k
|
|
93
|
-
), P = Y("Date", e),
|
|
93
|
+
), P = Y("Date", e), n = i(
|
|
94
94
|
() => I.indexOf(e.format) > -1
|
|
95
95
|
), d = i(
|
|
96
|
-
() =>
|
|
97
|
-
),
|
|
96
|
+
() => n.value ? H[e.format] : e.format
|
|
97
|
+
), m = i(() => {
|
|
98
98
|
if (y(t(p)))
|
|
99
99
|
return;
|
|
100
100
|
let o = r(t(p));
|
|
101
101
|
return e.timezone && (o = r(W(t(p), e.timezone))), o;
|
|
102
|
-
}), g = i(() => t(
|
|
103
|
-
const o = t(
|
|
102
|
+
}), g = i(() => t(n) ? e.picker ?? U[e.format] : e.picker), C = i(() => {
|
|
103
|
+
const o = t(n) ? K[e.format] : {};
|
|
104
104
|
return {
|
|
105
105
|
...$(e, [
|
|
106
106
|
"value",
|
|
@@ -114,39 +114,47 @@ const le = /* @__PURE__ */ b({
|
|
|
114
114
|
placeholder: t(P),
|
|
115
115
|
...o
|
|
116
116
|
};
|
|
117
|
-
}),
|
|
118
|
-
function
|
|
117
|
+
}), f = L(e.timezone);
|
|
118
|
+
function O(o) {
|
|
119
119
|
if (y(o)) {
|
|
120
|
-
|
|
120
|
+
c(null);
|
|
121
121
|
return;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
|
|
123
|
+
const l = r(o);
|
|
124
|
+
c(
|
|
125
|
+
f(l, t(n) ? t(d) : void 0)
|
|
126
|
+
);
|
|
125
127
|
}
|
|
126
|
-
function T(o,
|
|
128
|
+
function T(o, l) {
|
|
127
129
|
var s;
|
|
128
|
-
const u = r(o),
|
|
129
|
-
|
|
130
|
+
const u = r(o), a = o ? f(
|
|
131
|
+
u,
|
|
132
|
+
t(n) ? t(d) : void 0
|
|
133
|
+
) : null;
|
|
134
|
+
(s = e.onChange) == null || s.call(e, a, l);
|
|
130
135
|
}
|
|
131
136
|
function S(o) {
|
|
132
|
-
var
|
|
133
|
-
const
|
|
134
|
-
|
|
137
|
+
var a;
|
|
138
|
+
const l = r(o), u = o ? f(
|
|
139
|
+
l,
|
|
140
|
+
t(n) ? t(d) : void 0
|
|
141
|
+
) : null;
|
|
142
|
+
(a = e.onOk) == null || a.call(e, u);
|
|
135
143
|
}
|
|
136
|
-
return (o,
|
|
137
|
-
M(R(
|
|
138
|
-
], 64)) : (v(), F(t(j), A({ key: 1 },
|
|
139
|
-
value:
|
|
144
|
+
return (o, l) => o.mode === "read" ? (v(), _(w, { key: 0 }, [
|
|
145
|
+
M(R(m.value ? t(r)(m.value).format(d.value) : o.emptyText), 1)
|
|
146
|
+
], 64)) : (v(), F(t(j), A({ key: 1 }, C.value, {
|
|
147
|
+
value: m.value,
|
|
140
148
|
format: d.value,
|
|
141
149
|
picker: g.value,
|
|
142
|
-
"onUpdate:value":
|
|
150
|
+
"onUpdate:value": O,
|
|
143
151
|
onChange: T,
|
|
144
152
|
onOk: S
|
|
145
153
|
}), D({ _: 2 }, [
|
|
146
|
-
x(o.$slots, (u,
|
|
147
|
-
name:
|
|
154
|
+
x(o.$slots, (u, a) => ({
|
|
155
|
+
name: a,
|
|
148
156
|
fn: E((s) => [
|
|
149
|
-
V(o.$slots,
|
|
157
|
+
V(o.$slots, a, z(N(s || {})))
|
|
150
158
|
])
|
|
151
159
|
}))
|
|
152
160
|
]), 1040, ["value", "format", "picker"]));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as U, useSlots as H, computed as
|
|
1
|
+
import { defineComponent as U, useSlots as H, computed as m, unref as n, isVNode as K, createVNode as T, Fragment as h, openBlock as g, createElementBlock as v, createTextVNode as B, toDisplayString as P, createBlock as O, resolveDynamicComponent as $, mergeProps as L, createSlots as W, renderList as Y, withCtx as Z, renderSlot as q, normalizeProps as G, guardReactiveProps as J } from "vue";
|
|
2
2
|
import { ApFieldDatePresetFormats as Q, PRESET_FORMAT_MAP as X, PRESET_FORMAT_PICK_MAP as ee, PRESET_FORMAT_TIME_MAP as oe } from "../date/constant.mjs";
|
|
3
3
|
import "../../hooks/index.mjs";
|
|
4
|
-
import { isNil as
|
|
5
|
-
import
|
|
4
|
+
import { isNil as b, omit as R, isString as c, isFunction as ne } from "lodash-unified";
|
|
5
|
+
import u from "dayjs";
|
|
6
6
|
import { DatePicker as te } from "@aplus-frontend/antdv";
|
|
7
|
-
import { formatDayWithTimezone as ae
|
|
7
|
+
import { formatDayWithTimezone as ae } from "../date/helper.mjs";
|
|
8
8
|
import { SwapRightOutlined as re } from "@ant-design/icons-vue";
|
|
9
9
|
import { omitUndefined as le } from "../../utils/index.mjs";
|
|
10
10
|
import { getTimeFormatToZone as w } from "@aplus-frontend/utils";
|
|
@@ -153,76 +153,77 @@ const Be = /* @__PURE__ */ U({
|
|
|
153
153
|
setup(_, {
|
|
154
154
|
emit: A
|
|
155
155
|
}) {
|
|
156
|
-
const o = _, F = A,
|
|
157
|
-
value:
|
|
158
|
-
updateValue:
|
|
159
|
-
} = de(o, F), N = ue("DateRange", o),
|
|
160
|
-
var
|
|
161
|
-
const e = n(
|
|
162
|
-
if (
|
|
156
|
+
const o = _, F = A, k = H(), d = m(() => Q.indexOf(o.format) > -1), i = m(() => d.value ? X[o.format] : o.format), {
|
|
157
|
+
value: y,
|
|
158
|
+
updateValue: C
|
|
159
|
+
} = de(o, F), N = ue("DateRange", o), f = ae(o.timezone), S = m(() => {
|
|
160
|
+
var a, l;
|
|
161
|
+
const e = n(y);
|
|
162
|
+
if (b(e) || !(e != null && e.length))
|
|
163
163
|
return e;
|
|
164
|
-
const
|
|
165
|
-
return [
|
|
166
|
-
}), x =
|
|
167
|
-
const e = n(
|
|
164
|
+
const r = o.timezone ? w(n(y)[0], o.timezone) : (a = n(y)) == null ? void 0 : a[0], t = o.timezone ? w(n(y)[1], o.timezone) : (l = n(y)) == null ? void 0 : l[1];
|
|
165
|
+
return [u(r), u(t)];
|
|
166
|
+
}), x = m(() => n(d) ? o.picker ?? ee[o.format] : o.picker), z = m(() => {
|
|
167
|
+
const e = n(d) ? oe[o.format] : {};
|
|
168
168
|
return {
|
|
169
|
-
...le(
|
|
169
|
+
...le(R(o, ["value", "onUpdate:value", "onChange", "onOk", "format", "mode"])),
|
|
170
170
|
placeholder: n(N),
|
|
171
171
|
...e
|
|
172
172
|
};
|
|
173
173
|
});
|
|
174
174
|
function E(e) {
|
|
175
175
|
if (!e) {
|
|
176
|
-
|
|
176
|
+
C(e);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
let
|
|
180
|
-
|
|
179
|
+
let r = c(e[0]) ? u(e[0]) : e[0], t = c(e[1]) ? u(e[1]) : e[1];
|
|
180
|
+
const a = n(d) ? n(i) : void 0;
|
|
181
|
+
C([f(r, a), f(t, a, !1)]);
|
|
181
182
|
}
|
|
182
183
|
function V(e) {
|
|
183
|
-
var
|
|
184
|
-
const
|
|
185
|
-
(
|
|
184
|
+
var p;
|
|
185
|
+
const r = c(e[0]) ? u(e[0]) : e[0], t = c(e[1]) ? u(e[1]) : e[1], a = n(d) ? n(i) : void 0, l = e[0] ? f(r, a) : null, s = e[1] ? f(t, a, !1) : null;
|
|
186
|
+
(p = o.onOk) == null || p.call(o, [l, s]);
|
|
186
187
|
}
|
|
187
|
-
function I(e,
|
|
188
|
-
var
|
|
189
|
-
if (
|
|
190
|
-
(
|
|
188
|
+
function I(e, r) {
|
|
189
|
+
var M, D;
|
|
190
|
+
if (b(e)) {
|
|
191
|
+
(M = o.onChange) == null || M.call(o, e, r);
|
|
191
192
|
return;
|
|
192
193
|
}
|
|
193
|
-
const t =
|
|
194
|
-
(
|
|
194
|
+
const t = c(e[0]) ? u(e[0]) : e[0], a = c(e[1]) ? u(e[1]) : e[1], l = n(d) ? n(i) : void 0, s = e[0] ? f(t, l) : null, p = e[1] ? f(a, l, !1) : null;
|
|
195
|
+
(D = o.onChange) == null || D.call(o, [s, p], r);
|
|
195
196
|
}
|
|
196
|
-
const j =
|
|
197
|
+
const j = m(() => {
|
|
197
198
|
var t;
|
|
198
199
|
const e = o.readModeSeparator;
|
|
199
200
|
if (e)
|
|
200
|
-
return K(e) || ne(e) ? o.readModeSeparator :
|
|
201
|
-
const
|
|
202
|
-
return
|
|
201
|
+
return K(e) || ne(e) ? o.readModeSeparator : T(h, null, [o.readModeSeparator]);
|
|
202
|
+
const r = (t = k.readModeSeparator) == null ? void 0 : t.call(k);
|
|
203
|
+
return r ? T(h, null, [r]) : re;
|
|
203
204
|
});
|
|
204
|
-
return (e,
|
|
205
|
-
var t,
|
|
206
|
-
return e.mode === "read" ? (
|
|
205
|
+
return (e, r) => {
|
|
206
|
+
var t, a;
|
|
207
|
+
return e.mode === "read" ? (g(), v(h, {
|
|
207
208
|
key: 0
|
|
208
|
-
}, [
|
|
209
|
+
}, [S.value ? (g(), v(h, {
|
|
209
210
|
key: 0
|
|
210
|
-
}, [
|
|
211
|
+
}, [B(P((t = S.value[0]) == null ? void 0 : t.format(i.value)) + " ", 1), (g(), O($(j.value))), B(" " + P((a = S.value[1]) == null ? void 0 : a.format(i.value)), 1)], 64)) : (g(), v(h, {
|
|
211
212
|
key: 1
|
|
212
|
-
}, [
|
|
213
|
+
}, [B(P(e.emptyText), 1)], 64))], 64)) : (g(), O(n(te).RangePicker, L({
|
|
213
214
|
key: 1
|
|
214
215
|
}, z.value, {
|
|
215
|
-
value:
|
|
216
|
+
value: S.value,
|
|
216
217
|
picker: x.value,
|
|
217
|
-
format:
|
|
218
|
+
format: i.value,
|
|
218
219
|
"onUpdate:value": E,
|
|
219
220
|
onChange: I,
|
|
220
221
|
onOk: V
|
|
221
222
|
}), W({
|
|
222
223
|
_: 2
|
|
223
|
-
}, [Y(n(
|
|
224
|
-
name:
|
|
225
|
-
fn: Z((
|
|
224
|
+
}, [Y(n(R)(e.$slots, "readModeSeparator"), (l, s) => ({
|
|
225
|
+
name: s,
|
|
226
|
+
fn: Z((p) => [q(e.$slots, s, G(J(p || {})))])
|
|
226
227
|
}))]), 1040, ["value", "picker", "format"]));
|
|
227
228
|
};
|
|
228
229
|
}
|
|
@@ -6,7 +6,6 @@ import { RangePickerProps } from '@aplus-frontend/antdv/es/date-picker/dayjs';
|
|
|
6
6
|
import { LiteralUnion } from '../type';
|
|
7
7
|
import { InputPasswordProps } from './text/input-password-props';
|
|
8
8
|
import { ZoneAlias } from '@aplus-frontend/utils';
|
|
9
|
-
import { SelectValue } from '@aplus-frontend/antdv/es/select';
|
|
10
9
|
export type FieldMode = 'read' | 'edit';
|
|
11
10
|
export type BasicApFieldProps<FieldPropsType = any> = {
|
|
12
11
|
mode?: FieldMode;
|
|
@@ -119,11 +118,6 @@ export type ApFieldSelectProps = BasicApFieldProps<Omit<SelectProps, 'mode' | 'v
|
|
|
119
118
|
* 是否延迟请求选项列表
|
|
120
119
|
*/
|
|
121
120
|
lazy?: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* 选中之前调用,如果返回false,则不更新值,支持异步
|
|
124
|
-
* @returns
|
|
125
|
-
*/
|
|
126
|
-
onBeforeSelect?: (newVal: SelectValue) => boolean | Promise<boolean>;
|
|
127
121
|
};
|
|
128
122
|
export type ApFieldSelectExpose = {
|
|
129
123
|
focus: () => void;
|
|
@@ -4,7 +4,13 @@ import { FieldMode } from '..';
|
|
|
4
4
|
declare function __VLS_template(): {
|
|
5
5
|
attrs: Partial<{}>;
|
|
6
6
|
slots: {
|
|
7
|
-
label?(_:
|
|
7
|
+
label?(_: {
|
|
8
|
+
value: string | number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
payload?: any;
|
|
11
|
+
title?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): any;
|
|
8
14
|
};
|
|
9
15
|
refs: {};
|
|
10
16
|
rootEl: any;
|
|
@@ -72,10 +72,6 @@ declare function __VLS_template(): {
|
|
|
72
72
|
type: PropType<(val: SelectValue) => void>;
|
|
73
73
|
default: (val: SelectValue) => void;
|
|
74
74
|
};
|
|
75
|
-
onBeforeSelect: {
|
|
76
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
77
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
78
|
-
};
|
|
79
75
|
children: PropType< VueNode[]>;
|
|
80
76
|
listHeight: NumberConstructor;
|
|
81
77
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -195,6 +191,7 @@ declare function __VLS_template(): {
|
|
|
195
191
|
type: BooleanConstructor;
|
|
196
192
|
default: any;
|
|
197
193
|
};
|
|
194
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
198
195
|
labelInValue: {
|
|
199
196
|
type: BooleanConstructor;
|
|
200
197
|
default: any;
|
|
@@ -223,7 +220,6 @@ declare function __VLS_template(): {
|
|
|
223
220
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
224
221
|
defaultActiveFirstOption: boolean;
|
|
225
222
|
labelInValue: boolean;
|
|
226
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
227
223
|
}, true, {}, CustomSlotsType<{
|
|
228
224
|
notFoundContent: any;
|
|
229
225
|
suffixIcon: any;
|
|
@@ -287,10 +283,6 @@ declare function __VLS_template(): {
|
|
|
287
283
|
type: PropType<(val: SelectValue) => void>;
|
|
288
284
|
default: (val: SelectValue) => void;
|
|
289
285
|
};
|
|
290
|
-
onBeforeSelect: {
|
|
291
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
292
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
293
|
-
};
|
|
294
286
|
children: PropType< VueNode[]>;
|
|
295
287
|
listHeight: NumberConstructor;
|
|
296
288
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -410,6 +402,7 @@ declare function __VLS_template(): {
|
|
|
410
402
|
type: BooleanConstructor;
|
|
411
403
|
default: any;
|
|
412
404
|
};
|
|
405
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
413
406
|
labelInValue: {
|
|
414
407
|
type: BooleanConstructor;
|
|
415
408
|
default: any;
|
|
@@ -438,7 +431,6 @@ declare function __VLS_template(): {
|
|
|
438
431
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
439
432
|
defaultActiveFirstOption: boolean;
|
|
440
433
|
labelInValue: boolean;
|
|
441
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
442
434
|
}> | null;
|
|
443
435
|
};
|
|
444
436
|
rootEl: any;
|
|
@@ -516,10 +508,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
516
508
|
type: PropType<(val: SelectValue) => void>;
|
|
517
509
|
default: (val: SelectValue) => void;
|
|
518
510
|
};
|
|
519
|
-
onBeforeSelect: {
|
|
520
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
521
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
522
|
-
};
|
|
523
511
|
children: PropType< VueNode[]>;
|
|
524
512
|
listHeight: NumberConstructor;
|
|
525
513
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -639,6 +627,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
639
627
|
type: BooleanConstructor;
|
|
640
628
|
default: any;
|
|
641
629
|
};
|
|
630
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
642
631
|
labelInValue: {
|
|
643
632
|
type: BooleanConstructor;
|
|
644
633
|
default: any;
|
|
@@ -667,7 +656,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
667
656
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
668
657
|
defaultActiveFirstOption: boolean;
|
|
669
658
|
labelInValue: boolean;
|
|
670
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
671
659
|
}, true, {}, CustomSlotsType<{
|
|
672
660
|
notFoundContent: any;
|
|
673
661
|
suffixIcon: any;
|
|
@@ -731,10 +719,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
731
719
|
type: PropType<(val: SelectValue) => void>;
|
|
732
720
|
default: (val: SelectValue) => void;
|
|
733
721
|
};
|
|
734
|
-
onBeforeSelect: {
|
|
735
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
736
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
737
|
-
};
|
|
738
722
|
children: PropType< VueNode[]>;
|
|
739
723
|
listHeight: NumberConstructor;
|
|
740
724
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -854,6 +838,7 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
854
838
|
type: BooleanConstructor;
|
|
855
839
|
default: any;
|
|
856
840
|
};
|
|
841
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
857
842
|
labelInValue: {
|
|
858
843
|
type: BooleanConstructor;
|
|
859
844
|
default: any;
|
|
@@ -882,7 +867,6 @@ declare const __VLS_component: DefineComponent<ApFieldSelectProps, {
|
|
|
882
867
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
883
868
|
defaultActiveFirstOption: boolean;
|
|
884
869
|
labelInValue: boolean;
|
|
885
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
886
870
|
}> | null;
|
|
887
871
|
}, any>;
|
|
888
872
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, ref as y, onMounted as L, computed as w, unref as a, openBlock as S, createElementBlock as R, toDisplayString as
|
|
1
|
+
import { defineComponent as _, ref as y, onMounted as L, computed as w, unref as a, openBlock as S, createElementBlock as R, toDisplayString as z, createBlock as D, mergeProps as U, createSlots as K, renderList as H, withCtx as B, renderSlot as $, normalizeProps as j, guardReactiveProps as E, createVNode as W } from "vue";
|
|
2
2
|
import { debounce as G, isFunction as g, isArray as J, isNil as Q, omit as X } from "lodash-unified";
|
|
3
3
|
import { Select as Y, Spin as Z } from "@aplus-frontend/antdv";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
@@ -25,7 +25,6 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
25
25
|
dropdownClassName: {},
|
|
26
26
|
placement: {},
|
|
27
27
|
status: {},
|
|
28
|
-
onBeforeSelect: {},
|
|
29
28
|
children: {},
|
|
30
29
|
listHeight: {},
|
|
31
30
|
onMouseenter: {},
|
|
@@ -84,6 +83,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
84
83
|
optionFilterProp: {},
|
|
85
84
|
optionLabelProp: {},
|
|
86
85
|
defaultActiveFirstOption: { type: Boolean, default: void 0 },
|
|
86
|
+
onClickOption: {},
|
|
87
87
|
labelInValue: { type: Boolean, default: void 0 },
|
|
88
88
|
emptyText: { default: "--" },
|
|
89
89
|
request: {},
|
|
@@ -107,11 +107,11 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
107
107
|
}).finally(() => {
|
|
108
108
|
u.value = !1;
|
|
109
109
|
});
|
|
110
|
-
}, 300), e = C,
|
|
110
|
+
}, 300), e = C, O = (o, t) => {
|
|
111
111
|
var n;
|
|
112
112
|
const l = ((n = e.fieldNames) == null ? void 0 : n.label) || "label";
|
|
113
113
|
return typeof (t == null ? void 0 : t[l]) == "string" && t[l].toLowerCase().indexOf(o.toLowerCase()) > -1;
|
|
114
|
-
}, { options: s, updateOptions: i } = te(e), c = y(), u = y((e == null ? void 0 : e.loading) || !1),
|
|
114
|
+
}, { options: s, updateOptions: i } = te(e), c = y(), u = y((e == null ? void 0 : e.loading) || !1), x = b;
|
|
115
115
|
async function f(o = !0) {
|
|
116
116
|
if (!g(e.request))
|
|
117
117
|
return;
|
|
@@ -127,7 +127,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
127
127
|
u.value = !1;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function I(o) {
|
|
131
131
|
var t;
|
|
132
132
|
(t = e.onFocus) == null || t.call(e, o), e.refetchOnFocus && r > 0 && !u.value && f(!0);
|
|
133
133
|
}
|
|
@@ -138,7 +138,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
138
138
|
}
|
|
139
139
|
f();
|
|
140
140
|
});
|
|
141
|
-
const { value: m, updateValue:
|
|
141
|
+
const { value: m, updateValue: P } = le(e, x), V = oe("Select", e), k = w(() => {
|
|
142
142
|
var d, v;
|
|
143
143
|
const o = a(m);
|
|
144
144
|
if (!o)
|
|
@@ -165,7 +165,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
165
165
|
notFoundContent: u.value ? void 0 : null
|
|
166
166
|
} : {
|
|
167
167
|
showArrow: !0,
|
|
168
|
-
filterOption: Q(e == null ? void 0 : e.filterOption) ?
|
|
168
|
+
filterOption: Q(e == null ? void 0 : e.filterOption) ? O : e == null ? void 0 : e.filterOption
|
|
169
169
|
}), {
|
|
170
170
|
...ee(
|
|
171
171
|
X(e, [
|
|
@@ -179,7 +179,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
179
179
|
"onBeforeSelect"
|
|
180
180
|
])
|
|
181
181
|
),
|
|
182
|
-
placeholder: a(
|
|
182
|
+
placeholder: a(V),
|
|
183
183
|
...l
|
|
184
184
|
};
|
|
185
185
|
});
|
|
@@ -195,7 +195,7 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
195
195
|
focus: A,
|
|
196
196
|
blur: M,
|
|
197
197
|
request: f
|
|
198
|
-
}), (o, t) => o.mode === "read" ? (S(), R("span", ne,
|
|
198
|
+
}), (o, t) => o.mode === "read" ? (S(), R("span", ne, z(k.value), 1)) : (S(), D(a(Y), U({
|
|
199
199
|
key: 1,
|
|
200
200
|
ref_key: "selectRef",
|
|
201
201
|
ref: c,
|
|
@@ -205,8 +205,8 @@ const ne = { key: 0 }, pe = /* @__PURE__ */ _({
|
|
|
205
205
|
value: a(m),
|
|
206
206
|
options: a(s),
|
|
207
207
|
loading: u.value,
|
|
208
|
-
"onUpdate:value": a(
|
|
209
|
-
onFocus:
|
|
208
|
+
"onUpdate:value": a(P),
|
|
209
|
+
onFocus: I
|
|
210
210
|
}), K({ _: 2 }, [
|
|
211
211
|
H(o.$slots, (l, n) => ({
|
|
212
212
|
name: n,
|
|
@@ -2,7 +2,19 @@ import { ApFieldTextProps } from '../interface';
|
|
|
2
2
|
import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
|
|
3
3
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
4
|
import { FieldMode } from '..';
|
|
5
|
-
|
|
5
|
+
type ApFieldTextSlots = {
|
|
6
|
+
addonAfter?: any;
|
|
7
|
+
addonBefore?: any;
|
|
8
|
+
prefix?: any;
|
|
9
|
+
suffix?: any;
|
|
10
|
+
clearIcon?: any;
|
|
11
|
+
};
|
|
12
|
+
declare function __VLS_template(): {
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
slots: Readonly<ApFieldTextSlots> & ApFieldTextSlots;
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
6
18
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
7
19
|
declare const __VLS_component: DefineComponent<ApFieldTextProps, {
|
|
8
20
|
focus: (options?: InputFocusOptions) => void;
|
|
@@ -145,7 +145,19 @@ declare function __VLS_template(): {
|
|
|
145
145
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
146
146
|
select: () => void;
|
|
147
147
|
}> & {} & ComponentCustomProperties & {} & {
|
|
148
|
-
$slots:
|
|
148
|
+
$slots: Readonly<{
|
|
149
|
+
addonAfter?: any;
|
|
150
|
+
addonBefore?: any;
|
|
151
|
+
prefix?: any;
|
|
152
|
+
suffix?: any;
|
|
153
|
+
clearIcon?: any;
|
|
154
|
+
}> & {
|
|
155
|
+
addonAfter?: any;
|
|
156
|
+
addonBefore?: any;
|
|
157
|
+
prefix?: any;
|
|
158
|
+
suffix?: any;
|
|
159
|
+
clearIcon?: any;
|
|
160
|
+
};
|
|
149
161
|
}) | null;
|
|
150
162
|
};
|
|
151
163
|
rootEl: any;
|
|
@@ -288,7 +300,19 @@ declare const __VLS_component: DefineComponent<ApFormItemTextProps, {
|
|
|
288
300
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
289
301
|
select: () => void;
|
|
290
302
|
}> & {} & ComponentCustomProperties & {} & {
|
|
291
|
-
$slots:
|
|
303
|
+
$slots: Readonly<{
|
|
304
|
+
addonAfter?: any;
|
|
305
|
+
addonBefore?: any;
|
|
306
|
+
prefix?: any;
|
|
307
|
+
suffix?: any;
|
|
308
|
+
clearIcon?: any;
|
|
309
|
+
}> & {
|
|
310
|
+
addonAfter?: any;
|
|
311
|
+
addonBefore?: any;
|
|
312
|
+
prefix?: any;
|
|
313
|
+
suffix?: any;
|
|
314
|
+
clearIcon?: any;
|
|
315
|
+
};
|
|
292
316
|
}) | null;
|
|
293
317
|
}, any>;
|
|
294
318
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
@@ -1117,7 +1117,19 @@ export declare const apTableFormItemMap: {
|
|
|
1117
1117
|
setSelectionRange: (start: number, end: number, direction?: "forward" | "backward" | "none") => void;
|
|
1118
1118
|
select: () => void;
|
|
1119
1119
|
}> & {} & ComponentCustomProperties & {} & {
|
|
1120
|
-
$slots:
|
|
1120
|
+
$slots: Readonly<{
|
|
1121
|
+
addonAfter?: any;
|
|
1122
|
+
addonBefore?: any;
|
|
1123
|
+
prefix?: any;
|
|
1124
|
+
suffix?: any;
|
|
1125
|
+
clearIcon?: any;
|
|
1126
|
+
}> & {
|
|
1127
|
+
addonAfter?: any;
|
|
1128
|
+
addonBefore?: any;
|
|
1129
|
+
prefix?: any;
|
|
1130
|
+
suffix?: any;
|
|
1131
|
+
clearIcon?: any;
|
|
1132
|
+
};
|
|
1121
1133
|
}) | null;
|
|
1122
1134
|
}, any, ComponentProvideOptions, {
|
|
1123
1135
|
P: {};
|
|
@@ -2645,10 +2657,6 @@ export declare const apTableRenderItemMap: {
|
|
|
2645
2657
|
type: PropType<(val: SelectValue) => void>;
|
|
2646
2658
|
default: (val: SelectValue) => void;
|
|
2647
2659
|
};
|
|
2648
|
-
onBeforeSelect: {
|
|
2649
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
2650
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
2651
|
-
};
|
|
2652
2660
|
children: PropType< VueNode[]>;
|
|
2653
2661
|
listHeight: NumberConstructor;
|
|
2654
2662
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -2768,6 +2776,7 @@ export declare const apTableRenderItemMap: {
|
|
|
2768
2776
|
type: BooleanConstructor;
|
|
2769
2777
|
default: any;
|
|
2770
2778
|
};
|
|
2779
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
2771
2780
|
labelInValue: {
|
|
2772
2781
|
type: BooleanConstructor;
|
|
2773
2782
|
default: any;
|
|
@@ -2796,7 +2805,6 @@ export declare const apTableRenderItemMap: {
|
|
|
2796
2805
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
2797
2806
|
defaultActiveFirstOption: boolean;
|
|
2798
2807
|
labelInValue: boolean;
|
|
2799
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
2800
2808
|
}, true, {}, CustomSlotsType<{
|
|
2801
2809
|
notFoundContent: any;
|
|
2802
2810
|
suffixIcon: any;
|
|
@@ -2860,10 +2868,6 @@ export declare const apTableRenderItemMap: {
|
|
|
2860
2868
|
type: PropType<(val: SelectValue) => void>;
|
|
2861
2869
|
default: (val: SelectValue) => void;
|
|
2862
2870
|
};
|
|
2863
|
-
onBeforeSelect: {
|
|
2864
|
-
type: PropType<(nextVal: SelectValue) => boolean | Promise<boolean>>;
|
|
2865
|
-
default: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
2866
|
-
};
|
|
2867
2871
|
children: PropType< VueNode[]>;
|
|
2868
2872
|
listHeight: NumberConstructor;
|
|
2869
2873
|
onMouseenter: PropType<(e: MouseEvent) => void>;
|
|
@@ -2983,6 +2987,7 @@ export declare const apTableRenderItemMap: {
|
|
|
2983
2987
|
type: BooleanConstructor;
|
|
2984
2988
|
default: any;
|
|
2985
2989
|
};
|
|
2990
|
+
onClickOption: PropType<(e: MouseEvent, value: SelectValue, selected: boolean) => boolean | Promise<boolean>>;
|
|
2986
2991
|
labelInValue: {
|
|
2987
2992
|
type: BooleanConstructor;
|
|
2988
2993
|
default: any;
|
|
@@ -3011,7 +3016,6 @@ export declare const apTableRenderItemMap: {
|
|
|
3011
3016
|
filterOption: boolean | FilterFunc<DefaultOptionType>;
|
|
3012
3017
|
defaultActiveFirstOption: boolean;
|
|
3013
3018
|
labelInValue: boolean;
|
|
3014
|
-
onBeforeSelect: (nextVal: SelectValue) => boolean | Promise<boolean>;
|
|
3015
3019
|
}> | null;
|
|
3016
3020
|
}, any, ComponentProvideOptions, {
|
|
3017
3021
|
P: {};
|
|
@@ -3226,7 +3230,19 @@ export declare const apTableRenderItemMap: {
|
|
|
3226
3230
|
allowClear: boolean;
|
|
3227
3231
|
emptyText: string;
|
|
3228
3232
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
|
|
3229
|
-
$slots:
|
|
3233
|
+
$slots: Readonly<{
|
|
3234
|
+
addonAfter?: any;
|
|
3235
|
+
addonBefore?: any;
|
|
3236
|
+
prefix?: any;
|
|
3237
|
+
suffix?: any;
|
|
3238
|
+
clearIcon?: any;
|
|
3239
|
+
}> & {
|
|
3240
|
+
addonAfter?: any;
|
|
3241
|
+
addonBefore?: any;
|
|
3242
|
+
prefix?: any;
|
|
3243
|
+
suffix?: any;
|
|
3244
|
+
clearIcon?: any;
|
|
3245
|
+
};
|
|
3230
3246
|
}) & {
|
|
3231
3247
|
Password: typeof ApFieldPassword;
|
|
3232
3248
|
};
|