@solar-taro/ui-vant 2.5.0 → 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 +16 -0
- package/cascader/index.scss +6 -0
- package/directives/binding.d.ts +10 -0
- package/directives/index.d.ts +1 -0
- package/index.js +18 -16
- package/index10.js +213 -196
- package/index100.js +7 -10
- package/index101.js +9 -6
- package/index102.js +6 -17
- package/index103.js +17 -4
- package/index104.js +4 -4
- package/index105.js +4 -3
- package/index106.js +3 -3
- package/index107.js +3 -14
- package/index108.js +14 -7
- package/index109.js +8 -6
- package/index110.js +5 -5
- package/index111.js +5 -5
- package/index112.js +5 -5
- package/index113.js +5 -5
- package/index114.js +6 -3
- package/index115.js +3 -18
- package/index116.js +17 -5
- package/index117.js +5 -3
- package/index118.js +3 -3
- package/index119.js +3 -9
- package/index12.js +3 -28
- package/index120.js +9 -5
- package/index121.js +5 -4
- package/index122.js +4 -5
- package/index123.js +6 -3
- package/index124.js +3 -5
- package/index125.js +4 -4
- package/index126.js +4 -10
- package/index127.js +10 -6
- package/index128.js +6 -6
- package/index129.js +6 -4
- package/index13.js +28 -4
- package/index130.js +4 -7
- package/index131.js +8 -3
- package/index132.js +5 -0
- package/index14.js +5 -64
- package/index15.js +64 -2
- package/index16.js +1 -1
- package/index17.js +1 -1
- package/index18.js +1 -1
- package/index19.js +1 -1
- package/index2.js +1 -1
- package/index20.js +1 -1
- package/index21.js +1 -1
- package/index22.js +1 -1
- package/index23.js +2 -6
- package/index24.js +5 -3
- package/index25.js +3 -62
- package/index26.js +62 -3
- package/index27.js +4 -8
- package/index28.js +7 -6
- package/index29.js +6 -3
- package/index3.js +62 -59
- package/index30.js +4 -2
- package/index31.js +2 -6
- package/index32.js +5 -9
- package/index33.js +9 -4
- package/index34.js +5 -4
- package/index35.js +4 -3
- package/index36.js +3 -4
- package/index37.js +3 -7
- package/index38.js +7 -4
- package/index39.js +5 -5
- package/index4.js +1 -1
- package/index40.js +5 -7
- package/index41.js +6 -5
- package/index42.js +6 -9
- package/index43.js +9 -5
- package/index44.js +5 -7
- package/index45.js +6 -4
- package/index46.js +5 -10
- package/index47.js +9 -6
- package/index48.js +6 -17
- package/index49.js +17 -11
- package/index5.js +1 -1
- package/index50.js +11 -6
- package/index51.js +6 -12
- package/index52.js +12 -3
- package/index53.js +3 -11
- package/index54.js +11 -7
- package/index55.js +7 -9
- package/index56.js +9 -5
- package/index58.js +1 -1
- package/index59.js +5 -15
- package/index60.js +15 -5
- package/index61.js +5 -5
- package/index62.js +5 -8
- package/index63.js +8 -6
- package/index64.js +6 -5
- package/index65.js +4 -4
- package/index66.js +5 -6
- package/index67.js +5 -5
- package/index68.js +7 -26
- package/index69.js +26 -6
- package/index7.js +25 -19
- package/index70.js +5 -39
- package/index71.js +39 -6
- package/index72.js +6 -5
- package/index73.js +6 -15
- package/index74.js +14 -7
- package/index75.js +8 -2
- package/index76.js +2 -3
- package/index77.js +3 -13
- package/index78.js +12 -4
- package/index79.js +5 -3
- package/index8.js +1 -1
- package/index80.js +3 -4
- package/index81.js +4 -4
- package/index82.js +4 -4
- package/index83.js +4 -4
- package/index84.js +4 -4
- package/index85.js +3 -14
- package/index86.js +14 -13
- package/index87.js +13 -8
- package/index88.js +9 -3
- package/index89.js +3 -6
- package/index90.js +5 -5
- package/index91.js +5 -5
- package/index92.js +5 -7
- package/index93.js +7 -17
- package/index94.js +17 -10
- package/index95.js +9 -4
- package/index96.js +5 -4
- package/index97.js +4 -4
- package/index98.js +4 -5
- package/index99.js +5 -6
- package/modal/index.vue.d.ts +1 -0
- package/package.json +1 -1
- package/selector/index.scss +11 -0
- package/selector/index.vue.d.ts +2 -1
package/index14.js
CHANGED
|
@@ -1,66 +1,7 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
5
|
-
class a {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.duration = 2e3;
|
|
8
|
-
}
|
|
9
|
-
primary(n, t = "#van-notify") {
|
|
10
|
-
return i.notify({ type: "primary", message: n, duration: this.duration, selector: t });
|
|
11
|
-
}
|
|
12
|
-
success(n, t = "#van-notify") {
|
|
13
|
-
return i.notify({ type: "success", message: n, duration: this.duration, selector: t });
|
|
14
|
-
}
|
|
15
|
-
warning(n, t = "#van-notify") {
|
|
16
|
-
return i.notify({ type: "warning", message: n, duration: this.duration, selector: t });
|
|
17
|
-
}
|
|
18
|
-
danger(n, t = "#van-notify") {
|
|
19
|
-
return i.notify({ type: "danger", message: n, duration: this.duration, selector: t });
|
|
20
|
-
}
|
|
21
|
-
dismiss() {
|
|
22
|
-
return i.notify.clear();
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
class s {
|
|
26
|
-
/**
|
|
27
|
-
* 展示确认对话框
|
|
28
|
-
* @param title
|
|
29
|
-
* @param message
|
|
30
|
-
* @param options 其他 dialog 选项
|
|
31
|
-
*/
|
|
32
|
-
confirm(n, t, o) {
|
|
33
|
-
return i.dialog.confirm({
|
|
34
|
-
title: n,
|
|
35
|
-
message: t,
|
|
36
|
-
...o
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* 展示警告对话框
|
|
41
|
-
* @param title
|
|
42
|
-
* @param message
|
|
43
|
-
* @param options 其他 dialog 选项
|
|
44
|
-
*/
|
|
45
|
-
alert(n, t, o) {
|
|
46
|
-
return i.dialog.alert({
|
|
47
|
-
title: n,
|
|
48
|
-
message: t,
|
|
49
|
-
...o
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* 关闭对话框
|
|
54
|
-
*/
|
|
55
|
-
dismiss() {
|
|
56
|
-
return i.dialog.close();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
const u = new s(), c = new a();
|
|
1
|
+
const r = (t, o) => {
|
|
2
|
+
var e;
|
|
3
|
+
t.setAttribute("readonly", (e = o.value) != null ? e : !0);
|
|
4
|
+
};
|
|
60
5
|
export {
|
|
61
|
-
|
|
62
|
-
a as Notify,
|
|
63
|
-
u as dialog,
|
|
64
|
-
c as notify,
|
|
65
|
-
e as setupOverlay
|
|
6
|
+
r as vReadonly
|
|
66
7
|
};
|
package/index15.js
CHANGED
|
@@ -1,4 +1,66 @@
|
|
|
1
|
-
|
|
1
|
+
const i = {};
|
|
2
|
+
function e(r) {
|
|
3
|
+
Object.assign(i, r);
|
|
4
|
+
}
|
|
5
|
+
class a {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.duration = 2e3;
|
|
8
|
+
}
|
|
9
|
+
primary(n, t = "#van-notify") {
|
|
10
|
+
return i.notify({ type: "primary", message: n, duration: this.duration, selector: t });
|
|
11
|
+
}
|
|
12
|
+
success(n, t = "#van-notify") {
|
|
13
|
+
return i.notify({ type: "success", message: n, duration: this.duration, selector: t });
|
|
14
|
+
}
|
|
15
|
+
warning(n, t = "#van-notify") {
|
|
16
|
+
return i.notify({ type: "warning", message: n, duration: this.duration, selector: t });
|
|
17
|
+
}
|
|
18
|
+
danger(n, t = "#van-notify") {
|
|
19
|
+
return i.notify({ type: "danger", message: n, duration: this.duration, selector: t });
|
|
20
|
+
}
|
|
21
|
+
dismiss() {
|
|
22
|
+
return i.notify.clear();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
class s {
|
|
26
|
+
/**
|
|
27
|
+
* 展示确认对话框
|
|
28
|
+
* @param title
|
|
29
|
+
* @param message
|
|
30
|
+
* @param options 其他 dialog 选项
|
|
31
|
+
*/
|
|
32
|
+
confirm(n, t, o) {
|
|
33
|
+
return i.dialog.confirm({
|
|
34
|
+
title: n,
|
|
35
|
+
message: t,
|
|
36
|
+
...o
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 展示警告对话框
|
|
41
|
+
* @param title
|
|
42
|
+
* @param message
|
|
43
|
+
* @param options 其他 dialog 选项
|
|
44
|
+
*/
|
|
45
|
+
alert(n, t, o) {
|
|
46
|
+
return i.dialog.alert({
|
|
47
|
+
title: n,
|
|
48
|
+
message: t,
|
|
49
|
+
...o
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 关闭对话框
|
|
54
|
+
*/
|
|
55
|
+
dismiss() {
|
|
56
|
+
return i.dialog.close();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
const u = new s(), c = new a();
|
|
2
60
|
export {
|
|
3
|
-
|
|
61
|
+
s as Dialog,
|
|
62
|
+
a as Notify,
|
|
63
|
+
u as dialog,
|
|
64
|
+
c as notify,
|
|
65
|
+
e as setupOverlay
|
|
4
66
|
};
|
package/index16.js
CHANGED
package/index17.js
CHANGED
package/index18.js
CHANGED
package/index19.js
CHANGED
package/index2.js
CHANGED
package/index20.js
CHANGED
package/index21.js
CHANGED
package/index22.js
CHANGED
package/index23.js
CHANGED
package/index24.js
CHANGED
package/index25.js
CHANGED
|
@@ -1,65 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import B from "./index54.js";
|
|
4
|
-
import I from "./index60.js";
|
|
5
|
-
import O from "./index61.js";
|
|
6
|
-
import _ from "./index62.js";
|
|
7
|
-
import M from "./index63.js";
|
|
8
|
-
import l from "./index64.js";
|
|
9
|
-
import w from "./index65.js";
|
|
10
|
-
import D from "./index66.js";
|
|
11
|
-
import G from "./index67.js";
|
|
12
|
-
import N from "./index68.js";
|
|
13
|
-
import U from "./index69.js";
|
|
14
|
-
import h from "./index70.js";
|
|
15
|
-
import x from "./index71.js";
|
|
16
|
-
import K from "./index30.js";
|
|
17
|
-
import P from "./index34.js";
|
|
18
|
-
import R from "./index39.js";
|
|
19
|
-
import W from "./index38.js";
|
|
20
|
-
import Y from "./index43.js";
|
|
21
|
-
import q from "./index47.js";
|
|
22
|
-
import H from "./index50.js";
|
|
23
|
-
var J = 1, Q = 2, V = 4, A = "[object Arguments]", X = "[object Array]", Z = "[object Boolean]", $ = "[object Date]", u = "[object Error]", d = "[object Function]", z = "[object GeneratorFunction]", k = "[object Map]", v = "[object Number]", E = "[object Object]", rr = "[object RegExp]", or = "[object Set]", tr = "[object String]", er = "[object Symbol]", ir = "[object WeakMap]", nr = "[object ArrayBuffer]", fr = "[object DataView]", ar = "[object Float32Array]", mr = "[object Float64Array]", cr = "[object Int8Array]", gr = "[object Int16Array]", pr = "[object Int32Array]", br = "[object Uint8Array]", Tr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", yr = "[object Uint32Array]", o = {};
|
|
24
|
-
o[A] = o[X] = o[nr] = o[fr] = o[Z] = o[$] = o[ar] = o[mr] = o[cr] = o[gr] = o[pr] = o[k] = o[v] = o[E] = o[rr] = o[or] = o[tr] = o[er] = o[br] = o[Tr] = o[jr] = o[yr] = !0;
|
|
25
|
-
o[u] = o[d] = o[ir] = !1;
|
|
26
|
-
function p(r, f, g, sr, b, i) {
|
|
27
|
-
var t, m = f & J, c = f & Q, F = f & V;
|
|
28
|
-
if (t !== void 0)
|
|
29
|
-
return t;
|
|
30
|
-
if (!W(r))
|
|
31
|
-
return r;
|
|
32
|
-
var T = K(r);
|
|
33
|
-
if (T) {
|
|
34
|
-
if (t = U(r), !m)
|
|
35
|
-
return M(r, t);
|
|
36
|
-
} else {
|
|
37
|
-
var a = N(r), j = a == d || a == z;
|
|
38
|
-
if (P(r))
|
|
39
|
-
return _(r, m);
|
|
40
|
-
if (a == E || a == A || j && !b) {
|
|
41
|
-
if (t = c || j ? {} : x(r), !m)
|
|
42
|
-
return c ? w(r, O(t, r)) : l(r, I(t, r));
|
|
43
|
-
} else {
|
|
44
|
-
if (!o[a])
|
|
45
|
-
return b ? r : {};
|
|
46
|
-
t = h(r, a, m);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
i || (i = new S());
|
|
50
|
-
var y = i.get(r);
|
|
51
|
-
if (y)
|
|
52
|
-
return y;
|
|
53
|
-
i.set(r, t), Y(r) ? r.forEach(function(e) {
|
|
54
|
-
t.add(p(e, f, g, e, r, i));
|
|
55
|
-
}) : R(r) && r.forEach(function(e, n) {
|
|
56
|
-
t.set(n, p(e, f, g, n, r, i));
|
|
57
|
-
});
|
|
58
|
-
var C = F ? c ? G : D : c ? H : q, s = T ? void 0 : C(r);
|
|
59
|
-
return L(s || r, function(e, n) {
|
|
60
|
-
s && (n = e, e = r[n]), B(t, n, p(e, f, g, n, r, i));
|
|
61
|
-
}), t;
|
|
1
|
+
function n(l) {
|
|
2
|
+
return l == null;
|
|
62
3
|
}
|
|
63
4
|
export {
|
|
64
|
-
|
|
5
|
+
n as default
|
|
65
6
|
};
|
package/index26.js
CHANGED
|
@@ -1,6 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import S from "./index60.js";
|
|
2
|
+
import L from "./index57.js";
|
|
3
|
+
import B from "./index55.js";
|
|
4
|
+
import I from "./index61.js";
|
|
5
|
+
import O from "./index62.js";
|
|
6
|
+
import _ from "./index63.js";
|
|
7
|
+
import M from "./index64.js";
|
|
8
|
+
import l from "./index65.js";
|
|
9
|
+
import w from "./index66.js";
|
|
10
|
+
import D from "./index67.js";
|
|
11
|
+
import G from "./index68.js";
|
|
12
|
+
import N from "./index69.js";
|
|
13
|
+
import U from "./index70.js";
|
|
14
|
+
import h from "./index71.js";
|
|
15
|
+
import x from "./index72.js";
|
|
16
|
+
import K from "./index31.js";
|
|
17
|
+
import P from "./index35.js";
|
|
18
|
+
import R from "./index40.js";
|
|
19
|
+
import W from "./index39.js";
|
|
20
|
+
import Y from "./index44.js";
|
|
21
|
+
import q from "./index48.js";
|
|
22
|
+
import H from "./index51.js";
|
|
23
|
+
var J = 1, Q = 2, V = 4, A = "[object Arguments]", X = "[object Array]", Z = "[object Boolean]", $ = "[object Date]", u = "[object Error]", d = "[object Function]", z = "[object GeneratorFunction]", k = "[object Map]", v = "[object Number]", E = "[object Object]", rr = "[object RegExp]", or = "[object Set]", tr = "[object String]", er = "[object Symbol]", ir = "[object WeakMap]", nr = "[object ArrayBuffer]", fr = "[object DataView]", ar = "[object Float32Array]", mr = "[object Float64Array]", cr = "[object Int8Array]", gr = "[object Int16Array]", pr = "[object Int32Array]", br = "[object Uint8Array]", Tr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", yr = "[object Uint32Array]", o = {};
|
|
24
|
+
o[A] = o[X] = o[nr] = o[fr] = o[Z] = o[$] = o[ar] = o[mr] = o[cr] = o[gr] = o[pr] = o[k] = o[v] = o[E] = o[rr] = o[or] = o[tr] = o[er] = o[br] = o[Tr] = o[jr] = o[yr] = !0;
|
|
25
|
+
o[u] = o[d] = o[ir] = !1;
|
|
26
|
+
function p(r, f, g, sr, b, i) {
|
|
27
|
+
var t, m = f & J, c = f & Q, F = f & V;
|
|
28
|
+
if (t !== void 0)
|
|
29
|
+
return t;
|
|
30
|
+
if (!W(r))
|
|
31
|
+
return r;
|
|
32
|
+
var T = K(r);
|
|
33
|
+
if (T) {
|
|
34
|
+
if (t = U(r), !m)
|
|
35
|
+
return M(r, t);
|
|
36
|
+
} else {
|
|
37
|
+
var a = N(r), j = a == d || a == z;
|
|
38
|
+
if (P(r))
|
|
39
|
+
return _(r, m);
|
|
40
|
+
if (a == E || a == A || j && !b) {
|
|
41
|
+
if (t = c || j ? {} : x(r), !m)
|
|
42
|
+
return c ? w(r, O(t, r)) : l(r, I(t, r));
|
|
43
|
+
} else {
|
|
44
|
+
if (!o[a])
|
|
45
|
+
return b ? r : {};
|
|
46
|
+
t = h(r, a, m);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
i || (i = new S());
|
|
50
|
+
var y = i.get(r);
|
|
51
|
+
if (y)
|
|
52
|
+
return y;
|
|
53
|
+
i.set(r, t), Y(r) ? r.forEach(function(e) {
|
|
54
|
+
t.add(p(e, f, g, e, r, i));
|
|
55
|
+
}) : R(r) && r.forEach(function(e, n) {
|
|
56
|
+
t.set(n, p(e, f, g, n, r, i));
|
|
57
|
+
});
|
|
58
|
+
var C = F ? c ? G : D : c ? H : q, s = T ? void 0 : C(r);
|
|
59
|
+
return L(s || r, function(e, n) {
|
|
60
|
+
s && (n = e, e = r[n]), B(t, n, p(e, f, g, n, r, i));
|
|
61
|
+
}), t;
|
|
3
62
|
}
|
|
4
63
|
export {
|
|
5
|
-
|
|
64
|
+
p as default
|
|
6
65
|
};
|
package/index27.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return arguments;
|
|
5
|
-
}()) ? e : function(r) {
|
|
6
|
-
return o(r) && a.call(r, "callee") && !n.call(r, "callee");
|
|
7
|
-
};
|
|
1
|
+
function t(n, f) {
|
|
2
|
+
return n === f || n !== n && f !== f;
|
|
3
|
+
}
|
|
8
4
|
export {
|
|
9
|
-
|
|
5
|
+
t as default
|
|
10
6
|
};
|
package/index28.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import t from "./index37.js";
|
|
2
1
|
import e from "./index29.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return
|
|
6
|
-
}
|
|
2
|
+
import o from "./index30.js";
|
|
3
|
+
var t = Object.prototype, a = t.hasOwnProperty, n = t.propertyIsEnumerable, c = e(/* @__PURE__ */ function() {
|
|
4
|
+
return arguments;
|
|
5
|
+
}()) ? e : function(r) {
|
|
6
|
+
return o(r) && a.call(r, "callee") && !n.call(r, "callee");
|
|
7
|
+
};
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
c as default
|
|
9
10
|
};
|
package/index29.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,109 +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",
|
|
79
|
+
class: "sun-cascader-clear-icon",
|
|
84
80
|
name: "clear",
|
|
85
|
-
onTap: l[0] || (l[0] = (a) =>
|
|
81
|
+
onTap: l[0] || (l[0] = (a) => H())
|
|
86
82
|
}, null, 32)) : b("", !0)
|
|
87
|
-
], 16,
|
|
88
|
-
[
|
|
83
|
+
], 16, Ve)), [
|
|
84
|
+
[J]
|
|
89
85
|
])
|
|
90
86
|
]),
|
|
91
|
-
|
|
87
|
+
F(d(fe), { hook: "created" }, {
|
|
92
88
|
default: c(() => [
|
|
93
|
-
|
|
89
|
+
F(d(he), {
|
|
94
90
|
show: u.value,
|
|
95
91
|
"onUpdate:show": l[3] || (l[3] = (a) => u.value = a),
|
|
96
92
|
class: "sun-cascader-modal",
|
|
97
93
|
title: e.placeholder,
|
|
98
94
|
"show-buttons": !1,
|
|
99
|
-
onClose: l[4] || (l[4] = (a) =>
|
|
95
|
+
onClose: l[4] || (l[4] = (a) => G())
|
|
100
96
|
}, {
|
|
101
97
|
default: c(() => [
|
|
102
98
|
K.value ? (t(), o("van-tabs", {
|
|
103
99
|
key: 0,
|
|
104
100
|
class: "sun-cascader-tabs",
|
|
105
|
-
active: d(
|
|
101
|
+
active: d(y),
|
|
106
102
|
"line-width": "30px",
|
|
107
103
|
"line-height": "4px",
|
|
108
104
|
animated: "true",
|
|
109
|
-
onChange: l[2] || (l[2] = (a) =>
|
|
105
|
+
onChange: l[2] || (l[2] = (a) => y.value = a.detail.index)
|
|
110
106
|
}, [
|
|
111
|
-
(t(!0), o(m, null, k(
|
|
112
|
-
var
|
|
107
|
+
(t(!0), o(m, null, k(h.value, (a, $) => {
|
|
108
|
+
var T;
|
|
113
109
|
return t(), o("van-tab", {
|
|
114
110
|
key: a[e.valueKey],
|
|
111
|
+
name: $,
|
|
115
112
|
class: "sun-cascader-tab",
|
|
116
113
|
title: a[e.labelKey]
|
|
117
114
|
}, [
|
|
118
115
|
g("view", {
|
|
119
116
|
class: "sun-cascader-list",
|
|
120
|
-
style:
|
|
117
|
+
style: L({ height: e.height })
|
|
121
118
|
}, [
|
|
122
|
-
(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), {
|
|
123
120
|
key: i[e.valueKey],
|
|
124
|
-
class:
|
|
121
|
+
class: Ke(["sun-cascader-option", { "sun-cascader-option-active": a[e.valueKey] === i[e.valueKey] }]),
|
|
125
122
|
clickable: !0,
|
|
126
|
-
onTap: (
|
|
127
|
-
},
|
|
123
|
+
onTap: ($e) => B(i)
|
|
124
|
+
}, Ne({
|
|
128
125
|
default: c(() => [
|
|
129
|
-
E(
|
|
126
|
+
M(E(i[e.labelKey]) + " ", 1)
|
|
130
127
|
]),
|
|
131
128
|
_: 2
|
|
132
129
|
}, [
|
|
@@ -142,27 +139,33 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
|
|
|
142
139
|
} : void 0
|
|
143
140
|
]), 1032, ["class", "onTap"]))), 128))
|
|
144
141
|
], 4)
|
|
145
|
-
], 8,
|
|
142
|
+
], 8, Se);
|
|
146
143
|
}), 128)),
|
|
147
|
-
|
|
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
|
+
}, [
|
|
148
151
|
g("view", {
|
|
149
152
|
class: "sun-cascader-list",
|
|
150
|
-
style:
|
|
153
|
+
style: L({ height: e.height })
|
|
151
154
|
}, [
|
|
152
|
-
(t(!0), o(m, null, k(
|
|
155
|
+
(t(!0), o(m, null, k(A.value, (a) => (t(), I(d(q), {
|
|
153
156
|
key: a[e.valueKey],
|
|
154
157
|
class: "sun-cascader-option",
|
|
155
158
|
clickable: !0,
|
|
156
|
-
onTap: (
|
|
159
|
+
onTap: ($) => B(a)
|
|
157
160
|
}, {
|
|
158
161
|
default: c(() => [
|
|
159
|
-
E(
|
|
162
|
+
M(E(a[e.labelKey]), 1)
|
|
160
163
|
]),
|
|
161
164
|
_: 2
|
|
162
165
|
}, 1032, ["onTap"]))), 128))
|
|
163
166
|
], 4)
|
|
164
|
-
]))
|
|
165
|
-
], 40,
|
|
167
|
+
], 8, Be))
|
|
168
|
+
], 40, Ce)) : b("", !0)
|
|
166
169
|
]),
|
|
167
170
|
_: 1
|
|
168
171
|
}, 8, ["show", "title"])
|
|
@@ -174,5 +177,5 @@ const ye = Q, t = W, o = X, b = Y, be = Z, ke = x, ge = ee, d = le, k = ae, m =
|
|
|
174
177
|
}
|
|
175
178
|
});
|
|
176
179
|
export {
|
|
177
|
-
|
|
180
|
+
Ee as default
|
|
178
181
|
};
|
package/index30.js
CHANGED