Пример #1
0
 setTimeout(() => {
   if (isArray(list)) {
     each(list, (item) => item.doDestroy())
   } else if (list) {
     list.doDestroy()
   }
 }, 0)
Пример #2
0
      class: className
    }
    let $p = {
      style,
      on: {},
      class: classPrefix + which + 'track'
    }
    
    if (blank) {
      $div.style = {
        [this.isVertical ? 'top' : 'left']: blank + 'px'
      }
    }
    
    each(evTypes, (evType) => {
      $p.on[evType] = this.dragStart
    })
    this.trackEl = $$('b', $p)
    
    return $$('div', $div, [this.trackEl])
  },
  methods: {
    position (value, callback) {
      let { cache, scrollSize, clientSize, scrollbarCache, scrollProp } = this
      let max = cache[scrollSize] - cache[clientSize], min = 0
      
      if (isUndefined(value)) {
        value = scrollbarCache[scrollProp]
      }

      if (value < min) value = min