mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Picker): SSR broken (#9875)
This commit is contained in:
parent
247135fcd4
commit
9c48a14649
@ -1,5 +1,5 @@
|
|||||||
import { deepClone } from '../utils/deep-clone';
|
import { deepClone } from '../utils/deep-clone';
|
||||||
import { createNamespace, isObject } from '../utils';
|
import { createNamespace, inBrowser, isObject } from '../utils';
|
||||||
import { range } from '../utils/format/number';
|
import { range } from '../utils/format/number';
|
||||||
import { preventDefault, on, off } from '../utils/dom/event';
|
import { preventDefault, on, off } from '../utils/dom/event';
|
||||||
import { TouchMixin } from '../mixins/touch';
|
import { TouchMixin } from '../mixins/touch';
|
||||||
@ -27,7 +27,7 @@ function isOptionDisabled(option) {
|
|||||||
}
|
}
|
||||||
// use standard WheelEvent:
|
// use standard WheelEvent:
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent
|
// https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent
|
||||||
const supportMousewheel = 'onwheel' in window;
|
const supportMousewheel = inBrowser && 'onwheel' in window;
|
||||||
let mousewheelTimer = null;
|
let mousewheelTimer = null;
|
||||||
|
|
||||||
export default createComponent({
|
export default createComponent({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user