import { viewport } from '../../utils/dom'
import { listenOpts } from '../../utils/event'

export default {
  name: 'QWindowResizeObservable',
  render () {},
  methods: {
    trigger () {
      if (!this.timer) {
        this.timer = window.requestAnimationFrame(this.emit)
      }
    },
    emit () {
      this.timer = null
      this.$emit('resize', viewport())
    }
  },
  created () {
    this.emit()
  },
  mounted () {
    window.addEventListener('resize', this.trigger, listenOpts.passive)
  },
  beforeDestroy () {
    window.removeEventListener('resize', this.trigger, listenOpts.passive)
  }
}

@@ -142,136 +142,275 @@
 ,%0A  
-render () %7B%7D,%0A  methods: %7B%0A    trigger () %7B%0A      if (!this.timer) %7B%0A        this.timer = window.requestAnimationFrame(this.emit
+props: %7B%0A    debounce: %7B%0A      type: Number,%0A      default: 80%0A    %7D%0A  %7D,%0A  render () %7B%7D,%0A  methods: %7B%0A    trigger () %7B%0A      if (this.debounce === 0) %7B%0A        this.emit()%0A      %7D%0A      else if (!this.timer) %7B%0A        this.timer = setTimeout(this.emit, this.debounce
 )%0A  
@@ -655,24 +655,53 @@
 estroy () %7B%0A
+    clearTimeout(this.timer)%0A
     window.r

Improve QWindowResizeObservable delay