zz 65c8a28f48 项目初始化 il y a 2 jours
..
src 65c8a28f48 项目初始化 il y a 2 jours
.babelrc 65c8a28f48 项目初始化 il y a 2 jours
LICENSE 65c8a28f48 项目初始化 il y a 2 jours
README.md 65c8a28f48 项目初始化 il y a 2 jours
package.json 65c8a28f48 项目初始化 il y a 2 jours

README.md

vue-resize-sensor

detect container resizing.

  • event based
  • no window.onresize
  • no interval/timeout detection
  • no CSS modifications
  • no Javascript-Framework dependency

Example

<template>
  <div>
    <resize-sensor @resize="resize"></resize-sensor>
  </div>
</template>

API

props

initial Boolean

Request an initial size event.

events

@resize Object

A size object { width, height }

Browser support

Same browser support as Vue.js 2

Note

since v2.x, the script is exported as esm.

Credits

Franck Freiburger