vant 2.12.33 → 2.12.36
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/calendar/components/Month.js +2 -4
- package/es/calendar/index.js +10 -1
- package/es/datetime-picker/DatePicker.js +3 -0
- package/es/datetime-picker/TimePicker.js +3 -0
- package/es/index.js +1 -1
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.js +8 -2
- package/es/swipe/index.less +2 -0
- package/es/tabbar-item/index.js +5 -3
- package/es/uploader/index.js +15 -1
- package/lib/calendar/components/Month.js +2 -4
- package/lib/calendar/index.js +10 -1
- package/lib/datetime-picker/DatePicker.js +3 -0
- package/lib/datetime-picker/TimePicker.js +3 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.js +8 -2
- package/lib/swipe/index.less +2 -0
- package/lib/tabbar-item/index.js +5 -3
- package/lib/uploader/index.js +15 -1
- package/lib/vant.js +47 -12
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/vetur/attributes.json +160 -160
- package/vetur/tags.json +56 -56
- package/vetur/web-types.json +472 -472
@@ -90,11 +90,9 @@ export default createComponent({
|
|
90
90
|
},
|
91
91
|
methods: {
|
92
92
|
getHeight: function getHeight() {
|
93
|
-
|
94
|
-
this.height = this.$el.getBoundingClientRect().height;
|
95
|
-
}
|
93
|
+
var _this$$el;
|
96
94
|
|
97
|
-
return this.height;
|
95
|
+
return ((_this$$el = this.$el) == null ? void 0 : _this$$el.getBoundingClientRect().height) || 0;
|
98
96
|
},
|
99
97
|
scrollIntoView: function scrollIntoView(body) {
|
100
98
|
var _this$$refs = this.$refs,
|
package/es/calendar/index.js
CHANGED
@@ -98,6 +98,11 @@ export default createComponent({
|
|
98
98
|
}
|
99
99
|
}
|
100
100
|
},
|
101
|
+
inject: {
|
102
|
+
vanPopup: {
|
103
|
+
default: null
|
104
|
+
}
|
105
|
+
},
|
101
106
|
data: function data() {
|
102
107
|
return {
|
103
108
|
subtitle: '',
|
@@ -148,7 +153,11 @@ export default createComponent({
|
|
148
153
|
}
|
149
154
|
},
|
150
155
|
mounted: function mounted() {
|
151
|
-
|
156
|
+
var _this$vanPopup;
|
157
|
+
|
158
|
+
this.init(); // https://github.com/youzan/vant/issues/9845
|
159
|
+
|
160
|
+
(_this$vanPopup = this.vanPopup) == null ? void 0 : _this$vanPopup.$on('opened', this.onScroll);
|
152
161
|
},
|
153
162
|
|
154
163
|
/* istanbul ignore next */
|
@@ -272,6 +272,9 @@ export default createComponent({
|
|
272
272
|
this.updateInnerValue();
|
273
273
|
this.$nextTick(function () {
|
274
274
|
_this4.$nextTick(function () {
|
275
|
+
// https://github.com/youzan/vant/issues/9775
|
276
|
+
_this4.updateInnerValue();
|
277
|
+
|
275
278
|
_this4.$emit('change', picker);
|
276
279
|
});
|
277
280
|
});
|
@@ -114,6 +114,9 @@ export default createComponent({
|
|
114
114
|
this.updateInnerValue();
|
115
115
|
this.$nextTick(function () {
|
116
116
|
_this2.$nextTick(function () {
|
117
|
+
// https://github.com/youzan/vant/issues/9775
|
118
|
+
_this2.updateInnerValue();
|
119
|
+
|
117
120
|
_this2.$emit('change', picker);
|
118
121
|
});
|
119
122
|
});
|
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.36';
|
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/swipe/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.van-swipe{position:relative;overflow:hidden;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.van-swipe__track--vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.van-swipe__indicators{position:absolute;bottom:12px;left:50%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:6px}.van-swipe__indicator{width:6px;height:6px;background-color:#ebedf0;border-radius:100%;opacity:.3;-webkit-transition:opacity .2s,background-color .2s;transition:opacity .2s,background-color .2s}.van-swipe__indicator:not(:last-child){margin-right:6px}.van-swipe__indicator--active{background-color:#1989fa;opacity:1}
|
1
|
+
.van-swipe{position:relative;overflow:hidden;-webkit-transform:translateZ(0);transform:translateZ(0);cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:-webkit-box;display:-webkit-flex;display:flex;height:100%}.van-swipe__track--vertical{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.van-swipe__indicators{position:absolute;bottom:12px;left:50%;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:12px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:6px}.van-swipe__indicator{width:6px;height:6px;background-color:#ebedf0;border-radius:100%;opacity:.3;-webkit-transition:opacity .2s,background-color .2s;transition:opacity .2s,background-color .2s}.van-swipe__indicator:not(:last-child){margin-right:6px}.van-swipe__indicator--active{background-color:#1989fa;opacity:1}
|
package/es/swipe/index.js
CHANGED
@@ -181,10 +181,16 @@ export default createComponent({
|
|
181
181
|
},
|
182
182
|
onTouchMove: function onTouchMove(event) {
|
183
183
|
if (!this.touchable || !this.swiping) return;
|
184
|
-
this.touchMove(event);
|
184
|
+
this.touchMove(event); // if user starting to touchmove, prevent the event bubbling to
|
185
|
+
// avoid affecting the parent components
|
185
186
|
|
186
|
-
|
187
|
+
var shouldPrevent = this.isCorrectDirection || this.offsetY > this.offsetX === this.vertical;
|
188
|
+
|
189
|
+
if (shouldPrevent) {
|
187
190
|
preventDefault(event, this.stopPropagation);
|
191
|
+
}
|
192
|
+
|
193
|
+
if (this.isCorrectDirection) {
|
188
194
|
this.move({
|
189
195
|
offset: this.delta
|
190
196
|
});
|
package/es/swipe/index.less
CHANGED
package/es/tabbar-item/index.js
CHANGED
@@ -37,9 +37,11 @@ export default createComponent({
|
|
37
37
|
var config = isObject(to) ? to : {
|
38
38
|
path: to
|
39
39
|
};
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
return !!$route.matched.find(function (r) {
|
41
|
+
var pathMatched = config.path === r.path;
|
42
|
+
var nameMatched = isDef(config.name) && config.name === r.name;
|
43
|
+
return pathMatched || nameMatched;
|
44
|
+
});
|
43
45
|
}
|
44
46
|
},
|
45
47
|
active: function active() {
|
package/es/uploader/index.js
CHANGED
@@ -90,6 +90,14 @@ export default createComponent({
|
|
90
90
|
return this.fileList;
|
91
91
|
}
|
92
92
|
},
|
93
|
+
created: function created() {
|
94
|
+
this.urls = [];
|
95
|
+
},
|
96
|
+
beforeDestroy: function beforeDestroy() {
|
97
|
+
this.urls.forEach(function (url) {
|
98
|
+
return URL.revokeObjectURL(url);
|
99
|
+
});
|
100
|
+
},
|
93
101
|
methods: {
|
94
102
|
getDetail: function getDetail(index) {
|
95
103
|
if (index === void 0) {
|
@@ -268,7 +276,13 @@ export default createComponent({
|
|
268
276
|
return isImageFile(item);
|
269
277
|
});
|
270
278
|
var imageContents = imageFiles.map(function (item) {
|
271
|
-
|
279
|
+
if (item.file && !item.url) {
|
280
|
+
item.url = URL.createObjectURL(item.file);
|
281
|
+
|
282
|
+
_this5.urls.push(item.url);
|
283
|
+
}
|
284
|
+
|
285
|
+
return item.url;
|
272
286
|
});
|
273
287
|
this.imagePreview = ImagePreview(_extends({
|
274
288
|
images: imageContents,
|
@@ -98,11 +98,9 @@ var _default = createComponent({
|
|
98
98
|
},
|
99
99
|
methods: {
|
100
100
|
getHeight: function getHeight() {
|
101
|
-
|
102
|
-
this.height = this.$el.getBoundingClientRect().height;
|
103
|
-
}
|
101
|
+
var _this$$el;
|
104
102
|
|
105
|
-
return this.height;
|
103
|
+
return ((_this$$el = this.$el) == null ? void 0 : _this$$el.getBoundingClientRect().height) || 0;
|
106
104
|
},
|
107
105
|
scrollIntoView: function scrollIntoView(body) {
|
108
106
|
var _this$$refs = this.$refs,
|
package/lib/calendar/index.js
CHANGED
@@ -114,6 +114,11 @@ var _default2 = (0, _utils.createComponent)({
|
|
114
114
|
}
|
115
115
|
}
|
116
116
|
},
|
117
|
+
inject: {
|
118
|
+
vanPopup: {
|
119
|
+
default: null
|
120
|
+
}
|
121
|
+
},
|
117
122
|
data: function data() {
|
118
123
|
return {
|
119
124
|
subtitle: '',
|
@@ -164,7 +169,11 @@ var _default2 = (0, _utils.createComponent)({
|
|
164
169
|
}
|
165
170
|
},
|
166
171
|
mounted: function mounted() {
|
167
|
-
|
172
|
+
var _this$vanPopup;
|
173
|
+
|
174
|
+
this.init(); // https://github.com/youzan/vant/issues/9845
|
175
|
+
|
176
|
+
(_this$vanPopup = this.vanPopup) == null ? void 0 : _this$vanPopup.$on('opened', this.onScroll);
|
168
177
|
},
|
169
178
|
|
170
179
|
/* istanbul ignore next */
|
@@ -286,6 +286,9 @@ var _default2 = createComponent({
|
|
286
286
|
this.updateInnerValue();
|
287
287
|
this.$nextTick(function () {
|
288
288
|
_this4.$nextTick(function () {
|
289
|
+
// https://github.com/youzan/vant/issues/9775
|
290
|
+
_this4.updateInnerValue();
|
291
|
+
|
289
292
|
_this4.$emit('change', picker);
|
290
293
|
});
|
291
294
|
});
|
@@ -125,6 +125,9 @@ var _default = createComponent({
|
|
125
125
|
this.updateInnerValue();
|
126
126
|
this.$nextTick(function () {
|
127
127
|
_this2.$nextTick(function () {
|
128
|
+
// https://github.com/youzan/vant/issues/9775
|
129
|
+
_this2.updateInnerValue();
|
130
|
+
|
128
131
|
_this2.$emit('change', picker);
|
129
132
|
});
|
130
133
|
});
|