@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.
Files changed (73) hide show
  1. package/es/src/ag-grid/components/empty/index.vue.d.ts +4 -1
  2. package/es/src/ag-grid/components/empty/index.vue2.mjs +20 -10
  3. package/es/src/ag-grid/editable/form-item.vue.mjs +9 -8
  4. package/es/src/ag-grid/editable/index.vue.mjs +1 -0
  5. package/es/src/ag-grid/index.vue.mjs +54 -51
  6. package/es/src/ag-grid/interface.d.ts +4 -0
  7. package/es/src/ag-grid/style/index.mjs +5 -5
  8. package/es/src/ap-field/interface.d.ts +5 -0
  9. package/es/src/ap-field/select/index.vue.d.ts +2 -0
  10. package/es/src/ap-field/select/index.vue.mjs +150 -124
  11. package/es/src/ap-field/select/read.vue2.mjs +2 -1
  12. package/es/src/ap-field/select/use-select-options.mjs +12 -30
  13. package/es/src/ap-field/style/select.mjs +30 -19
  14. package/es/src/ap-form/items/select/index.vue.d.ts +12 -2
  15. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +135 -128
  16. package/es/src/ap-table/constants.d.ts +6 -1
  17. package/es/src/business/ap-attachment/style/index.mjs +3 -1
  18. package/es/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
  19. package/es/src/business/ap-export-group/ApExportGroup.vue2.mjs +296 -161
  20. package/es/src/business/ap-export-group/index.d.ts +4 -1
  21. package/es/src/business/ap-export-group/interface.d.ts +31 -0
  22. package/es/src/business/ap-export-group/style/index.d.ts +5 -0
  23. package/es/src/business/ap-export-group/style/index.mjs +17 -0
  24. package/es/src/business/ap-file-preview/utils/create-file-preview-modal.mjs +3 -2
  25. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +21 -21
  26. package/es/src/business/ap-view/style/index.mjs +3 -2
  27. package/es/src/config-provider/config-provider-props.d.ts +7 -6
  28. package/es/src/config-provider/config-provider-props.mjs +4 -4
  29. package/es/src/config-provider/config-provider.d.ts +35 -11
  30. package/es/src/config-provider/config-provider.mjs +24 -24
  31. package/es/src/config-provider/hooks/use-global-config.d.ts +14 -6
  32. package/es/src/config-provider/index.d.ts +65 -17
  33. package/es/src/locale/lang/en.mjs +7 -3
  34. package/es/src/locale/lang/zh-cn.mjs +6 -2
  35. package/es/src/version.d.ts +1 -1
  36. package/es/src/version.mjs +1 -1
  37. package/lib/src/ag-grid/components/empty/index.vue.d.ts +4 -1
  38. package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
  39. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  40. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  41. package/lib/src/ag-grid/index.vue.js +1 -1
  42. package/lib/src/ag-grid/interface.d.ts +4 -0
  43. package/lib/src/ag-grid/style/index.js +1 -1
  44. package/lib/src/ap-field/interface.d.ts +5 -0
  45. package/lib/src/ap-field/select/index.vue.d.ts +2 -0
  46. package/lib/src/ap-field/select/index.vue.js +1 -1
  47. package/lib/src/ap-field/select/read.vue2.js +1 -1
  48. package/lib/src/ap-field/select/use-select-options.js +1 -1
  49. package/lib/src/ap-field/style/select.js +1 -1
  50. package/lib/src/ap-form/items/select/index.vue.d.ts +12 -2
  51. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  52. package/lib/src/ap-table/constants.d.ts +6 -1
  53. package/lib/src/business/ap-attachment/style/index.js +1 -1
  54. package/lib/src/business/ap-export-group/ApExportGroup.vue.d.ts +2 -1
  55. package/lib/src/business/ap-export-group/ApExportGroup.vue2.js +1 -1
  56. package/lib/src/business/ap-export-group/index.d.ts +4 -1
  57. package/lib/src/business/ap-export-group/interface.d.ts +31 -0
  58. package/lib/src/business/ap-export-group/style/index.d.ts +5 -0
  59. package/lib/src/business/ap-export-group/style/index.js +1 -0
  60. package/lib/src/business/ap-file-preview/utils/create-file-preview-modal.js +1 -1
  61. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  62. package/lib/src/business/ap-view/style/index.js +1 -1
  63. package/lib/src/config-provider/config-provider-props.d.ts +7 -6
  64. package/lib/src/config-provider/config-provider-props.js +1 -1
  65. package/lib/src/config-provider/config-provider.d.ts +35 -11
  66. package/lib/src/config-provider/config-provider.js +1 -1
  67. package/lib/src/config-provider/hooks/use-global-config.d.ts +14 -6
  68. package/lib/src/config-provider/index.d.ts +65 -17
  69. package/lib/src/locale/lang/en.js +1 -1
  70. package/lib/src/locale/lang/zh-cn.js +1 -1
  71. package/lib/src/version.d.ts +1 -1
  72. package/lib/src/version.js +1 -1
  73. package/package.json +3 -3
@@ -1,15 +1,15 @@
1
- import { defineComponent as Y, ref as N, shallowRef as G, computed as u, onMounted as J, watch as Q, unref as a, createElementBlock as O, createBlock as X, openBlock as C, toDisplayString as S, mergeProps as Z, h as ee, createSlots as oe, withCtx as v, createVNode as x, normalizeClass as w, createElementVNode as te, createCommentVNode as le, withModifiers as ae, renderList as ne, renderSlot as re, normalizeProps as se, guardReactiveProps as ie } from "vue";
2
- import { Select as ue, Flex as pe, Spin as de } from "@aplus-frontend/antdv";
3
- import { debounce as ce, isFunction as V, isArray as fe, isNil as me, omit as ve } from "lodash-unified";
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 he } from "../hooks/use-default-placeholder.mjs";
7
- import ye from "../style/index.mjs";
8
- import { useSelectOptions as ge, SELECT_ALL_VALUE_KEY as h } from "./use-select-options.mjs";
9
- import { useNamespace as Ce } from "../../config-provider/hooks/use-namespace.mjs";
10
- import { useLocale as Se } from "../../config-provider/hooks/use-locale.mjs";
11
- import { useControllableValue as we } from "../../hooks/useControllableValue.mjs";
12
- const be = { key: 0 }, Be = ["onClick"], Pe = /* @__PURE__ */ Y({
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(I, { expose: k, emit: A }) {
109
+ setup(T, { expose: q, emit: D }) {
109
110
  let r = 0;
110
- const o = I, { b: p } = Ce("field-select"), _ = ye("field"), b = N(!1), { t: L } = Se(), M = ce((e) => {
111
- if (!V(o.request))
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 t = r;
115
- d([]), n.value = !0, o.request(e).then((l) => {
116
- r === t && (d(l), n.value = !1);
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
- }, o.searchDelay), P = (e, t) => {
119
- const l = o.fieldNames?.label || "label";
120
- return typeof t?.[l] == "string" && t[l].toLowerCase().indexOf(e.toLowerCase()) > -1;
121
- }, { options: s, updateOptions: d } = ge(o), y = G(), n = N(o?.loading || !1), T = A, q = u(() => {
122
- if (o.multiple)
123
- return o.tokenSeparators ? "tags" : "multiple";
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 c(e = !0) {
126
- if (!V(o.request))
126
+ async function h(o = !0) {
127
+ if (!P(e.request))
127
128
  return;
128
- n.value = !0, r += 1;
129
- const t = r;
129
+ a.value = !0, r += 1;
130
+ const l = r;
130
131
  try {
131
- e && d([]);
132
- const l = await o.request(void 0, o.params);
133
- if (t !== r)
132
+ o && v([]);
133
+ const t = await e.request(void 0, e.params);
134
+ if (l !== r)
134
135
  return;
135
- d(l);
136
+ v(t);
136
137
  } finally {
137
- n.value = !1;
138
+ a.value = !1;
138
139
  }
139
140
  }
140
- function D(e) {
141
- o.onFocus?.(e), o.refetchOnFocus && r > 0 && !n.value && c(!0);
141
+ function K(o) {
142
+ e.onFocus?.(o), e.refetchOnFocus && r > 0 && !a.value && h(!0);
142
143
  }
143
- J(() => {
144
- o.lazy || c();
145
- }), Q(
146
- () => o.params,
144
+ oe(() => {
145
+ e.lazy || h();
146
+ }), te(
147
+ () => e.params,
147
148
  () => {
148
- c();
149
+ h();
149
150
  },
150
151
  {
151
152
  deep: !0
152
153
  }
153
154
  );
154
- const { value: f, updateValue: m } = we(o, T), R = he("Select", o), z = u(() => {
155
- const e = a(f);
156
- if (!e)
157
- return o.emptyText;
158
- const t = o.fieldNames?.label || "label", l = o.fieldNames?.value || "value";
159
- return fe(e) ? e.map(
160
- (i) => a(s).find((W) => W[l] === i)?.[t]
161
- ).filter(Boolean).join("、") || o.emptyText : a(s).find(
162
- (i) => i[l] === e
163
- )?.[t] || o.emptyText;
164
- }), E = u(() => {
165
- const e = !!o?.showSearch, t = o.searchMode;
166
- let l = {};
167
- return e && (l = t === "request" ? {
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: M,
170
- notFoundContent: n.value ? void 0 : null,
170
+ onSearch: L,
171
+ notFoundContent: a.value ? void 0 : null,
171
172
  filterOption: !1,
172
173
  suffixIcon: null
173
174
  } : {
174
- filterOption: me(o?.filterOption) ? P : o?.filterOption
175
+ filterOption: ge(e?.filterOption) ? z : e?.filterOption
175
176
  }), {
176
- ...ve(o, [
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: a(R),
187
- ...l
187
+ placeholder: n(j),
188
+ ...t
188
189
  };
189
- }), B = u(
190
- () => s.value.map((e) => e[o.fieldNames?.value || "value"]).filter((e) => e !== h)
191
- ), U = u(() => {
192
- if (!o.multiple || !o.addAll)
193
- return a(f);
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
- y.value?.focus();
196
+ function G() {
197
+ S.value?.blur();
208
198
  }
209
- function j() {
210
- y.value?.blur();
199
+ function b(o, l) {
200
+ const t = e.fieldNames?.[l] ?? l;
201
+ return o[t];
211
202
  }
212
- function F(e, t) {
213
- const l = o.fieldNames?.[t] ?? t;
214
- return e[l];
203
+ function J(o) {
204
+ const l = b(o, "value");
205
+ y(e.multiple ? [l] : l);
215
206
  }
216
- function H(e) {
217
- const t = F(e, "value");
218
- m(o.multiple ? [t] : t);
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 k({
221
- focus: $,
222
- blur: j,
223
- request: c
224
- }), (e, t) => e.mode === "read" ? (C(), O("span", be, S(z.value), 1)) : (C(), X(a(ue), Z({
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: y,
223
+ ref: S,
228
224
  "allow-clear": ""
229
- }, E.value, {
230
- mode: q.value,
231
- value: U.value,
232
- options: a(s),
233
- loading: n.value,
234
- "menu-item-selected-icon": ee("span"),
235
- "popup-class-name": `${a(p)("popup")} ${a(_)}`,
236
- open: b.value,
237
- "onUpdate:value": K,
238
- onFocus: D,
239
- onDropdownVisibleChange: t[0] || (t[0] = (l) => b.value = l)
240
- }), oe({
241
- option: v((l) => [
242
- x(a(pe), {
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: w(a(p)("popup-option-wrapper")),
241
+ class: f(n(u)("popup-option-wrapper")),
246
242
  gap: 8
247
243
  }, {
248
- default: v(() => [
249
- te("span", {
250
- class: w(a(p)("popup-option-label"))
251
- }, S(F(l, "label")), 3),
252
- e.multiple ? (C(), O("span", {
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: w(a(p)("popup-option-action")),
255
- onClick: ae(() => H(l), ["stop"])
256
- }, S(a(L)("ap.field.chooseOnly")), 11, Be)) : le("", !0)
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
- ne(e.$slots, (l, g) => ({
264
- name: g,
265
- fn: v((i) => [
266
- re(e.$slots, g, se(ie(i || {})))
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
- n.value ? {
276
+ a.value ? {
270
277
  name: "notFoundContent",
271
- fn: v(() => [
272
- x(a(de), { size: "small" })
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
- Pe as default
306
+ ze as default
281
307
  };
@@ -93,7 +93,8 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
93
93
  lazy: { type: Boolean },
94
94
  addAll: { type: [Boolean, Number] },
95
95
  params: {},
96
- searchDelay: {}
96
+ searchDelay: {},
97
+ allowOnlySelect: { type: Boolean }
97
98
  },
98
99
  setup(l) {
99
100
  const e = l, r = s(() => {
@@ -1,42 +1,24 @@
1
- import { ref as r, watch as c } from "vue";
2
- import "../../config-provider/index.mjs";
3
- import { useLocale as f } from "../../config-provider/hooks/use-locale.mjs";
4
- const m = "SELECTABLE_ALL_VALUE_KEY", E = (l) => {
5
- const e = r(l?.options || []), { t: n } = f(), u = {
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 c(
26
- () => l.options,
7
+ return L(
8
+ () => o.options,
27
9
  (t) => {
28
- o(t);
10
+ n(t);
29
11
  },
30
12
  {
31
13
  deep: !0
32
14
  }
33
15
  ), {
34
16
  options: e,
35
- updateOptions: o
17
+ updateOptions: n
36
18
  };
37
19
  };
38
20
  export {
39
- m as SELECT_ALL_VALUE_KEY,
40
- E as default,
41
- E as useSelectOptions
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 p } from "../../style/index.mjs";
2
- const r = (o) => {
3
- const { componentCls: e } = o, i = `${e}-select-popup`;
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
- [`${i}`]: {
6
- [`${i}-option-wrapper`]: {
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
- [`${i}-option-label`]: {
10
- ...p(o),
20
+ [`${o}-option-label`]: {
21
+ ...l(i),
11
22
  color: "inherit"
12
23
  },
13
- [`${i}-option-action`]: {
24
+ [`${o}-option-action`]: {
14
25
  display: "none",
15
- color: o.colorPrimary,
16
- paddingInline: o.spaceSM,
17
- paddingBlock: o.spaceXXS,
26
+ color: i.colorPrimary,
27
+ paddingInline: i.spaceSM,
28
+ paddingBlock: i.spaceXXS,
18
29
  "&:hover": {
19
- background: o.colorPrimary,
30
+ background: i.colorPrimary,
20
31
  color: "#fff",
21
32
  borderRadius: "2px"
22
33
  }
23
34
  },
24
- "div.ant-select-item": {
25
- paddingInline: o.space,
26
- paddingBlock: o.spaceXS,
35
+ "div.ant-select-item:not(:last-child)": {
36
+ paddingInline: i.space,
37
+ paddingBlock: i.spaceXS,
27
38
  fontWeight: "normal !important",
28
- marginBottom: o.spaceXS,
39
+ marginBottom: i.spaceXS,
29
40
  "&:hover": {
30
- [`${i}-option-action`]: {
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: o.colorPrimary
46
+ color: i.colorPrimary
36
47
  }
37
48
  }
38
49
  }
39
50
  };
40
51
  };
41
52
  export {
42
- r as genSelectStyle
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>;