@aplus-frontend/ui 7.13.1 → 7.13.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/ag-grid/components/empty/index.vue.d.ts +4 -1
- package/es/src/ag-grid/components/empty/index.vue2.mjs +20 -10
- package/es/src/ag-grid/editable/form-item.vue.mjs +9 -8
- package/es/src/ag-grid/editable/index.vue.mjs +1 -0
- package/es/src/ag-grid/index.vue.mjs +54 -51
- package/es/src/ag-grid/interface.d.ts +4 -0
- package/es/src/ag-grid/style/index.mjs +5 -5
- package/es/src/ap-field/interface.d.ts +5 -0
- package/es/src/ap-field/select/index.vue.d.ts +2 -0
- package/es/src/ap-field/select/index.vue.mjs +150 -124
- package/es/src/ap-field/select/read.vue2.mjs +2 -1
- package/es/src/ap-field/select/use-select-options.mjs +12 -30
- package/es/src/ap-field/style/select.mjs +30 -19
- package/es/src/ap-form/items/select/index.vue.d.ts +12 -2
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +135 -128
- package/es/src/ap-table/constants.d.ts +6 -1
- package/es/src/business/ap-attachment/style/index.mjs +3 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
- package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +296 -161
- package/es/src/business/ap-export-group/index.d.ts +4 -1
- package/es/src/business/ap-export-group/interface.d.ts +31 -0
- package/es/src/business/ap-export-group/style/index.d.ts +5 -0
- package/es/src/business/ap-export-group/style/index.mjs +17 -0
- package/es/src/business/ap-file-preview/utils/create-file-preview-modal.mjs +3 -2
- package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
- package/es/src/business/ap-view/style/index.mjs +3 -2
- package/es/src/config-provider/config-provider-props.d.ts +7 -6
- package/es/src/config-provider/config-provider-props.mjs +4 -4
- package/es/src/config-provider/config-provider.d.ts +35 -11
- package/es/src/config-provider/config-provider.mjs +24 -24
- package/es/src/config-provider/hooks/use-global-config.d.ts +14 -6
- package/es/src/config-provider/index.d.ts +65 -17
- package/es/src/locale/lang/en.mjs +7 -3
- package/es/src/locale/lang/zh-cn.mjs +6 -2
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/empty/index.vue.d.ts +4 -1
- package/lib/src/ag-grid/components/empty/index.vue2.js +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 +4 -0
- package/lib/src/ag-grid/style/index.js +1 -1
- package/lib/src/ap-field/interface.d.ts +5 -0
- package/lib/src/ap-field/select/index.vue.d.ts +2 -0
- 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/select/use-select-options.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-form/items/select/index.vue.d.ts +12 -2
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/constants.d.ts +6 -1
- package/lib/src/business/ap-attachment/style/index.js +1 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
- package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
- package/lib/src/business/ap-export-group/index.d.ts +4 -1
- package/lib/src/business/ap-export-group/interface.d.ts +31 -0
- package/lib/src/business/ap-export-group/style/index.d.ts +5 -0
- package/lib/src/business/ap-export-group/style/index.js +1 -0
- package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.js +1 -1
- package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
- package/lib/src/business/ap-view/style/index.js +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +7 -6
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +35 -11
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +14 -6
- package/lib/src/config-provider/index.d.ts +65 -17
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Select as
|
|
3
|
-
import { debounce as
|
|
1
|
+
import { defineComponent as Z, ref as V, shallowRef as ee, computed as s, onMounted as oe, watch as te, unref as n, createElementBlock as I, createBlock as k, openBlock as p, toDisplayString as w, mergeProps as le, h as ne, createSlots as ae, withCtx as d, createVNode as C, normalizeClass as f, createCommentVNode as _, createElementVNode as F, withModifiers as re, renderList as se, renderSlot as ue, normalizeProps as ie, guardReactiveProps as de, resolveDynamicComponent as ce } from "vue";
|
|
2
|
+
import { Select as pe, Flex as fe, Space as me, Checkbox as M, Spin as ve } from "@aplus-frontend/antdv";
|
|
3
|
+
import { debounce as he, isFunction as P, isArray as ye, isNil as ge, omit as we, isNumber as Ce } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../hooks/index.mjs";
|
|
6
|
-
import { useDefaultPlaceholder as
|
|
7
|
-
import
|
|
8
|
-
import { useSelectOptions as
|
|
9
|
-
import { useNamespace as
|
|
10
|
-
import { useLocale as
|
|
11
|
-
import { useControllableValue as
|
|
12
|
-
const
|
|
6
|
+
import { useDefaultPlaceholder as Se } from "../hooks/use-default-placeholder.mjs";
|
|
7
|
+
import be from "../style/index.mjs";
|
|
8
|
+
import { useSelectOptions as Be } from "./use-select-options.mjs";
|
|
9
|
+
import { useNamespace as ke } from "../../config-provider/hooks/use-namespace.mjs";
|
|
10
|
+
import { useLocale as Fe } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useControllableValue as Ne } from "../../hooks/useControllableValue.mjs";
|
|
12
|
+
const Oe = { key: 0 }, xe = ["onClick"], ze = /* @__PURE__ */ Z({
|
|
13
13
|
name: "ApFieldSelect",
|
|
14
14
|
__name: "index",
|
|
15
15
|
props: {
|
|
@@ -100,80 +100,81 @@ const be = { key: 0 }, Be = ["onClick"], Pe = /* @__PURE__ */ Y({
|
|
|
100
100
|
searchMode: { default: "filter" },
|
|
101
101
|
refetchOnFocus: { type: Boolean, default: !1 },
|
|
102
102
|
lazy: { type: Boolean, default: !1 },
|
|
103
|
-
addAll: { type: [Boolean, Number] },
|
|
103
|
+
addAll: { type: [Boolean, Number], default: 5 },
|
|
104
104
|
params: {},
|
|
105
|
-
searchDelay: { default: 300 }
|
|
105
|
+
searchDelay: { default: 300 },
|
|
106
|
+
allowOnlySelect: { type: Boolean, default: !0 }
|
|
106
107
|
},
|
|
107
108
|
emits: ["update:value"],
|
|
108
|
-
setup(
|
|
109
|
+
setup(T, { expose: q, emit: D }) {
|
|
109
110
|
let r = 0;
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
111
|
+
const e = T, { b: u } = ke("field-select"), R = be("field"), N = V(!1), { t: O } = Fe(), L = he((o) => {
|
|
112
|
+
if (!P(e.request))
|
|
112
113
|
return;
|
|
113
114
|
r += 1;
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
r ===
|
|
115
|
+
const l = r;
|
|
116
|
+
v([]), a.value = !0, e.request(o).then((t) => {
|
|
117
|
+
r === l && (v(t), a.value = !1);
|
|
117
118
|
});
|
|
118
|
-
},
|
|
119
|
-
const
|
|
120
|
-
return typeof
|
|
121
|
-
}, { options:
|
|
122
|
-
if (
|
|
123
|
-
return
|
|
119
|
+
}, e.searchDelay), z = (o, l) => {
|
|
120
|
+
const t = e.fieldNames?.label || "label";
|
|
121
|
+
return typeof l?.[t] == "string" && l[t].toLowerCase().indexOf(o.toLowerCase()) > -1;
|
|
122
|
+
}, { options: m, updateOptions: v } = Be(e), S = ee(), a = V(e?.loading || !1), U = D, $ = s(() => {
|
|
123
|
+
if (e.multiple)
|
|
124
|
+
return e.tokenSeparators ? "tags" : "multiple";
|
|
124
125
|
});
|
|
125
|
-
async function
|
|
126
|
-
if (!
|
|
126
|
+
async function h(o = !0) {
|
|
127
|
+
if (!P(e.request))
|
|
127
128
|
return;
|
|
128
|
-
|
|
129
|
-
const
|
|
129
|
+
a.value = !0, r += 1;
|
|
130
|
+
const l = r;
|
|
130
131
|
try {
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
132
|
+
o && v([]);
|
|
133
|
+
const t = await e.request(void 0, e.params);
|
|
134
|
+
if (l !== r)
|
|
134
135
|
return;
|
|
135
|
-
|
|
136
|
+
v(t);
|
|
136
137
|
} finally {
|
|
137
|
-
|
|
138
|
+
a.value = !1;
|
|
138
139
|
}
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
-
|
|
141
|
+
function K(o) {
|
|
142
|
+
e.onFocus?.(o), e.refetchOnFocus && r > 0 && !a.value && h(!0);
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}),
|
|
146
|
-
() =>
|
|
144
|
+
oe(() => {
|
|
145
|
+
e.lazy || h();
|
|
146
|
+
}), te(
|
|
147
|
+
() => e.params,
|
|
147
148
|
() => {
|
|
148
|
-
|
|
149
|
+
h();
|
|
149
150
|
},
|
|
150
151
|
{
|
|
151
152
|
deep: !0
|
|
152
153
|
}
|
|
153
154
|
);
|
|
154
|
-
const { value:
|
|
155
|
-
const
|
|
156
|
-
if (!
|
|
157
|
-
return
|
|
158
|
-
const
|
|
159
|
-
return
|
|
160
|
-
(
|
|
161
|
-
).filter(Boolean).join("、") ||
|
|
162
|
-
(
|
|
163
|
-
)?.[
|
|
164
|
-
}),
|
|
165
|
-
const
|
|
166
|
-
let
|
|
167
|
-
return
|
|
155
|
+
const { value: i, updateValue: y } = Ne(e, U), j = Se("Select", e), E = s(() => {
|
|
156
|
+
const o = n(i);
|
|
157
|
+
if (!o)
|
|
158
|
+
return e.emptyText;
|
|
159
|
+
const l = e.fieldNames?.label || "label", t = e.fieldNames?.value || "value";
|
|
160
|
+
return ye(o) ? o.map(
|
|
161
|
+
(c) => n(m).find((Y) => Y[t] === c)?.[l]
|
|
162
|
+
).filter(Boolean).join("、") || e.emptyText : n(m).find(
|
|
163
|
+
(c) => c[t] === o
|
|
164
|
+
)?.[l] || e.emptyText;
|
|
165
|
+
}), H = s(() => {
|
|
166
|
+
const o = !!e?.showSearch, l = e.searchMode;
|
|
167
|
+
let t = {};
|
|
168
|
+
return o && (t = l === "request" ? {
|
|
168
169
|
defaultActiveFirstOption: !1,
|
|
169
|
-
onSearch:
|
|
170
|
-
notFoundContent:
|
|
170
|
+
onSearch: L,
|
|
171
|
+
notFoundContent: a.value ? void 0 : null,
|
|
171
172
|
filterOption: !1,
|
|
172
173
|
suffixIcon: null
|
|
173
174
|
} : {
|
|
174
|
-
filterOption:
|
|
175
|
+
filterOption: ge(e?.filterOption) ? z : e?.filterOption
|
|
175
176
|
}), {
|
|
176
|
-
...
|
|
177
|
+
...we(e, [
|
|
177
178
|
"mode",
|
|
178
179
|
"value",
|
|
179
180
|
"onUpdate:value",
|
|
@@ -183,99 +184,124 @@ const be = { key: 0 }, Be = ["onClick"], Pe = /* @__PURE__ */ Y({
|
|
|
183
184
|
"onFocus",
|
|
184
185
|
"onBeforeSelect"
|
|
185
186
|
]),
|
|
186
|
-
placeholder:
|
|
187
|
-
...
|
|
187
|
+
placeholder: n(j),
|
|
188
|
+
...t
|
|
188
189
|
};
|
|
189
|
-
}),
|
|
190
|
-
() =>
|
|
191
|
-
),
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if (s.value.some(
|
|
195
|
-
(e) => e[o.fieldNames?.value || "value"] === h
|
|
196
|
-
)) {
|
|
197
|
-
const e = a(B), t = a(f) || [];
|
|
198
|
-
if (e.length && e.every((l) => t?.includes(l)))
|
|
199
|
-
return [h];
|
|
200
|
-
}
|
|
201
|
-
return a(f);
|
|
202
|
-
});
|
|
203
|
-
function K(e) {
|
|
204
|
-
return o.multiple && e.includes(h) ? m(a(B)) : m(e);
|
|
190
|
+
}), g = s(
|
|
191
|
+
() => m.value.map((o) => o[e.fieldNames?.value || "value"])
|
|
192
|
+
), x = s(() => e.multiple ? Ce(e.addAll) ? g.value.length >= e.addAll : !!e.addAll : !1);
|
|
193
|
+
function W() {
|
|
194
|
+
S.value?.focus();
|
|
205
195
|
}
|
|
206
|
-
function
|
|
207
|
-
|
|
196
|
+
function G() {
|
|
197
|
+
S.value?.blur();
|
|
208
198
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
199
|
+
function b(o, l) {
|
|
200
|
+
const t = e.fieldNames?.[l] ?? l;
|
|
201
|
+
return o[t];
|
|
211
202
|
}
|
|
212
|
-
function
|
|
213
|
-
const l = o
|
|
214
|
-
|
|
203
|
+
function J(o) {
|
|
204
|
+
const l = b(o, "value");
|
|
205
|
+
y(e.multiple ? [l] : l);
|
|
215
206
|
}
|
|
216
|
-
|
|
217
|
-
const
|
|
218
|
-
|
|
207
|
+
const A = s(() => {
|
|
208
|
+
const o = n(i) || [], l = g.value;
|
|
209
|
+
return l.length > 0 && l.every((t) => o.includes(t));
|
|
210
|
+
}), Q = s(() => (n(i) || []).length > 0 && !A.value);
|
|
211
|
+
function X() {
|
|
212
|
+
console.log("123");
|
|
213
|
+
const o = n(i) || [], l = g.value;
|
|
214
|
+
l.length && l.every((t) => o?.includes(t)) ? y([]) : y(g.value);
|
|
219
215
|
}
|
|
220
|
-
return
|
|
221
|
-
focus:
|
|
222
|
-
blur:
|
|
223
|
-
request:
|
|
224
|
-
}), (
|
|
216
|
+
return q({
|
|
217
|
+
focus: W,
|
|
218
|
+
blur: G,
|
|
219
|
+
request: h
|
|
220
|
+
}), (o, l) => o.mode === "read" ? (p(), I("span", Oe, w(E.value), 1)) : (p(), k(n(pe), le({
|
|
225
221
|
key: 1,
|
|
226
222
|
ref_key: "selectRef",
|
|
227
|
-
ref:
|
|
223
|
+
ref: S,
|
|
228
224
|
"allow-clear": ""
|
|
229
|
-
},
|
|
230
|
-
mode:
|
|
231
|
-
value:
|
|
232
|
-
options:
|
|
233
|
-
loading:
|
|
234
|
-
"menu-item-selected-icon":
|
|
235
|
-
"popup-class-name": `${
|
|
236
|
-
open:
|
|
237
|
-
"onUpdate:value":
|
|
238
|
-
onFocus:
|
|
239
|
-
onDropdownVisibleChange:
|
|
240
|
-
}),
|
|
241
|
-
option:
|
|
242
|
-
|
|
225
|
+
}, H.value, {
|
|
226
|
+
mode: $.value,
|
|
227
|
+
value: n(i),
|
|
228
|
+
options: n(m),
|
|
229
|
+
loading: a.value,
|
|
230
|
+
"menu-item-selected-icon": ne("span"),
|
|
231
|
+
"popup-class-name": `${n(u)("popup")} ${n(R)}`,
|
|
232
|
+
open: N.value,
|
|
233
|
+
"onUpdate:value": n(y),
|
|
234
|
+
onFocus: K,
|
|
235
|
+
onDropdownVisibleChange: l[0] || (l[0] = (t) => N.value = t)
|
|
236
|
+
}), ae({
|
|
237
|
+
option: d((t) => [
|
|
238
|
+
C(n(fe), {
|
|
243
239
|
justify: "space-between",
|
|
244
240
|
align: "center",
|
|
245
|
-
class:
|
|
241
|
+
class: f(n(u)("popup-option-wrapper")),
|
|
246
242
|
gap: 8
|
|
247
243
|
}, {
|
|
248
|
-
default:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
default: d(() => [
|
|
245
|
+
C(n(me), null, {
|
|
246
|
+
default: d(() => [
|
|
247
|
+
x.value ? (p(), k(n(M), {
|
|
248
|
+
key: 0,
|
|
249
|
+
checked: n(i)?.includes(
|
|
250
|
+
b(t, "value")
|
|
251
|
+
)
|
|
252
|
+
}, null, 8, ["checked"])) : _("", !0),
|
|
253
|
+
F("span", {
|
|
254
|
+
class: f(n(u)("popup-option-label"))
|
|
255
|
+
}, w(b(t, "label")), 3)
|
|
256
|
+
]),
|
|
257
|
+
_: 2
|
|
258
|
+
}, 1024),
|
|
259
|
+
o.multiple && o.allowOnlySelect ? (p(), I("span", {
|
|
253
260
|
key: 0,
|
|
254
|
-
class:
|
|
255
|
-
onClick:
|
|
256
|
-
},
|
|
261
|
+
class: f(n(u)("popup-option-action")),
|
|
262
|
+
onClick: re(() => J(t), ["stop"])
|
|
263
|
+
}, w(n(O)("ap.field.chooseOnly")), 11, xe)) : _("", !0)
|
|
257
264
|
]),
|
|
258
265
|
_: 2
|
|
259
266
|
}, 1032, ["class"])
|
|
260
267
|
]),
|
|
261
268
|
_: 2
|
|
262
269
|
}, [
|
|
263
|
-
|
|
264
|
-
name:
|
|
265
|
-
fn:
|
|
266
|
-
|
|
270
|
+
se(o.$slots, (t, B) => ({
|
|
271
|
+
name: B,
|
|
272
|
+
fn: d((c) => [
|
|
273
|
+
ue(o.$slots, B, ie(de(c || {})))
|
|
267
274
|
])
|
|
268
275
|
})),
|
|
269
|
-
|
|
276
|
+
a.value ? {
|
|
270
277
|
name: "notFoundContent",
|
|
271
|
-
fn:
|
|
272
|
-
|
|
278
|
+
fn: d(() => [
|
|
279
|
+
C(n(ve), { size: "small" })
|
|
273
280
|
]),
|
|
274
281
|
key: "0"
|
|
282
|
+
} : void 0,
|
|
283
|
+
x.value ? {
|
|
284
|
+
name: "dropdownRender",
|
|
285
|
+
fn: d(({ menuNode: t }) => [
|
|
286
|
+
F("button", {
|
|
287
|
+
class: f(n(u)("popup-all-option")),
|
|
288
|
+
onClick: X
|
|
289
|
+
}, [
|
|
290
|
+
C(n(M), {
|
|
291
|
+
checked: A.value,
|
|
292
|
+
indeterminate: Q.value
|
|
293
|
+
}, null, 8, ["checked", "indeterminate"]),
|
|
294
|
+
F("span", {
|
|
295
|
+
class: f(n(u)("popup-all-option-label"))
|
|
296
|
+
}, w(n(O)("ap.field.selectAll")), 3)
|
|
297
|
+
], 2),
|
|
298
|
+
(p(), k(ce(t)))
|
|
299
|
+
]),
|
|
300
|
+
key: "1"
|
|
275
301
|
} : void 0
|
|
276
|
-
]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "open"]));
|
|
302
|
+
]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "open", "onUpdate:value"]));
|
|
277
303
|
}
|
|
278
304
|
});
|
|
279
305
|
export {
|
|
280
|
-
|
|
306
|
+
ze as default
|
|
281
307
|
};
|
|
@@ -1,42 +1,24 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[l.fieldNames?.label || "label"]: n("ap.common.all"),
|
|
7
|
-
[l.fieldNames?.value || "value"]: m
|
|
8
|
-
};
|
|
9
|
-
function i(t) {
|
|
10
|
-
const a = l.addAll;
|
|
11
|
-
if (!l.multiple || !a)
|
|
12
|
-
return !1;
|
|
13
|
-
const d = Math.min(0, a === !0 ? 0 : a);
|
|
14
|
-
return t.length > d;
|
|
15
|
-
}
|
|
16
|
-
function o(t) {
|
|
17
|
-
if (t) {
|
|
18
|
-
if (!i(t)) {
|
|
19
|
-
e.value = t;
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
e.value = [u, ...t];
|
|
23
|
-
}
|
|
1
|
+
import { ref as E, watch as L } from "vue";
|
|
2
|
+
const s = "SELECTABLE_ALL_VALUE_KEY", u = (o) => {
|
|
3
|
+
const e = E(o?.options || []);
|
|
4
|
+
function n(t) {
|
|
5
|
+
t && (e.value = [...t]);
|
|
24
6
|
}
|
|
25
|
-
return
|
|
26
|
-
() =>
|
|
7
|
+
return L(
|
|
8
|
+
() => o.options,
|
|
27
9
|
(t) => {
|
|
28
|
-
|
|
10
|
+
n(t);
|
|
29
11
|
},
|
|
30
12
|
{
|
|
31
13
|
deep: !0
|
|
32
14
|
}
|
|
33
15
|
), {
|
|
34
16
|
options: e,
|
|
35
|
-
updateOptions:
|
|
17
|
+
updateOptions: n
|
|
36
18
|
};
|
|
37
19
|
};
|
|
38
20
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
s as SELECT_ALL_VALUE_KEY,
|
|
22
|
+
u as default,
|
|
23
|
+
u as useSelectOptions
|
|
42
24
|
};
|
|
@@ -1,43 +1,54 @@
|
|
|
1
|
-
import { singleRow as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { singleRow as l } from "../../style/index.mjs";
|
|
2
|
+
const n = (i) => {
|
|
3
|
+
const { componentCls: p } = i, o = `${p}-select-popup`;
|
|
4
4
|
return {
|
|
5
|
-
[`${
|
|
6
|
-
|
|
5
|
+
[`${o}`]: {
|
|
6
|
+
padding: i.space,
|
|
7
|
+
[`${o}-all-option`]: {
|
|
8
|
+
width: "100%",
|
|
9
|
+
display: "inline-flex",
|
|
10
|
+
cursor: "pointer",
|
|
11
|
+
paddingInline: i.space,
|
|
12
|
+
paddingBlock: i.spaceSM,
|
|
13
|
+
[`${o}-all-option-label`]: {
|
|
14
|
+
paddingInline: i.space
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
[`${o}-option-wrapper`]: {
|
|
7
18
|
height: "22px"
|
|
8
19
|
},
|
|
9
|
-
[`${
|
|
10
|
-
...
|
|
20
|
+
[`${o}-option-label`]: {
|
|
21
|
+
...l(i),
|
|
11
22
|
color: "inherit"
|
|
12
23
|
},
|
|
13
|
-
[`${
|
|
24
|
+
[`${o}-option-action`]: {
|
|
14
25
|
display: "none",
|
|
15
|
-
color:
|
|
16
|
-
paddingInline:
|
|
17
|
-
paddingBlock:
|
|
26
|
+
color: i.colorPrimary,
|
|
27
|
+
paddingInline: i.spaceSM,
|
|
28
|
+
paddingBlock: i.spaceXXS,
|
|
18
29
|
"&:hover": {
|
|
19
|
-
background:
|
|
30
|
+
background: i.colorPrimary,
|
|
20
31
|
color: "#fff",
|
|
21
32
|
borderRadius: "2px"
|
|
22
33
|
}
|
|
23
34
|
},
|
|
24
|
-
"div.ant-select-item": {
|
|
25
|
-
paddingInline:
|
|
26
|
-
paddingBlock:
|
|
35
|
+
"div.ant-select-item:not(:last-child)": {
|
|
36
|
+
paddingInline: i.space,
|
|
37
|
+
paddingBlock: i.spaceXS,
|
|
27
38
|
fontWeight: "normal !important",
|
|
28
|
-
marginBottom:
|
|
39
|
+
marginBottom: i.spaceXS,
|
|
29
40
|
"&:hover": {
|
|
30
|
-
[`${
|
|
41
|
+
[`${o}-option-action`]: {
|
|
31
42
|
display: "inline"
|
|
32
43
|
}
|
|
33
44
|
},
|
|
34
45
|
"&.ant-select-item-option-selected:not(.ant-select-item-option-disabled)": {
|
|
35
|
-
color:
|
|
46
|
+
color: i.colorPrimary
|
|
36
47
|
}
|
|
37
48
|
}
|
|
38
49
|
}
|
|
39
50
|
};
|
|
40
51
|
};
|
|
41
52
|
export {
|
|
42
|
-
|
|
53
|
+
n as genSelectStyle
|
|
43
54
|
};
|
|
@@ -138,6 +138,7 @@ declare function __VLS_template(): {
|
|
|
138
138
|
readonly addAll?: boolean | number | undefined;
|
|
139
139
|
readonly params?: Recordable | undefined;
|
|
140
140
|
readonly searchDelay?: number | undefined;
|
|
141
|
+
readonly allowOnlySelect?: boolean | undefined;
|
|
141
142
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
142
143
|
$attrs: {
|
|
143
144
|
[x: string]: unknown;
|
|
@@ -606,7 +607,9 @@ declare function __VLS_template(): {
|
|
|
606
607
|
emptyText: string;
|
|
607
608
|
searchMode: "filter" | "request";
|
|
608
609
|
refetchOnFocus: boolean;
|
|
610
|
+
addAll: boolean | number;
|
|
609
611
|
searchDelay: number;
|
|
612
|
+
allowOnlySelect: boolean;
|
|
610
613
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
611
614
|
beforeCreate?: (() => void) | (() => void)[];
|
|
612
615
|
created?: (() => void) | (() => void)[];
|
|
@@ -647,10 +650,12 @@ declare function __VLS_template(): {
|
|
|
647
650
|
emptyText: string;
|
|
648
651
|
searchMode: "filter" | "request";
|
|
649
652
|
refetchOnFocus: boolean;
|
|
653
|
+
addAll: boolean | number;
|
|
650
654
|
searchDelay: number;
|
|
655
|
+
allowOnlySelect: boolean;
|
|
651
656
|
}> & Omit<Readonly< ApFieldSelectProps> & Readonly<{
|
|
652
657
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
653
|
-
}>, "blur" | "focus" | "request" | ("mode" | "open" | "multiple" | "disabled" | "virtual" | "autofocus" | "lazy" | "loading" | "bordered" | "allowClear" | "showArrow" | "autoClearSearchValue" | "defaultActiveFirstOption" | "labelInValue" | "showSearch" | "defaultOpen" | "emptyText" | "searchMode" | "refetchOnFocus" | "searchDelay")> & ShallowUnwrapRef<{
|
|
658
|
+
}>, "blur" | "focus" | "request" | ("mode" | "open" | "multiple" | "disabled" | "virtual" | "autofocus" | "lazy" | "loading" | "bordered" | "allowClear" | "showArrow" | "autoClearSearchValue" | "defaultActiveFirstOption" | "labelInValue" | "showSearch" | "defaultOpen" | "emptyText" | "searchMode" | "refetchOnFocus" | "addAll" | "searchDelay" | "allowOnlySelect")> & ShallowUnwrapRef<{
|
|
654
659
|
focus: () => void;
|
|
655
660
|
blur: () => void;
|
|
656
661
|
request: (clear?: boolean) => Promise<void>;
|
|
@@ -794,6 +799,7 @@ declare const __VLS_component: DefineComponent<ApFormItemSelectProps, {
|
|
|
794
799
|
readonly addAll?: boolean | number | undefined;
|
|
795
800
|
readonly params?: Recordable | undefined;
|
|
796
801
|
readonly searchDelay?: number | undefined;
|
|
802
|
+
readonly allowOnlySelect?: boolean | undefined;
|
|
797
803
|
} & VNodeProps & AllowedComponentProps & ComponentCustomProps;
|
|
798
804
|
$attrs: {
|
|
799
805
|
[x: string]: unknown;
|
|
@@ -1262,7 +1268,9 @@ declare const __VLS_component: DefineComponent<ApFormItemSelectProps, {
|
|
|
1262
1268
|
emptyText: string;
|
|
1263
1269
|
searchMode: "filter" | "request";
|
|
1264
1270
|
refetchOnFocus: boolean;
|
|
1271
|
+
addAll: boolean | number;
|
|
1265
1272
|
searchDelay: number;
|
|
1273
|
+
allowOnlySelect: boolean;
|
|
1266
1274
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
1267
1275
|
beforeCreate?: (() => void) | (() => void)[];
|
|
1268
1276
|
created?: (() => void) | (() => void)[];
|
|
@@ -1303,10 +1311,12 @@ declare const __VLS_component: DefineComponent<ApFormItemSelectProps, {
|
|
|
1303
1311
|
emptyText: string;
|
|
1304
1312
|
searchMode: "filter" | "request";
|
|
1305
1313
|
refetchOnFocus: boolean;
|
|
1314
|
+
addAll: boolean | number;
|
|
1306
1315
|
searchDelay: number;
|
|
1316
|
+
allowOnlySelect: boolean;
|
|
1307
1317
|
}> & Omit<Readonly< ApFieldSelectProps> & Readonly<{
|
|
1308
1318
|
"onUpdate:value"?: ((...args: any[]) => any) | undefined;
|
|
1309
|
-
}>, "blur" | "focus" | "request" | ("mode" | "open" | "multiple" | "disabled" | "virtual" | "autofocus" | "lazy" | "loading" | "bordered" | "allowClear" | "showArrow" | "autoClearSearchValue" | "defaultActiveFirstOption" | "labelInValue" | "showSearch" | "defaultOpen" | "emptyText" | "searchMode" | "refetchOnFocus" | "searchDelay")> & ShallowUnwrapRef<{
|
|
1319
|
+
}>, "blur" | "focus" | "request" | ("mode" | "open" | "multiple" | "disabled" | "virtual" | "autofocus" | "lazy" | "loading" | "bordered" | "allowClear" | "showArrow" | "autoClearSearchValue" | "defaultActiveFirstOption" | "labelInValue" | "showSearch" | "defaultOpen" | "emptyText" | "searchMode" | "refetchOnFocus" | "addAll" | "searchDelay" | "allowOnlySelect")> & ShallowUnwrapRef<{
|
|
1310
1320
|
focus: () => void;
|
|
1311
1321
|
blur: () => void;
|
|
1312
1322
|
request: (clear?: boolean) => Promise<void>;
|