@solar-taro/ui-vant 2.8.1 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/date-range-picker/index.scss +1 -1
- package/date-range-picker/index.vue.d.ts +14 -11
- package/index10.js +76 -75
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +1 -1
- package/index20.js +1 -1
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +1 -1
- package/index28.js +1 -1
- package/index5.js +94 -94
- package/index56.js +7 -11
- package/index57.js +9 -7
- package/index58.js +11 -9
- package/index63.js +1 -1
- package/index64.js +1 -1
- package/index67.js +1 -1
- package/index68.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 2.8.2 (2026-05-14)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for ui-vant to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 2.8.1 (2026-05-14)
|
|
6
|
+
|
|
7
|
+
### 🚀 Features
|
|
8
|
+
|
|
9
|
+
- **ui-vant/selector:** enhance multi-select style with and update slot context
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- HyperLife1119
|
|
14
|
+
|
|
1
15
|
## 2.8.0 (2026-05-13)
|
|
2
16
|
|
|
3
17
|
This was a version bump only for ui-vant to align it with other projects, there were no code changes.
|
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
2
|
+
modelValue: [number?, number?];
|
|
3
|
+
} & {
|
|
2
4
|
id?: string;
|
|
3
5
|
type?: "date" | "datetime";
|
|
4
6
|
label?: string;
|
|
5
7
|
title?: string;
|
|
6
8
|
placeholder?: [string, string];
|
|
7
|
-
modelValue: [number?, number?];
|
|
8
9
|
required?: boolean;
|
|
9
10
|
format?: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: [(number | undefined)?, (number | undefined)?]) => any;
|
|
15
|
+
} & {
|
|
13
16
|
close: () => any;
|
|
14
17
|
clear: (v: [(number | undefined)?, (number | undefined)?]) => any;
|
|
15
18
|
confirm: (v: [number, number]) => any;
|
|
16
|
-
"update:modelValue": (v: [(number | undefined)?, (number | undefined)?]) => any;
|
|
17
19
|
}, string, import('vue').PublicProps, Readonly<{
|
|
20
|
+
modelValue: [number?, number?];
|
|
21
|
+
} & {
|
|
18
22
|
id?: string;
|
|
19
23
|
type?: "date" | "datetime";
|
|
20
24
|
label?: string;
|
|
21
25
|
title?: string;
|
|
22
26
|
placeholder?: [string, string];
|
|
23
|
-
modelValue: [number?, number?];
|
|
24
27
|
required?: boolean;
|
|
25
28
|
format?: string;
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
min?: number;
|
|
30
|
+
max?: number;
|
|
28
31
|
}> & Readonly<{
|
|
29
32
|
onClose?: (() => any) | undefined;
|
|
30
33
|
onClear?: ((v: [(number | undefined)?, (number | undefined)?]) => any) | undefined;
|
|
31
34
|
onConfirm?: ((v: [number, number]) => any) | undefined;
|
|
32
|
-
"onUpdate:modelValue"?: ((
|
|
35
|
+
"onUpdate:modelValue"?: ((value: [(number | undefined)?, (number | undefined)?]) => any) | undefined;
|
|
33
36
|
}>, {
|
|
34
37
|
type: "date" | "datetime";
|
|
35
38
|
id: string;
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
38
41
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
39
42
|
default?(_: {
|
|
40
43
|
present: () => void;
|
package/index10.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as _, ref as I, computed as
|
|
1
|
+
import { defineComponent as _, ref as I, computed as v, renderSlot as x, toDisplayString as ee, createTextVNode as le, Fragment as te, openBlock as oe, createElementBlock as se, createCommentVNode as ae, renderList as ne, unref as re, withCtx as ie, createBlock as ue, createElementVNode as de, mergeProps as pe, resolveDirective as ce, withDirectives as fe, normalizeClass as ve, createSlots as me, createVNode as ye, normalizeStyle as he } from "vue";
|
|
2
2
|
import { useFilterList as be } from "@solar-taro/core";
|
|
3
3
|
import { SunTag as ge, SunLazyRender as ke, SunVirtualScroll as Ve, SunItem as M } from "@solar-taro/ui-sun";
|
|
4
4
|
import { createReusableTemplate as $e } from "./index25.js";
|
|
5
5
|
import we from "./index7.js";
|
|
6
6
|
import Se from "./index6.js";
|
|
7
7
|
import P from "./index26.js";
|
|
8
|
-
const
|
|
8
|
+
const d = x, T = ee, L = le, h = te, a = oe, i = se, m = ae, j = ne, r = re, n = ie, B = ue, y = de, A = pe, Te = ce, U = fe, G = ve, D = me, b = ye, W = he, Be = ["label", "placeholder", "required", "disabled"], Ke = {
|
|
9
|
+
key: 0,
|
|
9
10
|
name: "input",
|
|
10
11
|
class: "sun-selector-input"
|
|
11
12
|
}, Ce = { name: "right-icon" }, ze = ["label", "value", "placeholder", "use-right-icon-slot", "disabled"], Ne = { name: "right-icon" }, Le = ["value"], De = { class: "sun-selector-option-label" }, Me = /* @__PURE__ */ _({
|
|
@@ -30,11 +31,11 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
30
31
|
virtual: { type: [Boolean, Object] },
|
|
31
32
|
refresher: { type: Boolean },
|
|
32
33
|
refreshing: { type: Boolean },
|
|
33
|
-
compareWith: { type: Function, default: (
|
|
34
|
+
compareWith: { type: Function, default: (K, C) => K === C }
|
|
34
35
|
},
|
|
35
36
|
emits: ["update:modelValue", "select", "unselect", "clear", "close", "confirm", "refresh"],
|
|
36
|
-
setup(
|
|
37
|
-
const [J, q] = $e(), o =
|
|
37
|
+
setup(K, { expose: C, emit: H }) {
|
|
38
|
+
const [J, q] = $e(), o = K, p = H, g = I(!1), k = I(!1), Q = v(() => o.searcher || ((e, t) => e[o.labelKey].toLowerCase().includes(t))), { keyword: O, filteredList: z } = be(() => o.options, Q.value), V = v(() => {
|
|
38
39
|
var e;
|
|
39
40
|
if (c.value) {
|
|
40
41
|
const t = o.options.find(
|
|
@@ -45,7 +46,7 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
45
46
|
return ((e = o.modelValue) != null ? e : []).map(
|
|
46
47
|
(t) => o.options.find((s) => o.compareWith(s[o.valueKey], t))
|
|
47
48
|
).filter(Boolean);
|
|
48
|
-
}), N =
|
|
49
|
+
}), N = v(() => V.value.map((e) => e[o.labelKey]).join(o.delimiter)), $ = v(() => !Y(o.modelValue) && o.clearable), c = v(() => o.mode === "single"), X = v(() => {
|
|
49
50
|
var s, l;
|
|
50
51
|
let e, t = 47;
|
|
51
52
|
return typeof o.virtual != "boolean" && (s = o.virtual) != null && s.itemSize && (t = (l = o.virtual) == null ? void 0 : l.itemSize), { id: e, itemSize: t };
|
|
@@ -53,12 +54,12 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
53
54
|
function Y(e) {
|
|
54
55
|
return P(e) ? !0 : c.value ? !1 : e.length < 1;
|
|
55
56
|
}
|
|
56
|
-
function
|
|
57
|
+
function u(e) {
|
|
57
58
|
var s;
|
|
58
59
|
const t = e[o.valueKey];
|
|
59
60
|
return c.value ? P(o.modelValue) ? !1 : o.compareWith(o.modelValue, t) : ((s = o.modelValue) == null ? void 0 : s.some((l) => o.compareWith(l, t))) || !1;
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
+
function w() {
|
|
62
63
|
o.disabled || (g.value = !0, k.value || setTimeout(() => {
|
|
63
64
|
k.value = !0;
|
|
64
65
|
}, 300));
|
|
@@ -78,81 +79,81 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
78
79
|
function F(e) {
|
|
79
80
|
const t = e[o.valueKey];
|
|
80
81
|
let s = o.modelValue;
|
|
81
|
-
c.value ? (
|
|
82
|
+
c.value ? (u(e) ? o.required || (p("unselect", e), s = null) : (p("select", e), s = t), R()) : u(e) ? (p("unselect", e), s = o.modelValue.filter(
|
|
82
83
|
(l) => !o.compareWith(l, t)
|
|
83
84
|
)) : (p("select", e), s = (o.modelValue || []).concat(
|
|
84
85
|
e[o.valueKey]
|
|
85
86
|
)), p("update:modelValue", s);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function S() {
|
|
88
89
|
p("clear", o.modelValue), p("update:modelValue", o.required && !c.value ? [] : null);
|
|
89
90
|
}
|
|
90
|
-
return
|
|
91
|
-
present:
|
|
92
|
-
clear:
|
|
91
|
+
return C({
|
|
92
|
+
present: w,
|
|
93
|
+
clear: S
|
|
93
94
|
}), (e, t) => {
|
|
94
95
|
const s = Te("readonly");
|
|
95
|
-
return a(),
|
|
96
|
-
|
|
97
|
-
present:
|
|
96
|
+
return a(), i(h, null, [
|
|
97
|
+
d(e.$slots, "default", {
|
|
98
|
+
present: w,
|
|
98
99
|
label: N.value,
|
|
99
|
-
selectedOptions:
|
|
100
|
+
selectedOptions: V.value
|
|
100
101
|
}, () => [
|
|
101
|
-
e.type === "field" ? U((a(),
|
|
102
|
+
e.type === "field" ? U((a(), i("van-field", A({ key: 0 }, e.$attrs, {
|
|
102
103
|
class: "sun-selector",
|
|
103
104
|
label: e.label,
|
|
104
105
|
placeholder: e.placeholder,
|
|
105
106
|
required: e.required,
|
|
106
107
|
disabled: e.disabled,
|
|
107
|
-
onClickInput: t[1] || (t[1] = (l) =>
|
|
108
|
+
onClickInput: t[1] || (t[1] = (l) => w())
|
|
108
109
|
}), [
|
|
109
|
-
|
|
110
|
-
c.value ? (a(),
|
|
111
|
-
L(
|
|
112
|
-
], 64)) : (a(!0),
|
|
110
|
+
V.value.length ? (a(), i("slot-view", Ke, [
|
|
111
|
+
c.value ? (a(), i(h, { key: 0 }, [
|
|
112
|
+
L(T(N.value), 1)
|
|
113
|
+
], 64)) : (a(!0), i(h, { key: 1 }, j(V.value, (l) => (a(), B(r(ge), {
|
|
113
114
|
color: "medium",
|
|
114
115
|
type: "translucent"
|
|
115
116
|
}, {
|
|
116
117
|
default: n(() => [
|
|
117
|
-
L(
|
|
118
|
+
L(T(l[e.labelKey]), 1)
|
|
118
119
|
]),
|
|
119
120
|
_: 2
|
|
120
121
|
}, 1024))), 256))
|
|
121
|
-
]),
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
])) : m("", !0),
|
|
123
|
+
y("slot-view", Ce, [
|
|
124
|
+
$.value ? (a(), i("van-icon", {
|
|
124
125
|
key: 0,
|
|
125
126
|
class: "sun-selector-clear-icon",
|
|
126
127
|
name: "clear",
|
|
127
|
-
onTap: t[0] || (t[0] = (l) =>
|
|
128
|
-
}, null, 32)) :
|
|
129
|
-
|
|
128
|
+
onTap: t[0] || (t[0] = (l) => S())
|
|
129
|
+
}, null, 32)) : m("", !0),
|
|
130
|
+
d(e.$slots, "end")
|
|
130
131
|
])
|
|
131
132
|
], 16, Be)), [
|
|
132
133
|
[s]
|
|
133
|
-
]) : e.type === "search" ? U((a(),
|
|
134
|
+
]) : e.type === "search" ? U((a(), i("van-search", A({ key: 1 }, e.$attrs, {
|
|
134
135
|
class: "sun-selector",
|
|
135
136
|
label: e.label,
|
|
136
137
|
value: N.value,
|
|
137
138
|
placeholder: e.placeholder,
|
|
138
|
-
"use-right-icon-slot":
|
|
139
|
+
"use-right-icon-slot": $.value,
|
|
139
140
|
shape: "round",
|
|
140
141
|
clearable: !1,
|
|
141
142
|
disabled: e.disabled,
|
|
142
|
-
onClickInput: t[3] || (t[3] = (l) =>
|
|
143
|
+
onClickInput: t[3] || (t[3] = (l) => w())
|
|
143
144
|
}), [
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
y("slot-view", Ne, [
|
|
146
|
+
$.value ? (a(), i("van-icon", {
|
|
146
147
|
key: 0,
|
|
147
148
|
class: "sun-selector-clear-icon",
|
|
148
149
|
name: "clear",
|
|
149
|
-
onTap: t[2] || (t[2] = (l) =>
|
|
150
|
-
}, null, 32)) :
|
|
151
|
-
|
|
150
|
+
onTap: t[2] || (t[2] = (l) => S())
|
|
151
|
+
}, null, 32)) : m("", !0),
|
|
152
|
+
d(e.$slots, "end")
|
|
152
153
|
])
|
|
153
154
|
], 16, ze)), [
|
|
154
155
|
[s]
|
|
155
|
-
]) :
|
|
156
|
+
]) : m("", !0)
|
|
156
157
|
]),
|
|
157
158
|
b(r(ke), { hook: "created" }, {
|
|
158
159
|
default: n(() => [
|
|
@@ -163,8 +164,8 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
163
164
|
"show-buttons": !c.value
|
|
164
165
|
}, D({
|
|
165
166
|
buttons: n(() => [
|
|
166
|
-
|
|
167
|
-
c.value ?
|
|
167
|
+
d(e.$slots, "buttons", { confirm: E }, () => [
|
|
168
|
+
c.value ? m("", !0) : (a(), i("van-button", {
|
|
168
169
|
key: 0,
|
|
169
170
|
type: "primary",
|
|
170
171
|
round: "true",
|
|
@@ -174,25 +175,25 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
174
175
|
])
|
|
175
176
|
]),
|
|
176
177
|
default: n(() => [
|
|
177
|
-
|
|
178
|
-
e.searchable ? (a(),
|
|
178
|
+
d(e.$slots, "filter", { rendered: k.value }, () => [
|
|
179
|
+
e.searchable ? (a(), i("van-search", {
|
|
179
180
|
key: 0,
|
|
180
181
|
shape: "round",
|
|
181
182
|
"input-align": "center",
|
|
182
183
|
value: r(O),
|
|
183
184
|
placeholder: "输入关键字搜索",
|
|
184
185
|
onChange: t[5] || (t[5] = (l) => O.value = l.detail.trim())
|
|
185
|
-
}, null, 40, Le)) :
|
|
186
|
+
}, null, 40, Le)) : m("", !0)
|
|
186
187
|
]),
|
|
187
188
|
b(r(J), null, {
|
|
188
189
|
default: n(() => [
|
|
189
|
-
e.virtual ? (a(),
|
|
190
|
-
k.value ? (a(),
|
|
190
|
+
e.virtual ? (a(), i(h, { key: 0 }, [
|
|
191
|
+
k.value ? (a(), B(r(Ve), {
|
|
191
192
|
key: 0,
|
|
192
193
|
class: "sun-selector-options",
|
|
193
194
|
refresher: e.refresher,
|
|
194
195
|
refreshing: e.refreshing,
|
|
195
|
-
items: r(
|
|
196
|
+
items: r(z),
|
|
196
197
|
"item-size": X.value.itemSize,
|
|
197
198
|
"item-key": e.valueKey,
|
|
198
199
|
style: W({ height: e.height }),
|
|
@@ -200,39 +201,39 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
200
201
|
}, {
|
|
201
202
|
default: n(({ item: l, index: f }) => [
|
|
202
203
|
b(r(M), {
|
|
203
|
-
class: G(["sun-selector-option", { "sun-selector-option-active":
|
|
204
|
+
class: G(["sun-selector-option", { "sun-selector-option-active": u(l) }]),
|
|
204
205
|
clickable: !0,
|
|
205
206
|
onTap: (Z) => F(l)
|
|
206
207
|
}, D({
|
|
207
208
|
start: n(() => [
|
|
208
|
-
|
|
209
|
+
d(e.$slots, "option-start", {
|
|
209
210
|
option: l,
|
|
210
211
|
index: f,
|
|
211
|
-
active:
|
|
212
|
+
active: u(l)
|
|
212
213
|
})
|
|
213
214
|
]),
|
|
214
215
|
end: n(() => [
|
|
215
|
-
|
|
216
|
+
d(e.$slots, "option-end", {
|
|
216
217
|
option: l,
|
|
217
218
|
index: f,
|
|
218
|
-
active:
|
|
219
|
+
active: u(l)
|
|
219
220
|
})
|
|
220
221
|
]),
|
|
221
222
|
default: n(() => [
|
|
222
|
-
|
|
223
|
+
d(e.$slots, "option", {
|
|
223
224
|
option: l,
|
|
224
225
|
index: f,
|
|
225
|
-
active:
|
|
226
|
+
active: u(l)
|
|
226
227
|
}, () => [
|
|
227
|
-
L(
|
|
228
|
+
L(T(l[e.labelKey]), 1)
|
|
228
229
|
])
|
|
229
230
|
]),
|
|
230
231
|
_: 2
|
|
231
232
|
}, [
|
|
232
|
-
|
|
233
|
+
u(l) ? {
|
|
233
234
|
name: "end",
|
|
234
235
|
fn: n(() => [
|
|
235
|
-
t[10] || (t[10] =
|
|
236
|
+
t[10] || (t[10] = y("van-icon", {
|
|
236
237
|
class: "sun-selector-option-icon",
|
|
237
238
|
name: "success"
|
|
238
239
|
}, null, -1))
|
|
@@ -242,57 +243,57 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
242
243
|
]), 1032, ["class", "onTap"])
|
|
243
244
|
]),
|
|
244
245
|
_: 3
|
|
245
|
-
}, 8, ["refresher", "refreshing", "items", "item-size", "item-key", "style"])) : (a(),
|
|
246
|
+
}, 8, ["refresher", "refreshing", "items", "item-size", "item-key", "style"])) : (a(), i("view", {
|
|
246
247
|
key: 1,
|
|
247
248
|
style: W({ height: e.height })
|
|
248
249
|
}, null, 4))
|
|
249
|
-
], 64)) : (a(),
|
|
250
|
+
], 64)) : (a(), B(r(Se), {
|
|
250
251
|
key: 1,
|
|
251
252
|
class: "sun-selector-options",
|
|
252
253
|
refresher: e.refresher,
|
|
253
254
|
refreshing: e.refreshing,
|
|
254
|
-
data: r(
|
|
255
|
+
data: r(z),
|
|
255
256
|
loading: e.loading,
|
|
256
257
|
"empty-type": "search",
|
|
257
258
|
style: W({ height: e.height }),
|
|
258
259
|
onRefresh: t[7] || (t[7] = (l) => p("refresh"))
|
|
259
260
|
}, {
|
|
260
261
|
default: n(() => [
|
|
261
|
-
(a(!0),
|
|
262
|
+
(a(!0), i(h, null, j(r(z), (l, f) => (a(), B(r(M), {
|
|
262
263
|
key: l[e.valueKey],
|
|
263
|
-
class: G(["sun-selector-option", { "sun-selector-option-active":
|
|
264
|
+
class: G(["sun-selector-option", { "sun-selector-option-active": u(l) }]),
|
|
264
265
|
clickable: !0,
|
|
265
266
|
onTap: (Z) => F(l)
|
|
266
267
|
}, D({
|
|
267
268
|
start: n(() => [
|
|
268
|
-
|
|
269
|
+
d(e.$slots, "option-start", {
|
|
269
270
|
option: l,
|
|
270
271
|
index: f,
|
|
271
|
-
active:
|
|
272
|
+
active: u(l)
|
|
272
273
|
})
|
|
273
274
|
]),
|
|
274
275
|
end: n(() => [
|
|
275
|
-
|
|
276
|
+
d(e.$slots, "option-end", {
|
|
276
277
|
option: l,
|
|
277
278
|
index: f,
|
|
278
|
-
active:
|
|
279
|
+
active: u(l)
|
|
279
280
|
})
|
|
280
281
|
]),
|
|
281
282
|
default: n(() => [
|
|
282
|
-
|
|
283
|
+
d(e.$slots, "option", {
|
|
283
284
|
option: l,
|
|
284
285
|
index: f,
|
|
285
|
-
active:
|
|
286
|
+
active: u(l)
|
|
286
287
|
}, () => [
|
|
287
|
-
|
|
288
|
+
y("view", De, T(l[e.labelKey]), 1)
|
|
288
289
|
])
|
|
289
290
|
]),
|
|
290
291
|
_: 2
|
|
291
292
|
}, [
|
|
292
|
-
|
|
293
|
+
u(l) ? {
|
|
293
294
|
name: "end",
|
|
294
295
|
fn: n(() => [
|
|
295
|
-
t[11] || (t[11] =
|
|
296
|
+
t[11] || (t[11] = y("van-icon", {
|
|
296
297
|
class: "sun-selector-option-icon",
|
|
297
298
|
slot: "right-icon",
|
|
298
299
|
name: "success"
|
|
@@ -307,18 +308,18 @@ const u = x, S = ee, L = le, y = te, a = oe, d = se, h = ae, j = ne, r = re, n =
|
|
|
307
308
|
]),
|
|
308
309
|
_: 3
|
|
309
310
|
}),
|
|
310
|
-
|
|
311
|
+
d(e.$slots, "list", { ListTemplate: r(q) }, () => [
|
|
311
312
|
b(r(q))
|
|
312
313
|
])
|
|
313
314
|
]),
|
|
314
315
|
_: 2
|
|
315
316
|
}, [
|
|
316
|
-
|
|
317
|
+
$.value ? {
|
|
317
318
|
name: "extra",
|
|
318
319
|
fn: n(() => [
|
|
319
|
-
|
|
320
|
+
y("view", {
|
|
320
321
|
class: "sun-selector-clear-btn",
|
|
321
|
-
onTap: t[4] || (t[4] = (l) =>
|
|
322
|
+
onTap: t[4] || (t[4] = (l) => S())
|
|
322
323
|
}, "清除", 32)
|
|
323
324
|
]),
|
|
324
325
|
key: "0"
|
package/index17.js
CHANGED
package/index18.js
CHANGED
package/index19.js
CHANGED
package/index20.js
CHANGED
package/index21.js
CHANGED
package/index22.js
CHANGED
package/index23.js
CHANGED
package/index28.js
CHANGED
package/index5.js
CHANGED
|
@@ -1,175 +1,175 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { date as
|
|
3
|
-
import { vDatetimePicker as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as S, mergeModels as D, useModel as H, computed as s, ref as b, renderSlot as z, openBlock as Y, createElementBlock as j, createCommentVNode as x, createElementVNode as A, mergeProps as G, resolveDirective as J, withDirectives as K, unref as L, toDisplayString as O, normalizeClass as Q, Fragment as R } from "vue";
|
|
2
|
+
import { date as p } from "@solar-taro/core";
|
|
3
|
+
import { vDatetimePicker as U } from "./index13.js";
|
|
4
|
+
const W = z, o = Y, i = j, X = x, r = A, Z = G, ee = J, C = K, k = L, d = O, M = Q, te = R, ae = ["label", "value", "placeholder", "required"], ne = { name: "right-icon" }, re = ["show", "title"], le = { class: "sun-date-range-picker-input-group" }, oe = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "sun-date-range-picker-input-value"
|
|
7
|
-
},
|
|
7
|
+
}, ie = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "sun-date-range-picker-input-placeholder"
|
|
10
|
-
},
|
|
10
|
+
}, se = { class: "sun-date-range-picker-input-label" }, ue = {
|
|
11
11
|
key: 0,
|
|
12
12
|
name: "down",
|
|
13
13
|
color: "var(--color-gray)"
|
|
14
|
-
},
|
|
14
|
+
}, de = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "date-range-picker-input-value"
|
|
17
|
-
},
|
|
17
|
+
}, ce = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "sun-date-range-picker-input-placeholder"
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
const
|
|
20
|
+
}, ve = { class: "sun-date-range-picker-input-label" }, pe = ["id", "type", "value", "min-date", "max-date"], me = { class: "sun-date-range-picker-btn-wrapper" };
|
|
21
|
+
let fe = 1;
|
|
22
|
+
const we = /* @__PURE__ */ S({
|
|
23
23
|
__name: "index",
|
|
24
|
-
props: {
|
|
25
|
-
id: { default: () => `van-datetime-picker-${
|
|
24
|
+
props: /* @__PURE__ */ D({
|
|
25
|
+
id: { default: () => `van-datetime-picker-${fe++}` },
|
|
26
26
|
type: { default: "date" },
|
|
27
27
|
label: {},
|
|
28
28
|
title: {},
|
|
29
29
|
placeholder: {},
|
|
30
|
-
modelValue: {},
|
|
31
30
|
required: { type: Boolean },
|
|
32
31
|
format: {},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
min: { default: () => new Date((/* @__PURE__ */ new Date()).getFullYear() - 1, 0, 0, 0, 0, 0).getTime() },
|
|
33
|
+
max: { default: () => new Date((/* @__PURE__ */ new Date()).getFullYear() + 1, 0, 0, 0, 0, 0).getTime() }
|
|
34
|
+
}, {
|
|
35
|
+
modelValue: { required: !0 },
|
|
36
|
+
modelModifiers: {}
|
|
37
|
+
}),
|
|
38
|
+
emits: /* @__PURE__ */ D(["confirm", "clear", "close"], ["update:modelValue"]),
|
|
39
|
+
setup(w, { emit: V }) {
|
|
40
|
+
const n = w, a = H(w, "modelValue"), m = V, h = " ~ ", $ = s(
|
|
41
|
+
() => a.value[u.value] || F()
|
|
42
|
+
), f = b(!1), u = b(0), T = s(() => {
|
|
43
|
+
const [t, e] = a.value;
|
|
44
|
+
return t && e ? p(t, c.value) + h + p(e, c.value) : "";
|
|
45
|
+
}), q = s(() => a.value.length && !n.required), c = s(() => {
|
|
46
|
+
if (n.format)
|
|
47
|
+
return n.format;
|
|
48
|
+
switch (n.type) {
|
|
49
49
|
case "date":
|
|
50
50
|
return "yyyy-MM-dd";
|
|
51
51
|
case "datetime":
|
|
52
52
|
return "yyyy-MM-dd HH:mm";
|
|
53
53
|
}
|
|
54
|
-
}),
|
|
55
|
-
if (
|
|
56
|
-
return
|
|
57
|
-
switch (
|
|
54
|
+
}), B = s(() => {
|
|
55
|
+
if (n.title)
|
|
56
|
+
return n.title;
|
|
57
|
+
switch (n.type) {
|
|
58
58
|
case "date":
|
|
59
59
|
return "请选择日期";
|
|
60
60
|
case "datetime":
|
|
61
61
|
return "请选择时间";
|
|
62
62
|
}
|
|
63
|
-
}), y =
|
|
64
|
-
if (
|
|
65
|
-
return
|
|
66
|
-
switch (
|
|
63
|
+
}), y = s(() => {
|
|
64
|
+
if (n.placeholder)
|
|
65
|
+
return n.placeholder;
|
|
66
|
+
switch (n.type) {
|
|
67
67
|
case "date":
|
|
68
68
|
return ["开始日期", "结束日期"];
|
|
69
69
|
case "datetime":
|
|
70
70
|
return ["开始时间", "结束时间"];
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
|
-
function
|
|
73
|
+
function F() {
|
|
74
74
|
const t = /* @__PURE__ */ new Date(), e = t.getMinutes();
|
|
75
|
-
switch (
|
|
75
|
+
switch (n.type) {
|
|
76
76
|
case "date":
|
|
77
77
|
return t.setHours(0, 0, 0, 0);
|
|
78
78
|
case "datetime":
|
|
79
79
|
return t.setMinutes(e - e % 5);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
f.value = !0,
|
|
82
|
+
function _() {
|
|
83
|
+
f.value = !0, v(0);
|
|
84
84
|
}
|
|
85
85
|
function g() {
|
|
86
|
-
f.value = !1,
|
|
86
|
+
f.value = !1, m("close");
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
88
|
+
function E() {
|
|
89
|
+
m("clear", a.value), a.value = [];
|
|
90
90
|
}
|
|
91
|
-
function
|
|
92
|
-
|
|
91
|
+
function v(t) {
|
|
92
|
+
u.value = t;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
95
|
-
|
|
94
|
+
function I(t) {
|
|
95
|
+
a.value[u.value] = t, a.value = [...a.value];
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
const [t, e] =
|
|
97
|
+
function N() {
|
|
98
|
+
const [t, e] = a.value;
|
|
99
99
|
if (!t || !e)
|
|
100
|
-
return
|
|
101
|
-
|
|
100
|
+
return v(t ? 1 : 0);
|
|
101
|
+
m("confirm", a.value), g();
|
|
102
102
|
}
|
|
103
103
|
return (t, e) => {
|
|
104
|
-
const
|
|
105
|
-
return o(), i(
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
const P = ee("readonly");
|
|
105
|
+
return o(), i(te, null, [
|
|
106
|
+
W(t.$slots, "default", { present: _ }, () => [
|
|
107
|
+
C((o(), i("van-field", Z(t.$attrs, {
|
|
108
108
|
label: t.label,
|
|
109
|
-
value:
|
|
110
|
-
placeholder: y.value.join(
|
|
109
|
+
value: T.value,
|
|
110
|
+
placeholder: y.value.join(h),
|
|
111
111
|
required: t.required,
|
|
112
|
-
onClickInput: e[1] || (e[1] = (
|
|
112
|
+
onClickInput: e[1] || (e[1] = (l) => _())
|
|
113
113
|
}), [
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
r("slot-view", ne, [
|
|
115
|
+
q.value ? (o(), i("van-icon", {
|
|
116
116
|
key: 0,
|
|
117
117
|
name: "clear",
|
|
118
|
-
onTap: e[0] || (e[0] = (
|
|
119
|
-
}, null, 32)) :
|
|
118
|
+
onTap: e[0] || (e[0] = (l) => E())
|
|
119
|
+
}, null, 32)) : X("", !0)
|
|
120
120
|
])
|
|
121
|
-
], 16,
|
|
122
|
-
[
|
|
121
|
+
], 16, ae)), [
|
|
122
|
+
[P]
|
|
123
123
|
])
|
|
124
124
|
]),
|
|
125
|
-
|
|
125
|
+
r("van-action-sheet", {
|
|
126
126
|
show: f.value,
|
|
127
|
-
title:
|
|
127
|
+
title: B.value,
|
|
128
128
|
"close-on-click-overlay": !0,
|
|
129
|
-
onClose: e[6] || (e[6] = (
|
|
130
|
-
onCancel: e[7] || (e[7] = (
|
|
129
|
+
onClose: e[6] || (e[6] = (l) => g()),
|
|
130
|
+
onCancel: e[7] || (e[7] = (l) => g())
|
|
131
131
|
}, [
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
class:
|
|
135
|
-
onTap: e[2] || (e[2] = (
|
|
132
|
+
r("view", le, [
|
|
133
|
+
r("view", {
|
|
134
|
+
class: M(["sun-date-range-picker-input", { "sun-date-range-picker-input-active": u.value === 0 }]),
|
|
135
|
+
onTap: e[2] || (e[2] = (l) => v(0))
|
|
136
136
|
}, [
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
a.value[0] ? (o(), i("view", oe, d(k(p)(a.value[0], c.value)), 1)) : (o(), i("view", ie, "请选择")),
|
|
138
|
+
r("view", se, d(y.value[0]), 1)
|
|
139
139
|
], 34),
|
|
140
|
-
(o(), i("van-icon",
|
|
141
|
-
|
|
142
|
-
class:
|
|
143
|
-
onTap: e[3] || (e[3] = (
|
|
140
|
+
(o(), i("van-icon", ue)),
|
|
141
|
+
r("view", {
|
|
142
|
+
class: M(["sun-date-range-picker-input", { "sun-date-range-picker-input-active": u.value === 1 }]),
|
|
143
|
+
onTap: e[3] || (e[3] = (l) => v(1))
|
|
144
144
|
}, [
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
a.value[1] ? (o(), i("view", de, d(k(p)(a.value[1], c.value)), 1)) : (o(), i("view", ce, "请选择")),
|
|
146
|
+
r("view", ve, d(y.value[1]), 1)
|
|
147
147
|
], 34)
|
|
148
148
|
]),
|
|
149
|
-
|
|
149
|
+
C(r("van-datetime-picker", {
|
|
150
150
|
id: t.id,
|
|
151
151
|
type: t.type,
|
|
152
152
|
"show-toolbar": !1,
|
|
153
153
|
value: $.value,
|
|
154
|
-
"min-date": t.
|
|
155
|
-
"max-date": t.
|
|
156
|
-
onInput: e[4] || (e[4] = (
|
|
157
|
-
}, null, 40,
|
|
158
|
-
[
|
|
154
|
+
"min-date": t.min,
|
|
155
|
+
"max-date": t.max,
|
|
156
|
+
onInput: e[4] || (e[4] = (l) => I(l.detail))
|
|
157
|
+
}, null, 40, pe), [
|
|
158
|
+
[k(U)]
|
|
159
159
|
]),
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
r("view", me, [
|
|
161
|
+
r("van-button", {
|
|
162
162
|
type: "primary",
|
|
163
163
|
round: "true",
|
|
164
164
|
block: "true",
|
|
165
|
-
onTap: e[5] || (e[5] = (
|
|
166
|
-
},
|
|
165
|
+
onTap: e[5] || (e[5] = (l) => N())
|
|
166
|
+
}, d(a.value[0] && a.value[1] ? "确定" : "继续"), 33)
|
|
167
167
|
])
|
|
168
|
-
], 40,
|
|
168
|
+
], 40, re)
|
|
169
169
|
], 64);
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
});
|
|
173
173
|
export {
|
|
174
|
-
|
|
174
|
+
we as default
|
|
175
175
|
};
|
package/index56.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var n = f[s], r = void 0;
|
|
8
|
-
r === void 0 && (r = a[n]), d ? t(i, n, r) : m(i, n, r);
|
|
9
|
-
}
|
|
10
|
-
return i;
|
|
1
|
+
import t from "./index57.js";
|
|
2
|
+
import i from "./index29.js";
|
|
3
|
+
var s = Object.prototype, p = s.hasOwnProperty;
|
|
4
|
+
function l(r, a, o) {
|
|
5
|
+
var n = r[a];
|
|
6
|
+
(!(p.call(r, a) && i(n, o)) || o === void 0 && !(a in r)) && t(r, a, o);
|
|
11
7
|
}
|
|
12
8
|
export {
|
|
13
|
-
|
|
9
|
+
l as default
|
|
14
10
|
};
|
package/index57.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import u from "./index61.js";
|
|
2
|
+
function i(r, e, t) {
|
|
3
|
+
e == "__proto__" && u ? u(r, e, {
|
|
4
|
+
configurable: !0,
|
|
5
|
+
enumerable: !0,
|
|
6
|
+
value: t,
|
|
7
|
+
writable: !0
|
|
8
|
+
}) : r[e] = t;
|
|
7
9
|
}
|
|
8
10
|
export {
|
|
9
|
-
|
|
11
|
+
i as default
|
|
10
12
|
};
|
package/index58.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import m from "./index56.js";
|
|
2
|
+
import t from "./index57.js";
|
|
3
|
+
function v(a, f, i, u) {
|
|
4
|
+
var d = !i;
|
|
5
|
+
i || (i = {});
|
|
6
|
+
for (var s = -1, e = f.length; ++s < e; ) {
|
|
7
|
+
var n = f[s], r = void 0;
|
|
8
|
+
r === void 0 && (r = a[n]), d ? t(i, n, r) : m(i, n, r);
|
|
9
|
+
}
|
|
10
|
+
return i;
|
|
9
11
|
}
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
v as default
|
|
12
14
|
};
|
package/index63.js
CHANGED
package/index64.js
CHANGED
package/index67.js
CHANGED
package/index68.js
CHANGED