@solar-taro/ui-vant 3.5.3 → 4.0.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/cascader/index.scss +36 -6
- package/cascader/index.vue.d.ts +13 -13
- package/cascader/typings.d.ts +5 -0
- package/cascader-picker/index.vue.d.ts +1 -1
- package/date-range-picker/index.scss +37 -6
- package/date-range-picker/index.vue.d.ts +25 -30
- package/index.js +14 -14
- package/index10.js +61 -16
- package/index11.js +18 -3
- package/index12.js +3 -28
- package/index13.js +28 -4
- package/index14.js +5 -64
- package/index15.js +1 -1
- 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/index22.js +7 -36
- package/index23.js +38 -23
- package/index24.js +27 -0
- package/index3.js +202 -119
- package/index4.js +76 -79
- package/index5.js +129 -113
- package/index6.js +36 -32
- package/index7.js +141 -134
- package/index8.js +34 -34
- package/index9.js +325 -292
- package/package.json +1 -1
- package/select-picker/index.vue.d.ts +1 -1
- package/selector/index.scss +33 -5
- package/selector/index.vue.d.ts +20 -26
- package/selector/typings.d.ts +9 -0
package/cascader/index.scss
CHANGED
|
@@ -1,12 +1,44 @@
|
|
|
1
1
|
.sun-cascader {
|
|
2
|
+
flex: auto;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
min-height: 24px;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
|
|
8
|
+
&-disabled {
|
|
9
|
+
opacity: 0.5;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-inner {
|
|
13
|
+
flex: auto;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&-placeholder {
|
|
20
|
+
flex: auto;
|
|
21
|
+
color: var(--color-light-shade);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-icon {
|
|
25
|
+
flex-shrink: 0;
|
|
26
|
+
color: var(--color-medium-tint);
|
|
27
|
+
}
|
|
28
|
+
|
|
2
29
|
&-clear {
|
|
3
30
|
&-icon {
|
|
4
|
-
display: inline;
|
|
5
31
|
padding: 4px;
|
|
32
|
+
color: var(--color-medium-tint);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-btn {
|
|
36
|
+
color: var(--color-primary);
|
|
37
|
+
font-size: 14px;
|
|
6
38
|
}
|
|
7
39
|
}
|
|
8
40
|
|
|
9
|
-
&-
|
|
41
|
+
&-options {
|
|
10
42
|
overflow-y: auto;
|
|
11
43
|
}
|
|
12
44
|
|
|
@@ -14,17 +46,15 @@
|
|
|
14
46
|
--tab-font-size: 16px;
|
|
15
47
|
|
|
16
48
|
.van-tabs__wrap {
|
|
49
|
+
display: block;
|
|
17
50
|
padding-inline: 2px;
|
|
51
|
+
box-shadow: 0 1px 2px 0 rgb(0, 0, 0, 0.05);
|
|
18
52
|
}
|
|
19
53
|
|
|
20
54
|
.van-tab {
|
|
21
55
|
padding-inline: 12px;
|
|
22
56
|
flex: none;
|
|
23
57
|
}
|
|
24
|
-
|
|
25
|
-
.van-tabs__content {
|
|
26
|
-
padding-top: 8px;
|
|
27
|
-
}
|
|
28
58
|
}
|
|
29
59
|
|
|
30
60
|
&-option {
|
package/cascader/index.vue.d.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: <
|
|
1
|
+
import { CascaderOption } from './typings';
|
|
2
|
+
declare const _default: <TValue, TOption extends CascaderOption<TValue>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
3
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
-
readonly "onUpdate:modelValue"?: ((value:
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((value: TValue | null) => any) | undefined;
|
|
5
5
|
readonly onClose?: (() => any) | undefined;
|
|
6
|
-
readonly onSelect?: ((args_0:
|
|
7
|
-
readonly onClear?: ((args_0:
|
|
6
|
+
readonly onSelect?: ((args_0: TOption) => any) | undefined;
|
|
7
|
+
readonly onClear?: ((args_0: TValue) => any) | undefined;
|
|
8
8
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onSelect" | "onClose" | "onClear"> & ({
|
|
9
|
-
modelValue?:
|
|
9
|
+
modelValue?: TValue | null;
|
|
10
10
|
} & {
|
|
11
|
-
label?: string;
|
|
12
11
|
placeholder?: string;
|
|
13
|
-
options:
|
|
14
|
-
labelKey?: "children" | "parent" | "isLeaf" | keyof T;
|
|
15
|
-
valueKey?: "children" | "parent" | "isLeaf" | keyof T;
|
|
12
|
+
options: TOption[];
|
|
16
13
|
required?: boolean;
|
|
17
14
|
disabled?: boolean;
|
|
18
15
|
clearable?: boolean;
|
|
19
16
|
delimiter?: string;
|
|
20
17
|
height?: string;
|
|
18
|
+
searchable?: boolean;
|
|
21
19
|
}) & Partial<{}>> & import('vue').PublicProps;
|
|
22
|
-
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
20
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
|
21
|
+
present: () => void;
|
|
22
|
+
clear: () => void;
|
|
23
|
+
}>): void;
|
|
23
24
|
attrs: any;
|
|
24
25
|
slots: {
|
|
25
26
|
default?(_: {
|
|
26
27
|
present: () => void;
|
|
27
28
|
label: string;
|
|
28
29
|
}): any;
|
|
29
|
-
end?(_: {}): any;
|
|
30
30
|
};
|
|
31
|
-
emit: (((evt: "close") => void) & ((evt: "select", args_0:
|
|
31
|
+
emit: (((evt: "close") => void) & ((evt: "select", args_0: TOption) => void) & ((evt: "clear", args_0: TValue) => void)) & ((evt: "update:modelValue", value: TValue | null) => void);
|
|
32
32
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
33
33
|
[key: string]: any;
|
|
34
34
|
}> & {
|
|
@@ -25,9 +25,9 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
25
25
|
"onUpdate:show"?: ((args_0: boolean) => any) | undefined;
|
|
26
26
|
}>, {
|
|
27
27
|
options: any[][];
|
|
28
|
+
searchable: boolean;
|
|
28
29
|
labelKey: string;
|
|
29
30
|
valueKey: string;
|
|
30
31
|
pidKey: string;
|
|
31
|
-
searchable: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
export default _default;
|
|
@@ -1,6 +1,41 @@
|
|
|
1
1
|
.sun-date-range-picker {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
flex: auto;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
min-height: 24px;
|
|
6
|
+
line-height: 1.5;
|
|
7
|
+
|
|
8
|
+
&-disabled {
|
|
9
|
+
opacity: 0.5;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-inner {
|
|
13
|
+
flex: auto;
|
|
14
|
+
white-space: nowrap;
|
|
15
|
+
overflow-x: auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-placeholder {
|
|
19
|
+
flex: auto;
|
|
20
|
+
color: var(--color-light-shade);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-icon {
|
|
24
|
+
flex-shrink: 0;
|
|
25
|
+
color: var(--color-medium-tint);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-clear {
|
|
29
|
+
&-icon {
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
padding: 4px;
|
|
32
|
+
color: var(--color-medium-tint);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-btn {
|
|
36
|
+
color: var(--color-primary);
|
|
37
|
+
font-size: 14px;
|
|
38
|
+
}
|
|
4
39
|
}
|
|
5
40
|
|
|
6
41
|
&-input-group {
|
|
@@ -44,8 +79,4 @@
|
|
|
44
79
|
font-weight: normal;
|
|
45
80
|
}
|
|
46
81
|
}
|
|
47
|
-
|
|
48
|
-
&-btn-wrapper {
|
|
49
|
-
padding: 20px calc(12px + var(--safe-left)) 12px;
|
|
50
|
-
}
|
|
51
82
|
}
|
|
@@ -1,48 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} & {
|
|
4
|
-
id?: string;
|
|
5
|
-
type?: "date" | "datetime";
|
|
6
|
-
label?: string;
|
|
7
|
-
title?: string;
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
type?: 'date' | 'datetime';
|
|
8
3
|
placeholder?: [string, string];
|
|
9
4
|
required?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
10
6
|
format?: string;
|
|
11
7
|
min?: number;
|
|
12
8
|
max?: number;
|
|
13
|
-
}
|
|
9
|
+
};
|
|
10
|
+
declare function present(): void;
|
|
11
|
+
type __VLS_PublicProps = {
|
|
12
|
+
modelValue: [number?, number?];
|
|
13
|
+
} & __VLS_Props;
|
|
14
|
+
declare function __VLS_template(): {
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
slots: {
|
|
17
|
+
default?(_: {
|
|
18
|
+
present: typeof present;
|
|
19
|
+
displayValue: string;
|
|
20
|
+
}): any;
|
|
21
|
+
};
|
|
22
|
+
refs: {};
|
|
23
|
+
rootEl: any;
|
|
24
|
+
};
|
|
25
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
27
|
"update:modelValue": (value: [(number | undefined)?, (number | undefined)?]) => any;
|
|
15
28
|
} & {
|
|
16
|
-
close: () => any;
|
|
17
29
|
clear: (v: [(number | undefined)?, (number | undefined)?]) => any;
|
|
18
30
|
confirm: (v: [number, number]) => any;
|
|
19
|
-
}, string, import('vue').PublicProps, Readonly<{
|
|
20
|
-
modelValue: [number?, number?];
|
|
21
|
-
} & {
|
|
22
|
-
id?: string;
|
|
23
|
-
type?: "date" | "datetime";
|
|
24
|
-
label?: string;
|
|
25
|
-
title?: string;
|
|
26
|
-
placeholder?: [string, string];
|
|
27
|
-
required?: boolean;
|
|
28
|
-
format?: string;
|
|
29
|
-
min?: number;
|
|
30
|
-
max?: number;
|
|
31
|
-
}> & Readonly<{
|
|
31
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
32
32
|
"onUpdate:modelValue"?: ((value: [(number | undefined)?, (number | undefined)?]) => any) | undefined;
|
|
33
|
-
onClose?: (() => any) | undefined;
|
|
34
33
|
onClear?: ((v: [(number | undefined)?, (number | undefined)?]) => any) | undefined;
|
|
35
34
|
onConfirm?: ((v: [number, number]) => any) | undefined;
|
|
36
35
|
}>, {
|
|
37
36
|
type: "date" | "datetime";
|
|
38
|
-
id: string;
|
|
39
|
-
min: number;
|
|
40
37
|
max: number;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}): any;
|
|
45
|
-
}>;
|
|
38
|
+
min: number;
|
|
39
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
40
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
46
41
|
export default _default;
|
|
47
42
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
48
43
|
new (): {
|
package/index.js
CHANGED
|
@@ -6,14 +6,14 @@ import { default as d } from "./index6.js";
|
|
|
6
6
|
import { default as x } from "./index7.js";
|
|
7
7
|
import { default as s } from "./index8.js";
|
|
8
8
|
import { default as c } from "./index9.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { Dialog as g, Notify as k, dialog as y, notify as P, setupOverlay as C } from "./index10.js";
|
|
10
|
+
import { vBindFn as B } from "./index11.js";
|
|
11
|
+
import { vBinding as R } from "./index12.js";
|
|
12
|
+
import { vDatetimePicker as M } from "./index13.js";
|
|
13
|
+
import { vReadonly as V } from "./index14.js";
|
|
14
14
|
export {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
g as Dialog,
|
|
16
|
+
k as Notify,
|
|
17
17
|
o as SolarVant,
|
|
18
18
|
a as SunCascader,
|
|
19
19
|
l as SunCascaderPicker,
|
|
@@ -22,11 +22,11 @@ export {
|
|
|
22
22
|
x as SunOpperController,
|
|
23
23
|
s as SunSelectPicker,
|
|
24
24
|
c as SunSelector,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
y as dialog,
|
|
26
|
+
P as notify,
|
|
27
|
+
C as setupOverlay,
|
|
28
|
+
B as vBindFn,
|
|
29
|
+
R as vBinding,
|
|
30
|
+
M as vDatetimePicker,
|
|
31
|
+
V as vReadonly
|
|
32
32
|
};
|
package/index10.js
CHANGED
|
@@ -1,21 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
const i = {};
|
|
2
|
+
function e(r) {
|
|
3
|
+
Object.assign(i, r);
|
|
4
4
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
12
37
|
});
|
|
13
|
-
},
|
|
14
|
-
updated(e, t) {
|
|
15
|
-
const { page: n } = o();
|
|
16
|
-
c(n, e.id, t.arg, t.value);
|
|
17
38
|
}
|
|
18
|
-
|
|
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();
|
|
19
60
|
export {
|
|
20
|
-
|
|
61
|
+
s as Dialog,
|
|
62
|
+
a as Notify,
|
|
63
|
+
u as dialog,
|
|
64
|
+
c as notify,
|
|
65
|
+
e as setupOverlay
|
|
21
66
|
};
|
package/index11.js
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { getCurrentInstance as o, nextTick as a } from "@tarojs/taro";
|
|
2
|
+
function c(e, t, n, p) {
|
|
3
|
+
e.selectComponent("#" + t).setData({ [n]: p });
|
|
4
|
+
}
|
|
5
|
+
const r = {
|
|
6
|
+
mounted(e, t) {
|
|
7
|
+
const { page: n } = o();
|
|
8
|
+
a(() => {
|
|
9
|
+
a(() => {
|
|
10
|
+
c(n, e.id, t.arg, t.value);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
updated(e, t) {
|
|
15
|
+
const { page: n } = o();
|
|
16
|
+
c(n, e.id, t.arg, t.value);
|
|
17
|
+
}
|
|
3
18
|
};
|
|
4
19
|
export {
|
|
5
|
-
r as
|
|
20
|
+
r as vBindFn
|
|
6
21
|
};
|
package/index12.js
CHANGED
|
@@ -1,31 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
mounted(c) {
|
|
4
|
-
const { page: o } = s();
|
|
5
|
-
n(() => {
|
|
6
|
-
n(() => {
|
|
7
|
-
const r = o.selectComponent(`#${c.id}`);
|
|
8
|
-
r.setData({
|
|
9
|
-
formatter: (e, t) => {
|
|
10
|
-
switch (e) {
|
|
11
|
-
case "year":
|
|
12
|
-
return `${t}年`;
|
|
13
|
-
case "month":
|
|
14
|
-
return `${t}月`;
|
|
15
|
-
case "day":
|
|
16
|
-
return `${t}日`;
|
|
17
|
-
case "hour":
|
|
18
|
-
return `${t}时`;
|
|
19
|
-
case "minute":
|
|
20
|
-
return `${t}分`;
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
filter: (e, t) => e === "minute" ? t.filter((i) => +i % 5 === 0) : t
|
|
24
|
-
}), r.updateValue();
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
}
|
|
1
|
+
const r = (e, t) => {
|
|
2
|
+
e.setAttribute(t.arg, t.value);
|
|
28
3
|
};
|
|
29
4
|
export {
|
|
30
|
-
|
|
5
|
+
r as vBinding
|
|
31
6
|
};
|
package/index13.js
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { getCurrentInstance as s, nextTick as n } from "@tarojs/taro";
|
|
2
|
+
const m = {
|
|
3
|
+
mounted(c) {
|
|
4
|
+
const { page: o } = s();
|
|
5
|
+
n(() => {
|
|
6
|
+
n(() => {
|
|
7
|
+
const r = o.selectComponent(`#${c.id}`);
|
|
8
|
+
r.setData({
|
|
9
|
+
formatter: (e, t) => {
|
|
10
|
+
switch (e) {
|
|
11
|
+
case "year":
|
|
12
|
+
return `${t}年`;
|
|
13
|
+
case "month":
|
|
14
|
+
return `${t}月`;
|
|
15
|
+
case "day":
|
|
16
|
+
return `${t}日`;
|
|
17
|
+
case "hour":
|
|
18
|
+
return `${t}时`;
|
|
19
|
+
case "minute":
|
|
20
|
+
return `${t}分`;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
filter: (e, t) => e === "minute" ? t.filter((i) => +i % 5 === 0) : t
|
|
24
|
+
}), r.updateValue();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
}
|
|
4
28
|
};
|
|
5
29
|
export {
|
|
6
|
-
|
|
30
|
+
m as vDatetimePicker
|
|
7
31
|
};
|
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
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/index22.js
CHANGED
|
@@ -1,38 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
e.value = o.default;
|
|
8
|
-
};
|
|
9
|
-
} }), s = i({
|
|
10
|
-
inheritAttrs: t,
|
|
11
|
-
props: r.props,
|
|
12
|
-
setup(a, { attrs: o, slots: c }) {
|
|
13
|
-
return () => {
|
|
14
|
-
var l;
|
|
15
|
-
if (!e.value) throw new Error("[VueUse] Failed to find the definition of reusable template");
|
|
16
|
-
const n = (l = e.value) === null || l === void 0 ? void 0 : l.call(e, {
|
|
17
|
-
...r.props == null ? m(o) : a,
|
|
18
|
-
$slots: c
|
|
19
|
-
});
|
|
20
|
-
return t && (n == null ? void 0 : n.length) === 1 ? n[0] : n;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
return d({
|
|
25
|
-
define: u,
|
|
26
|
-
reuse: s
|
|
27
|
-
}, [u, s]);
|
|
28
|
-
}
|
|
29
|
-
function m(r) {
|
|
30
|
-
const t = {};
|
|
31
|
-
for (const e in r) t[f(e)] = r[e];
|
|
32
|
-
return t;
|
|
33
|
-
}
|
|
1
|
+
const s = (t) => {
|
|
2
|
+
const o = Math.max(t.startIndex - t.overscan, 0), e = Math.min(t.endIndex + t.overscan, t.count - 1) - o + 1, r = new Array(e);
|
|
3
|
+
for (let n = 0; n < e; n++)
|
|
4
|
+
r[n] = o + n;
|
|
5
|
+
return r;
|
|
6
|
+
};
|
|
34
7
|
export {
|
|
35
|
-
|
|
36
|
-
h as createReusableTemplate,
|
|
37
|
-
d as makeDestructurable
|
|
8
|
+
s as defaultRangeExtractor
|
|
38
9
|
};
|