vant 2.12.34-beta.0 → 2.12.37
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/datetime-picker/index.js +1 -1
- package/es/datetime-picker/shared.js +25 -3
- package/es/image-preview/ImagePreview.js +1 -0
- package/es/image-preview/index.js +1 -0
- package/es/index.js +1 -1
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.less +2 -0
- 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/datetime-picker/index.js +1 -1
- package/lib/datetime-picker/shared.js +25 -3
- package/lib/image-preview/ImagePreview.js +1 -0
- package/lib/image-preview/index.js +1 -0
- package/lib/index.css +1 -1
- package/lib/index.js +1 -1
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.less +2 -0
- package/lib/uploader/index.js +15 -1
- package/lib/vant.js +67 -16
- package/lib/vant.min.js +1 -1
- package/package.json +1 -1
- package/types/image-preview.d.ts +1 -0
- package/vetur/attributes.json +160 -156
- package/vetur/tags.json +63 -62
- package/vetur/web-types.json +514 -505
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.37';
|
365
365
|
exports.version = version;
|
366
366
|
|
367
367
|
function install(Vue) {
|
package/lib/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/lib/swipe/index.less
CHANGED
package/lib/uploader/index.js
CHANGED
@@ -104,6 +104,14 @@ var _default2 = createComponent({
|
|
104
104
|
return this.fileList;
|
105
105
|
}
|
106
106
|
},
|
107
|
+
created: function created() {
|
108
|
+
this.urls = [];
|
109
|
+
},
|
110
|
+
beforeDestroy: function beforeDestroy() {
|
111
|
+
this.urls.forEach(function (url) {
|
112
|
+
return URL.revokeObjectURL(url);
|
113
|
+
});
|
114
|
+
},
|
107
115
|
methods: {
|
108
116
|
getDetail: function getDetail(index) {
|
109
117
|
if (index === void 0) {
|
@@ -282,7 +290,13 @@ var _default2 = createComponent({
|
|
282
290
|
return (0, _utils2.isImageFile)(item);
|
283
291
|
});
|
284
292
|
var imageContents = imageFiles.map(function (item) {
|
285
|
-
|
293
|
+
if (item.file && !item.url) {
|
294
|
+
item.url = URL.createObjectURL(item.file);
|
295
|
+
|
296
|
+
_this5.urls.push(item.url);
|
297
|
+
}
|
298
|
+
|
299
|
+
return item.url;
|
286
300
|
});
|
287
301
|
this.imagePreview = (0, _imagePreview.default)((0, _extends2.default)({
|
288
302
|
images: imageContents,
|
package/lib/vant.js
CHANGED
@@ -790,7 +790,7 @@ __webpack_require__.d(__webpack_exports__, "Overlay", function() { return /* ree
|
|
790
790
|
__webpack_require__.d(__webpack_exports__, "Pagination", function() { return /* reexport */ pagination; });
|
791
791
|
__webpack_require__.d(__webpack_exports__, "Panel", function() { return /* reexport */ panel; });
|
792
792
|
__webpack_require__.d(__webpack_exports__, "PasswordInput", function() { return /* reexport */ password_input; });
|
793
|
-
__webpack_require__.d(__webpack_exports__, "Picker", function() { return /* reexport */
|
793
|
+
__webpack_require__.d(__webpack_exports__, "Picker", function() { return /* reexport */ es_picker; });
|
794
794
|
__webpack_require__.d(__webpack_exports__, "Popover", function() { return /* reexport */ popover; });
|
795
795
|
__webpack_require__.d(__webpack_exports__, "Popup", function() { return /* reexport */ popup; });
|
796
796
|
__webpack_require__.d(__webpack_exports__, "Progress", function() { return /* reexport */ es_progress; });
|
@@ -2560,7 +2560,7 @@ var picker_createNamespace = Object(create["a" /* createNamespace */])('picker')
|
|
2560
2560
|
picker_bem = picker_createNamespace[1],
|
2561
2561
|
t = picker_createNamespace[2];
|
2562
2562
|
|
2563
|
-
/* harmony default export */ var
|
2563
|
+
/* harmony default export */ var es_picker = (picker_createComponent({
|
2564
2564
|
props: _extends({}, pickerProps, {
|
2565
2565
|
defaultIndex: {
|
2566
2566
|
type: [Number, String],
|
@@ -3228,7 +3228,7 @@ function pickSlots(instance, keys) {
|
|
3228
3228
|
confirm: this.onConfirm
|
3229
3229
|
});
|
3230
3230
|
|
3231
|
-
return h(
|
3231
|
+
return h(es_picker, {
|
3232
3232
|
"ref": "picker",
|
3233
3233
|
"class": area_bem(),
|
3234
3234
|
"attrs": {
|
@@ -6677,11 +6677,9 @@ var Month_createNamespace = Object(create["a" /* createNamespace */])('calendar-
|
|
6677
6677
|
},
|
6678
6678
|
methods: {
|
6679
6679
|
getHeight: function getHeight() {
|
6680
|
-
|
6681
|
-
this.height = this.$el.getBoundingClientRect().height;
|
6682
|
-
}
|
6680
|
+
var _this$$el;
|
6683
6681
|
|
6684
|
-
return this.height;
|
6682
|
+
return ((_this$$el = this.$el) == null ? void 0 : _this$$el.getBoundingClientRect().height) || 0;
|
6685
6683
|
},
|
6686
6684
|
scrollIntoView: function scrollIntoView(body) {
|
6687
6685
|
var _this$$refs = this.$refs,
|
@@ -7077,6 +7075,11 @@ var Header_createNamespace = Object(create["a" /* createNamespace */])('calendar
|
|
7077
7075
|
}
|
7078
7076
|
}
|
7079
7077
|
},
|
7078
|
+
inject: {
|
7079
|
+
vanPopup: {
|
7080
|
+
default: null
|
7081
|
+
}
|
7082
|
+
},
|
7080
7083
|
data: function data() {
|
7081
7084
|
return {
|
7082
7085
|
subtitle: '',
|
@@ -7127,7 +7130,11 @@ var Header_createNamespace = Object(create["a" /* createNamespace */])('calendar
|
|
7127
7130
|
}
|
7128
7131
|
},
|
7129
7132
|
mounted: function mounted() {
|
7130
|
-
|
7133
|
+
var _this$vanPopup;
|
7134
|
+
|
7135
|
+
this.init(); // https://github.com/youzan/vant/issues/9845
|
7136
|
+
|
7137
|
+
(_this$vanPopup = this.vanPopup) == null ? void 0 : _this$vanPopup.$on('opened', this.onScroll);
|
7131
7138
|
},
|
7132
7139
|
|
7133
7140
|
/* istanbul ignore next */
|
@@ -10874,10 +10881,32 @@ var TimePickerMixin = {
|
|
10874
10881
|
});
|
10875
10882
|
},
|
10876
10883
|
methods: {
|
10877
|
-
// @exposed-api
|
10878
10884
|
getPicker: function getPicker() {
|
10879
10885
|
return this.$refs.picker;
|
10880
10886
|
},
|
10887
|
+
// https://github.com/youzan/vant/issues/10013
|
10888
|
+
getProxiedPicker: function getProxiedPicker() {
|
10889
|
+
var _this4 = this;
|
10890
|
+
|
10891
|
+
var picker = this.$refs.picker;
|
10892
|
+
|
10893
|
+
if (picker) {
|
10894
|
+
var proxy = function proxy(fn) {
|
10895
|
+
return function () {
|
10896
|
+
picker[fn].apply(picker, arguments);
|
10897
|
+
|
10898
|
+
_this4.updateInnerValue();
|
10899
|
+
};
|
10900
|
+
};
|
10901
|
+
|
10902
|
+
return _extends({}, picker, {
|
10903
|
+
setValues: proxy('setValues'),
|
10904
|
+
setIndexes: proxy('setIndexes'),
|
10905
|
+
setColumnIndex: proxy('setColumnIndex'),
|
10906
|
+
setColumnValue: proxy('setColumnValue')
|
10907
|
+
});
|
10908
|
+
}
|
10909
|
+
},
|
10881
10910
|
onConfirm: function onConfirm() {
|
10882
10911
|
this.$emit('input', this.innerValue);
|
10883
10912
|
this.$emit('confirm', this.innerValue);
|
@@ -10887,14 +10916,14 @@ var TimePickerMixin = {
|
|
10887
10916
|
}
|
10888
10917
|
},
|
10889
10918
|
render: function render() {
|
10890
|
-
var
|
10919
|
+
var _this5 = this;
|
10891
10920
|
|
10892
10921
|
var h = arguments[0];
|
10893
10922
|
var props = {};
|
10894
10923
|
Object.keys(pickerProps).forEach(function (key) {
|
10895
|
-
props[key] =
|
10924
|
+
props[key] = _this5[key];
|
10896
10925
|
});
|
10897
|
-
return h(
|
10926
|
+
return h(es_picker, {
|
10898
10927
|
"ref": "picker",
|
10899
10928
|
"attrs": {
|
10900
10929
|
"columns": this.columns,
|
@@ -11027,6 +11056,9 @@ var TimePicker_createNamespace = Object(create["a" /* createNamespace */])('time
|
|
11027
11056
|
this.updateInnerValue();
|
11028
11057
|
this.$nextTick(function () {
|
11029
11058
|
_this2.$nextTick(function () {
|
11059
|
+
// https://github.com/youzan/vant/issues/9775
|
11060
|
+
_this2.updateInnerValue();
|
11061
|
+
|
11030
11062
|
_this2.$emit('change', picker);
|
11031
11063
|
});
|
11032
11064
|
});
|
@@ -11359,6 +11391,9 @@ var DatePicker_createNamespace = Object(create["a" /* createNamespace */])('date
|
|
11359
11391
|
this.updateInnerValue();
|
11360
11392
|
this.$nextTick(function () {
|
11361
11393
|
_this4.$nextTick(function () {
|
11394
|
+
// https://github.com/youzan/vant/issues/9775
|
11395
|
+
_this4.updateInnerValue();
|
11396
|
+
|
11362
11397
|
_this4.$emit('change', picker);
|
11363
11398
|
});
|
11364
11399
|
});
|
@@ -11411,7 +11446,7 @@ var datetime_picker_createNamespace = Object(create["a" /* createNamespace */])(
|
|
11411
11446
|
methods: {
|
11412
11447
|
// @exposed-api
|
11413
11448
|
getPicker: function getPicker() {
|
11414
|
-
return this.$refs.root.
|
11449
|
+
return this.$refs.root.getProxiedPicker();
|
11415
11450
|
}
|
11416
11451
|
},
|
11417
11452
|
render: function render() {
|
@@ -13380,6 +13415,7 @@ function getDistance(touches) {
|
|
13380
13415
|
className: null,
|
13381
13416
|
closeable: Boolean,
|
13382
13417
|
asyncClose: Boolean,
|
13418
|
+
overlayStyle: Object,
|
13383
13419
|
showIndicators: Boolean,
|
13384
13420
|
images: {
|
13385
13421
|
type: Array,
|
@@ -13613,6 +13649,7 @@ var image_preview_defaultConfig = {
|
|
13613
13649
|
asyncClose: false,
|
13614
13650
|
transition: 'van-fade',
|
13615
13651
|
getContainer: 'body',
|
13652
|
+
overlayStyle: null,
|
13616
13653
|
startPosition: 0,
|
13617
13654
|
swipeDuration: 300,
|
13618
13655
|
showIndicators: false,
|
@@ -19137,6 +19174,14 @@ var uploader_createNamespace = Object(create["a" /* createNamespace */])('upload
|
|
19137
19174
|
return this.fileList;
|
19138
19175
|
}
|
19139
19176
|
},
|
19177
|
+
created: function created() {
|
19178
|
+
this.urls = [];
|
19179
|
+
},
|
19180
|
+
beforeDestroy: function beforeDestroy() {
|
19181
|
+
this.urls.forEach(function (url) {
|
19182
|
+
return URL.revokeObjectURL(url);
|
19183
|
+
});
|
19184
|
+
},
|
19140
19185
|
methods: {
|
19141
19186
|
getDetail: function getDetail(index) {
|
19142
19187
|
if (index === void 0) {
|
@@ -19315,7 +19360,13 @@ var uploader_createNamespace = Object(create["a" /* createNamespace */])('upload
|
|
19315
19360
|
return isImageFile(item);
|
19316
19361
|
});
|
19317
19362
|
var imageContents = imageFiles.map(function (item) {
|
19318
|
-
|
19363
|
+
if (item.file && !item.url) {
|
19364
|
+
item.url = URL.createObjectURL(item.file);
|
19365
|
+
|
19366
|
+
_this5.urls.push(item.url);
|
19367
|
+
}
|
19368
|
+
|
19369
|
+
return item.url;
|
19319
19370
|
});
|
19320
19371
|
this.imagePreview = image_preview(_extends({
|
19321
19372
|
images: imageContents,
|
@@ -22122,10 +22173,10 @@ TreeSelect.props = {
|
|
22122
22173
|
|
22123
22174
|
|
22124
22175
|
|
22125
|
-
var version = '2.12.
|
22176
|
+
var version = '2.12.37';
|
22126
22177
|
|
22127
22178
|
function install(Vue) {
|
22128
|
-
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,
|
22179
|
+
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];
|
22129
22180
|
components.forEach(function (item) {
|
22130
22181
|
if (item.install) {
|
22131
22182
|
Vue.use(item);
|