@solar-taro/ui-vant 2.5.1 → 2.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 +12 -0
- package/index116.js +5 -5
- package/index117.js +1 -1
- package/index125.js +3 -3
- package/index126.js +4 -4
- package/index127.js +10 -4
- package/index128.js +6 -10
- package/index129.js +6 -6
- package/index130.js +4 -6
- package/index16.js +1 -1
- 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/index26.js +1 -1
- package/index3.js +61 -59
- package/index50.js +1 -1
- package/index52.js +1 -1
- package/index56.js +1 -1
- package/index57.js +5 -5
- package/index58.js +9 -6
- package/index59.js +6 -9
- package/index72.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 2.5.1 (2026-01-12)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ui-vant/selector:** add clearable option and update clear logic
|
|
6
|
+
- **ui-vant/modal:** add extra slot
|
|
7
|
+
- **ui-vant:** add vBinding directive
|
|
8
|
+
|
|
9
|
+
### ❤️ Thank You
|
|
10
|
+
|
|
11
|
+
- HyperLife1119
|
|
12
|
+
|
|
1
13
|
## 2.5.0 (2025-12-25)
|
|
2
14
|
|
|
3
15
|
This was a version bump only for ui-vant to align it with other projects, there were no code changes.
|
package/index116.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import p from "./
|
|
2
|
-
import a from "./
|
|
3
|
-
import l from "./
|
|
4
|
-
import s from "./
|
|
5
|
-
import m from "./
|
|
1
|
+
import p from "./index125.js";
|
|
2
|
+
import a from "./index126.js";
|
|
3
|
+
import l from "./index127.js";
|
|
4
|
+
import s from "./index128.js";
|
|
5
|
+
import m from "./index129.js";
|
|
6
6
|
function t(o) {
|
|
7
7
|
var e = -1, h = o == null ? 0 : o.length;
|
|
8
8
|
for (this.clear(); ++e < h; ) {
|
package/index117.js
CHANGED
package/index125.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import t from "./index132.js";
|
|
2
|
+
function e() {
|
|
3
|
+
this.__data__ = t ? t(null) : {}, this.size = 0;
|
|
4
4
|
}
|
|
5
5
|
export {
|
|
6
6
|
e as default
|
package/index126.js
CHANGED
package/index127.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import e from "./index132.js";
|
|
2
|
+
var n = "__lodash_hash_undefined__", o = Object.prototype, _ = o.hasOwnProperty;
|
|
3
|
+
function h(a) {
|
|
4
|
+
var r = this.__data__;
|
|
5
|
+
if (e) {
|
|
6
|
+
var t = r[a];
|
|
7
|
+
return t === n ? void 0 : t;
|
|
8
|
+
}
|
|
9
|
+
return _.call(r, a) ? r[a] : void 0;
|
|
4
10
|
}
|
|
5
11
|
export {
|
|
6
|
-
|
|
12
|
+
h as default
|
|
7
13
|
};
|
package/index128.js
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
function
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
var t = r[a];
|
|
7
|
-
return t === n ? void 0 : t;
|
|
8
|
-
}
|
|
9
|
-
return _.call(r, a) ? r[a] : void 0;
|
|
1
|
+
import r from "./index132.js";
|
|
2
|
+
var e = Object.prototype, o = e.hasOwnProperty;
|
|
3
|
+
function p(t) {
|
|
4
|
+
var a = this.__data__;
|
|
5
|
+
return r ? a[t] !== void 0 : o.call(a, t);
|
|
10
6
|
}
|
|
11
7
|
export {
|
|
12
|
-
|
|
8
|
+
p as default
|
|
13
9
|
};
|
package/index129.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
function
|
|
4
|
-
var
|
|
5
|
-
return
|
|
1
|
+
import e from "./index132.js";
|
|
2
|
+
var h = "__lodash_hash_undefined__";
|
|
3
|
+
function s(t, a) {
|
|
4
|
+
var _ = this.__data__;
|
|
5
|
+
return this.size += this.has(t) ? 0 : 1, _[t] = e && a === void 0 ? h : a, this;
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
s as default
|
|
9
9
|
};
|
package/index130.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
var _ = this.__data__;
|
|
5
|
-
return this.size += this.has(t) ? 0 : 1, _[t] = e && a === void 0 ? h : a, this;
|
|
1
|
+
function e(t) {
|
|
2
|
+
var o = typeof t;
|
|
3
|
+
return o == "string" || o == "number" || o == "symbol" || o == "boolean" ? t !== "__proto__" : t === null;
|
|
6
4
|
}
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
e as default
|
|
9
7
|
};
|
package/index16.js
CHANGED
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/index26.js
CHANGED
package/index3.js
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { tree2list as
|
|
3
|
-
import { SunLazyRender as
|
|
4
|
-
import { SunModal as
|
|
5
|
-
import { linkedRef as
|
|
6
|
-
const
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "sun-cascader-tab",
|
|
9
|
-
title: "请选择",
|
|
10
|
-
"title-style": "color:#94a3b8"
|
|
11
|
-
}, ze = /* @__PURE__ */ J({
|
|
1
|
+
import { defineComponent as O, mergeModels as D, useModel as Q, computed as n, ref as _, renderSlot as W, openBlock as X, createElementBlock as Y, createCommentVNode as Z, mergeProps as x, resolveDirective as ee, withDirectives as le, unref as ae, renderList as te, Fragment as ne, toDisplayString as oe, createElementVNode as se, createTextVNode as re, normalizeClass as ue, withCtx as ie, createSlots as de, createBlock as ce, normalizeStyle as ve, createVNode as me } from "vue";
|
|
2
|
+
import { tree2list as pe } from "@solar-kit/core";
|
|
3
|
+
import { SunLazyRender as fe, SunItem as q } from "@solar-taro/ui-sun";
|
|
4
|
+
import { SunModal as he } from "@solar-taro/ui-vant";
|
|
5
|
+
import { linkedRef as z, untracked as ye } from "@solar-vue/core";
|
|
6
|
+
const be = W, t = X, o = Y, b = Z, ke = x, ge = ee, we = le, d = ae, k = te, m = ne, E = oe, g = se, M = re, Ke = ue, c = ie, Ne = de, I = ce, L = ve, F = me, Ve = ["label", "value", "placeholder", "required", "disabled"], Ce = ["active"], Se = ["name", "title"], Be = ["name"], Ee = /* @__PURE__ */ O({
|
|
12
7
|
__name: "index",
|
|
13
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ D({
|
|
14
9
|
label: {},
|
|
15
10
|
placeholder: { default: "请选择" },
|
|
16
11
|
options: {},
|
|
@@ -24,110 +19,111 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
|
|
|
24
19
|
modelValue: {},
|
|
25
20
|
modelModifiers: {}
|
|
26
21
|
}),
|
|
27
|
-
emits: /* @__PURE__ */
|
|
28
|
-
setup(w, { emit:
|
|
29
|
-
const p =
|
|
22
|
+
emits: /* @__PURE__ */ D(["select", "clear", "close"], ["update:modelValue"]),
|
|
23
|
+
setup(w, { emit: P }) {
|
|
24
|
+
const p = P, s = w, r = Q(w, "modelValue"), R = n(() => r.value && !s.required), u = _(!1), K = _(0), j = n(() => pe(s.options)), f = n(() => j.value.find((e) => e.parent && !e.children && e[s.valueKey] === r.value)), U = n(() => {
|
|
30
25
|
const e = [];
|
|
31
26
|
let l = f.value;
|
|
32
27
|
for (; l; )
|
|
33
28
|
e.unshift(l), l = l.parent;
|
|
34
29
|
return e;
|
|
35
|
-
}), v =
|
|
30
|
+
}), v = z(() => f.value), h = n(() => {
|
|
36
31
|
const e = [];
|
|
37
32
|
let l = v.value;
|
|
38
33
|
for (; l; )
|
|
39
34
|
e.unshift(l), l = l.parent;
|
|
40
35
|
return e;
|
|
41
|
-
}),
|
|
36
|
+
}), N = n(() => {
|
|
42
37
|
const e = v.value;
|
|
43
38
|
return e ? !e.children : !1;
|
|
44
|
-
}),
|
|
39
|
+
}), V = n(() => U.value.map((e) => e[s.labelKey]).join(` ${s.delimiter} `)), y = z(
|
|
45
40
|
() => (
|
|
46
41
|
// 如果有值,则取 currentNodes 的最后索引,否则为 0
|
|
47
|
-
f.value ?
|
|
42
|
+
f.value ? ye(() => h.value.length - 1) : 0
|
|
48
43
|
)
|
|
49
|
-
),
|
|
44
|
+
), C = n(() => s.options.filter((e) => !e.parent)), A = n(() => {
|
|
50
45
|
const e = v.value;
|
|
51
|
-
return e ? e.children :
|
|
46
|
+
return e ? e.children : C.value;
|
|
52
47
|
});
|
|
53
|
-
function
|
|
48
|
+
function S() {
|
|
54
49
|
s.disabled || (u.value = !0, K.value++);
|
|
55
50
|
}
|
|
56
|
-
function
|
|
51
|
+
function G() {
|
|
57
52
|
u.value = !1, p("close");
|
|
58
53
|
}
|
|
59
|
-
function
|
|
54
|
+
function H() {
|
|
60
55
|
p("clear", r.value), r.value = null;
|
|
61
56
|
}
|
|
62
|
-
function
|
|
63
|
-
v.value = e, p("select", e),
|
|
57
|
+
function B(e) {
|
|
58
|
+
v.value = e, p("select", e), N.value ? (r.value = e[s.valueKey], u.value = !1) : y.value++;
|
|
64
59
|
}
|
|
65
60
|
return (e, l) => {
|
|
66
|
-
const
|
|
61
|
+
const J = ge("readonly");
|
|
67
62
|
return t(), o(m, null, [
|
|
68
|
-
|
|
69
|
-
present:
|
|
70
|
-
label:
|
|
63
|
+
be(e.$slots, "default", {
|
|
64
|
+
present: S,
|
|
65
|
+
label: V.value
|
|
71
66
|
}, () => [
|
|
72
|
-
|
|
67
|
+
we((t(), o("van-field", ke(e.$attrs, {
|
|
73
68
|
class: "sun-cascader",
|
|
74
69
|
label: e.label,
|
|
75
|
-
value:
|
|
70
|
+
value: V.value,
|
|
76
71
|
placeholder: e.placeholder,
|
|
77
72
|
required: e.required,
|
|
78
73
|
disabled: e.disabled,
|
|
79
|
-
onClickInput: l[1] || (l[1] = (a) =>
|
|
74
|
+
onClickInput: l[1] || (l[1] = (a) => S())
|
|
80
75
|
}), [
|
|
81
|
-
|
|
76
|
+
R.value ? (t(), o("van-icon", {
|
|
82
77
|
key: 0,
|
|
83
78
|
slot: "right-icon",
|
|
84
79
|
class: "sun-cascader-clear-icon",
|
|
85
80
|
name: "clear",
|
|
86
|
-
onTap: l[0] || (l[0] = (a) =>
|
|
81
|
+
onTap: l[0] || (l[0] = (a) => H())
|
|
87
82
|
}, null, 32)) : b("", !0)
|
|
88
|
-
], 16,
|
|
89
|
-
[
|
|
83
|
+
], 16, Ve)), [
|
|
84
|
+
[J]
|
|
90
85
|
])
|
|
91
86
|
]),
|
|
92
|
-
|
|
87
|
+
F(d(fe), { hook: "created" }, {
|
|
93
88
|
default: c(() => [
|
|
94
|
-
|
|
89
|
+
F(d(he), {
|
|
95
90
|
show: u.value,
|
|
96
91
|
"onUpdate:show": l[3] || (l[3] = (a) => u.value = a),
|
|
97
92
|
class: "sun-cascader-modal",
|
|
98
93
|
title: e.placeholder,
|
|
99
94
|
"show-buttons": !1,
|
|
100
|
-
onClose: l[4] || (l[4] = (a) =>
|
|
95
|
+
onClose: l[4] || (l[4] = (a) => G())
|
|
101
96
|
}, {
|
|
102
97
|
default: c(() => [
|
|
103
98
|
K.value ? (t(), o("van-tabs", {
|
|
104
99
|
key: 0,
|
|
105
100
|
class: "sun-cascader-tabs",
|
|
106
|
-
active: d(
|
|
101
|
+
active: d(y),
|
|
107
102
|
"line-width": "30px",
|
|
108
103
|
"line-height": "4px",
|
|
109
104
|
animated: "true",
|
|
110
|
-
onChange: l[2] || (l[2] = (a) =>
|
|
105
|
+
onChange: l[2] || (l[2] = (a) => y.value = a.detail.index)
|
|
111
106
|
}, [
|
|
112
|
-
(t(!0), o(m, null, k(
|
|
113
|
-
var
|
|
107
|
+
(t(!0), o(m, null, k(h.value, (a, $) => {
|
|
108
|
+
var T;
|
|
114
109
|
return t(), o("van-tab", {
|
|
115
110
|
key: a[e.valueKey],
|
|
111
|
+
name: $,
|
|
116
112
|
class: "sun-cascader-tab",
|
|
117
113
|
title: a[e.labelKey]
|
|
118
114
|
}, [
|
|
119
115
|
g("view", {
|
|
120
116
|
class: "sun-cascader-list",
|
|
121
|
-
style:
|
|
117
|
+
style: L({ height: e.height })
|
|
122
118
|
}, [
|
|
123
|
-
(t(!0), o(m, null, k(((
|
|
119
|
+
(t(!0), o(m, null, k(((T = a.parent) == null ? void 0 : T.children) || C.value, (i) => (t(), I(d(q), {
|
|
124
120
|
key: i[e.valueKey],
|
|
125
|
-
class:
|
|
121
|
+
class: Ke(["sun-cascader-option", { "sun-cascader-option-active": a[e.valueKey] === i[e.valueKey] }]),
|
|
126
122
|
clickable: !0,
|
|
127
|
-
onTap: (
|
|
128
|
-
},
|
|
123
|
+
onTap: ($e) => B(i)
|
|
124
|
+
}, Ne({
|
|
129
125
|
default: c(() => [
|
|
130
|
-
E(
|
|
126
|
+
M(E(i[e.labelKey]) + " ", 1)
|
|
131
127
|
]),
|
|
132
128
|
_: 2
|
|
133
129
|
}, [
|
|
@@ -143,27 +139,33 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
|
|
|
143
139
|
} : void 0
|
|
144
140
|
]), 1032, ["class", "onTap"]))), 128))
|
|
145
141
|
], 4)
|
|
146
|
-
], 8,
|
|
142
|
+
], 8, Se);
|
|
147
143
|
}), 128)),
|
|
148
|
-
|
|
144
|
+
N.value ? b("", !0) : (t(), o("van-tab", {
|
|
145
|
+
key: 0,
|
|
146
|
+
name: h.value.length,
|
|
147
|
+
class: "sun-cascader-tab",
|
|
148
|
+
title: "请选择",
|
|
149
|
+
"title-style": "color:#94a3b8"
|
|
150
|
+
}, [
|
|
149
151
|
g("view", {
|
|
150
152
|
class: "sun-cascader-list",
|
|
151
|
-
style:
|
|
153
|
+
style: L({ height: e.height })
|
|
152
154
|
}, [
|
|
153
|
-
(t(!0), o(m, null, k(
|
|
155
|
+
(t(!0), o(m, null, k(A.value, (a) => (t(), I(d(q), {
|
|
154
156
|
key: a[e.valueKey],
|
|
155
157
|
class: "sun-cascader-option",
|
|
156
158
|
clickable: !0,
|
|
157
|
-
onTap: (
|
|
159
|
+
onTap: ($) => B(a)
|
|
158
160
|
}, {
|
|
159
161
|
default: c(() => [
|
|
160
|
-
E(
|
|
162
|
+
M(E(a[e.labelKey]), 1)
|
|
161
163
|
]),
|
|
162
164
|
_: 2
|
|
163
165
|
}, 1032, ["onTap"]))), 128))
|
|
164
166
|
], 4)
|
|
165
|
-
]))
|
|
166
|
-
], 40,
|
|
167
|
+
], 8, Be))
|
|
168
|
+
], 40, Ce)) : b("", !0)
|
|
167
169
|
]),
|
|
168
170
|
_: 1
|
|
169
171
|
}, 8, ["show", "title"])
|
|
@@ -175,5 +177,5 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
|
|
|
175
177
|
}
|
|
176
178
|
});
|
|
177
179
|
export {
|
|
178
|
-
|
|
180
|
+
Ee as default
|
|
179
181
|
};
|
package/index50.js
CHANGED
package/index52.js
CHANGED
package/index56.js
CHANGED
package/index57.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
1
|
+
function f(e, n) {
|
|
2
|
+
for (var l = -1, t = e == null ? 0 : e.length; ++l < t && n(e[l], l, e) !== !1; )
|
|
3
|
+
;
|
|
4
|
+
return e;
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
f as default
|
|
8
8
|
};
|
package/index58.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import r from "./index102.js";
|
|
2
|
+
var o = function() {
|
|
3
|
+
try {
|
|
4
|
+
var e = r(Object, "defineProperty");
|
|
5
|
+
return e({}, "", {}), e;
|
|
6
|
+
} catch {
|
|
7
|
+
}
|
|
8
|
+
}();
|
|
6
9
|
export {
|
|
7
|
-
|
|
10
|
+
o as default
|
|
8
11
|
};
|
package/index59.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} catch {
|
|
7
|
-
}
|
|
8
|
-
}();
|
|
1
|
+
var p = Object.prototype;
|
|
2
|
+
function e(t) {
|
|
3
|
+
var o = t && t.constructor, r = typeof o == "function" && o.prototype || p;
|
|
4
|
+
return t === r;
|
|
5
|
+
}
|
|
9
6
|
export {
|
|
10
|
-
|
|
7
|
+
e as default
|
|
11
8
|
};
|
package/index72.js
CHANGED