vant 2.12.54 → 2.13.0

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/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.54';
364
+ var version = '2.13.0';
365
365
  exports.version = version;
366
366
 
367
367
  function install(Vue) {
@@ -203,12 +203,11 @@ var _default2 = createComponent({
203
203
 
204
204
  if (this.startOffset === 0 && deltaY < 0) {
205
205
  return;
206
- } // get offset
207
- // if necessary, can adjust distance value to make scrolling smoother
206
+ } // Calculate the offset based on itemHeight
208
207
 
209
208
 
210
- var distance = -deltaY;
211
- this.offset = (0, _number.range)(this.startOffset + distance, -(this.count * this.itemHeight), this.itemHeight);
209
+ var itemOffset = this.itemHeight * (deltaY > 0 ? -1 : 1);
210
+ this.offset = (0, _number.range)(this.startOffset + itemOffset, -(this.count * this.itemHeight), this.itemHeight);
212
211
 
213
212
  if (mousewheelTimer) {
214
213
  clearTimeout(mousewheelTimer);
package/lib/vant.js CHANGED
@@ -3286,12 +3286,11 @@ var mousewheelTimer = null;
3286
3286
 
3287
3287
  if (this.startOffset === 0 && deltaY < 0) {
3288
3288
  return;
3289
- } // get offset
3290
- // if necessary, can adjust distance value to make scrolling smoother
3289
+ } // Calculate the offset based on itemHeight
3291
3290
 
3292
3291
 
3293
- var distance = -deltaY;
3294
- this.offset = range(this.startOffset + distance, -(this.count * this.itemHeight), this.itemHeight);
3292
+ var itemOffset = this.itemHeight * (deltaY > 0 ? -1 : 1);
3293
+ this.offset = range(this.startOffset + itemOffset, -(this.count * this.itemHeight), this.itemHeight);
3295
3294
 
3296
3295
  if (mousewheelTimer) {
3297
3296
  clearTimeout(mousewheelTimer);
@@ -23205,7 +23204,7 @@ TreeSelect.props = {
23205
23204
 
23206
23205
 
23207
23206
 
23208
- var version = '2.12.54';
23207
+ var version = '2.13.0';
23209
23208
 
23210
23209
  function install(Vue) {
23211
23210
  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];