v-resize-observer-yong
v0.0.4
Published
> A Vue.js project
Downloads
1
Readme
vue-use-resize
A Vue.js project
INSTALL
npm i v-resize-observer-yong -S
USE
import vueUseResize from 'v-resize-observer-yong'
Vue.use(vueUseResize)
// or
import {onMounted, onUnmounted} from 'vue'
import { vueUseResize } from 'v-resize-observer-yong'
onMounted(()=>{
vueUseResize(document.querySelector('.box'),(e)=>{
console.log(e)
})
})
EXAMPLE
<template>
<div id="app">
<div class="box" v-resize="resize">
<p>width: {{width}}</p>
<p>height: {{height}}</p>
</div>
</div>
</template>