vant 4.9.24 → 4.10.1
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/README.md +4 -8
- package/es/cell/Cell.mjs +3 -3
- package/es/composables/use-lock-scroll.mjs +4 -1
- package/es/field/Field.mjs +5 -3
- package/es/field/types.d.ts +1 -0
- package/es/image-preview/ImagePreview.mjs +11 -1
- package/es/image-preview/function-call.d.ts +1 -2
- package/es/image-preview/types.d.ts +2 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/lang/de-DE.mjs +1 -1
- package/es/locale/lang/ja-JP.mjs +2 -2
- package/es/locale/lang/nb-NO.mjs +11 -11
- package/es/locale/lang/nn-NO.d.ts +64 -0
- package/es/locale/lang/nn-NO.mjs +66 -0
- package/es/notify/function-call.d.ts +1 -2
- package/es/utils/basic.d.ts +1 -1
- package/lib/cell/Cell.js +3 -3
- package/lib/composables/use-lock-scroll.js +4 -1
- package/lib/field/Field.js +5 -3
- package/lib/field/types.d.ts +1 -0
- package/lib/image-preview/ImagePreview.js +11 -1
- package/lib/image-preview/function-call.d.ts +1 -2
- package/lib/image-preview/types.d.ts +2 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/de-DE.js +1 -1
- package/lib/locale/lang/ja-JP.js +2 -2
- package/lib/locale/lang/nb-NO.js +11 -11
- package/lib/locale/lang/nn-NO.d.ts +64 -0
- package/lib/locale/lang/nn-NO.js +85 -0
- package/lib/notify/function-call.d.ts +1 -2
- package/lib/utils/basic.d.ts +1 -1
- package/lib/vant.cjs.js +24 -9
- package/lib/vant.es.js +24 -9
- package/lib/vant.js +25 -10
- package/lib/vant.min.js +3 -3
- package/lib/web-types.json +1 -1
- package/package.json +32 -34
package/README.md
CHANGED
|
@@ -22,6 +22,10 @@
|
|
|
22
22
|
·
|
|
23
23
|
|
|
24
24
|
<a href="./README.zh-CN.md">中文介绍</a>
|
|
25
|
+
|
|
26
|
+
·
|
|
27
|
+
|
|
28
|
+
<a href="./README.ja-JP.md">日本語</a>
|
|
25
29
|
</p>
|
|
26
30
|
|
|
27
31
|
---
|
|
@@ -158,14 +162,6 @@ Core contributors of Vant and Vant Weapp:
|
|
|
158
162
|
| :-: | :-: | :-: | :-: | :-: | :-: |
|
|
159
163
|
| [Lindysen](https://github.com/Lindysen/) | [JakeLaoyu](https://github.com/JakeLaoyu/) | [landluck](https://github.com/landluck/) | [wjw-gavin](https://github.com/wjw-gavin/) | [inottn](https://github.com/inottn/) | [zhousg](https://github.com/zhousg/) |
|
|
160
164
|
|
|
161
|
-
## All Contributors
|
|
162
|
-
|
|
163
|
-
Thanks to the following friends for their contributions to Vant:
|
|
164
|
-
|
|
165
|
-
<a href="https://github.com/vant-ui/vant/graphs/contributors">
|
|
166
|
-
<img src="https://opencollective.com/vant/contributors.svg?width=890&button=false" alt="contributors">
|
|
167
|
-
</a>
|
|
168
|
-
|
|
169
165
|
## Contribution Guide
|
|
170
166
|
|
|
171
167
|
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
|
package/es/cell/Cell.mjs
CHANGED
|
@@ -91,7 +91,7 @@ var stdin_default = defineComponent({
|
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
return () => {
|
|
94
|
-
var _a;
|
|
94
|
+
var _a, _b, _c;
|
|
95
95
|
const {
|
|
96
96
|
tag,
|
|
97
97
|
size,
|
|
@@ -100,7 +100,7 @@ var stdin_default = defineComponent({
|
|
|
100
100
|
isLink,
|
|
101
101
|
required
|
|
102
102
|
} = props;
|
|
103
|
-
const clickable = (_a = props.clickable) != null ? _a : isLink;
|
|
103
|
+
const clickable = Boolean((_c = (_b = (_a = props.clickable) != null ? _a : props.to) != null ? _b : props.url) != null ? _c : isLink);
|
|
104
104
|
const classes = {
|
|
105
105
|
center,
|
|
106
106
|
required: !!required,
|
|
@@ -114,7 +114,7 @@ var stdin_default = defineComponent({
|
|
|
114
114
|
"class": bem(classes),
|
|
115
115
|
"role": clickable ? "button" : void 0,
|
|
116
116
|
"tabindex": clickable ? 0 : void 0,
|
|
117
|
-
"onClick": route
|
|
117
|
+
"onClick": clickable ? route : void 0
|
|
118
118
|
}, {
|
|
119
119
|
default: () => {
|
|
120
120
|
var _a2;
|
|
@@ -11,10 +11,13 @@ function useLockScroll(rootRef, shouldLock) {
|
|
|
11
11
|
const onTouchMove = (event) => {
|
|
12
12
|
touch.move(event);
|
|
13
13
|
const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
|
|
14
|
-
|
|
14
|
+
let el = getScrollParent(
|
|
15
15
|
event.target,
|
|
16
16
|
rootRef.value
|
|
17
17
|
);
|
|
18
|
+
while (el.scrollHeight <= el.offsetHeight && el !== rootRef.value && el.parentElement) {
|
|
19
|
+
el = getScrollParent(el.parentElement, rootRef.value);
|
|
20
|
+
}
|
|
18
21
|
const { scrollHeight, offsetHeight, scrollTop } = el;
|
|
19
22
|
let status = "11";
|
|
20
23
|
if (scrollTop === 0) {
|
package/es/field/Field.mjs
CHANGED
|
@@ -484,7 +484,8 @@ var stdin_default = defineComponent({
|
|
|
484
484
|
validate,
|
|
485
485
|
formValue,
|
|
486
486
|
resetValidation,
|
|
487
|
-
getValidationStatus
|
|
487
|
+
getValidationStatus,
|
|
488
|
+
adjustTextareaSize
|
|
488
489
|
});
|
|
489
490
|
provide(CUSTOM_FIELD_INJECTION_KEY, {
|
|
490
491
|
customValue,
|
|
@@ -527,8 +528,9 @@ var stdin_default = defineComponent({
|
|
|
527
528
|
}),
|
|
528
529
|
"center": props.center,
|
|
529
530
|
"border": props.border,
|
|
530
|
-
"isLink": props.isLink,
|
|
531
|
-
"clickable": props.clickable,
|
|
531
|
+
"isLink": disabled ? false : props.isLink,
|
|
532
|
+
"clickable": disabled ? false : props.clickable,
|
|
533
|
+
"onClick": disabled ? (e) => e.stopImmediatePropagation() : void 0,
|
|
532
534
|
"titleStyle": labelStyle.value,
|
|
533
535
|
"valueClass": bem("value"),
|
|
534
536
|
"titleClass": [bem("label", [labelAlign, {
|
package/es/field/types.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export type FieldExpose = {
|
|
|
36
36
|
getValidationStatus: () => FieldValidationStatus;
|
|
37
37
|
/** @private */
|
|
38
38
|
formValue: ComputedRef<unknown>;
|
|
39
|
+
adjustTextareaSize: () => void;
|
|
39
40
|
};
|
|
40
41
|
export type FieldInstance = ComponentPublicInstance<FieldProps, FieldExpose>;
|
|
41
42
|
declare global {
|
|
@@ -146,6 +146,14 @@ var stdin_default = defineComponent({
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
const onClosed = () => emit("closed");
|
|
149
|
+
const prev = () => {
|
|
150
|
+
var _a;
|
|
151
|
+
return (_a = swipeRef.value) == null ? void 0 : _a.prev();
|
|
152
|
+
};
|
|
153
|
+
const next = () => {
|
|
154
|
+
var _a;
|
|
155
|
+
return (_a = swipeRef.value) == null ? void 0 : _a.next();
|
|
156
|
+
};
|
|
149
157
|
const swipeTo = (index, options) => {
|
|
150
158
|
var _a;
|
|
151
159
|
return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
|
|
@@ -155,7 +163,9 @@ var stdin_default = defineComponent({
|
|
|
155
163
|
var _a;
|
|
156
164
|
(_a = activedPreviewItemRef.value) == null ? void 0 : _a.resetScale();
|
|
157
165
|
},
|
|
158
|
-
swipeTo
|
|
166
|
+
swipeTo,
|
|
167
|
+
prev,
|
|
168
|
+
next
|
|
159
169
|
});
|
|
160
170
|
onMounted(resize);
|
|
161
171
|
watch([windowWidth, windowHeight], resize);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ComponentInstance } from '../utils';
|
|
2
1
|
import type { ImagePreviewOptions } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Display a full-screen image preview component
|
|
5
4
|
*/
|
|
6
|
-
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) =>
|
|
5
|
+
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) => any;
|
|
@@ -45,6 +45,8 @@ export type ImagePreviewItemInstance = ComponentPublicInstance<ImagePreviewItemP
|
|
|
45
45
|
export type ImagePreviewExpose = {
|
|
46
46
|
resetScale: () => void;
|
|
47
47
|
swipeTo: (index: number, options?: SwipeToOptions) => void;
|
|
48
|
+
prev: () => void;
|
|
49
|
+
next: () => void;
|
|
48
50
|
};
|
|
49
51
|
export type ImagePreviewInstance = ComponentPublicInstance<ImagePreviewProps, ImagePreviewExpose>;
|
|
50
52
|
export type ImagePreviewThemeVars = {
|
package/es/index.d.ts
CHANGED
package/es/index.mjs
CHANGED
|
@@ -99,7 +99,7 @@ import { Toast } from "./toast/index.mjs";
|
|
|
99
99
|
import { TreeSelect } from "./tree-select/index.mjs";
|
|
100
100
|
import { Uploader } from "./uploader/index.mjs";
|
|
101
101
|
import { Watermark } from "./watermark/index.mjs";
|
|
102
|
-
const version = "4.
|
|
102
|
+
const version = "4.10.1";
|
|
103
103
|
function install(app) {
|
|
104
104
|
const components = [
|
|
105
105
|
ActionBar,
|
package/es/locale/lang/de-DE.mjs
CHANGED
|
@@ -16,7 +16,7 @@ var stdin_default = {
|
|
|
16
16
|
end: "Ende",
|
|
17
17
|
start: "Start",
|
|
18
18
|
title: "Kalender",
|
|
19
|
-
weekdays: ["So", "Mo", "Di", "
|
|
19
|
+
weekdays: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
|
20
20
|
monthTitle: (year, month) => `${year}/${month}`,
|
|
21
21
|
rangePrompt: (maxRange) => `W\xE4hle nicht mehr als ${maxRange} Tage`
|
|
22
22
|
},
|
package/es/locale/lang/ja-JP.mjs
CHANGED
|
@@ -44,8 +44,8 @@ var stdin_default = {
|
|
|
44
44
|
count: (count) => `${count}\u679A\u304C\u5229\u7528\u53EF\u80FD`
|
|
45
45
|
},
|
|
46
46
|
vanCouponList: {
|
|
47
|
-
exchange: "\
|
|
48
|
-
close: "\u4F7F\u7528\
|
|
47
|
+
exchange: "\u4EA4\u63DB",
|
|
48
|
+
close: "\u4F7F\u7528\u3057\u306A\u3044",
|
|
49
49
|
enable: "\u5229\u7528\u53EF\u80FD",
|
|
50
50
|
disabled: "\u5229\u7528\u3067\u304D\u307E\u305B\u3093",
|
|
51
51
|
placeholder: "\u5272\u5F15\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"
|
package/es/locale/lang/nb-NO.mjs
CHANGED
|
@@ -2,7 +2,7 @@ var stdin_default = {
|
|
|
2
2
|
name: "Navn",
|
|
3
3
|
tel: "Telefon",
|
|
4
4
|
save: "Lagre",
|
|
5
|
-
clear: "
|
|
5
|
+
clear: "T\xF8m",
|
|
6
6
|
undo: "Angre",
|
|
7
7
|
cancel: "Avbryt",
|
|
8
8
|
confirm: "Bekreft",
|
|
@@ -15,27 +15,27 @@ var stdin_default = {
|
|
|
15
15
|
vanCalendar: {
|
|
16
16
|
end: "Slutt",
|
|
17
17
|
start: "Start",
|
|
18
|
-
title: "
|
|
18
|
+
title: "Kalender",
|
|
19
19
|
weekdays: ["S\xF8n", "Man", "Tir", "Ons", "Tor", "Fre", "L\xF8r"],
|
|
20
20
|
monthTitle: (year, month) => `${year}/${month}`,
|
|
21
21
|
rangePrompt: (maxRange) => `Maks. ${maxRange} dager`
|
|
22
22
|
},
|
|
23
23
|
vanCascader: {
|
|
24
|
-
select: "
|
|
24
|
+
select: "Velg"
|
|
25
25
|
},
|
|
26
26
|
vanPagination: {
|
|
27
27
|
prev: "Forrige",
|
|
28
28
|
next: "Neste"
|
|
29
29
|
},
|
|
30
30
|
vanPullRefresh: {
|
|
31
|
-
pulling: "Dra for
|
|
32
|
-
loosing: "
|
|
31
|
+
pulling: "Dra for \xE5 oppdatere...",
|
|
32
|
+
loosing: "Slipp for \xE5 oppdatere..."
|
|
33
33
|
},
|
|
34
34
|
vanSubmitBar: {
|
|
35
35
|
label: "Totalt:"
|
|
36
36
|
},
|
|
37
37
|
vanCoupon: {
|
|
38
|
-
unlimited: "
|
|
38
|
+
unlimited: "Ubegrenset",
|
|
39
39
|
discount: (discount) => `${discount * 10}% avslag`,
|
|
40
40
|
condition: (condition) => `Minst ${condition}`
|
|
41
41
|
},
|
|
@@ -44,18 +44,18 @@ var stdin_default = {
|
|
|
44
44
|
count: (count) => `Du har ${count} kuponger`
|
|
45
45
|
},
|
|
46
46
|
vanCouponList: {
|
|
47
|
-
exchange: "
|
|
47
|
+
exchange: "Bytt",
|
|
48
48
|
close: "Lukk",
|
|
49
49
|
enable: "Tilgjengelig",
|
|
50
50
|
disabled: "Utilgjengelig",
|
|
51
|
-
placeholder: "
|
|
51
|
+
placeholder: "Kupongkode"
|
|
52
52
|
},
|
|
53
53
|
vanAddressEdit: {
|
|
54
54
|
area: "Omr\xE5de",
|
|
55
|
-
areaEmpty: "Vennligst
|
|
56
|
-
addressEmpty: "
|
|
55
|
+
areaEmpty: "Vennligst velg omr\xE5de",
|
|
56
|
+
addressEmpty: "Adressen kan ikke v\xE6re tom",
|
|
57
57
|
addressDetail: "Adresse",
|
|
58
|
-
defaultAddress: "Sett som
|
|
58
|
+
defaultAddress: "Sett som standardadresse"
|
|
59
59
|
},
|
|
60
60
|
vanAddressList: {
|
|
61
61
|
add: "Legg til ny adresse"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
name: string;
|
|
3
|
+
tel: string;
|
|
4
|
+
save: string;
|
|
5
|
+
clear: string;
|
|
6
|
+
undo: string;
|
|
7
|
+
cancel: string;
|
|
8
|
+
confirm: string;
|
|
9
|
+
delete: string;
|
|
10
|
+
loading: string;
|
|
11
|
+
noCoupon: string;
|
|
12
|
+
nameEmpty: string;
|
|
13
|
+
addContact: string;
|
|
14
|
+
telInvalid: string;
|
|
15
|
+
vanCalendar: {
|
|
16
|
+
end: string;
|
|
17
|
+
start: string;
|
|
18
|
+
title: string;
|
|
19
|
+
weekdays: string[];
|
|
20
|
+
monthTitle: (year: number, month: number) => string;
|
|
21
|
+
rangePrompt: (maxRange: number) => string;
|
|
22
|
+
};
|
|
23
|
+
vanCascader: {
|
|
24
|
+
select: string;
|
|
25
|
+
};
|
|
26
|
+
vanPagination: {
|
|
27
|
+
prev: string;
|
|
28
|
+
next: string;
|
|
29
|
+
};
|
|
30
|
+
vanPullRefresh: {
|
|
31
|
+
pulling: string;
|
|
32
|
+
loosing: string;
|
|
33
|
+
};
|
|
34
|
+
vanSubmitBar: {
|
|
35
|
+
label: string;
|
|
36
|
+
};
|
|
37
|
+
vanCoupon: {
|
|
38
|
+
unlimited: string;
|
|
39
|
+
discount: (discount: number) => string;
|
|
40
|
+
condition: (condition: number) => string;
|
|
41
|
+
};
|
|
42
|
+
vanCouponCell: {
|
|
43
|
+
title: string;
|
|
44
|
+
count: (count: number) => string;
|
|
45
|
+
};
|
|
46
|
+
vanCouponList: {
|
|
47
|
+
exchange: string;
|
|
48
|
+
close: string;
|
|
49
|
+
enable: string;
|
|
50
|
+
disabled: string;
|
|
51
|
+
placeholder: string;
|
|
52
|
+
};
|
|
53
|
+
vanAddressEdit: {
|
|
54
|
+
area: string;
|
|
55
|
+
areaEmpty: string;
|
|
56
|
+
addressEmpty: string;
|
|
57
|
+
addressDetail: string;
|
|
58
|
+
defaultAddress: string;
|
|
59
|
+
};
|
|
60
|
+
vanAddressList: {
|
|
61
|
+
add: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var stdin_default = {
|
|
2
|
+
name: "Namn",
|
|
3
|
+
tel: "Telefon",
|
|
4
|
+
save: "Lagre",
|
|
5
|
+
clear: "T\xF8m",
|
|
6
|
+
undo: "Angre",
|
|
7
|
+
cancel: "Avbryt",
|
|
8
|
+
confirm: "Stadfest",
|
|
9
|
+
delete: "Slett",
|
|
10
|
+
loading: "Lastar...",
|
|
11
|
+
noCoupon: "Ingen kupongar",
|
|
12
|
+
nameEmpty: "Fyll inn namn",
|
|
13
|
+
addContact: "Legg til ny kontakt",
|
|
14
|
+
telInvalid: "Ugyldig telefonnummer",
|
|
15
|
+
vanCalendar: {
|
|
16
|
+
end: "Slutt",
|
|
17
|
+
start: "Start",
|
|
18
|
+
title: "Kalender",
|
|
19
|
+
weekdays: ["Sun", "M\xE5n", "Tys", "Ons", "Tor", "Fre", "Lau"],
|
|
20
|
+
monthTitle: (year, month) => `${year}/${month}`,
|
|
21
|
+
rangePrompt: (maxRange) => `Maks. ${maxRange} dagar`
|
|
22
|
+
},
|
|
23
|
+
vanCascader: {
|
|
24
|
+
select: "Vel"
|
|
25
|
+
},
|
|
26
|
+
vanPagination: {
|
|
27
|
+
prev: "F\xF8rre",
|
|
28
|
+
next: "Neste"
|
|
29
|
+
},
|
|
30
|
+
vanPullRefresh: {
|
|
31
|
+
pulling: "Dra for \xE5 oppdatere...",
|
|
32
|
+
loosing: "Slepp for \xE5 oppdatere..."
|
|
33
|
+
},
|
|
34
|
+
vanSubmitBar: {
|
|
35
|
+
label: "Totalt:"
|
|
36
|
+
},
|
|
37
|
+
vanCoupon: {
|
|
38
|
+
unlimited: "Ubegrensa",
|
|
39
|
+
discount: (discount) => `${discount * 10}% avslag`,
|
|
40
|
+
condition: (condition) => `Minst ${condition}`
|
|
41
|
+
},
|
|
42
|
+
vanCouponCell: {
|
|
43
|
+
title: "Kupong",
|
|
44
|
+
count: (count) => `Du har ${count} kupongar`
|
|
45
|
+
},
|
|
46
|
+
vanCouponList: {
|
|
47
|
+
exchange: "Byt",
|
|
48
|
+
close: "Lukk",
|
|
49
|
+
enable: "Tilgjengeleg",
|
|
50
|
+
disabled: "Utilgjengeleg",
|
|
51
|
+
placeholder: "Kupongkode"
|
|
52
|
+
},
|
|
53
|
+
vanAddressEdit: {
|
|
54
|
+
area: "Omr\xE5de",
|
|
55
|
+
areaEmpty: "Vel omr\xE5de",
|
|
56
|
+
addressEmpty: "Adressa kan ikkje vere tom",
|
|
57
|
+
addressDetail: "Adresse",
|
|
58
|
+
defaultAddress: "Set som standardadresse"
|
|
59
|
+
},
|
|
60
|
+
vanAddressList: {
|
|
61
|
+
add: "Legg til ny adresse"
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
export {
|
|
65
|
+
stdin_default as default
|
|
66
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type ComponentInstance } from '../utils';
|
|
2
1
|
import type { NotifyMessage, NotifyOptions } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Close the currently displayed Notify
|
|
@@ -7,7 +6,7 @@ export declare const closeNotify: () => void;
|
|
|
7
6
|
/**
|
|
8
7
|
* Display Notify at the top of the page
|
|
9
8
|
*/
|
|
10
|
-
export declare function showNotify(options: NotifyMessage | NotifyOptions):
|
|
9
|
+
export declare function showNotify(options: NotifyMessage | NotifyOptions): any;
|
|
11
10
|
/**
|
|
12
11
|
* Modify the default configuration, affecting all `showNotify` calls
|
|
13
12
|
*/
|
package/es/utils/basic.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type Numeric = number | string;
|
|
|
11
11
|
export type ComponentInstance = ComponentPublicInstance<{}, any>;
|
|
12
12
|
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
|
13
13
|
export declare const isDef: <T>(val: T) => val is NonNullable<T>;
|
|
14
|
-
export declare const isFunction: (val: unknown) => val is
|
|
14
|
+
export declare const isFunction: (val: unknown) => val is (...args: any[]) => any;
|
|
15
15
|
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
|
16
16
|
export declare const isDate: (val: unknown) => val is Date;
|
|
17
17
|
export declare function isMobile(value: string): boolean;
|
package/lib/cell/Cell.js
CHANGED
|
@@ -115,7 +115,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
return () => {
|
|
118
|
-
var _a;
|
|
118
|
+
var _a, _b, _c;
|
|
119
119
|
const {
|
|
120
120
|
tag,
|
|
121
121
|
size,
|
|
@@ -124,7 +124,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
124
124
|
isLink,
|
|
125
125
|
required
|
|
126
126
|
} = props;
|
|
127
|
-
const clickable = (_a = props.clickable) != null ? _a : isLink;
|
|
127
|
+
const clickable = Boolean((_c = (_b = (_a = props.clickable) != null ? _a : props.to) != null ? _b : props.url) != null ? _c : isLink);
|
|
128
128
|
const classes = {
|
|
129
129
|
center,
|
|
130
130
|
required: !!required,
|
|
@@ -138,7 +138,7 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
138
138
|
"class": bem(classes),
|
|
139
139
|
"role": clickable ? "button" : void 0,
|
|
140
140
|
"tabindex": clickable ? 0 : void 0,
|
|
141
|
-
"onClick": route
|
|
141
|
+
"onClick": clickable ? route : void 0
|
|
142
142
|
}, {
|
|
143
143
|
default: () => {
|
|
144
144
|
var _a2;
|
|
@@ -33,10 +33,13 @@ function useLockScroll(rootRef, shouldLock) {
|
|
|
33
33
|
const onTouchMove = (event) => {
|
|
34
34
|
touch.move(event);
|
|
35
35
|
const direction = touch.deltaY.value > 0 ? DIRECTION_DOWN : DIRECTION_UP;
|
|
36
|
-
|
|
36
|
+
let el = (0, import_use.getScrollParent)(
|
|
37
37
|
event.target,
|
|
38
38
|
rootRef.value
|
|
39
39
|
);
|
|
40
|
+
while (el.scrollHeight <= el.offsetHeight && el !== rootRef.value && el.parentElement) {
|
|
41
|
+
el = (0, import_use.getScrollParent)(el.parentElement, rootRef.value);
|
|
42
|
+
}
|
|
40
43
|
const { scrollHeight, offsetHeight, scrollTop } = el;
|
|
41
44
|
let status = "11";
|
|
42
45
|
if (scrollTop === 0) {
|
package/lib/field/Field.js
CHANGED
|
@@ -508,7 +508,8 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
508
508
|
validate,
|
|
509
509
|
formValue,
|
|
510
510
|
resetValidation,
|
|
511
|
-
getValidationStatus
|
|
511
|
+
getValidationStatus,
|
|
512
|
+
adjustTextareaSize
|
|
512
513
|
});
|
|
513
514
|
(0, import_vue.provide)(import_use.CUSTOM_FIELD_INJECTION_KEY, {
|
|
514
515
|
customValue,
|
|
@@ -551,8 +552,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
551
552
|
}),
|
|
552
553
|
"center": props.center,
|
|
553
554
|
"border": props.border,
|
|
554
|
-
"isLink": props.isLink,
|
|
555
|
-
"clickable": props.clickable,
|
|
555
|
+
"isLink": disabled ? false : props.isLink,
|
|
556
|
+
"clickable": disabled ? false : props.clickable,
|
|
557
|
+
"onClick": disabled ? (e) => e.stopImmediatePropagation() : void 0,
|
|
556
558
|
"titleStyle": labelStyle.value,
|
|
557
559
|
"valueClass": bem("value"),
|
|
558
560
|
"titleClass": [bem("label", [labelAlign, {
|
package/lib/field/types.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export type FieldExpose = {
|
|
|
36
36
|
getValidationStatus: () => FieldValidationStatus;
|
|
37
37
|
/** @private */
|
|
38
38
|
formValue: ComputedRef<unknown>;
|
|
39
|
+
adjustTextareaSize: () => void;
|
|
39
40
|
};
|
|
40
41
|
export type FieldInstance = ComponentPublicInstance<FieldProps, FieldExpose>;
|
|
41
42
|
declare global {
|
|
@@ -179,6 +179,14 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
179
179
|
}
|
|
180
180
|
};
|
|
181
181
|
const onClosed = () => emit("closed");
|
|
182
|
+
const prev = () => {
|
|
183
|
+
var _a;
|
|
184
|
+
return (_a = swipeRef.value) == null ? void 0 : _a.prev();
|
|
185
|
+
};
|
|
186
|
+
const next = () => {
|
|
187
|
+
var _a;
|
|
188
|
+
return (_a = swipeRef.value) == null ? void 0 : _a.next();
|
|
189
|
+
};
|
|
182
190
|
const swipeTo = (index, options) => {
|
|
183
191
|
var _a;
|
|
184
192
|
return (_a = swipeRef.value) == null ? void 0 : _a.swipeTo(index, options);
|
|
@@ -188,7 +196,9 @@ var stdin_default = (0, import_vue.defineComponent)({
|
|
|
188
196
|
var _a;
|
|
189
197
|
(_a = activedPreviewItemRef.value) == null ? void 0 : _a.resetScale();
|
|
190
198
|
},
|
|
191
|
-
swipeTo
|
|
199
|
+
swipeTo,
|
|
200
|
+
prev,
|
|
201
|
+
next
|
|
192
202
|
});
|
|
193
203
|
(0, import_vue.onMounted)(resize);
|
|
194
204
|
(0, import_vue.watch)([import_utils.windowWidth, import_utils.windowHeight], resize);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ComponentInstance } from '../utils';
|
|
2
1
|
import type { ImagePreviewOptions } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* Display a full-screen image preview component
|
|
5
4
|
*/
|
|
6
|
-
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) =>
|
|
5
|
+
export declare const showImagePreview: (options: string[] | ImagePreviewOptions, startPosition?: number) => any;
|
|
@@ -45,6 +45,8 @@ export type ImagePreviewItemInstance = ComponentPublicInstance<ImagePreviewItemP
|
|
|
45
45
|
export type ImagePreviewExpose = {
|
|
46
46
|
resetScale: () => void;
|
|
47
47
|
swipeTo: (index: number, options?: SwipeToOptions) => void;
|
|
48
|
+
prev: () => void;
|
|
49
|
+
next: () => void;
|
|
48
50
|
};
|
|
49
51
|
export type ImagePreviewInstance = ComponentPublicInstance<ImagePreviewProps, ImagePreviewExpose>;
|
|
50
52
|
export type ImagePreviewThemeVars = {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -226,7 +226,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
|
226
226
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
|
227
227
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
|
228
228
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
|
229
|
-
const version = "4.
|
|
229
|
+
const version = "4.10.1";
|
|
230
230
|
function install(app) {
|
|
231
231
|
const components = [
|
|
232
232
|
import_action_bar.ActionBar,
|
package/lib/locale/lang/de-DE.js
CHANGED
|
@@ -38,7 +38,7 @@ var stdin_default = {
|
|
|
38
38
|
end: "Ende",
|
|
39
39
|
start: "Start",
|
|
40
40
|
title: "Kalender",
|
|
41
|
-
weekdays: ["So", "Mo", "Di", "
|
|
41
|
+
weekdays: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],
|
|
42
42
|
monthTitle: (year, month) => `${year}/${month}`,
|
|
43
43
|
rangePrompt: (maxRange) => `W\xE4hle nicht mehr als ${maxRange} Tage`
|
|
44
44
|
},
|
package/lib/locale/lang/ja-JP.js
CHANGED
|
@@ -66,8 +66,8 @@ var stdin_default = {
|
|
|
66
66
|
count: (count) => `${count}\u679A\u304C\u5229\u7528\u53EF\u80FD`
|
|
67
67
|
},
|
|
68
68
|
vanCouponList: {
|
|
69
|
-
exchange: "\
|
|
70
|
-
close: "\u4F7F\u7528\
|
|
69
|
+
exchange: "\u4EA4\u63DB",
|
|
70
|
+
close: "\u4F7F\u7528\u3057\u306A\u3044",
|
|
71
71
|
enable: "\u5229\u7528\u53EF\u80FD",
|
|
72
72
|
disabled: "\u5229\u7528\u3067\u304D\u307E\u305B\u3093",
|
|
73
73
|
placeholder: "\u5272\u5F15\u30B3\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044"
|
package/lib/locale/lang/nb-NO.js
CHANGED
|
@@ -24,7 +24,7 @@ var stdin_default = {
|
|
|
24
24
|
name: "Navn",
|
|
25
25
|
tel: "Telefon",
|
|
26
26
|
save: "Lagre",
|
|
27
|
-
clear: "
|
|
27
|
+
clear: "T\xF8m",
|
|
28
28
|
undo: "Angre",
|
|
29
29
|
cancel: "Avbryt",
|
|
30
30
|
confirm: "Bekreft",
|
|
@@ -37,27 +37,27 @@ var stdin_default = {
|
|
|
37
37
|
vanCalendar: {
|
|
38
38
|
end: "Slutt",
|
|
39
39
|
start: "Start",
|
|
40
|
-
title: "
|
|
40
|
+
title: "Kalender",
|
|
41
41
|
weekdays: ["S\xF8n", "Man", "Tir", "Ons", "Tor", "Fre", "L\xF8r"],
|
|
42
42
|
monthTitle: (year, month) => `${year}/${month}`,
|
|
43
43
|
rangePrompt: (maxRange) => `Maks. ${maxRange} dager`
|
|
44
44
|
},
|
|
45
45
|
vanCascader: {
|
|
46
|
-
select: "
|
|
46
|
+
select: "Velg"
|
|
47
47
|
},
|
|
48
48
|
vanPagination: {
|
|
49
49
|
prev: "Forrige",
|
|
50
50
|
next: "Neste"
|
|
51
51
|
},
|
|
52
52
|
vanPullRefresh: {
|
|
53
|
-
pulling: "Dra for
|
|
54
|
-
loosing: "
|
|
53
|
+
pulling: "Dra for \xE5 oppdatere...",
|
|
54
|
+
loosing: "Slipp for \xE5 oppdatere..."
|
|
55
55
|
},
|
|
56
56
|
vanSubmitBar: {
|
|
57
57
|
label: "Totalt:"
|
|
58
58
|
},
|
|
59
59
|
vanCoupon: {
|
|
60
|
-
unlimited: "
|
|
60
|
+
unlimited: "Ubegrenset",
|
|
61
61
|
discount: (discount) => `${discount * 10}% avslag`,
|
|
62
62
|
condition: (condition) => `Minst ${condition}`
|
|
63
63
|
},
|
|
@@ -66,18 +66,18 @@ var stdin_default = {
|
|
|
66
66
|
count: (count) => `Du har ${count} kuponger`
|
|
67
67
|
},
|
|
68
68
|
vanCouponList: {
|
|
69
|
-
exchange: "
|
|
69
|
+
exchange: "Bytt",
|
|
70
70
|
close: "Lukk",
|
|
71
71
|
enable: "Tilgjengelig",
|
|
72
72
|
disabled: "Utilgjengelig",
|
|
73
|
-
placeholder: "
|
|
73
|
+
placeholder: "Kupongkode"
|
|
74
74
|
},
|
|
75
75
|
vanAddressEdit: {
|
|
76
76
|
area: "Omr\xE5de",
|
|
77
|
-
areaEmpty: "Vennligst
|
|
78
|
-
addressEmpty: "
|
|
77
|
+
areaEmpty: "Vennligst velg omr\xE5de",
|
|
78
|
+
addressEmpty: "Adressen kan ikke v\xE6re tom",
|
|
79
79
|
addressDetail: "Adresse",
|
|
80
|
-
defaultAddress: "Sett som
|
|
80
|
+
defaultAddress: "Sett som standardadresse"
|
|
81
81
|
},
|
|
82
82
|
vanAddressList: {
|
|
83
83
|
add: "Legg til ny adresse"
|