UNPKG

kui-vue

Version:

A high quality UI Toolkit built on Vue.js 2.0

13 lines 332 B
import Vue from 'vue'; export default { bind(el, { value }) { const SSR = Vue && Vue.prototype.$isServer if (typeof value == 'function' && !SSR) { window.addEventListener('scroll', value) } }, unbind(el, { value }) { if (typeof value == 'function') window.removeEventListener('scroll', value) } }