@solar-taro/ui-vant 1.0.2 → 1.1.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/CHANGELOG.md +14 -0
- package/index.js +32 -1762
- package/index10.js +236 -0
- package/index100.js +7 -0
- package/index101.js +8 -0
- package/index102.js +9 -0
- package/index103.js +12 -0
- package/index104.js +9 -0
- package/index105.js +9 -0
- package/index106.js +20 -0
- package/index107.js +7 -0
- package/index108.js +7 -0
- package/index109.js +6 -0
- package/index11.js +48 -0
- package/index110.js +6 -0
- package/index111.js +17 -0
- package/index112.js +10 -0
- package/index113.js +8 -0
- package/index114.js +8 -0
- package/index115.js +8 -0
- package/index116.js +8 -0
- package/index117.js +8 -0
- package/index118.js +5 -0
- package/index119.js +20 -0
- package/index12.js +21 -0
- package/index120.js +8 -0
- package/index121.js +6 -0
- package/index122.js +6 -0
- package/index123.js +12 -0
- package/index124.js +8 -0
- package/index125.js +7 -0
- package/index126.js +8 -0
- package/index127.js +5 -0
- package/index128.js +7 -0
- package/index129.js +7 -0
- package/index13.js +31 -0
- package/index130.js +13 -0
- package/index131.js +9 -0
- package/index132.js +9 -0
- package/index133.js +7 -0
- package/index134.js +10 -0
- package/index135.js +5 -0
- package/index14.js +7 -0
- package/index15.js +66 -0
- package/index16.js +4 -0
- package/index17.js +4 -0
- package/index18.js +4 -0
- package/index19.js +4 -0
- package/index2.js +9 -0
- package/index20.js +4 -0
- package/index21.js +4 -0
- package/index22.js +4 -0
- package/index23.js +4 -0
- package/index24.js +4 -0
- package/index25.js +8 -0
- package/index26.js +11 -0
- package/index27.js +11 -0
- package/index28.js +65 -0
- package/index29.js +6 -0
- package/index3.js +131 -0
- package/index30.js +10 -0
- package/index31.js +9 -0
- package/index32.js +6 -0
- package/index33.js +4 -0
- package/index34.js +8 -0
- package/index35.js +12 -0
- package/index36.js +7 -0
- package/index37.js +6 -0
- package/index38.js +5 -0
- package/index39.js +6 -0
- package/index4.js +172 -0
- package/index40.js +10 -0
- package/index41.js +7 -0
- package/index42.js +7 -0
- package/index43.js +9 -0
- package/index44.js +8 -0
- package/index45.js +11 -0
- package/index46.js +7 -0
- package/index47.js +9 -0
- package/index48.js +7 -0
- package/index49.js +12 -0
- package/index5.js +36 -0
- package/index50.js +9 -0
- package/index51.js +20 -0
- package/index52.js +14 -0
- package/index53.js +9 -0
- package/index54.js +15 -0
- package/index55.js +6 -0
- package/index56.js +10 -0
- package/index57.js +12 -0
- package/index58.js +14 -0
- package/index59.js +8 -0
- package/index6.js +102 -0
- package/index60.js +8 -0
- package/index61.js +11 -0
- package/index62.js +18 -0
- package/index63.js +8 -0
- package/index64.js +8 -0
- package/index65.js +11 -0
- package/index66.js +9 -0
- package/index67.js +8 -0
- package/index68.js +8 -0
- package/index69.js +9 -0
- package/index7.js +46 -0
- package/index70.js +9 -0
- package/index71.js +28 -0
- package/index72.js +8 -0
- package/index73.js +42 -0
- package/index74.js +9 -0
- package/index75.js +8 -0
- package/index76.js +17 -0
- package/index77.js +10 -0
- package/index78.js +4 -0
- package/index79.js +5 -0
- package/index8.js +271 -0
- package/index80.js +15 -0
- package/index81.js +7 -0
- package/index82.js +5 -0
- package/index83.js +6 -0
- package/index84.js +6 -0
- package/index85.js +6 -0
- package/index86.js +6 -0
- package/index87.js +6 -0
- package/index88.js +17 -0
- package/index89.js +16 -0
- package/index9.js +64 -0
- package/index90.js +11 -0
- package/index91.js +5 -0
- package/index92.js +8 -0
- package/index93.js +8 -0
- package/index94.js +8 -0
- package/index95.js +10 -0
- package/index96.js +20 -0
- package/index97.js +13 -0
- package/index98.js +8 -0
- package/index99.js +7 -0
- package/opper-controller/index.vue.d.ts +8 -4
- package/package.json +2 -1
package/index131.js
ADDED
package/index132.js
ADDED
package/index133.js
ADDED
package/index134.js
ADDED
package/index135.js
ADDED
package/index14.js
ADDED
package/index15.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
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();
|
|
60
|
+
export {
|
|
61
|
+
s as Dialog,
|
|
62
|
+
a as Notify,
|
|
63
|
+
u as dialog,
|
|
64
|
+
c as notify,
|
|
65
|
+
e as setupOverlay
|
|
66
|
+
};
|
package/index16.js
ADDED
package/index17.js
ADDED
package/index18.js
ADDED
package/index19.js
ADDED
package/index2.js
ADDED
package/index20.js
ADDED
package/index21.js
ADDED
package/index22.js
ADDED
package/index23.js
ADDED
package/index24.js
ADDED
package/index25.js
ADDED
package/index26.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ref as i } from "vue";
|
|
2
|
+
import { takeUntilDestroyed as s } from "./index104.js";
|
|
3
|
+
function a(e, o) {
|
|
4
|
+
const t = i(o);
|
|
5
|
+
return (typeof e == "function" ? e() : e).pipe(s()).subscribe((r) => {
|
|
6
|
+
t.value = r;
|
|
7
|
+
}), t;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
a as useObservable
|
|
11
|
+
};
|
package/index27.js
ADDED
package/index28.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import S from "./index62.js";
|
|
2
|
+
import L from "./index60.js";
|
|
3
|
+
import B from "./index56.js";
|
|
4
|
+
import I from "./index63.js";
|
|
5
|
+
import O from "./index64.js";
|
|
6
|
+
import _ from "./index65.js";
|
|
7
|
+
import M from "./index66.js";
|
|
8
|
+
import l from "./index67.js";
|
|
9
|
+
import w from "./index68.js";
|
|
10
|
+
import D from "./index69.js";
|
|
11
|
+
import G from "./index70.js";
|
|
12
|
+
import N from "./index71.js";
|
|
13
|
+
import U from "./index72.js";
|
|
14
|
+
import h from "./index73.js";
|
|
15
|
+
import x from "./index74.js";
|
|
16
|
+
import K from "./index33.js";
|
|
17
|
+
import P from "./index37.js";
|
|
18
|
+
import R from "./index42.js";
|
|
19
|
+
import W from "./index41.js";
|
|
20
|
+
import Y from "./index46.js";
|
|
21
|
+
import q from "./index50.js";
|
|
22
|
+
import H from "./index53.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;
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
p as default
|
|
65
|
+
};
|
package/index29.js
ADDED
package/index3.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { defineComponent as E, ref as N, computed as r, mergeProps as I, createElementVNode as L, openBlock as P, createElementBlock as $, createCommentVNode as q } from "vue";
|
|
2
|
+
import y from "./index25.js";
|
|
3
|
+
const D = I, A = L, v = P, h = $, T = q, j = ["show"], z = ["title", "value-key", "columns", "loading"], H = /* @__PURE__ */ E({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "index",
|
|
6
|
+
props: {
|
|
7
|
+
show: { type: Boolean },
|
|
8
|
+
labelKey: { default: "fullName" },
|
|
9
|
+
valueKey: { default: "id" },
|
|
10
|
+
pidKey: { default: "pid" },
|
|
11
|
+
searchable: { type: Boolean, default: !0 },
|
|
12
|
+
title: {},
|
|
13
|
+
loading: { type: Boolean },
|
|
14
|
+
options: { default: () => [] },
|
|
15
|
+
modelValue: {},
|
|
16
|
+
required: { type: Boolean }
|
|
17
|
+
},
|
|
18
|
+
emits: ["close", "cancel", "confirm", "update:show", "update:modelValue"],
|
|
19
|
+
setup(K, { emit: g }) {
|
|
20
|
+
const u = g, n = K, a = N(""), d = r(() => {
|
|
21
|
+
const e = y(n.options);
|
|
22
|
+
for (let t = 0; t < e.length - 1; t++) {
|
|
23
|
+
const o = e[t];
|
|
24
|
+
for (let l = 0; l < o.length; l++) {
|
|
25
|
+
const i = o[l];
|
|
26
|
+
i.children = e[t + 1].filter((s) => s[n.pidKey] === i[n.valueKey]);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return e[0];
|
|
30
|
+
}), p = r(() => y(d.value).map((e) => c(e)).flat()), C = r(() => {
|
|
31
|
+
const e = n.options[n.options.length - 1].find((t) => t[n.valueKey] === n.modelValue);
|
|
32
|
+
return e ? x(e) : m();
|
|
33
|
+
});
|
|
34
|
+
function w() {
|
|
35
|
+
n.required || u("update:modelValue", null), u("cancel", n.modelValue), f();
|
|
36
|
+
}
|
|
37
|
+
function f() {
|
|
38
|
+
u("update:show", !1), u("close");
|
|
39
|
+
}
|
|
40
|
+
function V({ detail: e }) {
|
|
41
|
+
const t = e.value[e.value.length - 1];
|
|
42
|
+
u("update:modelValue", t[n.valueKey]), u("confirm", B(t)), u("update:show", !1);
|
|
43
|
+
}
|
|
44
|
+
function k({ detail: e }) {
|
|
45
|
+
const { picker: t, value: o, index: l } = e;
|
|
46
|
+
!a.value && l < n.options.length - 1 && t.setColumnValues(
|
|
47
|
+
l + 1,
|
|
48
|
+
n.options[l + 1].filter((i) => i[n.pidKey] === o[l][n.valueKey])
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function b({ detail: e }) {
|
|
52
|
+
a.value = e.trim().toLowerCase(), m();
|
|
53
|
+
}
|
|
54
|
+
function B(e) {
|
|
55
|
+
const t = [n.options[n.options.length - 1].find((o) => o[n.valueKey] === e[n.valueKey] && o[n.pidKey] === e[n.pidKey])];
|
|
56
|
+
for (let o = n.options.length - 2; o >= 0; o--)
|
|
57
|
+
t.unshift(
|
|
58
|
+
n.options[o].find((l) => {
|
|
59
|
+
var i;
|
|
60
|
+
return l[n.valueKey] === ((i = t[0]) == null ? void 0 : i[n.pidKey]);
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
return t;
|
|
64
|
+
}
|
|
65
|
+
function c(e, t = "") {
|
|
66
|
+
var i;
|
|
67
|
+
let o = [], l = t + e[n.labelKey];
|
|
68
|
+
return (i = e.children) != null && i.length ? e.children.forEach((s) => {
|
|
69
|
+
o = o.concat(c(s, l + " / "));
|
|
70
|
+
}) : (e[n.labelKey] = l, o.push(e)), o;
|
|
71
|
+
}
|
|
72
|
+
function m() {
|
|
73
|
+
var o;
|
|
74
|
+
if (a.value)
|
|
75
|
+
return [{
|
|
76
|
+
values: p.value.filter((l) => l[n.labelKey].toLowerCase().includes(a.value))
|
|
77
|
+
}];
|
|
78
|
+
const e = [];
|
|
79
|
+
let t = d.value;
|
|
80
|
+
for (; t; )
|
|
81
|
+
e.push({ values: t }), t = (o = t[0]) == null ? void 0 : o.children;
|
|
82
|
+
return e;
|
|
83
|
+
}
|
|
84
|
+
function x(e) {
|
|
85
|
+
if (a.value) {
|
|
86
|
+
const o = p.value.filter((l) => l[n.labelKey].toLowerCase().includes(a.value));
|
|
87
|
+
return [{
|
|
88
|
+
values: o,
|
|
89
|
+
defaultIndex: o.findIndex((l) => l[n.valueKey] === e[n.valueKey])
|
|
90
|
+
}];
|
|
91
|
+
}
|
|
92
|
+
const t = [];
|
|
93
|
+
for (let o = n.options.length - 1; o >= 0; o--) {
|
|
94
|
+
const l = n.options[o].filter((i) => i[n.pidKey] === e[n.pidKey]);
|
|
95
|
+
t[o] = {
|
|
96
|
+
values: l,
|
|
97
|
+
defaultIndex: l.findIndex((i) => i[n.valueKey] === e[n.valueKey])
|
|
98
|
+
}, o > 0 && (e = n.options[o - 1].find((i) => i[n.valueKey] === e[n.pidKey]));
|
|
99
|
+
}
|
|
100
|
+
return t;
|
|
101
|
+
}
|
|
102
|
+
return (e, t) => (v(), h("van-popup", {
|
|
103
|
+
show: e.show,
|
|
104
|
+
position: "bottom",
|
|
105
|
+
round: !0,
|
|
106
|
+
"close-on-click-overlay": !0,
|
|
107
|
+
onClose: t[4] || (t[4] = (o) => f())
|
|
108
|
+
}, [
|
|
109
|
+
A("van-picker", D(e.$attrs, {
|
|
110
|
+
title: e.title,
|
|
111
|
+
"show-toolbar": !0,
|
|
112
|
+
"value-key": e.labelKey,
|
|
113
|
+
columns: C.value,
|
|
114
|
+
loading: e.loading,
|
|
115
|
+
onCancel: t[0] || (t[0] = (o) => w()),
|
|
116
|
+
onConfirm: t[1] || (t[1] = (o) => V(o)),
|
|
117
|
+
onChange: t[2] || (t[2] = (o) => k(o))
|
|
118
|
+
}), null, 16, z),
|
|
119
|
+
e.searchable && e.options.length ? (v(), h("van-search", {
|
|
120
|
+
key: 0,
|
|
121
|
+
shape: "round",
|
|
122
|
+
"input-align": "center",
|
|
123
|
+
placeholder: "请输入搜索关键词",
|
|
124
|
+
onChange: t[3] || (t[3] = (o) => b(o))
|
|
125
|
+
}, null, 32)) : T("", !0)
|
|
126
|
+
], 40, j));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
H as default
|
|
131
|
+
};
|
package/index30.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import e from "./index31.js";
|
|
2
|
+
import o from "./index32.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
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
c as default
|
|
10
|
+
};
|
package/index31.js
ADDED
package/index32.js
ADDED
package/index33.js
ADDED
package/index34.js
ADDED
package/index35.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import o from "./index40.js";
|
|
2
|
+
import r from "./index41.js";
|
|
3
|
+
var e = "[object AsyncFunction]", a = "[object Function]", c = "[object GeneratorFunction]", i = "[object Proxy]";
|
|
4
|
+
function g(n) {
|
|
5
|
+
if (!r(n))
|
|
6
|
+
return !1;
|
|
7
|
+
var t = o(n);
|
|
8
|
+
return t == a || t == c || t == e || t == i;
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
g as default
|
|
12
|
+
};
|
package/index36.js
ADDED
package/index37.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import f from "./index38.js";
|
|
2
|
+
import t from "./index39.js";
|
|
3
|
+
var r = typeof exports == "object" && exports && !exports.nodeType && exports, e = r && typeof module == "object" && module && !module.nodeType && module, u = e && e.exports === r, o = u ? f.Buffer : void 0, p = o ? o.isBuffer : void 0, a = p || t;
|
|
4
|
+
export {
|
|
5
|
+
a as default
|
|
6
|
+
};
|
package/index38.js
ADDED