vant 4.7.1 → 4.7.3
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 +1 -0
- package/es/address-edit/AddressEdit.mjs +1 -1
- package/es/cell/Cell.d.ts +17 -5
- package/es/cell/Cell.mjs +5 -2
- package/es/cell/index.d.ts +9 -3
- package/es/collapse-item/CollapseItem.d.ts +13 -4
- package/es/collapse-item/index.d.ts +9 -3
- package/es/config-provider/types.d.ts +1 -1
- package/es/field/Field.d.ts +30 -21
- package/es/field/Field.mjs +11 -3
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +18 -12
- package/es/field/types.d.ts +1 -1
- package/es/form/Form.d.ts +3 -0
- package/es/form/Form.mjs +1 -0
- package/es/form/index.d.ts +2 -0
- package/es/icon/index.css +1 -1
- package/es/image-preview/ImagePreview.d.ts +13 -0
- package/es/image-preview/ImagePreview.mjs +2 -0
- package/es/image-preview/ImagePreviewItem.d.ts +3 -0
- package/es/image-preview/ImagePreviewItem.mjs +16 -11
- package/es/image-preview/function-call.mjs +1 -0
- package/es/image-preview/index.d.ts +9 -0
- package/es/image-preview/types.d.ts +1 -0
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/lang/ar-SA.d.ts +63 -0
- package/es/locale/lang/ar-SA.mjs +65 -0
- package/es/picker-group/PickerGroup.mjs +3 -3
- package/es/progress/types.d.ts +1 -4
- package/es/search/Search.d.ts +13 -13
- package/es/search/Search.mjs +3 -1
- package/es/search/index.css +1 -1
- package/es/search/index.d.ts +9 -9
- package/es/signature/Signature.mjs +49 -38
- package/es/signature/index.d.ts +1 -1
- package/es/signature/types.d.ts +6 -0
- package/es/tabs/Tabs.d.ts +13 -0
- package/es/tabs/Tabs.mjs +3 -2
- package/es/tabs/index.d.ts +9 -0
- package/es/text-ellipsis/index.css +1 -1
- package/es/uploader/Uploader.mjs +12 -3
- package/lib/address-edit/AddressEdit.js +1 -1
- package/lib/cell/Cell.d.ts +17 -5
- package/lib/cell/Cell.js +5 -2
- package/lib/cell/index.d.ts +9 -3
- package/lib/collapse-item/CollapseItem.d.ts +13 -4
- package/lib/collapse-item/index.d.ts +9 -3
- package/lib/config-provider/types.d.ts +1 -1
- package/lib/field/Field.d.ts +30 -21
- package/lib/field/Field.js +11 -3
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +18 -12
- package/lib/field/types.d.ts +1 -1
- package/lib/form/Form.d.ts +3 -0
- package/lib/form/Form.js +1 -0
- package/lib/form/index.d.ts +2 -0
- package/lib/icon/index.css +1 -1
- package/lib/image-preview/ImagePreview.d.ts +13 -0
- package/lib/image-preview/ImagePreview.js +2 -0
- package/lib/image-preview/ImagePreviewItem.d.ts +3 -0
- package/lib/image-preview/ImagePreviewItem.js +16 -11
- package/lib/image-preview/function-call.js +1 -0
- package/lib/image-preview/index.d.ts +9 -0
- package/lib/image-preview/types.d.ts +1 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/ar-SA.d.ts +63 -0
- package/lib/locale/lang/ar-SA.js +84 -0
- package/lib/picker-group/PickerGroup.js +2 -2
- package/lib/progress/types.d.ts +1 -4
- package/lib/search/Search.d.ts +13 -13
- package/lib/search/Search.js +3 -1
- package/lib/search/index.css +1 -1
- package/lib/search/index.d.ts +9 -9
- package/lib/signature/Signature.js +47 -36
- package/lib/signature/index.d.ts +1 -1
- package/lib/signature/types.d.ts +6 -0
- package/lib/tabs/Tabs.d.ts +13 -0
- package/lib/tabs/Tabs.js +3 -2
- package/lib/tabs/index.d.ts +9 -0
- package/lib/text-ellipsis/index.css +1 -1
- package/lib/uploader/Uploader.js +11 -2
- package/lib/vant.cjs.js +103 -61
- package/lib/vant.es.js +104 -62
- package/lib/vant.js +103 -61
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +4 -4
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -224,7 +224,7 @@ __reExport(stdin_exports, require("./toast"), module.exports);
|
|
224
224
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
225
225
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
226
226
|
__reExport(stdin_exports, require("./watermark"), module.exports);
|
227
|
-
const version = "4.7.
|
227
|
+
const version = "4.7.3";
|
228
228
|
function install(app) {
|
229
229
|
const components = [
|
230
230
|
import_action_bar.ActionBar,
|
@@ -0,0 +1,63 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
name: string;
|
3
|
+
tel: string;
|
4
|
+
save: string;
|
5
|
+
clear: string;
|
6
|
+
cancel: string;
|
7
|
+
confirm: string;
|
8
|
+
delete: string;
|
9
|
+
loading: string;
|
10
|
+
noCoupon: string;
|
11
|
+
nameEmpty: string;
|
12
|
+
addContact: string;
|
13
|
+
telInvalid: string;
|
14
|
+
vanCalendar: {
|
15
|
+
end: string;
|
16
|
+
start: string;
|
17
|
+
title: string;
|
18
|
+
weekdays: string[];
|
19
|
+
monthTitle: (year: number, month: number) => string;
|
20
|
+
rangePrompt: (maxRange: number) => string;
|
21
|
+
};
|
22
|
+
vanCascader: {
|
23
|
+
select: string;
|
24
|
+
};
|
25
|
+
vanPagination: {
|
26
|
+
prev: string;
|
27
|
+
next: string;
|
28
|
+
};
|
29
|
+
vanPullRefresh: {
|
30
|
+
pulling: string;
|
31
|
+
loosing: string;
|
32
|
+
};
|
33
|
+
vanSubmitBar: {
|
34
|
+
label: string;
|
35
|
+
};
|
36
|
+
vanCoupon: {
|
37
|
+
unlimited: string;
|
38
|
+
discount: (discount: number) => string;
|
39
|
+
condition: (condition: number) => string;
|
40
|
+
};
|
41
|
+
vanCouponCell: {
|
42
|
+
title: string;
|
43
|
+
count: (count: number) => string;
|
44
|
+
};
|
45
|
+
vanCouponList: {
|
46
|
+
exchange: string;
|
47
|
+
close: string;
|
48
|
+
enable: string;
|
49
|
+
disabled: string;
|
50
|
+
placeholder: string;
|
51
|
+
};
|
52
|
+
vanAddressEdit: {
|
53
|
+
area: string;
|
54
|
+
areaEmpty: string;
|
55
|
+
addressEmpty: string;
|
56
|
+
addressDetail: string;
|
57
|
+
defaultAddress: string;
|
58
|
+
};
|
59
|
+
vanAddressList: {
|
60
|
+
add: string;
|
61
|
+
};
|
62
|
+
};
|
63
|
+
export default _default;
|
@@ -0,0 +1,84 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
+
var __export = (target, all) => {
|
6
|
+
for (var name in all)
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
+
};
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
+
for (let key of __getOwnPropNames(from))
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
+
}
|
15
|
+
return to;
|
16
|
+
};
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
+
var stdin_exports = {};
|
19
|
+
__export(stdin_exports, {
|
20
|
+
default: () => stdin_default
|
21
|
+
});
|
22
|
+
module.exports = __toCommonJS(stdin_exports);
|
23
|
+
var stdin_default = {
|
24
|
+
name: "\u0627\u0644\u0627\u0633\u0645",
|
25
|
+
tel: "\u0627\u0644\u0647\u0627\u062A\u0641",
|
26
|
+
save: "\u062D\u0641\u0638",
|
27
|
+
clear: "\u0645\u0633\u062D",
|
28
|
+
cancel: "\u0625\u0644\u063A\u0627\u0621",
|
29
|
+
confirm: "\u062A\u0623\u0643\u064A\u062F",
|
30
|
+
delete: "\u062D\u0630\u0641",
|
31
|
+
loading: "\u062C\u0627\u0631 \u0627\u0644\u062A\u062D\u0645\u064A\u0644...",
|
32
|
+
noCoupon: "\u0644\u0627 \u064A\u0648\u062C\u062F \u0643\u0648\u0628\u0648\u0646\u0627\u062A",
|
33
|
+
nameEmpty: "\u064A\u0631\u062C\u0649 \u0645\u0644\u0621 \u0627\u0644\u0627\u0633\u0645",
|
34
|
+
addContact: "\u0625\u0636\u0627\u0641\u0629 \u062C\u0647\u0629 \u0627\u062A\u0635\u0627\u0644",
|
35
|
+
telInvalid: "\u0631\u0642\u0645 \u0627\u0644\u0647\u0627\u062A\u0641 \u063A\u064A\u0631 \u0635\u062D\u064A\u062D",
|
36
|
+
vanCalendar: {
|
37
|
+
end: "\u0646\u0647\u0627\u064A\u0629",
|
38
|
+
start: "\u0628\u062F\u0627\u064A\u0629",
|
39
|
+
title: "\u0627\u0644\u062A\u0642\u0648\u064A\u0645",
|
40
|
+
weekdays: ["\u0627\u0644\u0623\u062D\u062F", "\u0627\u0644\u0627\u062B\u0646\u064A\u0646", "\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621", "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621", "\u0627\u0644\u062E\u0645\u064A\u0633", "\u0627\u0644\u062C\u0645\u0639\u0629", "\u0627\u0644\u0633\u0628\u062A"],
|
41
|
+
monthTitle: (year, month) => `${year}/${month}`,
|
42
|
+
rangePrompt: (maxRange) => `\u0627\u062E\u062A\u0631 \u0644\u0627 \u064A\u0632\u064A\u062F \u0639\u0646 ${maxRange} \u0623\u064A\u0627\u0645`
|
43
|
+
},
|
44
|
+
vanCascader: {
|
45
|
+
select: "\u0627\u062E\u062A\u0631"
|
46
|
+
},
|
47
|
+
vanPagination: {
|
48
|
+
prev: "\u0627\u0644\u0633\u0627\u0628\u0642",
|
49
|
+
next: "\u0627\u0644\u062A\u0627\u0644\u064A"
|
50
|
+
},
|
51
|
+
vanPullRefresh: {
|
52
|
+
pulling: "\u0627\u0633\u062D\u0628 \u0644\u0644\u062A\u062D\u062F\u064A\u062B...",
|
53
|
+
loosing: "\u0623\u0641\u0644\u062A \u0644\u0644\u062A\u062D\u062F\u064A\u062B..."
|
54
|
+
},
|
55
|
+
vanSubmitBar: {
|
56
|
+
label: "\u0627\u0644\u0645\u062C\u0645\u0648\u0639:"
|
57
|
+
},
|
58
|
+
vanCoupon: {
|
59
|
+
unlimited: "\u063A\u064A\u0631 \u0645\u062D\u062F\u0648\u062F",
|
60
|
+
discount: (discount) => `${discount * 10}% \u062E\u0635\u0645`,
|
61
|
+
condition: (condition) => `\u0639\u0644\u0649 \u0627\u0644\u0623\u0642\u0644 ${condition}`
|
62
|
+
},
|
63
|
+
vanCouponCell: {
|
64
|
+
title: "\u0643\u0648\u0628\u0648\u0646",
|
65
|
+
count: (count) => `\u0644\u062F\u064A\u0643 ${count} \u0643\u0648\u0628\u0648\u0646\u0627\u062A`
|
66
|
+
},
|
67
|
+
vanCouponList: {
|
68
|
+
exchange: "\u0627\u0633\u062A\u0628\u062F\u0627\u0644",
|
69
|
+
close: "\u0625\u063A\u0644\u0627\u0642",
|
70
|
+
enable: "\u0645\u062A\u0627\u062D",
|
71
|
+
disabled: "\u063A\u064A\u0631 \u0645\u062A\u0627\u062D",
|
72
|
+
placeholder: "\u0643\u0648\u062F \u0627\u0644\u0643\u0648\u0628\u0648\u0646"
|
73
|
+
},
|
74
|
+
vanAddressEdit: {
|
75
|
+
area: "\u0627\u0644\u0645\u0646\u0637\u0642\u0629",
|
76
|
+
areaEmpty: "\u064A\u0631\u062C\u0649 \u0627\u062E\u062A\u064A\u0627\u0631 \u0645\u0646\u0637\u0642\u0629 \u0627\u0633\u062A\u0642\u0628\u0627\u0644",
|
77
|
+
addressEmpty: "\u0627\u0644\u0639\u0646\u0648\u0627\u0646 \u0644\u0627 \u064A\u0645\u0643\u0646 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0641\u0627\u0631\u063A\u064B\u0627",
|
78
|
+
addressDetail: "\u0627\u0644\u0639\u0646\u0648\u0627\u0646",
|
79
|
+
defaultAddress: "\u062A\u0639\u064A\u064A\u0646 \u0643\u0639\u0646\u0648\u0627\u0646 \u0627\u0641\u062A\u0631\u0627\u0636\u064A"
|
80
|
+
},
|
81
|
+
vanAddressList: {
|
82
|
+
add: "\u0625\u0636\u0627\u0641\u0629 \u0639\u0646\u0648\u0627\u0646 \u062C\u062F\u064A\u062F"
|
83
|
+
}
|
84
|
+
};
|
@@ -71,8 +71,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
71
71
|
};
|
72
72
|
const onCancel = () => emit("cancel");
|
73
73
|
return () => {
|
74
|
-
var _a;
|
75
|
-
const childNodes = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
74
|
+
var _a, _b;
|
75
|
+
const childNodes = (_b = (_a = slots.default) == null ? void 0 : _a.call(slots)) == null ? void 0 : _b.filter((node) => node.type !== import_vue2.Comment);
|
76
76
|
const confirmButtonText = showNextButton() ? props.nextStepText : props.confirmButtonText;
|
77
77
|
return (0, import_vue.createVNode)("div", {
|
78
78
|
"class": bem()
|
package/lib/progress/types.d.ts
CHANGED
@@ -1,9 +1,6 @@
|
|
1
1
|
import type { ComponentPublicInstance } from 'vue';
|
2
2
|
import type { ProgressProps } from './Progress';
|
3
|
-
export type
|
4
|
-
resize: () => void;
|
5
|
-
};
|
6
|
-
export type ProgressInstance = ComponentPublicInstance<ProgressProps, ProgressExpose>;
|
3
|
+
export type ProgressInstance = ComponentPublicInstance<ProgressProps>;
|
7
4
|
export type ProgressThemeVars = {
|
8
5
|
progressHeight?: string;
|
9
6
|
progressColor?: string;
|
package/lib/search/Search.d.ts
CHANGED
@@ -24,10 +24,6 @@ export declare const searchProps: {
|
|
24
24
|
autocorrect: StringConstructor;
|
25
25
|
errorMessage: StringConstructor;
|
26
26
|
enterkeyhint: StringConstructor;
|
27
|
-
spellcheck: {
|
28
|
-
type: BooleanConstructor;
|
29
|
-
default: null;
|
30
|
-
};
|
31
27
|
clearTrigger: {
|
32
28
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
33
29
|
default: import("../field").FieldClearTrigger;
|
@@ -36,6 +32,10 @@ export declare const searchProps: {
|
|
36
32
|
type: import("vue").PropType<import("../field").FieldFormatTrigger>;
|
37
33
|
default: import("../field").FieldFormatTrigger;
|
38
34
|
};
|
35
|
+
spellcheck: {
|
36
|
+
type: BooleanConstructor;
|
37
|
+
default: null;
|
38
|
+
};
|
39
39
|
error: {
|
40
40
|
type: BooleanConstructor;
|
41
41
|
default: null;
|
@@ -91,10 +91,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
91
91
|
autocorrect: StringConstructor;
|
92
92
|
errorMessage: StringConstructor;
|
93
93
|
enterkeyhint: StringConstructor;
|
94
|
-
spellcheck: {
|
95
|
-
type: BooleanConstructor;
|
96
|
-
default: null;
|
97
|
-
};
|
98
94
|
clearTrigger: {
|
99
95
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
100
96
|
default: import("../field").FieldClearTrigger;
|
@@ -103,6 +99,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
103
99
|
type: import("vue").PropType<import("../field").FieldFormatTrigger>;
|
104
100
|
default: import("../field").FieldFormatTrigger;
|
105
101
|
};
|
102
|
+
spellcheck: {
|
103
|
+
type: BooleanConstructor;
|
104
|
+
default: null;
|
105
|
+
};
|
106
106
|
error: {
|
107
107
|
type: BooleanConstructor;
|
108
108
|
default: null;
|
@@ -156,10 +156,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
156
156
|
autocorrect: StringConstructor;
|
157
157
|
errorMessage: StringConstructor;
|
158
158
|
enterkeyhint: StringConstructor;
|
159
|
-
spellcheck: {
|
160
|
-
type: BooleanConstructor;
|
161
|
-
default: null;
|
162
|
-
};
|
163
159
|
clearTrigger: {
|
164
160
|
type: import("vue").PropType<import("../field").FieldClearTrigger>;
|
165
161
|
default: import("../field").FieldClearTrigger;
|
@@ -168,6 +164,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
168
164
|
type: import("vue").PropType<import("../field").FieldFormatTrigger>;
|
169
165
|
default: import("../field").FieldFormatTrigger;
|
170
166
|
};
|
167
|
+
spellcheck: {
|
168
|
+
type: BooleanConstructor;
|
169
|
+
default: null;
|
170
|
+
};
|
171
171
|
error: {
|
172
172
|
type: BooleanConstructor;
|
173
173
|
default: null;
|
@@ -215,9 +215,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
215
215
|
clearable: boolean;
|
216
216
|
clearIcon: string;
|
217
217
|
modelValue: string | number;
|
218
|
-
spellcheck: boolean;
|
219
218
|
clearTrigger: import("../field").FieldClearTrigger;
|
220
219
|
formatTrigger: import("../field").FieldFormatTrigger;
|
220
|
+
spellcheck: boolean;
|
221
221
|
error: boolean;
|
222
222
|
readonly: boolean;
|
223
223
|
showAction: boolean;
|
package/lib/search/Search.js
CHANGED
@@ -105,7 +105,9 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
105
105
|
return (0, import_vue.createVNode)(import_field.Field, (0, import_vue.mergeProps)({
|
106
106
|
"ref": fieldRef,
|
107
107
|
"type": "search",
|
108
|
-
"class": bem("field"
|
108
|
+
"class": bem("field", {
|
109
|
+
"with-message": fieldAttrs.errorMessage
|
110
|
+
}),
|
109
111
|
"border": false,
|
110
112
|
"onBlur": onBlur,
|
111
113
|
"onFocus": onFocus,
|
package/lib/search/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-search-padding: 10px var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: 34px;--van-search-label-padding: 0 5px;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}
|
1
|
+
:root{--van-search-padding: 10px var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: 34px;--van-search-label-padding: 0 5px;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search__field--with-message{height:auto;align-items:flex-start;padding-top:5px;padding-bottom:5px}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}
|
package/lib/search/index.d.ts
CHANGED
@@ -23,10 +23,6 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
23
23
|
autocorrect: StringConstructor;
|
24
24
|
errorMessage: StringConstructor;
|
25
25
|
enterkeyhint: StringConstructor;
|
26
|
-
spellcheck: {
|
27
|
-
type: BooleanConstructor;
|
28
|
-
default: null;
|
29
|
-
};
|
30
26
|
clearTrigger: {
|
31
27
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
32
28
|
default: import("..").FieldClearTrigger;
|
@@ -35,6 +31,10 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
35
31
|
type: import("vue").PropType<import("..").FieldFormatTrigger>;
|
36
32
|
default: import("..").FieldFormatTrigger;
|
37
33
|
};
|
34
|
+
spellcheck: {
|
35
|
+
type: BooleanConstructor;
|
36
|
+
default: null;
|
37
|
+
};
|
38
38
|
error: {
|
39
39
|
type: BooleanConstructor;
|
40
40
|
default: null;
|
@@ -88,10 +88,6 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
88
88
|
autocorrect: StringConstructor;
|
89
89
|
errorMessage: StringConstructor;
|
90
90
|
enterkeyhint: StringConstructor;
|
91
|
-
spellcheck: {
|
92
|
-
type: BooleanConstructor;
|
93
|
-
default: null;
|
94
|
-
};
|
95
91
|
clearTrigger: {
|
96
92
|
type: import("vue").PropType<import("..").FieldClearTrigger>;
|
97
93
|
default: import("..").FieldClearTrigger;
|
@@ -100,6 +96,10 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
100
96
|
type: import("vue").PropType<import("..").FieldFormatTrigger>;
|
101
97
|
default: import("..").FieldFormatTrigger;
|
102
98
|
};
|
99
|
+
spellcheck: {
|
100
|
+
type: BooleanConstructor;
|
101
|
+
default: null;
|
102
|
+
};
|
103
103
|
error: {
|
104
104
|
type: BooleanConstructor;
|
105
105
|
default: null;
|
@@ -147,9 +147,9 @@ export declare const Search: import("../utils").WithInstall<import("vue").Define
|
|
147
147
|
clearable: boolean;
|
148
148
|
clearIcon: string;
|
149
149
|
modelValue: string | number;
|
150
|
-
spellcheck: boolean;
|
151
150
|
clearTrigger: import("..").FieldClearTrigger;
|
152
151
|
formatTrigger: import("..").FieldFormatTrigger;
|
152
|
+
spellcheck: boolean;
|
153
153
|
error: boolean;
|
154
154
|
readonly: boolean;
|
155
155
|
showAction: boolean;
|
@@ -25,6 +25,7 @@ var import_vue = require("vue");
|
|
25
25
|
var import_vue2 = require("vue");
|
26
26
|
var import_utils = require("../utils");
|
27
27
|
var import_use = require("@vant/use");
|
28
|
+
var import_use_expose = require("../composables/use-expose");
|
28
29
|
var import_button = require("../button");
|
29
30
|
const [name, bem, t] = (0, import_utils.createNamespace)("signature");
|
30
31
|
const signatureProps = {
|
@@ -50,37 +51,37 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
50
51
|
}) {
|
51
52
|
const canvasRef = (0, import_vue2.ref)();
|
52
53
|
const wrapRef = (0, import_vue2.ref)();
|
53
|
-
const
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
ratio: import_utils.inBrowser ? window.devicePixelRatio : 1
|
54
|
+
const ctx = (0, import_vue2.computed)(() => {
|
55
|
+
if (!canvasRef.value)
|
56
|
+
return null;
|
57
|
+
return canvasRef.value.getContext("2d");
|
58
58
|
});
|
59
|
-
let canvasRect;
|
60
59
|
const isRenderCanvas = import_utils.inBrowser ? hasCanvasSupport() : true;
|
60
|
+
let canvasWidth = 0;
|
61
|
+
let canvasHeight = 0;
|
62
|
+
let canvasRect;
|
61
63
|
const touchStart = () => {
|
62
|
-
if (!
|
64
|
+
if (!ctx.value) {
|
63
65
|
return false;
|
64
66
|
}
|
65
|
-
|
66
|
-
|
67
|
-
|
67
|
+
ctx.value.beginPath();
|
68
|
+
ctx.value.lineWidth = props.lineWidth;
|
69
|
+
ctx.value.strokeStyle = props.penColor;
|
68
70
|
canvasRect = (0, import_use.useRect)(canvasRef);
|
69
71
|
emit("start");
|
70
72
|
};
|
71
73
|
const touchMove = (event) => {
|
72
|
-
|
73
|
-
if (!state.ctx) {
|
74
|
+
if (!ctx.value) {
|
74
75
|
return false;
|
75
76
|
}
|
76
77
|
(0, import_utils.preventDefault)(event);
|
77
78
|
const touch = event.touches[0];
|
78
|
-
const mouseX =
|
79
|
-
const mouseY =
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
const mouseX = touch.clientX - ((canvasRect == null ? void 0 : canvasRect.left) || 0);
|
80
|
+
const mouseY = touch.clientY - ((canvasRect == null ? void 0 : canvasRect.top) || 0);
|
81
|
+
ctx.value.lineCap = "round";
|
82
|
+
ctx.value.lineJoin = "round";
|
83
|
+
ctx.value.lineTo(mouseX, mouseY);
|
84
|
+
ctx.value.stroke();
|
84
85
|
emit("signing", event);
|
85
86
|
};
|
86
87
|
const touchEnd = (event) => {
|
@@ -97,10 +98,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
97
98
|
}
|
98
99
|
return canvas.toDataURL() === empty.toDataURL();
|
99
100
|
};
|
100
|
-
const setCanvasBgColor = (
|
101
|
-
if (
|
102
|
-
|
103
|
-
|
101
|
+
const setCanvasBgColor = (ctx2) => {
|
102
|
+
if (ctx2 && props.backgroundColor) {
|
103
|
+
ctx2.fillStyle = props.backgroundColor;
|
104
|
+
ctx2.fillRect(0, 0, canvasWidth, canvasHeight);
|
104
105
|
}
|
105
106
|
};
|
106
107
|
const submit = () => {
|
@@ -120,23 +121,35 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
120
121
|
});
|
121
122
|
};
|
122
123
|
const clear = () => {
|
123
|
-
if (
|
124
|
-
|
125
|
-
|
126
|
-
setCanvasBgColor(
|
124
|
+
if (ctx.value) {
|
125
|
+
ctx.value.clearRect(0, 0, canvasWidth, canvasHeight);
|
126
|
+
ctx.value.closePath();
|
127
|
+
setCanvasBgColor(ctx.value);
|
127
128
|
}
|
128
129
|
emit("clear");
|
129
130
|
};
|
130
|
-
|
131
|
+
const initialize = () => {
|
131
132
|
var _a, _b, _c;
|
132
|
-
if (isRenderCanvas) {
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
(0
|
137
|
-
|
138
|
-
|
133
|
+
if (isRenderCanvas && canvasRef.value) {
|
134
|
+
const canvas = canvasRef.value;
|
135
|
+
const dpr = import_utils.inBrowser ? window.devicePixelRatio : 1;
|
136
|
+
canvasWidth = canvas.width = (((_a = wrapRef.value) == null ? void 0 : _a.offsetWidth) || 0) * dpr;
|
137
|
+
canvasHeight = canvas.height = (((_b = wrapRef.value) == null ? void 0 : _b.offsetHeight) || 0) * dpr;
|
138
|
+
(_c = ctx.value) == null ? void 0 : _c.scale(dpr, dpr);
|
139
|
+
setCanvasBgColor(ctx.value);
|
139
140
|
}
|
141
|
+
};
|
142
|
+
const resize = () => {
|
143
|
+
if (ctx.value) {
|
144
|
+
const data = ctx.value.getImageData(0, 0, canvasWidth, canvasHeight);
|
145
|
+
initialize();
|
146
|
+
ctx.value.putImageData(data, 0, 0);
|
147
|
+
}
|
148
|
+
};
|
149
|
+
(0, import_vue2.watch)(import_utils.windowWidth, resize);
|
150
|
+
(0, import_vue2.onMounted)(initialize);
|
151
|
+
(0, import_use_expose.useExpose)({
|
152
|
+
resize
|
140
153
|
});
|
141
154
|
return () => (0, import_vue.createVNode)("div", {
|
142
155
|
"class": bem()
|
@@ -145,8 +158,6 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
145
158
|
"ref": wrapRef
|
146
159
|
}, [isRenderCanvas ? (0, import_vue.createVNode)("canvas", {
|
147
160
|
"ref": canvasRef,
|
148
|
-
"width": state.width,
|
149
|
-
"height": state.height,
|
150
161
|
"onTouchstartPassive": touchStart,
|
151
162
|
"onTouchmove": touchMove,
|
152
163
|
"onTouchend": touchEnd
|
package/lib/signature/index.d.ts
CHANGED
@@ -52,7 +52,7 @@ export declare const Signature: import("../utils").WithInstall<import("vue").Def
|
|
52
52
|
}, {}>>;
|
53
53
|
export default Signature;
|
54
54
|
export type { SignatureProps } from './Signature';
|
55
|
-
export type { SignatureThemeVars } from './types';
|
55
|
+
export type { SignatureInstance, SignatureThemeVars } from './types';
|
56
56
|
declare module 'vue' {
|
57
57
|
interface GlobalComponents {
|
58
58
|
Signature: typeof Signature;
|
package/lib/signature/types.d.ts
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
import type { ComponentPublicInstance } from 'vue';
|
2
|
+
import type { SignatureProps } from './Signature';
|
3
|
+
export type SignatureExpose = {
|
4
|
+
resize: () => void;
|
5
|
+
};
|
6
|
+
export type SignatureInstance = ComponentPublicInstance<SignatureProps, SignatureExpose>;
|
1
7
|
export type SignatureThemeVars = {
|
2
8
|
signaturePadding?: string;
|
3
9
|
signatureContentHeight?: string;
|
package/lib/tabs/Tabs.d.ts
CHANGED
@@ -34,6 +34,10 @@ export declare const tabsProps: {
|
|
34
34
|
type: BooleanConstructor;
|
35
35
|
default: true;
|
36
36
|
};
|
37
|
+
showHeader: {
|
38
|
+
type: BooleanConstructor;
|
39
|
+
default: true;
|
40
|
+
};
|
37
41
|
lineWidth: (NumberConstructor | StringConstructor)[];
|
38
42
|
lineHeight: (NumberConstructor | StringConstructor)[];
|
39
43
|
beforeChange: PropType<Interceptor>;
|
@@ -79,6 +83,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
79
83
|
type: BooleanConstructor;
|
80
84
|
default: true;
|
81
85
|
};
|
86
|
+
showHeader: {
|
87
|
+
type: BooleanConstructor;
|
88
|
+
default: true;
|
89
|
+
};
|
82
90
|
lineWidth: (NumberConstructor | StringConstructor)[];
|
83
91
|
lineHeight: (NumberConstructor | StringConstructor)[];
|
84
92
|
beforeChange: PropType<Interceptor>;
|
@@ -121,6 +129,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
121
129
|
type: BooleanConstructor;
|
122
130
|
default: true;
|
123
131
|
};
|
132
|
+
showHeader: {
|
133
|
+
type: BooleanConstructor;
|
134
|
+
default: true;
|
135
|
+
};
|
124
136
|
lineWidth: (NumberConstructor | StringConstructor)[];
|
125
137
|
lineHeight: (NumberConstructor | StringConstructor)[];
|
126
138
|
beforeChange: PropType<Interceptor>;
|
@@ -149,6 +161,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
149
161
|
swipeable: boolean;
|
150
162
|
shrink: boolean;
|
151
163
|
scrollspy: boolean;
|
164
|
+
showHeader: boolean;
|
152
165
|
swipeThreshold: string | number;
|
153
166
|
}, {}>;
|
154
167
|
export default _default;
|
package/lib/tabs/Tabs.js
CHANGED
@@ -61,6 +61,7 @@ const tabsProps = {
|
|
61
61
|
offsetTop: (0, import_utils.makeNumericProp)(0),
|
62
62
|
background: String,
|
63
63
|
lazyRender: import_utils.truthProp,
|
64
|
+
showHeader: import_utils.truthProp,
|
64
65
|
lineWidth: import_utils.numericProp,
|
65
66
|
lineHeight: import_utils.numericProp,
|
66
67
|
beforeChange: Function,
|
@@ -362,13 +363,13 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
362
363
|
return () => (0, import_vue.createVNode)("div", {
|
363
364
|
"ref": root,
|
364
365
|
"class": bem([props.type])
|
365
|
-
}, [props.sticky ? (0, import_vue.createVNode)(import_sticky.Sticky, {
|
366
|
+
}, [props.showHeader ? props.sticky ? (0, import_vue.createVNode)(import_sticky.Sticky, {
|
366
367
|
"container": root.value,
|
367
368
|
"offsetTop": offsetTopPx.value,
|
368
369
|
"onScroll": onStickyScroll
|
369
370
|
}, {
|
370
371
|
default: () => [renderHeader()]
|
371
|
-
}) : renderHeader(), (0, import_vue.createVNode)(import_TabsContent.default, {
|
372
|
+
}) : renderHeader() : null, (0, import_vue.createVNode)(import_TabsContent.default, {
|
372
373
|
"ref": contentRef,
|
373
374
|
"count": children.length,
|
374
375
|
"inited": state.inited,
|
package/lib/tabs/index.d.ts
CHANGED
@@ -32,6 +32,10 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
32
32
|
type: BooleanConstructor;
|
33
33
|
default: true;
|
34
34
|
};
|
35
|
+
showHeader: {
|
36
|
+
type: BooleanConstructor;
|
37
|
+
default: true;
|
38
|
+
};
|
35
39
|
lineWidth: (NumberConstructor | StringConstructor)[];
|
36
40
|
lineHeight: (NumberConstructor | StringConstructor)[];
|
37
41
|
beforeChange: import("vue").PropType<import("../utils").Interceptor>;
|
@@ -74,6 +78,10 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
74
78
|
type: BooleanConstructor;
|
75
79
|
default: true;
|
76
80
|
};
|
81
|
+
showHeader: {
|
82
|
+
type: BooleanConstructor;
|
83
|
+
default: true;
|
84
|
+
};
|
77
85
|
lineWidth: (NumberConstructor | StringConstructor)[];
|
78
86
|
lineHeight: (NumberConstructor | StringConstructor)[];
|
79
87
|
beforeChange: import("vue").PropType<import("../utils").Interceptor>;
|
@@ -102,6 +110,7 @@ export declare const Tabs: import("../utils").WithInstall<import("vue").DefineCo
|
|
102
110
|
swipeable: boolean;
|
103
111
|
shrink: boolean;
|
104
112
|
scrollspy: boolean;
|
113
|
+
showHeader: boolean;
|
105
114
|
swipeThreshold: string | number;
|
106
115
|
}, {}>>;
|
107
116
|
export default Tabs;
|
@@ -1 +1 @@
|
|
1
|
-
:root{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;
|
1
|
+
:root{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;overflow-wrap:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}
|
package/lib/uploader/Uploader.js
CHANGED
@@ -80,6 +80,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
80
80
|
const inputRef = (0, import_vue2.ref)();
|
81
81
|
const urls = [];
|
82
82
|
const reuploadIndex = (0, import_vue2.ref)(-1);
|
83
|
+
const isReuploading = (0, import_vue2.ref)(false);
|
83
84
|
const getDetail = (index = props.modelValue.length) => ({
|
84
85
|
name: props.name,
|
85
86
|
index
|
@@ -216,8 +217,15 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
216
217
|
emit("delete", item, getDetail(index));
|
217
218
|
};
|
218
219
|
const reuploadImage = (index) => {
|
219
|
-
|
220
|
+
isReuploading.value = true;
|
220
221
|
reuploadIndex.value = index;
|
222
|
+
(0, import_vue2.nextTick)(() => chooseFile());
|
223
|
+
};
|
224
|
+
const onInputClick = () => {
|
225
|
+
if (!isReuploading.value) {
|
226
|
+
reuploadIndex.value = -1;
|
227
|
+
}
|
228
|
+
isReuploading.value = false;
|
221
229
|
};
|
222
230
|
const renderPreviewItem = (item, index) => {
|
223
231
|
const needPickData = ["imageFit", "deletable", "reupload", "previewSize", "beforeDelete"];
|
@@ -250,7 +258,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
250
258
|
"capture": props.capture,
|
251
259
|
"multiple": props.multiple && reuploadIndex.value === -1,
|
252
260
|
"disabled": props.disabled,
|
253
|
-
"onChange": onChange
|
261
|
+
"onChange": onChange,
|
262
|
+
"onClick": onInputClick
|
254
263
|
}, null);
|
255
264
|
if (slots.default) {
|
256
265
|
return (0, import_vue.withDirectives)((0, import_vue.createVNode)("div", {
|