vant 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/area/utils.mjs +2 -2
- package/es/back-top/BackTop.mjs +1 -1
- package/es/badge/Badge.mjs +1 -1
- package/es/button/Button.d.ts +1 -1
- package/es/button/index.d.ts +1 -1
- package/es/calendar/Calendar.mjs +2 -2
- package/es/calendar/utils.mjs +1 -1
- package/es/checkbox/Checkbox.mjs +1 -1
- package/es/date-picker/DatePicker.mjs +1 -1
- package/es/divider/Divider.d.ts +1 -1
- package/es/divider/index.d.ts +1 -1
- package/es/field/Field.mjs +13 -7
- package/es/field/index.css +1 -1
- package/es/field/index.d.ts +1 -1
- package/es/field/types.d.ts +2 -2
- package/es/grid-item/GridItem.mjs +1 -1
- package/es/image-preview/ImagePreviewItem.mjs +4 -3
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/lazyload/vue-lazyload/index.mjs +5 -0
- package/es/lazyload/vue-lazyload/lazy-image.mjs +0 -1
- package/es/lazyload/vue-lazyload/lazy.mjs +81 -0
- package/es/lazyload/vue-lazyload/listener.mjs +45 -0
- package/es/list/List.mjs +3 -2
- package/es/locale/lang/km-KH.d.ts +62 -0
- package/es/locale/lang/km-KH.mjs +64 -0
- package/es/number-keyboard/NumberKeyboard.mjs +1 -1
- package/es/password-input/PasswordInput.mjs +1 -1
- package/es/picker/Picker.mjs +1 -0
- package/es/popup/shared.mjs +12 -0
- package/es/progress/Progress.mjs +1 -1
- package/es/search/Search.mjs +4 -4
- package/es/slider/Slider.d.ts +1 -1
- package/es/slider/index.d.ts +1 -1
- package/es/stepper/Stepper.mjs +2 -2
- package/es/sticky/Sticky.mjs +2 -0
- package/es/swipe/Swipe.mjs +3 -2
- package/es/tabs/Tabs.mjs +1 -1
- package/es/tag/Tag.d.ts +1 -1
- package/es/tag/index.d.ts +1 -1
- package/es/text-ellipsis/index.css +1 -1
- package/es/tree-select/TreeSelect.mjs +1 -1
- package/es/uploader/Uploader.mjs +1 -1
- package/es/uploader/utils.mjs +2 -2
- package/lib/action-bar/index.js +4 -0
- package/lib/action-bar-button/index.js +4 -0
- package/lib/action-bar-icon/index.js +4 -0
- package/lib/action-sheet/index.js +4 -0
- package/lib/address-edit/AddressEdit.js +4 -0
- package/lib/address-edit/index.js +4 -0
- package/lib/address-list/AddressList.js +4 -0
- package/lib/address-list/index.js +4 -0
- package/lib/area/index.js +4 -0
- package/lib/area/utils.js +2 -2
- package/lib/back-top/BackTop.js +1 -1
- package/lib/back-top/index.js +4 -0
- package/lib/badge/Badge.js +1 -1
- package/lib/badge/index.js +4 -0
- package/lib/button/Button.d.ts +1 -1
- package/lib/button/index.d.ts +1 -1
- package/lib/button/index.js +4 -0
- package/lib/calendar/Calendar.js +6 -2
- package/lib/calendar/CalendarMonth.js +4 -0
- package/lib/calendar/index.js +4 -0
- package/lib/calendar/utils.js +1 -1
- package/lib/card/index.js +4 -0
- package/lib/cascader/index.js +4 -0
- package/lib/cell/index.js +4 -0
- package/lib/cell-group/index.js +4 -0
- package/lib/checkbox/Checkbox.js +5 -1
- package/lib/checkbox/index.js +4 -0
- package/lib/checkbox-group/index.js +4 -0
- package/lib/circle/index.js +4 -0
- package/lib/col/index.js +4 -0
- package/lib/collapse/index.js +4 -0
- package/lib/collapse-item/index.js +4 -0
- package/lib/config-provider/index.js +4 -0
- package/lib/contact-card/index.js +4 -0
- package/lib/contact-edit/index.js +4 -0
- package/lib/contact-list/index.js +4 -0
- package/lib/count-down/index.js +4 -0
- package/lib/coupon/index.js +4 -0
- package/lib/coupon-cell/index.js +4 -0
- package/lib/coupon-list/index.js +4 -0
- package/lib/date-picker/DatePicker.js +1 -1
- package/lib/date-picker/index.js +4 -0
- package/lib/dialog/function-call.js +4 -0
- package/lib/dialog/index.js +4 -0
- package/lib/divider/Divider.d.ts +1 -1
- package/lib/divider/index.d.ts +1 -1
- package/lib/divider/index.js +4 -0
- package/lib/dropdown-item/index.js +4 -0
- package/lib/dropdown-menu/index.js +4 -0
- package/lib/empty/index.js +4 -0
- package/lib/field/Field.js +13 -7
- package/lib/field/index.css +1 -1
- package/lib/field/index.d.ts +1 -1
- package/lib/field/index.js +4 -0
- package/lib/field/types.d.ts +2 -2
- package/lib/form/index.js +4 -0
- package/lib/grid/index.js +4 -0
- package/lib/grid-item/GridItem.js +1 -1
- package/lib/grid-item/index.js +4 -0
- package/lib/icon/index.js +4 -0
- package/lib/image/index.js +4 -0
- package/lib/image-preview/ImagePreview.js +4 -0
- package/lib/image-preview/ImagePreviewItem.js +4 -3
- package/lib/image-preview/function-call.js +4 -0
- package/lib/image-preview/index.js +4 -0
- package/lib/index-anchor/index.js +4 -0
- package/lib/index-bar/index.js +4 -0
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/lazyload/vue-lazyload/index.js +9 -0
- package/lib/lazyload/vue-lazyload/lazy-image.js +0 -1
- package/lib/lazyload/vue-lazyload/lazy.js +85 -0
- package/lib/lazyload/vue-lazyload/listener.js +45 -0
- package/lib/list/List.js +3 -2
- package/lib/list/index.js +4 -0
- package/lib/loading/index.js +4 -0
- package/lib/locale/index.js +4 -0
- package/lib/locale/lang/km-KH.d.ts +62 -0
- package/lib/locale/lang/km-KH.js +83 -0
- package/lib/nav-bar/index.js +4 -0
- package/lib/notice-bar/index.js +4 -0
- package/lib/notify/function-call.js +4 -0
- package/lib/notify/index.js +4 -0
- package/lib/number-keyboard/NumberKeyboard.js +5 -1
- package/lib/number-keyboard/index.js +4 -0
- package/lib/overlay/index.js +4 -0
- package/lib/pagination/index.js +4 -0
- package/lib/password-input/PasswordInput.js +1 -1
- package/lib/password-input/index.js +4 -0
- package/lib/picker/Picker.js +5 -0
- package/lib/picker/index.js +4 -0
- package/lib/picker-group/PickerGroup.js +4 -0
- package/lib/picker-group/index.js +4 -0
- package/lib/popover/index.js +4 -0
- package/lib/popup/index.js +4 -0
- package/lib/popup/shared.js +12 -0
- package/lib/progress/Progress.js +1 -1
- package/lib/progress/index.js +4 -0
- package/lib/pull-refresh/index.js +4 -0
- package/lib/radio/Radio.js +4 -0
- package/lib/radio/index.js +4 -0
- package/lib/radio-group/index.js +4 -0
- package/lib/rate/index.js +4 -0
- package/lib/row/index.js +4 -0
- package/lib/search/Search.js +4 -4
- package/lib/search/index.js +4 -0
- package/lib/share-sheet/index.js +4 -0
- package/lib/sidebar/index.js +4 -0
- package/lib/sidebar-item/index.js +4 -0
- package/lib/skeleton/Skeleton.js +4 -0
- package/lib/skeleton/index.js +4 -0
- package/lib/skeleton-avatar/index.js +4 -0
- package/lib/skeleton-image/index.js +4 -0
- package/lib/skeleton-paragraph/index.js +4 -0
- package/lib/skeleton-title/index.js +4 -0
- package/lib/slider/Slider.d.ts +1 -1
- package/lib/slider/index.d.ts +1 -1
- package/lib/slider/index.js +4 -0
- package/lib/space/index.js +4 -0
- package/lib/step/index.js +4 -0
- package/lib/stepper/Stepper.js +2 -2
- package/lib/stepper/index.js +4 -0
- package/lib/steps/index.js +4 -0
- package/lib/sticky/Sticky.js +2 -0
- package/lib/sticky/index.js +4 -0
- package/lib/submit-bar/index.js +4 -0
- package/lib/swipe/Swipe.js +3 -2
- package/lib/swipe/index.js +4 -0
- package/lib/swipe-cell/index.js +4 -0
- package/lib/swipe-item/index.js +4 -0
- package/lib/switch/index.js +4 -0
- package/lib/tab/index.js +4 -0
- package/lib/tabbar/index.js +4 -0
- package/lib/tabbar-item/index.js +4 -0
- package/lib/tabs/Tabs.js +5 -1
- package/lib/tabs/index.js +4 -0
- package/lib/tag/Tag.d.ts +1 -1
- package/lib/tag/index.d.ts +1 -1
- package/lib/tag/index.js +4 -0
- package/lib/text-ellipsis/index.css +1 -1
- package/lib/text-ellipsis/index.js +4 -0
- package/lib/time-picker/index.js +4 -0
- package/lib/toast/function-call.js +4 -0
- package/lib/toast/index.js +4 -0
- package/lib/tree-select/TreeSelect.js +1 -1
- package/lib/tree-select/index.js +4 -0
- package/lib/uploader/Uploader.js +5 -1
- package/lib/uploader/index.js +4 -0
- package/lib/uploader/utils.js +2 -2
- package/lib/utils/create.js +4 -0
- package/lib/vant.cjs.js +194 -40
- package/lib/vant.es.js +194 -40
- package/lib/vant.js +231 -47
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +11 -5
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
@@ -212,7 +212,7 @@ __reExport(stdin_exports, require("./time-picker"), module.exports);
|
|
212
212
|
__reExport(stdin_exports, require("./toast"), module.exports);
|
213
213
|
__reExport(stdin_exports, require("./tree-select"), module.exports);
|
214
214
|
__reExport(stdin_exports, require("./uploader"), module.exports);
|
215
|
-
const version = "4.1.
|
215
|
+
const version = "4.1.2";
|
216
216
|
function install(app) {
|
217
217
|
const components = [
|
218
218
|
import_action_bar.ActionBar,
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -31,6 +35,11 @@ var import_lazy_component = __toESM(require("./lazy-component"));
|
|
31
35
|
var import_lazy_container = __toESM(require("./lazy-container"));
|
32
36
|
var import_lazy_image = __toESM(require("./lazy-image"));
|
33
37
|
const Lazyload = {
|
38
|
+
/*
|
39
|
+
* install function
|
40
|
+
* @param {App} app
|
41
|
+
* @param {object} options lazyload options
|
42
|
+
*/
|
34
43
|
install(app, options = {}) {
|
35
44
|
const LazyClass = (0, import_lazy.default)();
|
36
45
|
const lazy = new LazyClass(options);
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -92,12 +96,26 @@ function stdin_default() {
|
|
92
96
|
);
|
93
97
|
this.setMode(this.options.observer ? import_util.modeType.observer : import_util.modeType.event);
|
94
98
|
}
|
99
|
+
/**
|
100
|
+
* update config
|
101
|
+
* @param {Object} config params
|
102
|
+
* @return
|
103
|
+
*/
|
95
104
|
config(options = {}) {
|
96
105
|
Object.assign(this.options, options);
|
97
106
|
}
|
107
|
+
/**
|
108
|
+
* output listener's load performance
|
109
|
+
* @return {Array}
|
110
|
+
*/
|
98
111
|
performance() {
|
99
112
|
return this.listeners.map((item) => item.performance());
|
100
113
|
}
|
114
|
+
/*
|
115
|
+
* add lazy component to queue
|
116
|
+
* @param {Vue} vm lazy component instance
|
117
|
+
* @return
|
118
|
+
*/
|
101
119
|
addLazyBox(vm) {
|
102
120
|
this.listeners.push(vm);
|
103
121
|
if (import_use.inBrowser) {
|
@@ -108,6 +126,13 @@ function stdin_default() {
|
|
108
126
|
}
|
109
127
|
}
|
110
128
|
}
|
129
|
+
/*
|
130
|
+
* add image listener to queue
|
131
|
+
* @param {DOM} el
|
132
|
+
* @param {object} binding vue directive binding
|
133
|
+
* @param {vnode} vnode vue directive vnode
|
134
|
+
* @return
|
135
|
+
*/
|
111
136
|
add(el, binding, vnode) {
|
112
137
|
if (this.listeners.some((item) => item.el === el)) {
|
113
138
|
this.update(el, binding);
|
@@ -148,6 +173,12 @@ function stdin_default() {
|
|
148
173
|
(0, import_vue.nextTick)(() => this.lazyLoadHandler());
|
149
174
|
});
|
150
175
|
}
|
176
|
+
/**
|
177
|
+
* update image src
|
178
|
+
* @param {DOM} el
|
179
|
+
* @param {object} vue directive binding
|
180
|
+
* @return
|
181
|
+
*/
|
151
182
|
update(el, binding, vnode) {
|
152
183
|
const value = this.valueFormatter(binding.value);
|
153
184
|
let { src } = value;
|
@@ -169,6 +200,11 @@ function stdin_default() {
|
|
169
200
|
this.lazyLoadHandler();
|
170
201
|
(0, import_vue.nextTick)(() => this.lazyLoadHandler());
|
171
202
|
}
|
203
|
+
/**
|
204
|
+
* remove listener form list
|
205
|
+
* @param {DOM} el
|
206
|
+
* @return
|
207
|
+
*/
|
172
208
|
remove(el) {
|
173
209
|
if (!el)
|
174
210
|
return;
|
@@ -181,6 +217,11 @@ function stdin_default() {
|
|
181
217
|
existItem.$destroy();
|
182
218
|
}
|
183
219
|
}
|
220
|
+
/*
|
221
|
+
* remove lazy components form list
|
222
|
+
* @param {Vue} vm Vue instance
|
223
|
+
* @return
|
224
|
+
*/
|
184
225
|
removeComponent(vm) {
|
185
226
|
if (!vm)
|
186
227
|
return;
|
@@ -213,6 +254,14 @@ function stdin_default() {
|
|
213
254
|
this.initIntersectionObserver();
|
214
255
|
}
|
215
256
|
}
|
257
|
+
/*
|
258
|
+
*** Private functions ***
|
259
|
+
*/
|
260
|
+
/*
|
261
|
+
* add listener target
|
262
|
+
* @param {DOM} el listener target
|
263
|
+
* @return
|
264
|
+
*/
|
216
265
|
addListenerTarget(el) {
|
217
266
|
if (!el)
|
218
267
|
return;
|
@@ -231,6 +280,11 @@ function stdin_default() {
|
|
231
280
|
}
|
232
281
|
return this.targetIndex;
|
233
282
|
}
|
283
|
+
/*
|
284
|
+
* remove listener target or reduce target childrenCount
|
285
|
+
* @param {DOM} el or window
|
286
|
+
* @return
|
287
|
+
*/
|
234
288
|
removeListenerTarget(el) {
|
235
289
|
this.targets.forEach((target, index) => {
|
236
290
|
if (target.el === el) {
|
@@ -243,6 +297,12 @@ function stdin_default() {
|
|
243
297
|
}
|
244
298
|
});
|
245
299
|
}
|
300
|
+
/*
|
301
|
+
* add or remove eventlistener
|
302
|
+
* @param {DOM} el DOM or Window
|
303
|
+
* @param {boolean} start flag
|
304
|
+
* @return
|
305
|
+
*/
|
246
306
|
initListen(el, start) {
|
247
307
|
this.options.ListenEvents.forEach(
|
248
308
|
(evt) => (start ? import_util.on : import_util.off)(el, evt, this.lazyLoadHandler)
|
@@ -283,6 +343,10 @@ function stdin_default() {
|
|
283
343
|
this.Event.listeners[event].forEach((func) => func(context, inCache));
|
284
344
|
};
|
285
345
|
}
|
346
|
+
/**
|
347
|
+
* find nodes which in viewport and trigger load
|
348
|
+
* @return
|
349
|
+
*/
|
286
350
|
lazyLoadHandler() {
|
287
351
|
const freeList = [];
|
288
352
|
this.listeners.forEach((listener) => {
|
@@ -299,6 +363,11 @@ function stdin_default() {
|
|
299
363
|
item.$destroy();
|
300
364
|
});
|
301
365
|
}
|
366
|
+
/**
|
367
|
+
* init IntersectionObserver
|
368
|
+
* set mode to observer
|
369
|
+
* @return
|
370
|
+
*/
|
302
371
|
initIntersectionObserver() {
|
303
372
|
if (!import_util.hasIntersectionObserver) {
|
304
373
|
return;
|
@@ -313,6 +382,10 @@ function stdin_default() {
|
|
313
382
|
});
|
314
383
|
}
|
315
384
|
}
|
385
|
+
/**
|
386
|
+
* init IntersectionObserver
|
387
|
+
* @return
|
388
|
+
*/
|
316
389
|
observerHandler(entries) {
|
317
390
|
entries.forEach((entry) => {
|
318
391
|
if (entry.isIntersecting) {
|
@@ -326,6 +399,13 @@ function stdin_default() {
|
|
326
399
|
}
|
327
400
|
});
|
328
401
|
}
|
402
|
+
/**
|
403
|
+
* set element attribute with image'url and state
|
404
|
+
* @param {object} lazyload listener object
|
405
|
+
* @param {string} state will be rendered
|
406
|
+
* @param {bool} inCache is rendered from cache
|
407
|
+
* @return
|
408
|
+
*/
|
329
409
|
elRenderer(listener, state, cache) {
|
330
410
|
if (!listener.el)
|
331
411
|
return;
|
@@ -357,6 +437,11 @@ function stdin_default() {
|
|
357
437
|
el.dispatchEvent(event);
|
358
438
|
}
|
359
439
|
}
|
440
|
+
/**
|
441
|
+
* generate loading loaded error image url
|
442
|
+
* @param {string} image's src
|
443
|
+
* @return {object} image's loading, loaded, error url
|
444
|
+
*/
|
360
445
|
valueFormatter(value) {
|
361
446
|
let src = value;
|
362
447
|
let { loading, error } = this.options;
|
@@ -57,6 +57,10 @@ class ReactiveListener {
|
|
57
57
|
this.initState();
|
58
58
|
this.render("loading", false);
|
59
59
|
}
|
60
|
+
/*
|
61
|
+
* init listener state
|
62
|
+
* @return
|
63
|
+
*/
|
60
64
|
initState() {
|
61
65
|
if ("dataset" in this.el) {
|
62
66
|
this.el.dataset.src = this.src;
|
@@ -70,9 +74,20 @@ class ReactiveListener {
|
|
70
74
|
rendered: false
|
71
75
|
};
|
72
76
|
}
|
77
|
+
/*
|
78
|
+
* record performance
|
79
|
+
* @return
|
80
|
+
*/
|
73
81
|
record(event) {
|
74
82
|
this.performanceData[event] = Date.now();
|
75
83
|
}
|
84
|
+
/*
|
85
|
+
* update image listener data
|
86
|
+
* @param {String} image uri
|
87
|
+
* @param {String} loading image uri
|
88
|
+
* @param {String} error image uri
|
89
|
+
* @return
|
90
|
+
*/
|
76
91
|
update({ src, loading, error }) {
|
77
92
|
const oldSrc = this.src;
|
78
93
|
this.src = src;
|
@@ -84,15 +99,27 @@ class ReactiveListener {
|
|
84
99
|
this.initState();
|
85
100
|
}
|
86
101
|
}
|
102
|
+
/*
|
103
|
+
* check el is in view
|
104
|
+
* @return {Boolean} el is in view
|
105
|
+
*/
|
87
106
|
checkInView() {
|
88
107
|
const rect = (0, import_use.useRect)(this.el);
|
89
108
|
return rect.top < window.innerHeight * this.options.preLoad && rect.bottom > this.options.preLoadTop && rect.left < window.innerWidth * this.options.preLoad && rect.right > 0;
|
90
109
|
}
|
110
|
+
/*
|
111
|
+
* listener filter
|
112
|
+
*/
|
91
113
|
filter() {
|
92
114
|
Object.keys(this.options.filter).forEach((key) => {
|
93
115
|
this.options.filter[key](this, this.options);
|
94
116
|
});
|
95
117
|
}
|
118
|
+
/*
|
119
|
+
* render loading first
|
120
|
+
* @params cb:Function
|
121
|
+
* @return
|
122
|
+
*/
|
96
123
|
renderLoading(cb) {
|
97
124
|
this.state.loading = true;
|
98
125
|
(0, import_util.loadImageAsync)(
|
@@ -115,6 +142,10 @@ class ReactiveListener {
|
|
115
142
|
}
|
116
143
|
);
|
117
144
|
}
|
145
|
+
/*
|
146
|
+
* try load image and render it
|
147
|
+
* @return
|
148
|
+
*/
|
118
149
|
load(onFinish = import_utils.noop) {
|
119
150
|
if (this.attempt > this.options.attempt - 1 && this.state.error) {
|
120
151
|
if (process.env.NODE_ENV !== "production" && !this.options.silent) {
|
@@ -163,9 +194,19 @@ class ReactiveListener {
|
|
163
194
|
);
|
164
195
|
});
|
165
196
|
}
|
197
|
+
/*
|
198
|
+
* render image
|
199
|
+
* @param {String} state to render // ['loading', 'src', 'error']
|
200
|
+
* @param {String} is form cache
|
201
|
+
* @return
|
202
|
+
*/
|
166
203
|
render(state, cache) {
|
167
204
|
this.elRenderer(this, state, cache);
|
168
205
|
}
|
206
|
+
/*
|
207
|
+
* output performance data
|
208
|
+
* @return {Object} performance data
|
209
|
+
*/
|
169
210
|
performance() {
|
170
211
|
let state = "loading";
|
171
212
|
let time = 0;
|
@@ -181,6 +222,10 @@ class ReactiveListener {
|
|
181
222
|
time
|
182
223
|
};
|
183
224
|
}
|
225
|
+
/*
|
226
|
+
* $destroy
|
227
|
+
* @return
|
228
|
+
*/
|
184
229
|
$destroy() {
|
185
230
|
this.el = null;
|
186
231
|
this.src = null;
|
package/lib/list/List.js
CHANGED
@@ -56,13 +56,14 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
56
56
|
const scrollParent = (0, import_use.useScrollParent)(root);
|
57
57
|
const check = () => {
|
58
58
|
(0, import_vue2.nextTick)(() => {
|
59
|
-
if (loading.value || props.finished || props.disabled || props.error ||
|
59
|
+
if (loading.value || props.finished || props.disabled || props.error || // skip check when inside an inactive tab
|
60
|
+
(tabStatus == null ? void 0 : tabStatus.value) === false) {
|
60
61
|
return;
|
61
62
|
}
|
62
63
|
const {
|
63
|
-
offset,
|
64
64
|
direction
|
65
65
|
} = props;
|
66
|
+
const offset = +props.offset;
|
66
67
|
const scrollParentRect = (0, import_use.useRect)(scrollParent);
|
67
68
|
if (!scrollParentRect.height || (0, import_utils.isHidden)(root)) {
|
68
69
|
return;
|
package/lib/list/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/loading/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/locale/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -0,0 +1,62 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
name: string;
|
3
|
+
tel: string;
|
4
|
+
save: string;
|
5
|
+
confirm: string;
|
6
|
+
cancel: string;
|
7
|
+
delete: string;
|
8
|
+
loading: string;
|
9
|
+
noCoupon: string;
|
10
|
+
nameEmpty: string;
|
11
|
+
addContact: string;
|
12
|
+
telInvalid: string;
|
13
|
+
vanCalendar: {
|
14
|
+
end: string;
|
15
|
+
start: string;
|
16
|
+
title: string;
|
17
|
+
weekdays: string[];
|
18
|
+
monthTitle: (year: number, month: number) => string;
|
19
|
+
rangePrompt: (maxRange: number) => string;
|
20
|
+
};
|
21
|
+
vanCascader: {
|
22
|
+
select: string;
|
23
|
+
};
|
24
|
+
vanPagination: {
|
25
|
+
prev: string;
|
26
|
+
next: string;
|
27
|
+
};
|
28
|
+
vanPullRefresh: {
|
29
|
+
pulling: string;
|
30
|
+
loosing: string;
|
31
|
+
};
|
32
|
+
vanSubmitBar: {
|
33
|
+
label: string;
|
34
|
+
};
|
35
|
+
vanCoupon: {
|
36
|
+
unlimited: string;
|
37
|
+
discount: (discount: number) => string;
|
38
|
+
condition: (condition: number) => string;
|
39
|
+
};
|
40
|
+
vanCouponCell: {
|
41
|
+
title: string;
|
42
|
+
count: (count: number) => string;
|
43
|
+
};
|
44
|
+
vanCouponList: {
|
45
|
+
exchange: string;
|
46
|
+
close: string;
|
47
|
+
enable: string;
|
48
|
+
disabled: string;
|
49
|
+
placeholder: string;
|
50
|
+
};
|
51
|
+
vanAddressEdit: {
|
52
|
+
area: string;
|
53
|
+
areaEmpty: string;
|
54
|
+
addressEmpty: string;
|
55
|
+
addressDetail: string;
|
56
|
+
defaultAddress: string;
|
57
|
+
};
|
58
|
+
vanAddressList: {
|
59
|
+
add: string;
|
60
|
+
};
|
61
|
+
};
|
62
|
+
export default _default;
|
@@ -0,0 +1,83 @@
|
|
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: "\u1788\u17D2\u1798\u17C4\u17C7",
|
25
|
+
tel: "\u1791\u17BC\u179A\u179F\u17D0\u1796\u17D2\u1791",
|
26
|
+
save: "\u179A\u1780\u17D2\u179F\u17B6\u1791\u17BB\u1780",
|
27
|
+
confirm: "\u1799\u179B\u17CB\u1796\u17D2\u179A\u1798",
|
28
|
+
cancel: "\u1794\u17C4\u17C7\u1794\u1784\u17CB",
|
29
|
+
delete: "\u179B\u17BB\u1794",
|
30
|
+
loading: "\u1780\u17C6\u1796\u17BB\u1784\u200B\u1795\u17D2\u1791\u17BB\u1780...",
|
31
|
+
noCoupon: "\u1782\u17D2\u1798\u17B6\u1793\u1782\u17BC\u1794\u17C9\u17BB\u1784",
|
32
|
+
nameEmpty: "\u179F\u17BC\u1798\u1794\u17C6\u1796\u17C1\u1789\u1788\u17D2\u1798\u17C4\u17C7",
|
33
|
+
addContact: "\u1794\u1793\u17D2\u1790\u17C2\u1798\u1791\u17C6\u1793\u17B6\u1780\u17CB\u1791\u17C6\u1793\u1784",
|
34
|
+
telInvalid: "\u179B\u17C1\u1781\u1791\u17BC\u179A\u179F\u17D0\u1796\u17D2\u1791\u1798\u17B7\u1793\u178F\u17D2\u179A\u17BC\u179C\u1791\u1798\u17D2\u179A\u1784\u17CB",
|
35
|
+
vanCalendar: {
|
36
|
+
end: "\u1794\u1789\u17D2\u1785\u1794\u17CB",
|
37
|
+
start: "\u1785\u17B6\u1794\u17CB\u1796\u17B8",
|
38
|
+
title: "\u1794\u17D2\u179A\u178F\u17B7\u1791\u17B7\u1793",
|
39
|
+
weekdays: ["\u17A2\u17B6", "\u1785", "\u17A2", "\u1796", "\u1796\u17D2\u179A", "\u179F\u17BB", "\u179F\u17C5"],
|
40
|
+
monthTitle: (year, month) => `${year}/${month}`,
|
41
|
+
rangePrompt: (maxRange) => `\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F\u1798\u17B7\u1793\u179B\u17BE\u179F\u1796\u17B8 ${maxRange} \u1790\u17D2\u1784\u17C3`
|
42
|
+
},
|
43
|
+
vanCascader: {
|
44
|
+
select: "\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F"
|
45
|
+
},
|
46
|
+
vanPagination: {
|
47
|
+
prev: "\u1798\u17BB\u1793",
|
48
|
+
next: "\u1794\u1793\u17D2\u1791\u17B6\u1794\u17CB"
|
49
|
+
},
|
50
|
+
vanPullRefresh: {
|
51
|
+
pulling: "\u1791\u17B6\u1789\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u17A1\u17BE\u1784\u179C\u17B7\u1789...",
|
52
|
+
loosing: "\u1796\u17D2\u179A\u179B\u17C2\u1784\u178A\u17BE\u1798\u17D2\u1794\u17B8\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u17A1\u17BE\u1784\u179C\u17B7\u1789..."
|
53
|
+
},
|
54
|
+
vanSubmitBar: {
|
55
|
+
label: "\u179F\u179A\u17BB\u1794:"
|
56
|
+
},
|
57
|
+
vanCoupon: {
|
58
|
+
unlimited: "\u1782\u17D2\u1798\u17B6\u1793\u178A\u17C2\u1793\u1780\u17C6\u178E\u178F\u17CB",
|
59
|
+
discount: (discount) => `\u1794\u1789\u17D2\u1785\u17BB\u17C7\u178F\u1798\u17D2\u179B\u17C3 ${discount * 10}%`,
|
60
|
+
condition: (condition) => `\u1799\u17C9\u17B6\u1784\u178F\u17B7\u1785 ${condition}`
|
61
|
+
},
|
62
|
+
vanCouponCell: {
|
63
|
+
title: "\u1782\u17BC\u1794\u17C9\u17BB\u1784",
|
64
|
+
count: (count) => `\u17A2\u17D2\u1793\u1780\u1798\u17B6\u1793 ${count}\u1782\u17BC\u1794\u17C9\u17BB\u1784`
|
65
|
+
},
|
66
|
+
vanCouponList: {
|
67
|
+
exchange: "\u1794\u17D2\u178A\u17BC\u179A",
|
68
|
+
close: "\u1794\u17B7\u1791",
|
69
|
+
enable: "\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",
|
70
|
+
disabled: "\u1798\u17B7\u1793\u17A2\u17B6\u1785\u1794\u17D2\u179A\u17BE\u1794\u17B6\u1793",
|
71
|
+
placeholder: "\u179B\u17C1\u1781\u1780\u17BC\u178A\u1782\u17BC\u1794\u17C9\u17BB\u1784"
|
72
|
+
},
|
73
|
+
vanAddressEdit: {
|
74
|
+
area: "\u1791\u17B8\u178F\u17B6\u17C6\u1784",
|
75
|
+
areaEmpty: "\u179F\u17BC\u1798\u1787\u17D2\u179A\u17BE\u179F\u179A\u17BE\u179F\u1791\u17B8\u178F\u17B6\u17C6\u1784\u1791\u1791\u17BD\u179B",
|
76
|
+
addressEmpty: "\u178F\u1798\u17D2\u179A\u17BC\u179C\u17A2\u17C4\u1799\u1798\u17B6\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793",
|
77
|
+
addressDetail: "\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793",
|
78
|
+
defaultAddress: "\u178A\u17B6\u1780\u17CB\u1787\u17B6\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u178A\u17BE\u1798"
|
79
|
+
},
|
80
|
+
vanAddressList: {
|
81
|
+
add: "\u1794\u1793\u17D2\u1790\u17C2\u1798\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u1790\u17D2\u1798\u17B8"
|
82
|
+
}
|
83
|
+
};
|
package/lib/nav-bar/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/notice-bar/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/notify/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -146,7 +150,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
146
150
|
emit("update:modelValue", value.slice(0, value.length - 1));
|
147
151
|
} else if (type === "close") {
|
148
152
|
onClose();
|
149
|
-
} else if (value.length < props.maxlength) {
|
153
|
+
} else if (value.length < +props.maxlength) {
|
150
154
|
emit("input", text);
|
151
155
|
emit("update:modelValue", value + text);
|
152
156
|
}
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/overlay/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
package/lib/pagination/index.js
CHANGED
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|
@@ -50,10 +50,10 @@ var stdin_default = (0, import_vue2.defineComponent)({
|
|
50
50
|
const {
|
51
51
|
mask,
|
52
52
|
value,
|
53
|
-
length,
|
54
53
|
gutter,
|
55
54
|
focused
|
56
55
|
} = props;
|
56
|
+
const length = +props.length;
|
57
57
|
for (let i = 0; i < length; i++) {
|
58
58
|
const char = value[i];
|
59
59
|
const showBorder = i !== 0 && !gutter;
|
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
17
17
|
return to;
|
18
18
|
};
|
19
19
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
20
24
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
25
|
mod
|
22
26
|
));
|