@seresweb/website-component 2.2.2 → 2.3.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/README.md +5 -4
- package/dist/_icons-DtBTpiO2.cjs +11 -0
- package/dist/_icons-FW35XHO0.js +14 -0
- package/dist/_utils-B7LThWoT.js +26 -0
- package/dist/_utils-CtkVBTg-.cjs +1 -0
- package/dist/cjs/checkbox.cjs +1 -0
- package/dist/cjs/col.cjs +1 -0
- package/dist/cjs/config-provider.cjs +1 -0
- package/dist/cjs/date-picker.cjs +1 -0
- package/dist/cjs/date-select.cjs +1 -0
- package/dist/cjs/horizontal-viewer.cjs +1 -1
- package/dist/cjs/image-indicator.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/input.cjs +1 -1
- package/dist/cjs/layz-image.cjs +1 -1
- package/dist/cjs/locales.cjs +1 -0
- package/dist/cjs/parameter-box.cjs +1 -1
- package/dist/cjs/radio.cjs +1 -1
- package/dist/cjs/row.cjs +1 -0
- package/dist/cjs/select.cjs +1 -0
- package/dist/cjs/swiper-normal.cjs +1 -1
- package/dist/cjs/swiper-showcase.cjs +1 -1
- package/dist/cjs/tab-indicator.cjs +1 -1
- package/dist/css/checkbox.css +1 -0
- package/dist/css/col.css +1 -0
- package/dist/css/date-picker.css +1 -0
- package/dist/css/date-select.css +1 -0
- package/dist/css/input.css +1 -1
- package/dist/css/radio.css +1 -1
- package/dist/css/row.css +1 -0
- package/dist/css/select.css +1 -0
- package/dist/en-US-BBTWftdk.js +35 -0
- package/dist/en-US-UkqgG0fb.cjs +1 -0
- package/dist/es/checkbox.mjs +82 -0
- package/dist/es/col.mjs +48 -0
- package/dist/es/config-provider.mjs +17 -0
- package/dist/es/date-picker.mjs +6 -0
- package/dist/es/date-select.mjs +113 -0
- package/dist/es/horizontal-viewer.mjs +1 -1
- package/dist/es/image-indicator.mjs +1 -1
- package/dist/es/index.mjs +61 -41
- package/dist/es/input.mjs +17 -16
- package/dist/es/layz-image.mjs +18 -17
- package/dist/es/locales.mjs +41 -0
- package/dist/es/parameter-box.mjs +123 -85
- package/dist/es/radio.mjs +27 -23
- package/dist/es/row.mjs +63 -0
- package/dist/es/select.mjs +210 -0
- package/dist/es/swiper-normal.mjs +1 -1
- package/dist/es/swiper-showcase.mjs +37 -37
- package/dist/es/tab-indicator.mjs +65 -79
- package/dist/global.d.ts +8 -0
- package/dist/index-B-sVxtkA.cjs +1 -0
- package/dist/{index-tkvNmWjy.js → index-BPX4w5Vn.js} +113 -106
- package/dist/index-Bc4wAl0z.js +644 -0
- package/dist/index-CEjz1ubF.cjs +1 -0
- package/dist/index.css +1 -1
- package/dist/scss/checkbox.scss +155 -0
- package/dist/scss/col.scss +16 -0
- package/dist/scss/date-picker.scss +226 -0
- package/dist/scss/date-select.scss +41 -0
- package/dist/scss/index.scss +6 -0
- package/dist/scss/input.scss +44 -4
- package/dist/scss/radio.scss +6 -6
- package/dist/scss/row.scss +10 -0
- package/dist/scss/select.scss +210 -0
- package/dist/types/components/_icons.d.ts +4 -0
- package/dist/types/components/_utils.d.ts +4 -0
- package/dist/types/components/checkbox/checkbox.vue.d.ts +24 -0
- package/dist/types/components/checkbox/index.d.ts +6 -0
- package/dist/types/components/checkbox/type.d.ts +30 -0
- package/dist/types/components/col/col.vue.d.ts +21 -0
- package/dist/types/components/col/index.d.ts +6 -0
- package/dist/types/components/col/type.d.ts +24 -0
- package/dist/types/components/config-provider/config-provider.vue.d.ts +20 -0
- package/dist/types/components/config-provider/index.d.ts +27 -0
- package/dist/types/components/config-provider/type.d.ts +4 -0
- package/dist/types/components/date-picker/date-picker.vue.d.ts +16 -0
- package/dist/types/components/date-picker/index.d.ts +53 -0
- package/dist/types/components/date-picker/type.d.ts +12 -0
- package/dist/types/components/date-select/date-select.vue.d.ts +16 -0
- package/dist/types/components/date-select/index.d.ts +7 -0
- package/dist/types/components/date-select/type.d.ts +16 -0
- package/dist/types/components/index.d.ts +8 -0
- package/dist/types/components/input/input.vue.d.ts +1 -0
- package/dist/types/components/input/type.d.ts +1 -0
- package/dist/types/components/locales/ar-SA.d.ts +20 -0
- package/dist/types/components/locales/en-US.d.ts +20 -0
- package/dist/types/components/locales/index.d.ts +44 -0
- package/dist/types/components/radio/radio.vue.d.ts +2 -2
- package/dist/types/components/row/index.d.ts +6 -0
- package/dist/types/components/row/row.vue.d.ts +23 -0
- package/dist/types/components/row/type.d.ts +7 -0
- package/dist/types/components/select/index.d.ts +7 -0
- package/dist/types/components/select/select.vue.d.ts +48 -0
- package/dist/types/components/select/type.d.ts +20 -0
- package/dist/types/components/swiper-normal/swiper-normal.vue.d.ts +2 -2
- package/dist/types/components/swiper-vehicle/swiper-vehicle.vue.d.ts +2 -2
- package/dist/types/components/tab-indicator/tab-indicator.vue.d.ts +2 -2
- package/package.json +2 -1
- package/dist/index-BIPlvoY9.cjs +0 -1
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { P as
|
|
3
|
-
import { ScAnimatedNumber as
|
|
4
|
-
const
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "parameter-wrap"
|
|
7
|
-
}, f = { class: "item-name" }, h = { class: "item-value" }, k = { key: 1 }, B = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "parameter-wrap"
|
|
10
|
-
}, A = { class: "item-value" }, b = { key: 1 }, g = { class: "item-name" }, m = /* @__PURE__ */ c({
|
|
1
|
+
import { defineComponent as d, createElementBlock as l, openBlock as o, normalizeClass as r, unref as a, Fragment as v, renderList as y, createElementVNode as i, toDisplayString as s, createBlock as p } from "vue";
|
|
2
|
+
import { P as n } from "../_vars-BV4QQF-p.js";
|
|
3
|
+
import { ScAnimatedNumber as c } from "./animated-number.mjs";
|
|
4
|
+
const f = { key: 1 }, $ = { key: 1 }, u = /* @__PURE__ */ d({
|
|
11
5
|
__name: "parameter-box",
|
|
12
6
|
props: {
|
|
13
7
|
dataList: {},
|
|
@@ -17,88 +11,132 @@ const y = {
|
|
|
17
11
|
colorMode: { default: "light" },
|
|
18
12
|
inline: { type: Boolean }
|
|
19
13
|
},
|
|
20
|
-
setup(
|
|
21
|
-
return (
|
|
14
|
+
setup(m) {
|
|
15
|
+
return (t, k) => (o(), l(
|
|
22
16
|
"div",
|
|
23
17
|
{
|
|
24
|
-
class:
|
|
25
|
-
`${
|
|
26
|
-
`${
|
|
27
|
-
|
|
18
|
+
class: r([
|
|
19
|
+
`${a(n)}-parameter-box`,
|
|
20
|
+
`${a(n)}-parameter-box--${t.colorMode}`,
|
|
21
|
+
t.inline && `${a(n)}-parameter-box--inline`
|
|
28
22
|
])
|
|
29
23
|
},
|
|
30
24
|
[
|
|
31
|
-
(
|
|
25
|
+
(o(!0), l(
|
|
32
26
|
v,
|
|
33
27
|
null,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
y(t.dataList, (e) => (o(), l(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
key: e.name,
|
|
32
|
+
class: r(`${a(n)}-parameter-item`)
|
|
33
|
+
},
|
|
34
|
+
[
|
|
35
|
+
t.nameOnTop ? (o(), l(
|
|
40
36
|
"div",
|
|
41
|
-
|
|
42
|
-
r(e.name),
|
|
43
|
-
1
|
|
44
|
-
/* TEXT */
|
|
45
|
-
),
|
|
46
|
-
t("div", h, [
|
|
47
|
-
typeof e.value == "number" ? (a(), u(i(p), {
|
|
37
|
+
{
|
|
48
38
|
key: 0,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
39
|
+
class: r(`${a(n)}-parameter-wrap`)
|
|
40
|
+
},
|
|
41
|
+
[
|
|
42
|
+
i(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
class: r(`${a(n)}-item-name`)
|
|
46
|
+
},
|
|
47
|
+
s(e.name),
|
|
48
|
+
3
|
|
49
|
+
/* TEXT, CLASS */
|
|
50
|
+
),
|
|
51
|
+
i(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
class: r(`${a(n)}-item-value`)
|
|
55
|
+
},
|
|
56
|
+
[
|
|
57
|
+
typeof e.value == "number" ? (o(), p(a(c), {
|
|
58
|
+
key: 0,
|
|
59
|
+
value: e.value,
|
|
60
|
+
format: "",
|
|
61
|
+
direction: "up",
|
|
62
|
+
isAnimation: t.isAnimation,
|
|
63
|
+
range: e.value / 10
|
|
64
|
+
}, null, 8, ["value", "isAnimation", "range"])) : (o(), l(
|
|
65
|
+
"span",
|
|
66
|
+
f,
|
|
67
|
+
s(e.value),
|
|
68
|
+
1
|
|
69
|
+
/* TEXT */
|
|
70
|
+
)),
|
|
71
|
+
i(
|
|
72
|
+
"span",
|
|
73
|
+
null,
|
|
74
|
+
s(e.unit),
|
|
75
|
+
1
|
|
76
|
+
/* TEXT */
|
|
77
|
+
)
|
|
78
|
+
],
|
|
79
|
+
2
|
|
80
|
+
/* CLASS */
|
|
81
|
+
)
|
|
82
|
+
],
|
|
83
|
+
2
|
|
84
|
+
/* CLASS */
|
|
85
|
+
)) : (o(), l(
|
|
94
86
|
"div",
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
87
|
+
{
|
|
88
|
+
key: 1,
|
|
89
|
+
class: r(`${a(n)}-parameter-wrap`)
|
|
90
|
+
},
|
|
91
|
+
[
|
|
92
|
+
i(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
class: r(`${a(n)}-item-value`)
|
|
96
|
+
},
|
|
97
|
+
[
|
|
98
|
+
typeof e.value == "number" ? (o(), p(a(c), {
|
|
99
|
+
key: 0,
|
|
100
|
+
value: e.value,
|
|
101
|
+
format: "",
|
|
102
|
+
direction: "up",
|
|
103
|
+
isAnimation: t.isAnimation,
|
|
104
|
+
range: e.value / 10
|
|
105
|
+
}, null, 8, ["value", "isAnimation", "range"])) : (o(), l(
|
|
106
|
+
"span",
|
|
107
|
+
$,
|
|
108
|
+
s(e.value),
|
|
109
|
+
1
|
|
110
|
+
/* TEXT */
|
|
111
|
+
)),
|
|
112
|
+
i(
|
|
113
|
+
"span",
|
|
114
|
+
null,
|
|
115
|
+
s(e.unit),
|
|
116
|
+
1
|
|
117
|
+
/* TEXT */
|
|
118
|
+
)
|
|
119
|
+
],
|
|
120
|
+
2
|
|
121
|
+
/* CLASS */
|
|
122
|
+
),
|
|
123
|
+
i(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
class: r(`${a(n)}-item-name`)
|
|
127
|
+
},
|
|
128
|
+
s(e.name),
|
|
129
|
+
3
|
|
130
|
+
/* TEXT, CLASS */
|
|
131
|
+
)
|
|
132
|
+
],
|
|
133
|
+
2
|
|
134
|
+
/* CLASS */
|
|
135
|
+
))
|
|
136
|
+
],
|
|
137
|
+
2
|
|
138
|
+
/* CLASS */
|
|
139
|
+
))),
|
|
102
140
|
128
|
|
103
141
|
/* KEYED_FRAGMENT */
|
|
104
142
|
))
|
|
@@ -108,8 +146,8 @@ const y = {
|
|
|
108
146
|
));
|
|
109
147
|
}
|
|
110
148
|
});
|
|
111
|
-
|
|
112
|
-
const
|
|
149
|
+
u.install = (m) => (m.component("ScParameterBox", u), m);
|
|
150
|
+
const g = u;
|
|
113
151
|
export {
|
|
114
|
-
|
|
152
|
+
g as ScParameterBox
|
|
115
153
|
};
|
package/dist/es/radio.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { P as
|
|
3
|
-
const c = ["id", "name", "value", "checked", "disabled"],
|
|
1
|
+
import { defineComponent as m, createElementBlock as u, openBlock as p, normalizeClass as o, unref as a, createElementVNode as d, toDisplayString as b } from "vue";
|
|
2
|
+
import { P as l } from "../_vars-BV4QQF-p.js";
|
|
3
|
+
const c = ["id", "name", "value", "checked", "disabled"], i = /* @__PURE__ */ m({
|
|
4
4
|
__name: "radio",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -11,37 +11,41 @@ const c = ["id", "name", "value", "checked", "disabled"], v = { class: "radio-la
|
|
|
11
11
|
name: {}
|
|
12
12
|
},
|
|
13
13
|
emits: ["change", "update:modelValue"],
|
|
14
|
-
setup(
|
|
15
|
-
const t =
|
|
16
|
-
return (e,
|
|
14
|
+
setup(n, { emit: r }) {
|
|
15
|
+
const t = r;
|
|
16
|
+
return (e, s) => (p(), u(
|
|
17
17
|
"label",
|
|
18
18
|
{
|
|
19
|
-
class:
|
|
19
|
+
class: o([`${a(l)}-radio`, e.disabled && `${a(l)}-disabled`])
|
|
20
20
|
},
|
|
21
21
|
[
|
|
22
|
-
|
|
22
|
+
d("input", {
|
|
23
23
|
type: "radio",
|
|
24
24
|
id: e.id,
|
|
25
25
|
name: e.name,
|
|
26
26
|
value: e.value,
|
|
27
27
|
checked: e.modelValue === e.value,
|
|
28
28
|
disabled: e.disabled,
|
|
29
|
-
class:
|
|
30
|
-
onChange:
|
|
31
|
-
}, null,
|
|
32
|
-
|
|
29
|
+
class: o(`${a(l)}-radio-input`),
|
|
30
|
+
onChange: s[0] || (s[0] = (v) => t("update:modelValue", e.value))
|
|
31
|
+
}, null, 42, c),
|
|
32
|
+
d(
|
|
33
33
|
"span",
|
|
34
|
-
{
|
|
34
|
+
{
|
|
35
|
+
class: o(`${a(l)}-radio-box`)
|
|
36
|
+
},
|
|
35
37
|
null,
|
|
36
|
-
|
|
37
|
-
/*
|
|
38
|
-
)
|
|
39
|
-
|
|
38
|
+
2
|
|
39
|
+
/* CLASS */
|
|
40
|
+
),
|
|
41
|
+
d(
|
|
40
42
|
"span",
|
|
41
|
-
|
|
43
|
+
{
|
|
44
|
+
class: o(`${a(l)}-radio-label`)
|
|
45
|
+
},
|
|
42
46
|
b(e.label),
|
|
43
|
-
|
|
44
|
-
/* TEXT */
|
|
47
|
+
3
|
|
48
|
+
/* TEXT, CLASS */
|
|
45
49
|
)
|
|
46
50
|
],
|
|
47
51
|
2
|
|
@@ -49,8 +53,8 @@ const c = ["id", "name", "value", "checked", "disabled"], v = { class: "radio-la
|
|
|
49
53
|
));
|
|
50
54
|
}
|
|
51
55
|
});
|
|
52
|
-
|
|
53
|
-
const
|
|
56
|
+
i.install = (n) => (n.component("ScRadio", i), n);
|
|
57
|
+
const g = i;
|
|
54
58
|
export {
|
|
55
|
-
|
|
59
|
+
g as ScRadio
|
|
56
60
|
};
|
package/dist/es/row.mjs
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { defineComponent as c, computed as o, provide as m, createElementBlock as f, openBlock as g, normalizeStyle as w, normalizeClass as d, renderSlot as x } from "vue";
|
|
2
|
+
import { P as s } from "../_vars-BV4QQF-p.js";
|
|
3
|
+
const a = /* @__PURE__ */ c({
|
|
4
|
+
__name: "row",
|
|
5
|
+
props: {
|
|
6
|
+
gutter: { default: 0 },
|
|
7
|
+
justify: { default: "start" },
|
|
8
|
+
align: { default: "top" },
|
|
9
|
+
wrap: { type: Boolean, default: !0 }
|
|
10
|
+
},
|
|
11
|
+
setup(r) {
|
|
12
|
+
const e = r, n = o(() => {
|
|
13
|
+
const t = e.gutter;
|
|
14
|
+
return typeof t == "number" ? t : {
|
|
15
|
+
small: 8,
|
|
16
|
+
medium: 16,
|
|
17
|
+
large: 24
|
|
18
|
+
}[t] || 0;
|
|
19
|
+
}), u = o(() => [
|
|
20
|
+
`${s}-row`,
|
|
21
|
+
{
|
|
22
|
+
[`${s}-row--wrap`]: e.wrap
|
|
23
|
+
}
|
|
24
|
+
]), p = o(() => {
|
|
25
|
+
const t = n.value / 2;
|
|
26
|
+
return {
|
|
27
|
+
"--row-gutter": `${n.value}px`,
|
|
28
|
+
"--row-margin": `${-t}px`,
|
|
29
|
+
display: "flex",
|
|
30
|
+
flexWrap: e.wrap ? "wrap" : "nowrap",
|
|
31
|
+
justifyContent: e.justify,
|
|
32
|
+
alignItems: i(e.align),
|
|
33
|
+
marginLeft: `${-t}px`,
|
|
34
|
+
marginRight: `${-t}px`
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
function i(t) {
|
|
38
|
+
return {
|
|
39
|
+
top: "flex-start",
|
|
40
|
+
middle: "center",
|
|
41
|
+
bottom: "flex-end",
|
|
42
|
+
stretch: "stretch"
|
|
43
|
+
}[t] || "flex-start";
|
|
44
|
+
}
|
|
45
|
+
return m("rowGutter", n), (t, l) => (g(), f(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
class: d(u.value),
|
|
49
|
+
style: w(p.value)
|
|
50
|
+
},
|
|
51
|
+
[
|
|
52
|
+
x(t.$slots, "default")
|
|
53
|
+
],
|
|
54
|
+
6
|
|
55
|
+
/* CLASS, STYLE */
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
a.install = (r) => (r.component("ScRow", a), r);
|
|
60
|
+
const v = a;
|
|
61
|
+
export {
|
|
62
|
+
v as ScRow
|
|
63
|
+
};
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
import { defineComponent as M, ref as y, computed as C, onMounted as N, onUnmounted as O, createElementBlock as n, openBlock as c, normalizeClass as a, unref as l, createCommentVNode as o, createElementVNode as r, createVNode as I, renderSlot as $, createTextVNode as S, toDisplayString as k, Fragment as V, withModifiers as R, Transition as F, withCtx as H, withDirectives as P, renderList as z, vShow as U } from "vue";
|
|
2
|
+
import { P as t } from "../_vars-BV4QQF-p.js";
|
|
3
|
+
import { C as X } from "../_icons-FW35XHO0.js";
|
|
4
|
+
const j = ["innerHTML"], q = ["onClick"], g = /* @__PURE__ */ M({
|
|
5
|
+
name: "ScSelect",
|
|
6
|
+
__name: "select",
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: { default: null },
|
|
9
|
+
options: { default: () => [] },
|
|
10
|
+
placeholder: { default: "请选择" },
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
dark: { type: Boolean, default: !1 },
|
|
13
|
+
clearable: { type: Boolean, default: !1 }
|
|
14
|
+
},
|
|
15
|
+
emits: ["update:modelValue", "change"],
|
|
16
|
+
setup(u, { expose: w, emit: L }) {
|
|
17
|
+
const s = u, v = L, d = y(!1), B = X, f = y(), D = C(() => {
|
|
18
|
+
if (s.options && s.options.length > 0) {
|
|
19
|
+
const e = s.options.find((m) => m.value === s.modelValue);
|
|
20
|
+
return e ? e.label : "";
|
|
21
|
+
}
|
|
22
|
+
return "";
|
|
23
|
+
}), p = C(() => s.options && s.options.length > 0 ? D.value : s.modelValue === null || s.modelValue === void 0 ? "" : String(s.modelValue)), E = (e) => {
|
|
24
|
+
e.preventDefault(), !s.disabled && (d.value = !d.value);
|
|
25
|
+
}, h = (e) => {
|
|
26
|
+
e == null || e.preventDefault(), d.value = !1;
|
|
27
|
+
}, _ = (e) => {
|
|
28
|
+
e.disabled || (v("update:modelValue", e.value), v("change", e.value), h());
|
|
29
|
+
}, T = () => {
|
|
30
|
+
v("update:modelValue", null), v("change", null);
|
|
31
|
+
}, b = (e) => {
|
|
32
|
+
const m = e.target;
|
|
33
|
+
f.value && !f.value.contains(m) && (d.value = !1);
|
|
34
|
+
};
|
|
35
|
+
return N(() => {
|
|
36
|
+
document.addEventListener("click", b);
|
|
37
|
+
}), O(() => {
|
|
38
|
+
document.removeEventListener("click", b);
|
|
39
|
+
}), w({
|
|
40
|
+
close: h,
|
|
41
|
+
selectOption: _
|
|
42
|
+
}), (e, m) => (c(), n(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref_key: "selectRef",
|
|
46
|
+
ref: f,
|
|
47
|
+
class: a([`${l(t)}-select`, { [`${l(t)}-select--dark`]: e.dark }, { [`${l(t)}-select--disabled`]: e.disabled }])
|
|
48
|
+
},
|
|
49
|
+
[
|
|
50
|
+
o(" 选择框触发区域 "),
|
|
51
|
+
r(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
class: a(`${l(t)}-select__trigger`),
|
|
55
|
+
onClick: E
|
|
56
|
+
},
|
|
57
|
+
[
|
|
58
|
+
o(" 已选择的值 "),
|
|
59
|
+
p.value ? (c(), n(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
key: 0,
|
|
63
|
+
class: a(`${l(t)}-select__value`)
|
|
64
|
+
},
|
|
65
|
+
[
|
|
66
|
+
$(e.$slots, "selected", {
|
|
67
|
+
value: p.value,
|
|
68
|
+
hasValue: !!p.value
|
|
69
|
+
}, () => [
|
|
70
|
+
S(
|
|
71
|
+
k(p.value),
|
|
72
|
+
1
|
|
73
|
+
/* TEXT */
|
|
74
|
+
)
|
|
75
|
+
])
|
|
76
|
+
],
|
|
77
|
+
2
|
|
78
|
+
/* CLASS */
|
|
79
|
+
)) : (c(), n(
|
|
80
|
+
V,
|
|
81
|
+
{ key: 1 },
|
|
82
|
+
[
|
|
83
|
+
o(" placeholder "),
|
|
84
|
+
r(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
class: a(`${l(t)}-select__placeholder`)
|
|
88
|
+
},
|
|
89
|
+
k(e.placeholder),
|
|
90
|
+
3
|
|
91
|
+
/* TEXT, CLASS */
|
|
92
|
+
)
|
|
93
|
+
],
|
|
94
|
+
2112
|
|
95
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
96
|
+
)),
|
|
97
|
+
o(" 清除按钮 "),
|
|
98
|
+
e.clearable && e.modelValue !== null && e.modelValue !== void 0 ? (c(), n(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
key: 2,
|
|
102
|
+
class: a(`${l(t)}-select__clear`),
|
|
103
|
+
onClick: R(T, ["stop"])
|
|
104
|
+
},
|
|
105
|
+
" × ",
|
|
106
|
+
2
|
|
107
|
+
/* CLASS */
|
|
108
|
+
)) : o("v-if", !0),
|
|
109
|
+
o(" 下拉箭头 "),
|
|
110
|
+
r("div", {
|
|
111
|
+
class: a([`${l(t)}-select__icon`, { [`${l(t)}-select__icon--open`]: d.value }]),
|
|
112
|
+
innerHTML: l(B),
|
|
113
|
+
"aria-hidden": "true"
|
|
114
|
+
}, null, 10, j)
|
|
115
|
+
],
|
|
116
|
+
2
|
|
117
|
+
/* CLASS */
|
|
118
|
+
),
|
|
119
|
+
o(" 下拉菜单 "),
|
|
120
|
+
I(F, {
|
|
121
|
+
name: `${l(t)}-select-slide`,
|
|
122
|
+
persisted: ""
|
|
123
|
+
}, {
|
|
124
|
+
default: H(() => [
|
|
125
|
+
P(r(
|
|
126
|
+
"div",
|
|
127
|
+
{
|
|
128
|
+
class: a(`${l(t)}-select__dropdown`)
|
|
129
|
+
},
|
|
130
|
+
[
|
|
131
|
+
o(" 默认选项列表 "),
|
|
132
|
+
e.options && e.options.length > 0 && !e.$slots.default ? (c(), n(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
key: 0,
|
|
136
|
+
class: a(`${l(t)}-select__options`)
|
|
137
|
+
},
|
|
138
|
+
[
|
|
139
|
+
(c(!0), n(
|
|
140
|
+
V,
|
|
141
|
+
null,
|
|
142
|
+
z(e.options, (i) => (c(), n("div", {
|
|
143
|
+
key: `${i.value}`,
|
|
144
|
+
class: a([
|
|
145
|
+
`${l(t)}-select__option`,
|
|
146
|
+
{
|
|
147
|
+
[`${l(t)}-select__option--selected`]: e.modelValue === i.value,
|
|
148
|
+
[`${l(t)}-select__option--disabled`]: i.disabled
|
|
149
|
+
}
|
|
150
|
+
]),
|
|
151
|
+
onClick: (A) => _(i)
|
|
152
|
+
}, [
|
|
153
|
+
$(e.$slots, "option", { option: i }, () => [
|
|
154
|
+
S(
|
|
155
|
+
k(i.label),
|
|
156
|
+
1
|
|
157
|
+
/* TEXT */
|
|
158
|
+
)
|
|
159
|
+
])
|
|
160
|
+
], 10, q))),
|
|
161
|
+
128
|
|
162
|
+
/* KEYED_FRAGMENT */
|
|
163
|
+
))
|
|
164
|
+
],
|
|
165
|
+
2
|
|
166
|
+
/* CLASS */
|
|
167
|
+
)) : (c(), n(
|
|
168
|
+
V,
|
|
169
|
+
{ key: 1 },
|
|
170
|
+
[
|
|
171
|
+
o(" 自定义内容插槽 "),
|
|
172
|
+
r(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
class: a(`${l(t)}-select__custom-content`)
|
|
176
|
+
},
|
|
177
|
+
[
|
|
178
|
+
$(e.$slots, "default", {
|
|
179
|
+
select: _,
|
|
180
|
+
close: h
|
|
181
|
+
})
|
|
182
|
+
],
|
|
183
|
+
2
|
|
184
|
+
/* CLASS */
|
|
185
|
+
)
|
|
186
|
+
],
|
|
187
|
+
2112
|
|
188
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
189
|
+
))
|
|
190
|
+
],
|
|
191
|
+
2
|
|
192
|
+
/* CLASS */
|
|
193
|
+
), [
|
|
194
|
+
[U, d.value]
|
|
195
|
+
])
|
|
196
|
+
]),
|
|
197
|
+
_: 3
|
|
198
|
+
/* FORWARDED */
|
|
199
|
+
}, 8, ["name"])
|
|
200
|
+
],
|
|
201
|
+
2
|
|
202
|
+
/* CLASS */
|
|
203
|
+
));
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
g.install = (u) => (u.component("ScSelect", g), u);
|
|
207
|
+
const Q = g;
|
|
208
|
+
export {
|
|
209
|
+
Q as ScSelect
|
|
210
|
+
};
|