@solar-taro/ui-vant 3.5.1 → 3.5.2
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 +10 -0
- package/index15.js +1 -1
- package/index16.js +1 -1
- package/index17.js +1 -1
- package/index19.js +1 -1
- package/index20.js +1 -1
- package/index21.js +1 -1
- package/index9.js +18 -21
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index15.js
CHANGED
package/index16.js
CHANGED
package/index17.js
CHANGED
package/index19.js
CHANGED
package/index20.js
CHANGED
package/index21.js
CHANGED
package/index9.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { defineComponent as ee, mergeModels as A, ref as U, computed as m, useModel as le, renderSlot as oe, toDisplayString as te, createTextVNode as ne, Fragment as ae, openBlock as se, createElementBlock as re, createCommentVNode as ie, renderList as ue, unref as de, withCtx as ce, createBlock as pe, createElementVNode as fe, mergeProps as ve, resolveDirective as me, withDirectives as ye, createVNode as he, normalizeClass as be, normalizeStyle as ge, createSlots as ke } from "vue";
|
|
2
2
|
import { SunTag as Ve, SunIcon as z, SunLazyRender as $e, SunVirtualList as we, SunItem as G, SunListPlaceholder as Se, SunList as Ke } from "@solar-taro/ui-sun";
|
|
3
|
-
import {
|
|
4
|
-
import { createReusableTemplate as Be } from "./index22.js";
|
|
3
|
+
import { createReusableTemplate as Te } from "./index22.js";
|
|
5
4
|
import { isNil as H } from "lodash-es";
|
|
6
|
-
import
|
|
7
|
-
const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r = ce, y = pe, L = fe, J = ve,
|
|
5
|
+
import Be from "./index6.js";
|
|
6
|
+
const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r = ce, y = pe, L = fe, J = ve, ze = me, Q = ye, h = he, X = be, N = ge, O = ke, Ce = ["label", "placeholder", "required", "disabled"], Le = {
|
|
8
7
|
key: 0,
|
|
9
8
|
name: "input",
|
|
10
9
|
class: "sun-selector-input"
|
|
11
|
-
},
|
|
10
|
+
}, Ne = { name: "right-icon" }, De = ["label", "value", "placeholder", "use-right-icon-slot", "disabled"], We = { name: "right-icon" }, qe = ["value"], Me = { class: "sun-selector-option-label" }, je = /* @__PURE__ */ ee({
|
|
12
11
|
__name: "index",
|
|
13
12
|
props: /* @__PURE__ */ A({
|
|
14
13
|
type: { default: "field" },
|
|
@@ -37,7 +36,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
37
36
|
}),
|
|
38
37
|
emits: /* @__PURE__ */ A(["update:modelValue", "select", "unselect", "clear", "close", "confirm", "refresh"], ["update:keyword"]),
|
|
39
38
|
setup(V, { expose: D, emit: Y }) {
|
|
40
|
-
const [Z, R] =
|
|
39
|
+
const [Z, R] = Te(), o = V, f = Y, $ = U(!1), k = U(!1), I = m(() => o.searcher || ((e, l) => e[o.labelKey].toLowerCase().includes(l))), w = le(V, "keyword"), i = m(() => o.options.filter(
|
|
41
40
|
(e) => I.value(e, w.value.toLowerCase())
|
|
42
41
|
)), S = m(() => {
|
|
43
42
|
var e;
|
|
@@ -64,11 +63,9 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
64
63
|
return v.value ? H(o.modelValue) ? !1 : o.compareWith(o.modelValue, l) : ((n = o.modelValue) == null ? void 0 : n.some((t) => o.compareWith(t, l))) || !1;
|
|
65
64
|
}
|
|
66
65
|
function T() {
|
|
67
|
-
o.disabled || ($.value = !0, k.value ||
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}, 301);
|
|
71
|
-
}));
|
|
66
|
+
o.disabled || ($.value = !0, k.value || setTimeout(() => {
|
|
67
|
+
k.value = !0;
|
|
68
|
+
}, 300));
|
|
72
69
|
}
|
|
73
70
|
function P() {
|
|
74
71
|
$.value = !1, f("close");
|
|
@@ -99,7 +96,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
99
96
|
clear: B,
|
|
100
97
|
keyword: w
|
|
101
98
|
}), (e, l) => {
|
|
102
|
-
const n =
|
|
99
|
+
const n = ze("readonly");
|
|
103
100
|
return s(), p(b, null, [
|
|
104
101
|
c(e.$slots, "default", {
|
|
105
102
|
present: T,
|
|
@@ -114,7 +111,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
114
111
|
disabled: e.disabled,
|
|
115
112
|
onClickInput: l[1] || (l[1] = (t) => T())
|
|
116
113
|
}), [
|
|
117
|
-
S.value.length ? (s(), p("slot-view",
|
|
114
|
+
S.value.length ? (s(), p("slot-view", Le, [
|
|
118
115
|
v.value ? (s(), p(b, { key: 0 }, [
|
|
119
116
|
q(C(W.value), 1)
|
|
120
117
|
], 64)) : (s(!0), p(b, { key: 1 }, M(S.value, (t) => (s(), y(u(Ve), {
|
|
@@ -127,7 +124,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
127
124
|
_: 2
|
|
128
125
|
}, 1024))), 256))
|
|
129
126
|
])) : g("", !0),
|
|
130
|
-
L("slot-view",
|
|
127
|
+
L("slot-view", Ne, [
|
|
131
128
|
K.value ? (s(), y(u(z), {
|
|
132
129
|
key: 0,
|
|
133
130
|
class: "sun-selector-clear-icon",
|
|
@@ -136,7 +133,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
136
133
|
})) : g("", !0),
|
|
137
134
|
c(e.$slots, "end")
|
|
138
135
|
])
|
|
139
|
-
], 16,
|
|
136
|
+
], 16, Ce)), [
|
|
140
137
|
[n]
|
|
141
138
|
]) : e.type === "search" ? Q((s(), p("van-search", J({ key: 1 }, e.$attrs, {
|
|
142
139
|
class: "sun-selector",
|
|
@@ -149,7 +146,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
149
146
|
disabled: e.disabled,
|
|
150
147
|
onClickInput: l[3] || (l[3] = (t) => T())
|
|
151
148
|
}), [
|
|
152
|
-
L("slot-view",
|
|
149
|
+
L("slot-view", We, [
|
|
153
150
|
K.value ? (s(), y(u(z), {
|
|
154
151
|
key: 0,
|
|
155
152
|
class: "sun-selector-clear-icon",
|
|
@@ -158,13 +155,13 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
158
155
|
})) : g("", !0),
|
|
159
156
|
c(e.$slots, "end")
|
|
160
157
|
])
|
|
161
|
-
], 16,
|
|
158
|
+
], 16, De)), [
|
|
162
159
|
[n]
|
|
163
160
|
]) : g("", !0)
|
|
164
161
|
]),
|
|
165
162
|
h(u($e), { hook: "created" }, {
|
|
166
163
|
default: r(() => [
|
|
167
|
-
h(u(
|
|
164
|
+
h(u(Be), {
|
|
168
165
|
show: $.value,
|
|
169
166
|
"onUpdate:show": l[9] || (l[9] = (t) => $.value = t),
|
|
170
167
|
title: e.placeholder,
|
|
@@ -190,7 +187,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
190
187
|
value: w.value,
|
|
191
188
|
placeholder: "输入关键字搜索",
|
|
192
189
|
onChange: l[5] || (l[5] = (t) => w.value = t.detail.trim())
|
|
193
|
-
}, null, 40,
|
|
190
|
+
}, null, 40, qe)) : g("", !0)
|
|
194
191
|
]),
|
|
195
192
|
h(u(Z), null, {
|
|
196
193
|
default: r(() => [
|
|
@@ -301,7 +298,7 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
301
298
|
index: a,
|
|
302
299
|
active: d(t)
|
|
303
300
|
}, () => [
|
|
304
|
-
L("view",
|
|
301
|
+
L("view", Me, C(t[e.labelKey]), 1)
|
|
305
302
|
])
|
|
306
303
|
]),
|
|
307
304
|
_: 2
|
|
@@ -351,5 +348,5 @@ const c = oe, C = te, q = ne, b = ae, s = se, p = re, g = ie, M = ue, u = de, r
|
|
|
351
348
|
}
|
|
352
349
|
});
|
|
353
350
|
export {
|
|
354
|
-
|
|
351
|
+
je as default
|
|
355
352
|
};
|