vant 2.12.38 → 2.12.39
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/datetime-picker/utils.js +4 -0
- package/es/image-preview/ImagePreviewItem.js +8 -3
- package/es/index.js +1 -1
- package/es/nav-bar/index.js +9 -1
- package/es/tabbar/index.js +14 -6
- package/lib/datetime-picker/utils.js +4 -0
- package/lib/image-preview/ImagePreviewItem.js +8 -3
- package/lib/index.js +1 -1
- package/lib/nav-bar/index.js +9 -1
- package/lib/tabbar/index.js +14 -6
- package/lib/vant.js +36 -11
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +120 -120
- package/vetur/tags.json +42 -42
- package/vetur/web-types.json +430 -430
@@ -114,10 +114,11 @@ export default {
|
|
114
114
|
offsetX = _this$offsetX === void 0 ? 0 : _this$offsetX;
|
115
115
|
this.touchStart(event);
|
116
116
|
this.touchStartTime = new Date();
|
117
|
+
this.fingerNum = touches.length;
|
117
118
|
this.startMoveX = this.moveX;
|
118
119
|
this.startMoveY = this.moveY;
|
119
|
-
this.moving =
|
120
|
-
this.zooming =
|
120
|
+
this.moving = this.fingerNum === 1 && this.scale !== 1;
|
121
|
+
this.zooming = this.fingerNum === 2 && !offsetX;
|
121
122
|
|
122
123
|
if (this.zooming) {
|
123
124
|
this.startScale = this.scale;
|
@@ -182,13 +183,17 @@ export default {
|
|
182
183
|
checkTap: function checkTap() {
|
183
184
|
var _this = this;
|
184
185
|
|
186
|
+
if (this.fingerNum > 1) {
|
187
|
+
return;
|
188
|
+
}
|
189
|
+
|
185
190
|
var _this$offsetX2 = this.offsetX,
|
186
191
|
offsetX = _this$offsetX2 === void 0 ? 0 : _this$offsetX2,
|
187
192
|
_this$offsetY = this.offsetY,
|
188
193
|
offsetY = _this$offsetY === void 0 ? 0 : _this$offsetY;
|
189
194
|
var deltaTime = new Date() - this.touchStartTime;
|
190
195
|
var TAP_TIME = 250;
|
191
|
-
var TAP_OFFSET =
|
196
|
+
var TAP_OFFSET = 5;
|
192
197
|
|
193
198
|
if (offsetX < TAP_OFFSET && offsetY < TAP_OFFSET && deltaTime < TAP_TIME) {
|
194
199
|
if (this.doubleTapTimer) {
|
package/es/index.js
CHANGED
@@ -87,7 +87,7 @@ import Tag from './tag';
|
|
87
87
|
import Toast from './toast';
|
88
88
|
import TreeSelect from './tree-select';
|
89
89
|
import Uploader from './uploader';
|
90
|
-
var version = '2.12.
|
90
|
+
var version = '2.12.39';
|
91
91
|
|
92
92
|
function install(Vue) {
|
93
93
|
var components = [ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, GoodsAction, GoodsActionButton, GoodsActionIcon, Grid, GridItem, Icon, Image, ImagePreview, IndexAnchor, IndexBar, Info, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, Panel, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Sku, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, SwitchCell, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
|
package/es/nav-bar/index.js
CHANGED
@@ -29,8 +29,16 @@ export default createComponent({
|
|
29
29
|
};
|
30
30
|
},
|
31
31
|
mounted: function mounted() {
|
32
|
+
var _this = this;
|
33
|
+
|
32
34
|
if (this.placeholder && this.fixed) {
|
33
|
-
|
35
|
+
var setHeight = function setHeight() {
|
36
|
+
_this.height = _this.$refs.navBar.getBoundingClientRect().height;
|
37
|
+
};
|
38
|
+
|
39
|
+
setHeight(); // https://github.com/youzan/vant/issues/10131
|
40
|
+
|
41
|
+
setTimeout(setHeight, 100);
|
34
42
|
}
|
35
43
|
},
|
36
44
|
methods: {
|
package/es/tabbar/index.js
CHANGED
@@ -53,28 +53,36 @@ export default createComponent({
|
|
53
53
|
children: 'setActiveItem'
|
54
54
|
},
|
55
55
|
mounted: function mounted() {
|
56
|
+
var _this = this;
|
57
|
+
|
56
58
|
if (this.placeholder && this.fixed) {
|
57
|
-
|
59
|
+
var setHeight = function setHeight() {
|
60
|
+
_this.height = _this.$refs.tabbar.getBoundingClientRect().height;
|
61
|
+
};
|
62
|
+
|
63
|
+
setHeight(); // https://github.com/youzan/vant/issues/10131
|
64
|
+
|
65
|
+
setTimeout(setHeight, 100);
|
58
66
|
}
|
59
67
|
},
|
60
68
|
methods: {
|
61
69
|
setActiveItem: function setActiveItem() {
|
62
|
-
var
|
70
|
+
var _this2 = this;
|
63
71
|
|
64
72
|
this.children.forEach(function (item, index) {
|
65
|
-
item.nameMatched = (item.name || index) ===
|
73
|
+
item.nameMatched = (item.name || index) === _this2.value;
|
66
74
|
});
|
67
75
|
},
|
68
76
|
triggerChange: function triggerChange(active, afterChange) {
|
69
|
-
var
|
77
|
+
var _this3 = this;
|
70
78
|
|
71
79
|
callInterceptor({
|
72
80
|
interceptor: this.beforeChange,
|
73
81
|
args: [active],
|
74
82
|
done: function done() {
|
75
|
-
|
83
|
+
_this3.$emit('input', active);
|
76
84
|
|
77
|
-
|
85
|
+
_this3.$emit('change', active);
|
78
86
|
|
79
87
|
afterChange();
|
80
88
|
}
|
@@ -127,10 +127,11 @@ var _default = {
|
|
127
127
|
offsetX = _this$offsetX === void 0 ? 0 : _this$offsetX;
|
128
128
|
this.touchStart(event);
|
129
129
|
this.touchStartTime = new Date();
|
130
|
+
this.fingerNum = touches.length;
|
130
131
|
this.startMoveX = this.moveX;
|
131
132
|
this.startMoveY = this.moveY;
|
132
|
-
this.moving =
|
133
|
-
this.zooming =
|
133
|
+
this.moving = this.fingerNum === 1 && this.scale !== 1;
|
134
|
+
this.zooming = this.fingerNum === 2 && !offsetX;
|
134
135
|
|
135
136
|
if (this.zooming) {
|
136
137
|
this.startScale = this.scale;
|
@@ -195,13 +196,17 @@ var _default = {
|
|
195
196
|
checkTap: function checkTap() {
|
196
197
|
var _this = this;
|
197
198
|
|
199
|
+
if (this.fingerNum > 1) {
|
200
|
+
return;
|
201
|
+
}
|
202
|
+
|
198
203
|
var _this$offsetX2 = this.offsetX,
|
199
204
|
offsetX = _this$offsetX2 === void 0 ? 0 : _this$offsetX2,
|
200
205
|
_this$offsetY = this.offsetY,
|
201
206
|
offsetY = _this$offsetY === void 0 ? 0 : _this$offsetY;
|
202
207
|
var deltaTime = new Date() - this.touchStartTime;
|
203
208
|
var TAP_TIME = 250;
|
204
|
-
var TAP_OFFSET =
|
209
|
+
var TAP_OFFSET = 5;
|
205
210
|
|
206
211
|
if (offsetX < TAP_OFFSET && offsetY < TAP_OFFSET && deltaTime < TAP_TIME) {
|
207
212
|
if (this.doubleTapTimer) {
|
package/lib/index.js
CHANGED
@@ -361,7 +361,7 @@ exports.TreeSelect = _treeSelect.default;
|
|
361
361
|
var _uploader = _interopRequireDefault(require("./uploader"));
|
362
362
|
|
363
363
|
exports.Uploader = _uploader.default;
|
364
|
-
var version = '2.12.
|
364
|
+
var version = '2.12.39';
|
365
365
|
exports.version = version;
|
366
366
|
|
367
367
|
function install(Vue) {
|
package/lib/nav-bar/index.js
CHANGED
@@ -38,8 +38,16 @@ var _default = createComponent({
|
|
38
38
|
};
|
39
39
|
},
|
40
40
|
mounted: function mounted() {
|
41
|
+
var _this = this;
|
42
|
+
|
41
43
|
if (this.placeholder && this.fixed) {
|
42
|
-
|
44
|
+
var setHeight = function setHeight() {
|
45
|
+
_this.height = _this.$refs.navBar.getBoundingClientRect().height;
|
46
|
+
};
|
47
|
+
|
48
|
+
setHeight(); // https://github.com/youzan/vant/issues/10131
|
49
|
+
|
50
|
+
setTimeout(setHeight, 100);
|
43
51
|
}
|
44
52
|
},
|
45
53
|
methods: {
|
package/lib/tabbar/index.js
CHANGED
@@ -61,28 +61,36 @@ var _default = createComponent({
|
|
61
61
|
children: 'setActiveItem'
|
62
62
|
},
|
63
63
|
mounted: function mounted() {
|
64
|
+
var _this = this;
|
65
|
+
|
64
66
|
if (this.placeholder && this.fixed) {
|
65
|
-
|
67
|
+
var setHeight = function setHeight() {
|
68
|
+
_this.height = _this.$refs.tabbar.getBoundingClientRect().height;
|
69
|
+
};
|
70
|
+
|
71
|
+
setHeight(); // https://github.com/youzan/vant/issues/10131
|
72
|
+
|
73
|
+
setTimeout(setHeight, 100);
|
66
74
|
}
|
67
75
|
},
|
68
76
|
methods: {
|
69
77
|
setActiveItem: function setActiveItem() {
|
70
|
-
var
|
78
|
+
var _this2 = this;
|
71
79
|
|
72
80
|
this.children.forEach(function (item, index) {
|
73
|
-
item.nameMatched = (item.name || index) ===
|
81
|
+
item.nameMatched = (item.name || index) === _this2.value;
|
74
82
|
});
|
75
83
|
},
|
76
84
|
triggerChange: function triggerChange(active, afterChange) {
|
77
|
-
var
|
85
|
+
var _this3 = this;
|
78
86
|
|
79
87
|
(0, _interceptor.callInterceptor)({
|
80
88
|
interceptor: this.beforeChange,
|
81
89
|
args: [active],
|
82
90
|
done: function done() {
|
83
|
-
|
91
|
+
_this3.$emit('input', active);
|
84
92
|
|
85
|
-
|
93
|
+
_this3.$emit('change', active);
|
86
94
|
|
87
95
|
afterChange();
|
88
96
|
}
|
package/lib/vant.js
CHANGED
@@ -6561,6 +6561,10 @@ function copyDates(dates) {
|
|
6561
6561
|
// CONCATENATED MODULE: ./es/datetime-picker/utils.js
|
6562
6562
|
|
6563
6563
|
function times(n, iteratee) {
|
6564
|
+
if (n < 0) {
|
6565
|
+
return [];
|
6566
|
+
}
|
6567
|
+
|
6564
6568
|
var index = -1;
|
6565
6569
|
var result = Array(n);
|
6566
6570
|
|
@@ -13265,10 +13269,11 @@ function getDistance(touches) {
|
|
13265
13269
|
offsetX = _this$offsetX === void 0 ? 0 : _this$offsetX;
|
13266
13270
|
this.touchStart(event);
|
13267
13271
|
this.touchStartTime = new Date();
|
13272
|
+
this.fingerNum = touches.length;
|
13268
13273
|
this.startMoveX = this.moveX;
|
13269
13274
|
this.startMoveY = this.moveY;
|
13270
|
-
this.moving =
|
13271
|
-
this.zooming =
|
13275
|
+
this.moving = this.fingerNum === 1 && this.scale !== 1;
|
13276
|
+
this.zooming = this.fingerNum === 2 && !offsetX;
|
13272
13277
|
|
13273
13278
|
if (this.zooming) {
|
13274
13279
|
this.startScale = this.scale;
|
@@ -13333,13 +13338,17 @@ function getDistance(touches) {
|
|
13333
13338
|
checkTap: function checkTap() {
|
13334
13339
|
var _this = this;
|
13335
13340
|
|
13341
|
+
if (this.fingerNum > 1) {
|
13342
|
+
return;
|
13343
|
+
}
|
13344
|
+
|
13336
13345
|
var _this$offsetX2 = this.offsetX,
|
13337
13346
|
offsetX = _this$offsetX2 === void 0 ? 0 : _this$offsetX2,
|
13338
13347
|
_this$offsetY = this.offsetY,
|
13339
13348
|
offsetY = _this$offsetY === void 0 ? 0 : _this$offsetY;
|
13340
13349
|
var deltaTime = new Date() - this.touchStartTime;
|
13341
13350
|
var TAP_TIME = 250;
|
13342
|
-
var TAP_OFFSET =
|
13351
|
+
var TAP_OFFSET = 5;
|
13343
13352
|
|
13344
13353
|
if (offsetX < TAP_OFFSET && offsetY < TAP_OFFSET && deltaTime < TAP_TIME) {
|
13345
13354
|
if (this.doubleTapTimer) {
|
@@ -14244,8 +14253,16 @@ var nav_bar_createNamespace = Object(create["a" /* createNamespace */])('nav-bar
|
|
14244
14253
|
};
|
14245
14254
|
},
|
14246
14255
|
mounted: function mounted() {
|
14256
|
+
var _this = this;
|
14257
|
+
|
14247
14258
|
if (this.placeholder && this.fixed) {
|
14248
|
-
|
14259
|
+
var setHeight = function setHeight() {
|
14260
|
+
_this.height = _this.$refs.navBar.getBoundingClientRect().height;
|
14261
|
+
};
|
14262
|
+
|
14263
|
+
setHeight(); // https://github.com/youzan/vant/issues/10131
|
14264
|
+
|
14265
|
+
setTimeout(setHeight, 100);
|
14249
14266
|
}
|
14250
14267
|
},
|
14251
14268
|
methods: {
|
@@ -21785,28 +21802,36 @@ var tabbar_createNamespace = Object(create["a" /* createNamespace */])('tabbar')
|
|
21785
21802
|
children: 'setActiveItem'
|
21786
21803
|
},
|
21787
21804
|
mounted: function mounted() {
|
21805
|
+
var _this = this;
|
21806
|
+
|
21788
21807
|
if (this.placeholder && this.fixed) {
|
21789
|
-
|
21808
|
+
var setHeight = function setHeight() {
|
21809
|
+
_this.height = _this.$refs.tabbar.getBoundingClientRect().height;
|
21810
|
+
};
|
21811
|
+
|
21812
|
+
setHeight(); // https://github.com/youzan/vant/issues/10131
|
21813
|
+
|
21814
|
+
setTimeout(setHeight, 100);
|
21790
21815
|
}
|
21791
21816
|
},
|
21792
21817
|
methods: {
|
21793
21818
|
setActiveItem: function setActiveItem() {
|
21794
|
-
var
|
21819
|
+
var _this2 = this;
|
21795
21820
|
|
21796
21821
|
this.children.forEach(function (item, index) {
|
21797
|
-
item.nameMatched = (item.name || index) ===
|
21822
|
+
item.nameMatched = (item.name || index) === _this2.value;
|
21798
21823
|
});
|
21799
21824
|
},
|
21800
21825
|
triggerChange: function triggerChange(active, afterChange) {
|
21801
|
-
var
|
21826
|
+
var _this3 = this;
|
21802
21827
|
|
21803
21828
|
callInterceptor({
|
21804
21829
|
interceptor: this.beforeChange,
|
21805
21830
|
args: [active],
|
21806
21831
|
done: function done() {
|
21807
|
-
|
21832
|
+
_this3.$emit('input', active);
|
21808
21833
|
|
21809
|
-
|
21834
|
+
_this3.$emit('change', active);
|
21810
21835
|
|
21811
21836
|
afterChange();
|
21812
21837
|
}
|
@@ -22190,7 +22215,7 @@ TreeSelect.props = {
|
|
22190
22215
|
|
22191
22216
|
|
22192
22217
|
|
22193
|
-
var version = '2.12.
|
22218
|
+
var version = '2.12.39';
|
22194
22219
|
|
22195
22220
|
function install(Vue) {
|
22196
22221
|
var components = [action_sheet, address_edit, address_list, es_area, badge, es_button, calendar, card, cascader, cell, cell_group, es_checkbox, checkbox_group, circle, col, collapse, collapse_item, contact_card, contact_edit, contact_list, count_down, es_coupon, coupon_cell, coupon_list, datetime_picker, dialog, divider, dropdown_item, dropdown_menu, empty, es_field, es_form, goods_action, goods_action_button, goods_action_icon, grid, grid_item, es_icon, es_image, image_preview, index_anchor, index_bar, es_info, es_list, es_loading, locale["a" /* default */], nav_bar, notice_bar, notify, number_keyboard, es_overlay, pagination, panel, password_input, es_picker, popover, popup, es_progress, pull_refresh, es_radio, radio_group, es_rate, row, search, share_sheet, sidebar, sidebar_item, skeleton, es_sku, slider, es_step, stepper, steps, es_sticky, submit_bar, swipe, swipe_cell, swipe_item, es_switch, switch_cell, tab, tabbar, tabbar_item, tabs, es_tag, es_toast, tree_select, uploader];
|