x-next 1.10.0 → 1.11.0
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/AI_CODING.md +97 -0
- package/AI_USAGE/catalog.md +111 -0
- package/AI_USAGE/components/alert.md +33 -0
- package/AI_USAGE/components/bar-chart.md +46 -0
- package/AI_USAGE/components/button.md +35 -0
- package/AI_USAGE/components/checkbox.md +34 -0
- package/AI_USAGE/components/color-picker.md +36 -0
- package/AI_USAGE/components/config-provider.md +58 -0
- package/AI_USAGE/components/date-picker.md +34 -0
- package/AI_USAGE/components/dialog.md +37 -0
- package/AI_USAGE/components/dropdown.md +38 -0
- package/AI_USAGE/components/empty.md +30 -0
- package/AI_USAGE/components/input.md +32 -0
- package/AI_USAGE/components/line-chart.md +45 -0
- package/AI_USAGE/components/message-box.md +39 -0
- package/AI_USAGE/components/message.md +36 -0
- package/AI_USAGE/components/notification.md +37 -0
- package/AI_USAGE/components/pagination.md +32 -0
- package/AI_USAGE/components/pie-chart.md +55 -0
- package/AI_USAGE/components/popconfirm.md +33 -0
- package/AI_USAGE/components/popover.md +35 -0
- package/AI_USAGE/components/progress.md +32 -0
- package/AI_USAGE/components/radio.md +35 -0
- package/AI_USAGE/components/rate.md +30 -0
- package/AI_USAGE/components/select.md +38 -0
- package/AI_USAGE/components/slider.md +34 -0
- package/AI_USAGE/components/steps.md +33 -0
- package/AI_USAGE/components/switch.md +32 -0
- package/AI_USAGE/components/tabs.md +33 -0
- package/AI_USAGE/components/textarea.md +31 -0
- package/AI_USAGE/components/time-picker.md +34 -0
- package/AI_USAGE/components/upload.md +60 -0
- package/AI_USAGE/core.md +37 -0
- package/AI_USAGE/index.md +52 -0
- package/AI_USAGE/recipes/form-on-demand.md +42 -0
- package/AI_USAGE.md +173 -46
- package/CHANGELOG.md +36 -1
- package/README.md +15 -2
- package/dist/_container/resize-trigger.vue.d.ts +1 -1
- package/dist/_hooks/use-dialog-focus.d.ts +7 -0
- package/dist/_hooks/use-pointer-drag.d.ts +6 -0
- package/dist/_hooks/use-popup-close.d.ts +11 -0
- package/dist/_hooks/use-popup-theme.d.ts +5 -0
- package/dist/_utils/palette.d.ts +2 -0
- package/dist/components/_components/picker/input-range.vue.d.ts +1 -3
- package/dist/components/_components/picker/input.vue.d.ts +1 -3
- package/dist/components/_components/select-view/select-view.d.ts +9 -0
- package/dist/components/alert/Alert.vue.d.ts +1 -1
- package/dist/components/alert/index.d.ts +3 -3
- package/dist/components/bar-chart/BarChart.d.ts +3 -3
- package/dist/components/bar-chart/index.d.ts +9 -9
- package/dist/components/color-picker/ColorPicker.d.ts +2 -1
- package/dist/components/color-picker/index.d.ts +2 -0
- package/dist/components/color-picker/panel.d.ts +6 -0
- package/dist/components/config-provider/context.d.ts +7 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +9 -12
- package/dist/components/date-picker/index.d.ts +19 -27
- package/dist/components/drawer/index.d.ts +51 -9
- package/dist/components/drawer/src/Drawer.vue.d.ts +19 -4
- package/dist/components/dropdown/Dropdown.vue.d.ts +6 -3
- package/dist/components/dropdown/DropdownButton.vue.d.ts +6 -3
- package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +6 -3
- package/dist/components/dropdown/dropdown-panel.vue.d.ts +6 -3
- package/dist/components/dropdown/index.d.ts +36 -18
- package/dist/components/form-select/Select.d.ts +18 -5
- package/dist/components/form-select/SelectDropdown.vue.d.ts +6 -3
- package/dist/components/form-select/SelectOption.vue.d.ts +1 -0
- package/dist/components/form-select/SelectOptionGroup.vue.d.ts +1 -0
- package/dist/components/form-select/hooks/use-options.d.ts +1 -1
- package/dist/components/form-select/hooks/use-select.d.ts +1 -1
- package/dist/components/form-select/index.d.ts +57 -17
- package/dist/components/form-select/interface.d.ts +8 -0
- package/dist/components/form-slider/Slider.vue.d.ts +1 -1
- package/dist/components/form-slider/index.d.ts +3 -3
- package/dist/components/form-textarea/Textarea.vue.d.ts +2 -4
- package/dist/components/form-textarea/index.d.ts +6 -12
- package/dist/components/image/Image.vue.d.ts +2 -4
- package/dist/components/image/index.d.ts +6 -12
- package/dist/components/layout/LayoutSidebar.vue.d.ts +5 -5
- package/dist/components/layout/index.d.ts +10 -10
- package/dist/components/line-chart/LineChart.d.ts +3 -3
- package/dist/components/line-chart/index.d.ts +9 -9
- package/dist/components/menu/Menu.d.ts +6 -3
- package/dist/components/menu/base-menu.vue.d.ts +6 -3
- package/dist/components/menu/index.d.ts +12 -6
- package/dist/components/menu/sub-menu-pop.vue.d.ts +6 -3
- package/dist/components/network/Network.vue.d.ts +1 -1
- package/dist/components/network/index.d.ts +3 -3
- package/dist/components/pagination/page-options.vue.d.ts +60 -32
- package/dist/components/pie-chart/PieChart.d.ts +1 -1
- package/dist/components/pie-chart/index.d.ts +3 -3
- package/dist/components/resize-box/ResizeBox.vue.d.ts +2 -2
- package/dist/components/resize-box/index.d.ts +5 -5
- package/dist/components/scrollbar-v2/Scrollbar.vue.d.ts +2 -1
- package/dist/components/scrollbar-v2/index.d.ts +6 -3
- package/dist/components/table/Table.d.ts +1 -1
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/tabs/Tabs.d.ts +1 -1
- package/dist/components/tabs/index.d.ts +3 -3
- package/dist/components/time-picker/TimeColumn.vue.d.ts +6 -3
- package/dist/components/time-picker/TimePanel.vue.d.ts +6 -3
- package/dist/components/time-picker/TimePicker.vue.d.ts +9 -12
- package/dist/components/time-picker/index.d.ts +19 -27
- package/dist/components/trend-chart/components/TrendChart.d.ts +5 -5
- package/dist/components/trend-chart/components/trend-chart-curve.d.ts +1 -1
- package/dist/components/trend-chart/index.d.ts +14 -14
- package/dist/components/trigger/interface.d.ts +2 -0
- package/dist/components/virtual-list-v2/virtual-list.vue.d.ts +7 -4
- package/dist/es/_hooks/use-dialog-focus.js +69 -0
- package/dist/es/_hooks/use-pointer-drag.js +18 -0
- package/dist/es/_hooks/use-popup-close.js +27 -0
- package/dist/es/_hooks/use-popup-manager.js +26 -24
- package/dist/es/_hooks/use-popup-theme.js +18 -0
- package/dist/es/_hooks/use-teleport-container.js +9 -10
- package/dist/es/_utils/palette.js +57 -52
- package/dist/es/components/_components/select-view/select-view.js +89 -78
- package/dist/es/components/button/Button.js +1 -1
- package/dist/es/components/color-picker/ColorPicker.js +131 -102
- package/dist/es/components/color-picker/gradient-slider.js +38 -40
- package/dist/es/components/color-picker/panel.js +221 -192
- package/dist/es/components/color-picker/sv-panel.js +51 -50
- package/dist/es/components/config-provider/ConfigProvider.js +58 -41
- package/dist/es/components/dialog/Dialog.js +133 -186
- package/dist/es/components/drawer/src/Drawer.vue.js +59 -51
- package/dist/es/components/drawer/src/Drawer.vue2.js +117 -107
- package/dist/es/components/form/FormItem.vue.js +12 -12
- package/dist/es/components/form-input-tag/InputTag.js +1 -1
- package/dist/es/components/form-select/Select.js +348 -300
- package/dist/es/components/form-select/SelectDropdown.vue.js +7 -7
- package/dist/es/components/form-select/SelectOption.vue.js +22 -17
- package/dist/es/components/form-select/SelectOption.vue2.js +59 -51
- package/dist/es/components/form-select/SelectOptionGroup.vue.js +17 -13
- package/dist/es/components/form-select/SelectOptionGroup.vue2.js +8 -5
- package/dist/es/components/form-select/hooks/use-options.js +40 -40
- package/dist/es/components/form-select/hooks/use-select.js +76 -71
- package/dist/es/components/form-switch/Switch.vue.js +24 -24
- package/dist/es/components/image/Image.vue.js +12 -12
- package/dist/es/components/link/Link.vue.js +6 -6
- package/dist/es/components/menu/sub-menu-inline.vue.js +11 -11
- package/dist/es/components/menu/sub-menu-pop.vue.js +12 -12
- package/dist/es/components/notification/Notification.js +59 -59
- package/dist/es/components/resize-box/ResizeBox.vue.js +19 -22
- package/dist/es/components/skeleton/Skeleton.vue.js +9 -9
- package/dist/es/components/tag/Tag.vue.js +7 -7
- package/dist/es/components/trigger/Trigger.js +171 -163
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/style/bar-chart.js +1 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/color-picker.css +1 -1
- package/dist/style/color-picker.js +4 -0
- package/dist/style/date-picker.js +4 -0
- package/dist/style/dependencies.json +296 -0
- package/dist/style/dialog.js +2 -0
- package/dist/style/drawer.js +3 -0
- package/dist/style/dropdown.js +5 -0
- package/dist/style/form-checkbox.css +1 -1
- package/dist/style/form-input-number.js +2 -0
- package/dist/style/form-input.css +1 -1
- package/dist/style/form-input.js +1 -0
- package/dist/style/form-select.js +5 -0
- package/dist/style/form-slider.js +5 -0
- package/dist/style/form.js +3 -0
- package/dist/style/heatmap.js +1 -0
- package/dist/style/image.js +2 -0
- package/dist/style/layout.js +1 -0
- package/dist/style/line-chart.js +1 -0
- package/dist/style/menu.js +3 -0
- package/dist/style/message-box.js +3 -0
- package/dist/style/pagination.js +9 -0
- package/dist/style/pie-chart.js +1 -0
- package/dist/style/popconfirm.js +3 -0
- package/dist/style/popover.js +1 -0
- package/dist/style/popup.js +2 -0
- package/dist/style/table.js +12 -0
- package/dist/style/time-picker.js +3 -0
- package/dist/style/tooltip.js +1 -0
- package/dist/style/upload.js +4 -0
- package/dist/style.css +1 -1
- package/package.json +17 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import m from "./SelectDropdown.vue2.js";
|
|
2
|
-
import { resolveComponent as p, openBlock as l, createElementBlock as r, normalizeClass as s, renderSlot as o, createCommentVNode as a, createBlock as t, resolveDynamicComponent as i, withDirectives as d, mergeProps as u, withCtx as y, createElementVNode as
|
|
3
|
-
import
|
|
2
|
+
import { resolveComponent as p, openBlock as l, createElementBlock as r, normalizeClass as s, renderSlot as o, createCommentVNode as a, createBlock as t, resolveDynamicComponent as i, withDirectives as d, mergeProps as u, withCtx as y, createElementVNode as v, vShow as c } from "vue";
|
|
3
|
+
import f from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
4
|
const h = ["id", "aria-multiselectable", "aria-busy"];
|
|
5
|
-
function $(e,
|
|
5
|
+
function $(e, b, k, w, N, S) {
|
|
6
6
|
const n = p("spin");
|
|
7
7
|
return l(), r("div", {
|
|
8
8
|
id: e.id,
|
|
@@ -28,14 +28,14 @@ function $(e, k, b, w, N, S) {
|
|
|
28
28
|
(l(), t(i("Empty"), { component: "select" }))
|
|
29
29
|
])
|
|
30
30
|
], 2)) : a("", !0),
|
|
31
|
-
e.virtualList && !e.loading && !e.empty ? o(e.$slots, "virtual-list", {
|
|
31
|
+
e.virtualList && !e.loading && !e.empty ? o(e.$slots, "virtual-list", {}, void 0, void 0, 3) : a("", !0),
|
|
32
32
|
e.virtualList ? a("", !0) : d((l(), t(i(e.displayScrollbar ? "ScrollbarComponent" : "div"), u({
|
|
33
33
|
key: 4,
|
|
34
34
|
ref: "wrapperComRef",
|
|
35
35
|
class: e.className.element("list-wrapper")
|
|
36
36
|
}, e.scrollbarProps, { onScroll: e.handleScroll }), {
|
|
37
37
|
default: y(() => [
|
|
38
|
-
|
|
38
|
+
v("ul", {
|
|
39
39
|
class: s(e.className.element("list"))
|
|
40
40
|
}, [
|
|
41
41
|
o(e.$slots, "default")
|
|
@@ -43,7 +43,7 @@ function $(e, k, b, w, N, S) {
|
|
|
43
43
|
]),
|
|
44
44
|
_: 3
|
|
45
45
|
}, 16, ["class", "onScroll"])), [
|
|
46
|
-
[
|
|
46
|
+
[c, !e.loading && !e.empty]
|
|
47
47
|
]),
|
|
48
48
|
e.$slots.footer && (!e.empty || e.showFooterOnEmpty) ? (l(), r("div", {
|
|
49
49
|
key: 5,
|
|
@@ -53,7 +53,7 @@ function $(e, k, b, w, N, S) {
|
|
|
53
53
|
], 2)) : a("", !0)
|
|
54
54
|
], 10, h);
|
|
55
55
|
}
|
|
56
|
-
const B = /* @__PURE__ */
|
|
56
|
+
const B = /* @__PURE__ */ f(m, [["render", $]]);
|
|
57
57
|
export {
|
|
58
58
|
B as default
|
|
59
59
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { resolveComponent as
|
|
1
|
+
import f from "./SelectOption.vue2.js";
|
|
2
|
+
import { resolveComponent as c, withDirectives as p, openBlock as s, createBlock as i, resolveDynamicComponent as h, normalizeClass as o, withCtx as t, createElementBlock as a, renderSlot as l, createCommentVNode as d, withModifiers as k, createTextVNode as r, toDisplayString as m, vShow as C } from "vue";
|
|
3
3
|
import b from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
return
|
|
4
|
+
function $(e, n, v, M, N, y) {
|
|
5
|
+
const u = c("checkbox");
|
|
6
|
+
return p((s(), i(h(e.component), {
|
|
7
7
|
ref: "itemRef",
|
|
8
8
|
id: e.optionId,
|
|
9
9
|
role: "option",
|
|
@@ -14,32 +14,37 @@ function h(e, $, v, C, N, y) {
|
|
|
14
14
|
onMouseenter: e.handleMouseEnter,
|
|
15
15
|
onMouseleave: e.handleMouseLeave
|
|
16
16
|
}, {
|
|
17
|
-
default:
|
|
17
|
+
default: t(() => [
|
|
18
18
|
e.$slots.icon ? (s(), a("span", {
|
|
19
19
|
key: 0,
|
|
20
20
|
class: o(e.className.element("icon"))
|
|
21
21
|
}, [
|
|
22
22
|
l(e.$slots, "icon")
|
|
23
|
-
], 2)) :
|
|
24
|
-
e.selectCtx && e.selectCtx.multiple ? (s(),
|
|
23
|
+
], 2)) : d("", !0),
|
|
24
|
+
e.selectCtx && e.selectCtx.multiple ? (s(), i(u, {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: o(e.className.element("checkbox")),
|
|
27
27
|
"model-value": e.isSelected,
|
|
28
28
|
disabled: e.disabled,
|
|
29
|
-
|
|
29
|
+
tabindex: -1,
|
|
30
|
+
"aria-hidden": "true",
|
|
31
|
+
"uninject-group-context": "",
|
|
32
|
+
onClick: n[0] || (n[0] = k(() => {
|
|
33
|
+
}, ["stop"])),
|
|
34
|
+
onChange: e.handleCheckboxChange
|
|
30
35
|
}, {
|
|
31
|
-
default:
|
|
36
|
+
default: t(() => [
|
|
32
37
|
l(e.$slots, "default", {}, () => [
|
|
33
|
-
r(
|
|
38
|
+
r(m(e.label), 1)
|
|
34
39
|
])
|
|
35
40
|
]),
|
|
36
41
|
_: 3
|
|
37
|
-
}, 8, ["class", "model-value", "disabled"])) : (s(), a("span", {
|
|
42
|
+
}, 8, ["class", "model-value", "disabled", "onChange"])) : (s(), a("span", {
|
|
38
43
|
key: 2,
|
|
39
44
|
class: o(e.className.element("content"))
|
|
40
45
|
}, [
|
|
41
46
|
l(e.$slots, "default", {}, () => [
|
|
42
|
-
r(
|
|
47
|
+
r(m(e.label), 1)
|
|
43
48
|
])
|
|
44
49
|
], 2)),
|
|
45
50
|
e.$slots.suffix ? (s(), a("span", {
|
|
@@ -47,14 +52,14 @@ function h(e, $, v, C, N, y) {
|
|
|
47
52
|
class: o(e.className.element("suffix"))
|
|
48
53
|
}, [
|
|
49
54
|
l(e.$slots, "suffix")
|
|
50
|
-
], 2)) :
|
|
55
|
+
], 2)) : d("", !0)
|
|
51
56
|
]),
|
|
52
57
|
_: 3
|
|
53
58
|
}, 40, ["id", "aria-selected", "aria-disabled", "class", "onClick", "onMouseenter", "onMouseleave"])), [
|
|
54
|
-
[
|
|
59
|
+
[C, e.isValid]
|
|
55
60
|
]);
|
|
56
61
|
}
|
|
57
|
-
const
|
|
62
|
+
const B = /* @__PURE__ */ b(f, [["render", $]]);
|
|
58
63
|
export {
|
|
59
|
-
|
|
64
|
+
B as default
|
|
60
65
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { selectInjectionKey as
|
|
4
|
-
import { getKeyFromValue as
|
|
5
|
-
import { isEqual as
|
|
6
|
-
import { getClassNameMixin as
|
|
7
|
-
|
|
1
|
+
import { defineComponent as M, toRefs as N, inject as P, provide as _, getCurrentInstance as A, ref as f, watch as q, computed as i, onMounted as w, onUpdated as E, reactive as R, onBeforeUnmount as U } from "vue";
|
|
2
|
+
import F from "../form-checkbox/Checkbox.js";
|
|
3
|
+
import { selectInjectionKey as L } from "./context.js";
|
|
4
|
+
import { getKeyFromValue as T, isValidOption as z } from "./utils.js";
|
|
5
|
+
import { isEqual as D } from "../../_utils/is-equal.js";
|
|
6
|
+
import { getClassNameMixin as G } from "../../_utils/config.js";
|
|
7
|
+
import { formItemInjectionKey as H } from "../form/context.js";
|
|
8
|
+
const x = M({
|
|
8
9
|
name: "Option",
|
|
9
10
|
components: {
|
|
10
|
-
Checkbox:
|
|
11
|
+
Checkbox: F
|
|
11
12
|
},
|
|
12
13
|
props: {
|
|
13
14
|
/**
|
|
@@ -55,76 +56,83 @@ const X = B({
|
|
|
55
56
|
// private
|
|
56
57
|
internal: Boolean
|
|
57
58
|
},
|
|
58
|
-
setup(
|
|
59
|
-
const { disabled: v, tagProps: s, index:
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
setup(n) {
|
|
60
|
+
const { disabled: v, tagProps: s, index: h } = N(n), t = G("select--option"), e = P(L, void 0);
|
|
61
|
+
e && _(H, {});
|
|
62
|
+
const d = A(), u = f(), m = f(s.value);
|
|
63
|
+
q(s, (o, l) => {
|
|
64
|
+
D(o, l) || (m.value = o);
|
|
62
65
|
});
|
|
63
|
-
const
|
|
64
|
-
if (!
|
|
65
|
-
const
|
|
66
|
-
|
|
66
|
+
const r = f(""), c = i(() => n.value ?? n.label ?? r.value), b = i(() => n.label ?? r.value), a = i(() => T(c.value, e == null ? void 0 : e.valueKey)), O = i(() => (e == null ? void 0 : e.component) ?? "li"), I = i(() => e == null ? void 0 : e.getOptionId(a.value)), p = () => {
|
|
67
|
+
if (!n.label && u.value) {
|
|
68
|
+
const o = u.value.querySelector(
|
|
69
|
+
".x-select--option--content, .x-checkbox--label"
|
|
70
|
+
), l = (o == null ? void 0 : o.textContent) ?? "";
|
|
71
|
+
r.value !== l && (r.value = l);
|
|
67
72
|
}
|
|
68
73
|
};
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
let
|
|
72
|
-
if (!
|
|
73
|
-
const
|
|
74
|
+
w(() => p()), E(() => p());
|
|
75
|
+
const y = i(() => (e == null ? void 0 : e.valueKeys.includes(a.value)) ?? !1), K = i(() => (e == null ? void 0 : e.activeKey) === a.value);
|
|
76
|
+
let g = f(!0);
|
|
77
|
+
if (!n.internal) {
|
|
78
|
+
const o = R({
|
|
74
79
|
raw: {
|
|
75
|
-
value:
|
|
76
|
-
label:
|
|
80
|
+
value: c,
|
|
81
|
+
label: b,
|
|
77
82
|
disabled: v,
|
|
78
|
-
tagProps:
|
|
83
|
+
tagProps: m
|
|
79
84
|
},
|
|
80
85
|
ref: u,
|
|
81
|
-
index:
|
|
82
|
-
key:
|
|
86
|
+
index: h,
|
|
87
|
+
key: a,
|
|
83
88
|
origin: "slot",
|
|
84
|
-
value:
|
|
85
|
-
label:
|
|
89
|
+
value: c,
|
|
90
|
+
label: b,
|
|
86
91
|
disabled: v,
|
|
87
|
-
tagProps:
|
|
92
|
+
tagProps: m
|
|
88
93
|
});
|
|
89
|
-
|
|
90
|
-
() =>
|
|
94
|
+
g = i(
|
|
95
|
+
() => z(o, {
|
|
91
96
|
inputValue: e == null ? void 0 : e.inputValue,
|
|
92
97
|
filterOption: e == null ? void 0 : e.filterOption
|
|
93
98
|
})
|
|
94
|
-
),
|
|
95
|
-
|
|
99
|
+
), d && (e == null || e.addSlotOptionInfo(d.uid, o)), U(() => {
|
|
100
|
+
d && (e == null || e.removeSlotOptionInfo(d.uid));
|
|
96
101
|
});
|
|
97
102
|
}
|
|
98
|
-
const S = (
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
103
|
+
const S = (o) => {
|
|
104
|
+
n.disabled || e == null || e.onSelect(a.value, o);
|
|
105
|
+
}, k = (o, l) => {
|
|
106
|
+
n.disabled || e == null || e.onSelect(a.value, l);
|
|
102
107
|
}, j = () => {
|
|
103
|
-
|
|
104
|
-
}, V =
|
|
105
|
-
|
|
108
|
+
n.disabled || e == null || e.setActiveKey(a.value);
|
|
109
|
+
}, V = () => {
|
|
110
|
+
n.disabled || e == null || e.setActiveKey();
|
|
111
|
+
}, B = i(() => [
|
|
112
|
+
t.block,
|
|
106
113
|
{
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
114
|
+
[t.modifier("disabled")]: n.disabled,
|
|
115
|
+
[t.modifier("selected")]: y.value,
|
|
116
|
+
[t.modifier("active")]: K.value,
|
|
117
|
+
[t.modifier("multiple")]: e == null ? void 0 : e.multiple
|
|
111
118
|
}
|
|
112
119
|
]);
|
|
113
120
|
return {
|
|
114
|
-
className:
|
|
115
|
-
cls:
|
|
121
|
+
className: t,
|
|
122
|
+
cls: B,
|
|
116
123
|
selectCtx: e,
|
|
117
124
|
itemRef: u,
|
|
118
125
|
component: O,
|
|
119
126
|
optionId: I,
|
|
120
|
-
isSelected:
|
|
121
|
-
isValid:
|
|
127
|
+
isSelected: y,
|
|
128
|
+
isValid: g,
|
|
122
129
|
handleClick: S,
|
|
123
|
-
|
|
124
|
-
|
|
130
|
+
handleCheckboxChange: k,
|
|
131
|
+
handleMouseEnter: j,
|
|
132
|
+
handleMouseLeave: V
|
|
125
133
|
};
|
|
126
134
|
}
|
|
127
135
|
});
|
|
128
136
|
export {
|
|
129
|
-
|
|
137
|
+
x as default
|
|
130
138
|
};
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { openBlock as
|
|
3
|
-
import
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
s(
|
|
7
|
-
class:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import l from "./SelectOptionGroup.vue2.js";
|
|
2
|
+
import { openBlock as o, createElementBlock as r, Fragment as n, createBlock as a, resolveDynamicComponent as s, normalizeClass as p, withCtx as c, renderSlot as t, createTextVNode as m, toDisplayString as i } from "vue";
|
|
3
|
+
import f from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
function d(e, u, $, _, k, B) {
|
|
5
|
+
return o(), r(n, null, [
|
|
6
|
+
(o(), a(s(e.component), {
|
|
7
|
+
class: p(e.className.element("title")),
|
|
8
|
+
role: "presentation"
|
|
9
|
+
}, {
|
|
10
|
+
default: c(() => [
|
|
11
|
+
t(e.$slots, "label", {}, () => [
|
|
12
|
+
m(i(e.label), 1)
|
|
13
|
+
])
|
|
14
|
+
]),
|
|
15
|
+
_: 3
|
|
16
|
+
}, 8, ["class"])),
|
|
13
17
|
t(e.$slots, "default")
|
|
14
18
|
], 64);
|
|
15
19
|
}
|
|
16
|
-
const g = /* @__PURE__ */
|
|
20
|
+
const g = /* @__PURE__ */ f(l, [["render", d]]);
|
|
17
21
|
export {
|
|
18
22
|
g as default
|
|
19
23
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { getClassNameMixin as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as n, inject as p, computed as i } from "vue";
|
|
2
|
+
import { getClassNameMixin as m } from "../../_utils/config.js";
|
|
3
|
+
import { selectInjectionKey as c } from "./context.js";
|
|
4
|
+
const l = n({
|
|
4
5
|
name: "SelectOptionGroup",
|
|
5
6
|
props: {
|
|
6
7
|
/**
|
|
@@ -18,11 +19,13 @@ const p = e({
|
|
|
18
19
|
* @version 2.10.0
|
|
19
20
|
*/
|
|
20
21
|
setup() {
|
|
22
|
+
const e = m("select--option--group"), o = p(c, void 0), t = i(() => (o == null ? void 0 : o.component) ?? "li");
|
|
21
23
|
return {
|
|
22
|
-
className:
|
|
24
|
+
className: e,
|
|
25
|
+
component: t
|
|
23
26
|
};
|
|
24
27
|
}
|
|
25
28
|
});
|
|
26
29
|
export {
|
|
27
|
-
|
|
30
|
+
l as default
|
|
28
31
|
};
|
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { getOptionInfos as
|
|
3
|
-
import { isNumber as
|
|
4
|
-
const
|
|
1
|
+
import { computed as r, reactive as u, watch as D } from "vue";
|
|
2
|
+
import { getOptionInfos as g, getValidOptions as S, isValidOption as z } from "../utils.js";
|
|
3
|
+
import { isNumber as b } from "../../../_utils/is.js";
|
|
4
|
+
const F = {
|
|
5
5
|
value: "value",
|
|
6
6
|
label: "label",
|
|
7
7
|
disabled: "disabled",
|
|
8
8
|
tagProps: "tagProps",
|
|
9
9
|
render: "render"
|
|
10
|
-
},
|
|
11
|
-
options:
|
|
12
|
-
extraOptions:
|
|
10
|
+
}, T = ({
|
|
11
|
+
options: v,
|
|
12
|
+
extraOptions: I,
|
|
13
13
|
inputValue: n,
|
|
14
14
|
filterOption: a,
|
|
15
|
-
showExtraOptions:
|
|
16
|
-
valueKey:
|
|
15
|
+
showExtraOptions: s,
|
|
16
|
+
valueKey: d,
|
|
17
17
|
fieldNames: l
|
|
18
18
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
...
|
|
19
|
+
const m = r(() => ({
|
|
20
|
+
...F,
|
|
21
21
|
...l == null ? void 0 : l.value
|
|
22
|
-
})),
|
|
23
|
-
() => Array.from(
|
|
24
|
-
),
|
|
22
|
+
})), c = u(/* @__PURE__ */ new Map()), M = r(
|
|
23
|
+
() => Array.from(c.values()).sort((o, t) => b(o.index) && b(t.index) ? o.index - t.index : 0)
|
|
24
|
+
), p = r(() => {
|
|
25
25
|
const o = /* @__PURE__ */ new Map();
|
|
26
26
|
return {
|
|
27
|
-
optionInfos:
|
|
28
|
-
valueKey: (
|
|
29
|
-
fieldNames:
|
|
27
|
+
optionInfos: g((v == null ? void 0 : v.value) ?? [], {
|
|
28
|
+
valueKey: (d == null ? void 0 : d.value) ?? "value",
|
|
29
|
+
fieldNames: m.value,
|
|
30
30
|
origin: "options",
|
|
31
31
|
optionInfoMap: o
|
|
32
32
|
}),
|
|
33
33
|
optionInfoMap: o
|
|
34
34
|
};
|
|
35
|
-
}),
|
|
35
|
+
}), f = r(() => {
|
|
36
36
|
const o = /* @__PURE__ */ new Map();
|
|
37
37
|
return {
|
|
38
|
-
optionInfos:
|
|
39
|
-
valueKey: (
|
|
40
|
-
fieldNames:
|
|
38
|
+
optionInfos: g((I == null ? void 0 : I.value) ?? [], {
|
|
39
|
+
valueKey: (d == null ? void 0 : d.value) ?? "value",
|
|
40
|
+
fieldNames: m.value,
|
|
41
41
|
origin: "extraOptions",
|
|
42
42
|
optionInfoMap: o
|
|
43
43
|
}),
|
|
44
44
|
optionInfoMap: o
|
|
45
45
|
};
|
|
46
|
-
}), e =
|
|
47
|
-
|
|
48
|
-
[
|
|
46
|
+
}), e = u(/* @__PURE__ */ new Map());
|
|
47
|
+
D(
|
|
48
|
+
[M, p, f],
|
|
49
49
|
() => {
|
|
50
|
-
e.clear(),
|
|
50
|
+
e.clear(), M.value.forEach((o, t) => {
|
|
51
51
|
e.set(o.key, { ...o, index: t });
|
|
52
|
-
}),
|
|
52
|
+
}), p.value.optionInfoMap.forEach((o) => {
|
|
53
53
|
e.has(o.key) || (o.index = e.size, e.set(o.key, o));
|
|
54
|
-
}),
|
|
54
|
+
}), f.value.optionInfoMap.forEach((o) => {
|
|
55
55
|
e.has(o.key) || (o.index = e.size, e.set(o.key, o));
|
|
56
56
|
});
|
|
57
57
|
},
|
|
58
58
|
{ immediate: !0, deep: !0 }
|
|
59
59
|
);
|
|
60
|
-
const
|
|
61
|
-
const o =
|
|
60
|
+
const k = r(() => {
|
|
61
|
+
const o = S(p.value.optionInfos, {
|
|
62
62
|
inputValue: n == null ? void 0 : n.value,
|
|
63
63
|
filterOption: a == null ? void 0 : a.value
|
|
64
64
|
});
|
|
65
|
-
return ((
|
|
66
|
-
...
|
|
65
|
+
return ((s == null ? void 0 : s.value) ?? !0) && o.push(
|
|
66
|
+
...S(f.value.optionInfos, {
|
|
67
67
|
inputValue: n == null ? void 0 : n.value,
|
|
68
68
|
filterOption: a == null ? void 0 : a.value
|
|
69
69
|
})
|
|
70
70
|
), o;
|
|
71
|
-
}), i =
|
|
72
|
-
() => Array.from(e.values()).filter((o) => o.origin === "extraOptions" && (
|
|
71
|
+
}), i = r(
|
|
72
|
+
() => Array.from(e.values()).filter((o) => o.origin === "extraOptions" && (s == null ? void 0 : s.value) === !1 ? !1 : z(o, {
|
|
73
73
|
inputValue: n == null ? void 0 : n.value,
|
|
74
74
|
filterOption: a == null ? void 0 : a.value
|
|
75
75
|
}))
|
|
76
|
-
),
|
|
76
|
+
), A = r(
|
|
77
77
|
() => i.value.filter((o) => !o.disabled).map((o) => o.key)
|
|
78
78
|
);
|
|
79
79
|
return {
|
|
80
|
-
validOptions:
|
|
80
|
+
validOptions: k,
|
|
81
81
|
optionInfoMap: e,
|
|
82
82
|
validOptionInfos: i,
|
|
83
|
-
enabledOptionKeys:
|
|
84
|
-
getNextSlotOptionIndex: () =>
|
|
83
|
+
enabledOptionKeys: A,
|
|
84
|
+
getNextSlotOptionIndex: () => c.size,
|
|
85
85
|
addSlotOptionInfo: (o, t) => {
|
|
86
|
-
|
|
86
|
+
c.set(o, t);
|
|
87
87
|
},
|
|
88
88
|
removeSlotOptionInfo: (o) => {
|
|
89
|
-
|
|
89
|
+
c.delete(o);
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
T as useOptions
|
|
95
95
|
};
|