@aplus-frontend/ui 7.13.8 → 7.13.9
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/body-cell/index.vue2.mjs +7 -7
- package/es/src/ag-grid/components/empty/index.vue2.mjs +10 -10
- package/es/src/ag-grid/components/header-cell/index.vue2.mjs +37 -37
- package/es/src/ag-grid/components/row/index.vue2.mjs +5 -5
- package/es/src/ag-grid/components/tooltip/index.vue2.mjs +12 -12
- package/es/src/ag-grid/editable/form-item.vue.mjs +49 -49
- package/es/src/ag-grid/editable/index.vue.mjs +27 -27
- package/es/src/ag-grid/index.vue.mjs +249 -249
- package/es/src/ap-action/group/index.vue.mjs +15 -15
- package/es/src/ap-action/item/index.vue2.mjs +28 -28
- package/es/src/ap-action/item-dropdown/index.vue.mjs +39 -39
- package/es/src/ap-field/checkbox/index.vue.mjs +19 -19
- package/es/src/ap-field/checkbox/read.vue2.mjs +9 -9
- package/es/src/ap-field/date/index.vue.mjs +50 -50
- package/es/src/ap-field/date/read.vue2.mjs +7 -7
- package/es/src/ap-field/date-range/index.vue.mjs +30 -30
- package/es/src/ap-field/date-range/read.vue2.mjs +20 -20
- package/es/src/ap-field/number/index.vue.mjs +24 -24
- package/es/src/ap-field/radio/index.vue.mjs +24 -24
- package/es/src/ap-field/second/index.vue.mjs +15 -15
- package/es/src/ap-field/second/read.vue2.mjs +7 -7
- package/es/src/ap-field/segmented/index.vue.mjs +24 -24
- package/es/src/ap-field/select/index.vue.d.ts +12 -2
- package/es/src/ap-field/select/index.vue.mjs +127 -124
- package/es/src/ap-field/select/read.vue2.mjs +6 -6
- package/es/src/ap-field/slider/index.vue.mjs +11 -11
- package/es/src/ap-field/style/select.mjs +53 -36
- package/es/src/ap-field/switch/index.vue.mjs +45 -45
- package/es/src/ap-field/text/read-password.vue2.mjs +13 -13
- package/es/src/ap-field/text/read.vue2.mjs +3 -3
- package/es/src/ap-field/text-area/index.vue.mjs +29 -29
- package/es/src/ap-field/text-area/read.vue2.mjs +12 -12
- package/es/src/ap-field/tree-select/index.vue.mjs +31 -31
- package/es/src/ap-form/ap-form.vue2.mjs +46 -46
- package/es/src/ap-form/drawer-form/index.vue.mjs +30 -30
- package/es/src/ap-form/item/index.vue.mjs +75 -75
- package/es/src/ap-form/items/checkbox/index.vue.mjs +10 -10
- package/es/src/ap-form/items/number/index.vue.mjs +17 -17
- package/es/src/ap-form/items/radio/index.vue.mjs +13 -13
- package/es/src/ap-form/items/switch/index.vue.mjs +14 -14
- package/es/src/ap-form/items/text/index.vue2.mjs +26 -26
- package/es/src/ap-form/items/text/password.vue.mjs +19 -19
- package/es/src/ap-form/items/text-area/index.vue.mjs +17 -17
- package/es/src/ap-form/modal-form/index.vue.mjs +34 -34
- package/es/src/ap-form/search-form/components/popover-filter.vue2.mjs +39 -39
- package/es/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.mjs +7 -7
- package/es/src/ap-grid/editable/form-item.vue.mjs +46 -46
- package/es/src/ap-grid/editable/index.vue.mjs +19 -19
- package/es/src/ap-grid/index.vue.mjs +212 -212
- package/es/src/ap-list/index.vue.mjs +116 -116
- package/es/src/ap-table/ap-table.vue2.mjs +217 -217
- package/es/src/ap-table/components/index/index.vue2.mjs +9 -9
- package/es/src/ap-table/components/setting/modal/index.vue2.mjs +52 -51
- package/es/src/ap-table/components/setting/select-group/index.vue2.mjs +21 -21
- package/es/src/ap-table/components/setting/sortable/index.vue2.mjs +15 -15
- package/es/src/ap-table/components/setting/sortable/item.vue2.mjs +69 -69
- package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
- package/es/src/ap-table/components/setting/template/edit-form.vue2.mjs +31 -30
- package/es/src/ap-table/components/setting/template/index.vue2.mjs +25 -25
- package/es/src/ap-table/components/setting/template/item.vue2.mjs +41 -40
- package/es/src/ap-table/components/setting/tree-select/index.vue2.mjs +14 -14
- package/es/src/ap-table/style/setting.mjs +2 -2
- package/es/src/business/ag-grid-modal/modal-layout/index.vue2.mjs +54 -54
- package/es/src/business/ag-grid-modal/selected-items/default.vue2.mjs +13 -13
- package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +20 -20
- package/es/src/business/ap-descriptions/ap-descriptions.vue.mjs +33 -33
- package/es/src/business/ap-descriptions/help-message/index.vue2.mjs +13 -13
- package/es/src/business/ap-download/ap-download.vue.mjs +24 -24
- package/es/src/business/ap-expand-alert/ApExpandAlert.vue.mjs +77 -77
- package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +33 -33
- package/es/src/business/ap-status/group/ApStatusGroup.vue2.mjs +12 -12
- package/es/src/business/ap-table-modal/table-layout/index.vue2.mjs +43 -43
- package/es/src/business/ap-table-modal/table-modal.vue2.mjs +57 -57
- package/es/src/business/ap-tag/ap-tag-group.vue.mjs +37 -37
- package/es/src/business/ap-tag/ap-tag.vue.mjs +24 -24
- package/es/src/business/ap-title/ApTitle.vue2.mjs +27 -27
- package/es/src/business/ap-value-select-card/index.vue2.mjs +98 -98
- package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/es/src/business/batch-input-group/form-item.vue.mjs +25 -25
- package/es/src/business/batch-input-group/index.vue.mjs +60 -60
- package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +29 -29
- package/es/src/editable-table/form-item.vue.mjs +35 -35
- package/es/src/editable-table/index.vue.mjs +19 -19
- package/es/src/full-screen/index.vue.mjs +46 -46
- package/es/src/locale/lang/en.mjs +2 -1
- package/es/src/locale/lang/zh-cn.mjs +2 -1
- package/es/src/mask/index.vue.mjs +48 -48
- package/es/src/portal/index.vue.mjs +5 -5
- package/es/src/scroll-bar/internal.vue.mjs +62 -62
- package/es/src/scroll-view/index.vue.mjs +66 -66
- package/es/src/skeleton/components/desc/index.vue2.mjs +9 -9
- package/es/src/skeleton/components/desc/item-large.vue2.mjs +25 -25
- package/es/src/skeleton/components/desc/item.vue2.mjs +13 -13
- package/es/src/skeleton/components/list/index.vue2.mjs +14 -14
- package/es/src/skeleton/components/list/item.vue2.mjs +12 -12
- package/es/src/skeleton/components/page-header/index.vue2.mjs +8 -8
- package/es/src/skeleton/components/search-form/index.vue2.mjs +35 -35
- package/es/src/skeleton/components/table/index.vue2.mjs +17 -17
- package/es/src/skeleton/components/table/item.vue2.mjs +23 -23
- package/es/src/skeleton/descriptions.vue2.mjs +15 -15
- package/es/src/skeleton/list-page.vue2.mjs +12 -12
- package/es/src/splitter/Panel.vue2.mjs +11 -11
- package/es/src/splitter/SplitBar.vue2.mjs +79 -79
- package/es/src/splitter/Splitter.vue2.mjs +50 -50
- package/es/src/text/group.vue.mjs +8 -8
- package/es/src/text/index.vue.mjs +48 -48
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/src/ag-grid/components/body-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/empty/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/header-cell/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/row/index.vue2.js +1 -1
- package/lib/src/ag-grid/components/tooltip/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/ap-action/group/index.vue.js +1 -1
- package/lib/src/ap-action/item/index.vue2.js +1 -1
- package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/index.vue.js +1 -1
- package/lib/src/ap-field/checkbox/read.vue2.js +1 -1
- package/lib/src/ap-field/date/index.vue.js +1 -1
- package/lib/src/ap-field/date/read.vue2.js +1 -1
- package/lib/src/ap-field/date-range/index.vue.js +1 -1
- package/lib/src/ap-field/date-range/read.vue2.js +1 -1
- package/lib/src/ap-field/number/index.vue.js +1 -1
- package/lib/src/ap-field/radio/index.vue.js +1 -1
- package/lib/src/ap-field/second/index.vue.js +1 -1
- package/lib/src/ap-field/second/read.vue2.js +1 -1
- package/lib/src/ap-field/segmented/index.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +12 -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.js +1 -1
- package/lib/src/ap-field/style/select.js +1 -1
- package/lib/src/ap-field/switch/index.vue.js +1 -1
- package/lib/src/ap-field/text/read-password.vue2.js +1 -1
- package/lib/src/ap-field/text/read.vue2.js +1 -1
- package/lib/src/ap-field/text-area/index.vue.js +1 -1
- package/lib/src/ap-field/text-area/read.vue2.js +1 -1
- package/lib/src/ap-field/tree-select/index.vue.js +1 -1
- package/lib/src/ap-form/ap-form.vue2.js +1 -1
- package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
- package/lib/src/ap-form/item/index.vue.js +1 -1
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -1
- package/lib/src/ap-form/items/number/index.vue.js +1 -1
- package/lib/src/ap-form/items/radio/index.vue.js +1 -1
- package/lib/src/ap-form/items/switch/index.vue.js +1 -1
- package/lib/src/ap-form/items/text/index.vue2.js +1 -1
- package/lib/src/ap-form/items/text/password.vue.js +1 -1
- package/lib/src/ap-form/items/text-area/index.vue.js +1 -1
- package/lib/src/ap-form/modal-form/index.vue.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-filter.vue2.js +1 -1
- package/lib/src/ap-form/search-form/components/popover-sorter/sortable-item.vue2.js +1 -1
- package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-grid/editable/index.vue.js +1 -1
- package/lib/src/ap-grid/index.vue.js +1 -1
- package/lib/src/ap-list/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue2.js +1 -1
- package/lib/src/ap-table/components/index/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/select-group/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/sortable/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +1 -0
- package/lib/src/ap-table/components/setting/template/edit-form.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/index.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/template/item.vue2.js +1 -1
- package/lib/src/ap-table/components/setting/tree-select/index.vue2.js +1 -1
- package/lib/src/ap-table/style/setting.js +1 -1
- package/lib/src/business/ag-grid-modal/modal-layout/index.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/selected-items/default.vue2.js +1 -1
- package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
- package/lib/src/business/ap-descriptions/ap-descriptions.vue.js +1 -1
- package/lib/src/business/ap-descriptions/help-message/index.vue2.js +1 -1
- package/lib/src/business/ap-download/ap-download.vue.js +1 -1
- package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.js +1 -1
- package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
- package/lib/src/business/ap-status/group/ApStatusGroup.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-layout/index.vue2.js +1 -1
- package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
- package/lib/src/business/ap-tag/ap-tag-group.vue.js +1 -1
- package/lib/src/business/ap-tag/ap-tag.vue.js +1 -1
- package/lib/src/business/ap-title/ApTitle.vue2.js +1 -1
- package/lib/src/business/ap-value-select-card/index.vue2.js +1 -1
- package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
- package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
- package/lib/src/business/batch-input-group/index.vue.js +2 -2
- package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -2
- package/lib/src/editable-table/form-item.vue.js +1 -1
- package/lib/src/editable-table/index.vue.js +1 -1
- package/lib/src/full-screen/index.vue.js +1 -1
- package/lib/src/locale/lang/en.js +1 -1
- package/lib/src/locale/lang/zh-cn.js +1 -1
- package/lib/src/mask/index.vue.js +1 -1
- package/lib/src/portal/index.vue.js +1 -1
- package/lib/src/scroll-bar/internal.vue.js +1 -1
- package/lib/src/scroll-view/index.vue.js +1 -1
- package/lib/src/skeleton/components/desc/index.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item-large.vue2.js +1 -1
- package/lib/src/skeleton/components/desc/item.vue2.js +1 -1
- package/lib/src/skeleton/components/list/index.vue2.js +1 -1
- package/lib/src/skeleton/components/list/item.vue2.js +1 -1
- package/lib/src/skeleton/components/page-header/index.vue2.js +1 -1
- package/lib/src/skeleton/components/search-form/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/index.vue2.js +1 -1
- package/lib/src/skeleton/components/table/item.vue2.js +1 -1
- package/lib/src/skeleton/descriptions.vue2.js +1 -1
- package/lib/src/skeleton/list-page.vue2.js +1 -1
- package/lib/src/splitter/Panel.vue2.js +1 -1
- package/lib/src/splitter/SplitBar.vue2.js +1 -1
- package/lib/src/splitter/Splitter.vue2.js +1 -1
- package/lib/src/text/group.vue.js +1 -1
- package/lib/src/text/index.vue.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Select as
|
|
3
|
-
import { debounce as
|
|
1
|
+
import { defineComponent as ie, useSlots as de, ref as I, shallowRef as ce, computed as s, onMounted as pe, watch as fe, unref as n, createVNode as c, createElementBlock as _, createBlock as C, openBlock as p, toDisplayString as N, mergeProps as me, h as he, createSlots as ve, withCtx as f, createElementVNode as x, normalizeClass as m, createCommentVNode as M, resolveDynamicComponent as P, withModifiers as ye, renderList as ge, renderSlot as Ce, normalizeProps as be, guardReactiveProps as we } from "vue";
|
|
2
|
+
import { Select as Se, Flex as D, Checkbox as T, Spin as ke } from "@aplus-frontend/antdv";
|
|
3
|
+
import { debounce as Be, isFunction as q, isArray as Ne, isNil as xe, omit as L, isNumber as Fe } from "lodash-unified";
|
|
4
4
|
import "../../config-provider/index.mjs";
|
|
5
5
|
import "../../utils/index.mjs";
|
|
6
6
|
import "../../hooks/index.mjs";
|
|
7
|
-
import { useDefaultPlaceholder as
|
|
8
|
-
import
|
|
9
|
-
import { useSelectOptions as
|
|
10
|
-
import { useNamespace as
|
|
11
|
-
import { useLocale as
|
|
12
|
-
import { useControllableValue as
|
|
7
|
+
import { useDefaultPlaceholder as Oe } from "../hooks/use-default-placeholder.mjs";
|
|
8
|
+
import Ae from "../style/index.mjs";
|
|
9
|
+
import { useSelectOptions as Ve } from "./use-select-options.mjs";
|
|
10
|
+
import { useNamespace as R } from "../../config-provider/hooks/use-namespace.mjs";
|
|
11
|
+
import { useLocale as Ie } from "../../config-provider/hooks/use-locale.mjs";
|
|
12
|
+
import { useControllableValue as _e } from "../../hooks/useControllableValue.mjs";
|
|
13
13
|
import { isDef as z } from "../../utils/is.mjs";
|
|
14
|
-
const
|
|
14
|
+
const Me = {
|
|
15
15
|
key: 0
|
|
16
|
-
},
|
|
16
|
+
}, Pe = ["onClick"], Ge = /* @__PURE__ */ ie({
|
|
17
17
|
name: "ApFieldSelect",
|
|
18
18
|
__name: "index",
|
|
19
19
|
props: {
|
|
@@ -172,189 +172,192 @@ const Ie = {
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
emits: ["update:value"],
|
|
175
|
-
setup(
|
|
175
|
+
setup(E, {
|
|
176
176
|
expose: U,
|
|
177
177
|
emit: $
|
|
178
178
|
}) {
|
|
179
179
|
let r = 0;
|
|
180
|
-
const
|
|
181
|
-
b
|
|
182
|
-
} =
|
|
180
|
+
const F = de(), e = E, {
|
|
181
|
+
b
|
|
182
|
+
} = R("field-select"), {
|
|
183
|
+
b: i
|
|
184
|
+
} = R("field-select-popup-option"), K = Ae("field"), O = I(!1), {
|
|
183
185
|
t: A
|
|
184
|
-
} =
|
|
185
|
-
if (!
|
|
186
|
+
} = Ie(), j = Be((t) => {
|
|
187
|
+
if (!q(e.request))
|
|
186
188
|
return;
|
|
187
189
|
r += 1;
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
r ===
|
|
190
|
+
const o = r;
|
|
191
|
+
y([]), u.value = !0, e.request(t).then((l) => {
|
|
192
|
+
r === o && (y(l), u.value = !1);
|
|
191
193
|
});
|
|
192
|
-
}, e.searchDelay),
|
|
193
|
-
const
|
|
194
|
-
return typeof
|
|
194
|
+
}, e.searchDelay), H = (t, o) => {
|
|
195
|
+
const l = e.fieldNames?.label || "label";
|
|
196
|
+
return typeof o?.[l] == "string" && o[l].toLowerCase().indexOf(t.toLowerCase()) > -1;
|
|
195
197
|
}, {
|
|
196
198
|
options: h,
|
|
197
|
-
updateOptions:
|
|
198
|
-
} =
|
|
199
|
+
updateOptions: y
|
|
200
|
+
} = Ve(e), w = ce(), u = I(e?.loading || !1), W = $, G = s(() => {
|
|
199
201
|
if (e.multiple)
|
|
200
202
|
return e.tokenSeparators ? "tags" : "multiple";
|
|
201
203
|
});
|
|
202
|
-
async function
|
|
203
|
-
if (!
|
|
204
|
+
async function g(t = !0) {
|
|
205
|
+
if (!q(e.request))
|
|
204
206
|
return;
|
|
205
207
|
u.value = !0, r += 1;
|
|
206
|
-
const
|
|
208
|
+
const o = r;
|
|
207
209
|
try {
|
|
208
|
-
t &&
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
210
|
+
t && y([]);
|
|
211
|
+
const l = await e.request(void 0, e.params);
|
|
212
|
+
if (o !== r)
|
|
211
213
|
return;
|
|
212
|
-
|
|
214
|
+
y(l);
|
|
213
215
|
} finally {
|
|
214
216
|
u.value = !1;
|
|
215
217
|
}
|
|
216
218
|
}
|
|
217
|
-
function
|
|
218
|
-
e.onFocus?.(t), e.refetchOnFocus && r > 0 && !u.value &&
|
|
219
|
+
function J(t) {
|
|
220
|
+
e.onFocus?.(t), e.refetchOnFocus && r > 0 && !u.value && g(!0);
|
|
219
221
|
}
|
|
220
|
-
|
|
221
|
-
e.lazy ||
|
|
222
|
-
}),
|
|
223
|
-
|
|
222
|
+
pe(() => {
|
|
223
|
+
e.lazy || g();
|
|
224
|
+
}), fe(() => e.params, () => {
|
|
225
|
+
g();
|
|
224
226
|
}, {
|
|
225
227
|
deep: !0
|
|
226
228
|
});
|
|
227
229
|
const {
|
|
228
|
-
value:
|
|
229
|
-
updateValue:
|
|
230
|
-
} =
|
|
231
|
-
const t =
|
|
230
|
+
value: d,
|
|
231
|
+
updateValue: S
|
|
232
|
+
} = _e(e, W), Q = Oe("Select", e), X = s(() => {
|
|
233
|
+
const t = n(d);
|
|
232
234
|
if (!t)
|
|
233
235
|
return e.emptyText;
|
|
234
|
-
const
|
|
235
|
-
return
|
|
236
|
-
}),
|
|
237
|
-
const t = !!e?.showSearch,
|
|
238
|
-
let
|
|
239
|
-
return t && (
|
|
236
|
+
const o = e.fieldNames?.label || "label", l = e.fieldNames?.value || "value";
|
|
237
|
+
return Ne(t) ? t.map((v) => n(h).find((re) => re[l] === v)?.[o]).filter(Boolean).join("、") || e.emptyText : n(h).find((v) => v[l] === t)?.[o] || e.emptyText;
|
|
238
|
+
}), Y = s(() => {
|
|
239
|
+
const t = !!e?.showSearch, o = e.searchMode;
|
|
240
|
+
let l = {};
|
|
241
|
+
return t && (l = o === "request" ? {
|
|
240
242
|
defaultActiveFirstOption: !1,
|
|
241
243
|
onSearch: j,
|
|
242
244
|
notFoundContent: u.value ? void 0 : null,
|
|
243
245
|
filterOption: !1,
|
|
244
246
|
suffixIcon: null
|
|
245
247
|
} : {
|
|
246
|
-
filterOption: xe(e?.filterOption) ?
|
|
248
|
+
filterOption: xe(e?.filterOption) ? H : e?.filterOption
|
|
247
249
|
}), {
|
|
248
|
-
...
|
|
249
|
-
placeholder:
|
|
250
|
-
...
|
|
250
|
+
...L(e, ["mode", "value", "onUpdate:value", "onSearch", "request", "searchMode", "onFocus", "onBeforeSelect"]),
|
|
251
|
+
placeholder: n(Q),
|
|
252
|
+
...l
|
|
251
253
|
};
|
|
252
|
-
}),
|
|
253
|
-
function
|
|
254
|
-
|
|
254
|
+
}), Z = s(() => h.value.map((t) => t[e.fieldNames?.value || "value"])), k = s(() => h.value.filter((t) => !t.disabled).map((t) => t[e.fieldNames?.value || "value"])), V = s(() => !e.multiple || z(e.maxCount) ? !1 : Fe(e.addAll) ? Z.value.length >= e.addAll : !!e.addAll), ee = s(() => e.multiple && e.allowOnlySelect && (!z(e.maxCount) || e.maxCount >= 1));
|
|
255
|
+
function te() {
|
|
256
|
+
w.value?.focus();
|
|
255
257
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
258
|
+
function oe() {
|
|
259
|
+
w.value?.blur();
|
|
258
260
|
}
|
|
259
|
-
function
|
|
260
|
-
const
|
|
261
|
-
return t[
|
|
261
|
+
function B(t, o) {
|
|
262
|
+
const l = e.fieldNames?.[o] ?? o;
|
|
263
|
+
return t[l];
|
|
262
264
|
}
|
|
263
|
-
function
|
|
264
|
-
const
|
|
265
|
-
|
|
265
|
+
function le(t) {
|
|
266
|
+
const o = B(t, "value");
|
|
267
|
+
S(e.multiple ? [o] : o);
|
|
266
268
|
}
|
|
267
|
-
function
|
|
268
|
-
return
|
|
269
|
-
class:
|
|
270
|
-
}, [
|
|
271
|
-
class:
|
|
272
|
-
}, [
|
|
269
|
+
function ne(t) {
|
|
270
|
+
return F.option ? c("div", {
|
|
271
|
+
class: i("custom")
|
|
272
|
+
}, [F.option(t)]) : c("span", {
|
|
273
|
+
class: i("label")
|
|
274
|
+
}, [B(t, "label")]);
|
|
273
275
|
}
|
|
274
|
-
const
|
|
275
|
-
const t =
|
|
276
|
-
return
|
|
277
|
-
}),
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
276
|
+
const ae = s(() => {
|
|
277
|
+
const t = n(d) || [], o = k.value;
|
|
278
|
+
return o.length > 0 && o.every((l) => t.includes(l));
|
|
279
|
+
}), se = s(() => {
|
|
280
|
+
const t = n(d) || [], o = k.value, l = o.filter((a) => t.includes(a)).length;
|
|
281
|
+
return l > 0 && l < o.length;
|
|
282
|
+
});
|
|
283
|
+
function ue() {
|
|
284
|
+
const t = new Set(n(d) || []), o = k.value;
|
|
285
|
+
o.length > 0 && o.every((a) => t.has(a)) ? o.forEach((a) => t.delete(a)) : o.forEach((a) => t.add(a)), S([...t]);
|
|
282
286
|
}
|
|
283
287
|
return U({
|
|
284
|
-
focus:
|
|
285
|
-
blur:
|
|
286
|
-
request:
|
|
287
|
-
}), (t,
|
|
288
|
+
focus: te,
|
|
289
|
+
blur: oe,
|
|
290
|
+
request: g
|
|
291
|
+
}), (t, o) => t.mode === "read" ? (p(), _("span", Me, N(X.value), 1)) : (p(), C(n(Se), me({
|
|
288
292
|
key: 1,
|
|
289
293
|
ref_key: "selectRef",
|
|
290
|
-
ref:
|
|
294
|
+
ref: w,
|
|
291
295
|
"allow-clear": ""
|
|
292
|
-
},
|
|
293
|
-
mode:
|
|
294
|
-
value:
|
|
295
|
-
options:
|
|
296
|
+
}, Y.value, {
|
|
297
|
+
mode: G.value,
|
|
298
|
+
value: n(d),
|
|
299
|
+
options: n(h),
|
|
296
300
|
loading: u.value,
|
|
297
|
-
"menu-item-selected-icon":
|
|
298
|
-
"popup-class-name": `${
|
|
299
|
-
open:
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
301
|
+
"menu-item-selected-icon": he("span"),
|
|
302
|
+
"popup-class-name": `${n(b)("popup")} ${n(K)}`,
|
|
303
|
+
open: O.value,
|
|
304
|
+
"onUpdate:value": n(S),
|
|
305
|
+
onFocus: J,
|
|
306
|
+
onDropdownVisibleChange: o[0] || (o[0] = (l) => O.value = l)
|
|
307
|
+
}), ve({
|
|
308
|
+
option: f((l) => [x("div", {
|
|
309
|
+
class: m(n(i)("outter"))
|
|
310
|
+
}, [c(n(D), {
|
|
306
311
|
justify: "space-between",
|
|
307
312
|
align: "center",
|
|
308
|
-
class:
|
|
313
|
+
class: m(n(i)("wrapper")),
|
|
309
314
|
gap: 8
|
|
310
315
|
}, {
|
|
311
|
-
default:
|
|
316
|
+
default: f(() => [c(n(D), {
|
|
312
317
|
gap: 8,
|
|
313
318
|
align: "center",
|
|
314
|
-
class:
|
|
319
|
+
class: m(n(i)("content-wrapper"))
|
|
315
320
|
}, {
|
|
316
|
-
default:
|
|
321
|
+
default: f(() => [V.value ? (p(), C(n(T), {
|
|
317
322
|
key: 0,
|
|
318
|
-
checked:
|
|
319
|
-
}, null, 8, ["checked"])) :
|
|
323
|
+
checked: n(d)?.includes(B(l, "value"))
|
|
324
|
+
}, null, 8, ["checked"])) : M("", !0), (p(), C(P(ne(l))))]),
|
|
320
325
|
_: 2
|
|
321
|
-
}, 1032, ["class"]),
|
|
326
|
+
}, 1032, ["class"]), ee.value && !l?.disabled ? (p(), _("span", {
|
|
322
327
|
key: 0,
|
|
323
|
-
class:
|
|
324
|
-
onClick:
|
|
325
|
-
},
|
|
328
|
+
class: m(n(i)("action")),
|
|
329
|
+
onClick: ye(() => le(l), ["stop"])
|
|
330
|
+
}, N(n(A)("ap.field.chooseOnly")), 11, Pe)) : M("", !0)]),
|
|
326
331
|
_: 2
|
|
327
|
-
}, 1032, ["class"])]),
|
|
332
|
+
}, 1032, ["class"])], 2)]),
|
|
328
333
|
_: 2
|
|
329
|
-
}, [
|
|
330
|
-
name:
|
|
331
|
-
fn:
|
|
334
|
+
}, [ge(n(L)(t.$slots, ["option"]), (l, a) => ({
|
|
335
|
+
name: a,
|
|
336
|
+
fn: f((v) => [Ce(t.$slots, a, be(we(v || {})))])
|
|
332
337
|
})), u.value ? {
|
|
333
338
|
name: "notFoundContent",
|
|
334
|
-
fn:
|
|
339
|
+
fn: f(() => [c(n(ke), {
|
|
335
340
|
size: "small"
|
|
336
341
|
})]),
|
|
337
342
|
key: "0"
|
|
338
343
|
} : void 0, V.value ? {
|
|
339
344
|
name: "dropdownRender",
|
|
340
|
-
fn:
|
|
341
|
-
menuNode:
|
|
342
|
-
}) => [
|
|
343
|
-
class: f(o(a)("popup-all-option-wrapper"))
|
|
344
|
-
}, [k("div", {
|
|
345
|
+
fn: f(({
|
|
346
|
+
menuNode: l
|
|
347
|
+
}) => [x("div", {
|
|
345
348
|
tabindex: -1,
|
|
346
|
-
class:
|
|
347
|
-
onClick:
|
|
348
|
-
}, [
|
|
349
|
-
checked:
|
|
350
|
-
indeterminate:
|
|
351
|
-
}, null, 8, ["checked", "indeterminate"]),
|
|
352
|
-
class:
|
|
353
|
-
},
|
|
349
|
+
class: m(n(b)("popup-all-option")),
|
|
350
|
+
onClick: ue
|
|
351
|
+
}, [c(n(T), {
|
|
352
|
+
checked: ae.value,
|
|
353
|
+
indeterminate: se.value
|
|
354
|
+
}, null, 8, ["checked", "indeterminate"]), x("span", {
|
|
355
|
+
class: m(n(b)("popup-all-option-label"))
|
|
356
|
+
}, N(n(A)("ap.field.selectAll")), 3)], 2), (p(), C(P(l)))]),
|
|
354
357
|
key: "1"
|
|
355
358
|
} : void 0]), 1040, ["mode", "value", "options", "loading", "menu-item-selected-icon", "popup-class-name", "open", "onUpdate:value"]));
|
|
356
359
|
}
|
|
357
360
|
});
|
|
358
361
|
export {
|
|
359
|
-
|
|
362
|
+
Ge as default
|
|
360
363
|
};
|
|
@@ -96,19 +96,19 @@ const f = { key: 0 }, C = /* @__PURE__ */ i({
|
|
|
96
96
|
searchDelay: {},
|
|
97
97
|
allowOnlySelect: { type: Boolean }
|
|
98
98
|
},
|
|
99
|
-
setup(
|
|
100
|
-
const e =
|
|
99
|
+
setup(l) {
|
|
100
|
+
const e = l, r = s(() => {
|
|
101
101
|
const o = e.value;
|
|
102
102
|
if (!o)
|
|
103
103
|
return e.emptyText;
|
|
104
|
-
const t = e.fieldNames?.label || "label",
|
|
104
|
+
const t = e.fieldNames?.label || "label", a = e.fieldNames?.value || "value";
|
|
105
105
|
return y(o) ? o.map(
|
|
106
|
-
(n) => e.options?.find((p) => p[
|
|
106
|
+
(n) => e.options?.find((p) => p[a] === n)?.[t]
|
|
107
107
|
).filter(Boolean).join("、") || e.emptyText : e.options?.find(
|
|
108
|
-
(n) => n[
|
|
108
|
+
(n) => n[a] === o
|
|
109
109
|
)?.[t] || e.emptyText;
|
|
110
110
|
});
|
|
111
|
-
return (o, t) =>
|
|
111
|
+
return (o, t) => o.mode === "read" ? (u(), d("span", f, m(r.value), 1)) : c("", !0);
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as B, useSlots as x, shallowRef as C, computed as b, unref as t, createElementBlock as g, createBlock as k, openBlock as
|
|
1
|
+
import { defineComponent as B, useSlots as x, shallowRef as C, computed as b, unref as t, createElementBlock as g, createBlock as k, openBlock as n, Fragment as F, createTextVNode as S, toDisplayString as h, mergeProps as T, createSlots as V, renderList as _, withCtx as P, renderSlot as R, normalizeProps as N, guardReactiveProps as U } from "vue";
|
|
2
2
|
import { Slider as A } from "@aplus-frontend/antdv";
|
|
3
3
|
import { isNil as H, isArray as L, omit as $ } from "lodash-unified";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
@@ -52,9 +52,9 @@ const G = /* @__PURE__ */ B({
|
|
|
52
52
|
emptyText: { default: "--" }
|
|
53
53
|
},
|
|
54
54
|
emits: ["update:value"],
|
|
55
|
-
setup(
|
|
56
|
-
const
|
|
57
|
-
const e = t(
|
|
55
|
+
setup(s, { expose: u, emit: i }) {
|
|
56
|
+
const p = x(), o = C(), a = s, d = i, { value: l, updateValue: m } = w(a, d), c = b(() => {
|
|
57
|
+
const e = t(l);
|
|
58
58
|
return H(e) ? a.emptyText : L(e) ? `${e[0]}-${e[1]}` : e;
|
|
59
59
|
});
|
|
60
60
|
function f() {
|
|
@@ -66,9 +66,9 @@ const G = /* @__PURE__ */ B({
|
|
|
66
66
|
return u({
|
|
67
67
|
focus: f,
|
|
68
68
|
blur: y
|
|
69
|
-
}), (e, j) =>
|
|
69
|
+
}), (e, j) => e.mode === "read" ? (n(), g(F, { key: 0 }, [
|
|
70
70
|
S(h(c.value), 1)
|
|
71
|
-
], 64)) : (
|
|
71
|
+
], 64)) : (n(), k(t(A), T(
|
|
72
72
|
{ key: 1 },
|
|
73
73
|
t($)(a, [
|
|
74
74
|
"value",
|
|
@@ -80,14 +80,14 @@ const G = /* @__PURE__ */ B({
|
|
|
80
80
|
{
|
|
81
81
|
ref_key: "sliderRef",
|
|
82
82
|
ref: o,
|
|
83
|
-
value: t(
|
|
83
|
+
value: t(l),
|
|
84
84
|
"onUpdate:value": t(m)
|
|
85
85
|
}
|
|
86
86
|
), V({ _: 2 }, [
|
|
87
|
-
|
|
88
|
-
name:
|
|
89
|
-
fn:
|
|
90
|
-
|
|
87
|
+
_(p, (q, r) => ({
|
|
88
|
+
name: r,
|
|
89
|
+
fn: P((v) => [
|
|
90
|
+
R(e.$slots, r, N(U(v || {})))
|
|
91
91
|
])
|
|
92
92
|
}))
|
|
93
93
|
]), 1040, ["value", "onUpdate:value"]));
|
|
@@ -1,73 +1,90 @@
|
|
|
1
|
-
import { singleRow as
|
|
2
|
-
const
|
|
3
|
-
const { componentCls:
|
|
1
|
+
import { singleRow as n } from "../../style/index.mjs";
|
|
2
|
+
const a = (o) => {
|
|
3
|
+
const { componentCls: t } = o, i = `${t}-select-popup`;
|
|
4
4
|
return {
|
|
5
|
-
[`${
|
|
6
|
-
padding:
|
|
7
|
-
[`${
|
|
8
|
-
padding: i.space,
|
|
9
|
-
paddingBlockEnd: i.spaceXS,
|
|
10
|
-
marginBlockEnd: i.calc(i.space).mul(-1).equal()
|
|
11
|
-
},
|
|
12
|
-
[`${p}-all-option`]: {
|
|
5
|
+
[`${i}`]: {
|
|
6
|
+
padding: o.space,
|
|
7
|
+
[`${i}-all-option`]: {
|
|
13
8
|
width: "100%",
|
|
14
9
|
display: "inline-flex",
|
|
15
10
|
cursor: "pointer",
|
|
16
|
-
paddingInline:
|
|
17
|
-
paddingBlock:
|
|
18
|
-
[`${
|
|
19
|
-
paddingInline:
|
|
11
|
+
paddingInline: o.space,
|
|
12
|
+
paddingBlock: o.spaceSM,
|
|
13
|
+
[`${i}-all-option-label`]: {
|
|
14
|
+
paddingInline: o.space
|
|
20
15
|
}
|
|
21
16
|
},
|
|
22
|
-
[`${
|
|
23
|
-
|
|
17
|
+
[`${i}-option-outter`]: {
|
|
18
|
+
borderRadius: o.antdv.borderRadiusSM,
|
|
19
|
+
paddingInline: o.space
|
|
20
|
+
},
|
|
21
|
+
[`${i}-option-wrapper`]: {
|
|
22
|
+
height: "30px"
|
|
24
23
|
},
|
|
25
|
-
[`${
|
|
24
|
+
[`${i}-option-content-wrapper`]: {
|
|
26
25
|
flex: 1,
|
|
27
26
|
flexShrink: 1,
|
|
28
27
|
minWidth: 0
|
|
29
28
|
},
|
|
30
|
-
[`${
|
|
31
|
-
...
|
|
29
|
+
[`${i}-option-label`]: {
|
|
30
|
+
...n(o),
|
|
32
31
|
color: "inherit"
|
|
33
32
|
},
|
|
34
|
-
[`${
|
|
33
|
+
[`${i}-option-custom`]: {
|
|
35
34
|
flex: 1,
|
|
36
35
|
flexShrink: 1,
|
|
37
36
|
minWidth: 0
|
|
38
37
|
},
|
|
39
|
-
[`${
|
|
38
|
+
[`${i}-option-action`]: {
|
|
40
39
|
display: "none",
|
|
41
|
-
color:
|
|
42
|
-
paddingInline:
|
|
43
|
-
paddingBlock:
|
|
40
|
+
color: o.colorPrimary,
|
|
41
|
+
paddingInline: o.spaceSM,
|
|
42
|
+
paddingBlock: o.spaceXXS,
|
|
44
43
|
"&:hover": {
|
|
45
|
-
background:
|
|
44
|
+
background: o.colorPrimary,
|
|
46
45
|
color: "#fff",
|
|
47
46
|
borderRadius: "2px"
|
|
48
47
|
}
|
|
49
48
|
},
|
|
50
49
|
"div.ant-select-item": {
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
padding: 0,
|
|
51
|
+
paddingBlockEnd: o.spaceXS,
|
|
53
52
|
fontWeight: "normal !important",
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
"&.ant-select-item-option-active:not(.ant-select-item-option-disabled)": {
|
|
54
|
+
backgroundColor: "unset",
|
|
55
|
+
[`& ${i}-option-outter`]: {
|
|
56
|
+
backgroundColor: o.antdv.controlItemBgHover
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"&.ant-select-item-option-selected:not(.ant-select-item-option-disabled)": {
|
|
60
|
+
backgroundColor: "unset",
|
|
61
|
+
[`& ${i}-option-outter`]: {
|
|
62
|
+
backgroundColor: o.antdv.controlItemBgActive
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"&.ant-select-item-option-disabled.ant-select-item-option-selected": {
|
|
66
|
+
backgroundColor: "unset",
|
|
67
|
+
[`& ${i}-option-outter`]: {
|
|
68
|
+
backgroundColor: o.antdv.colorBgContainerDisabled
|
|
69
|
+
}
|
|
70
|
+
},
|
|
56
71
|
"&:hover": {
|
|
57
|
-
[`${
|
|
72
|
+
[`${i}-option-action`]: {
|
|
58
73
|
display: "inline"
|
|
59
74
|
}
|
|
60
75
|
},
|
|
61
76
|
"&:last-child": {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
77
|
+
paddingBlockEnd: 0
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
[`&:has(${i}-all-option)`]: {
|
|
81
|
+
"div.ant-select-item:first-child": {
|
|
82
|
+
paddingBlockStart: o.spaceXS
|
|
66
83
|
}
|
|
67
84
|
}
|
|
68
85
|
}
|
|
69
86
|
};
|
|
70
87
|
};
|
|
71
88
|
export {
|
|
72
|
-
|
|
89
|
+
a as genSelectStyle
|
|
73
90
|
};
|