gong9/resize-observer-vuePublic NotificationsYou must be signed in to change notification settings Fork0 Star5 main 2Branches 0Tags Code Folders and files Name Last commit message Last commit date Latest commit gong9 chore: udpate package
1. 2、使用步骤 第一步 安装 npm i resize-observer-polyfill --save-dev 1. 监听元素宽高的变化
<template>Hello world!</template>exportdefault{methods:{handleResize({width,height,offsetWidth,offsetHeight}){console.log({width,height,offsetWidth,offsetHeight})}}} in.tsxfile import{defineComponent,h,resolveDirective,withDirectives}from'vue'import{Size}from'@vue-toys/resize-observer'consthandleResize...
2 changes: 2 additions & 0 deletions 2 build/rollup.config.base.js Original file line numberDiff line numberDiff line change @@ -28,6 +28,8 @@ export default { }), css({ output: styles => { const file = require.resolve('vue-resize/dist/vue-resize.css') styles += fs.readFile...