Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
vue-element-resize-detector
Advanced tools
Vue Directive to detect resize events on elements or components. Uses element Resize Detector under the hood
$ npm install vue-element-resize-detector
In main.js
import resize from "vue-element-resize-detector";
Vue.use(resize)
<template>
<div id="app">
<h1>Vue Element Resize Detector</h1>
<div v-resize @resize="onResize">This divs with is: {{ width }}</div>
</div>
</template>
<script>
export default {
name: "app",
data() {
return {
width: 0
};
},
methods: {
onResize(e) {
console.log("resize event", e.detail.width, e.detail.height);
this.width = e.detail.width;
}
}
};
</script>
<style>
#app {
font-family: "Avenir", Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Please give a ⭐️ if this project helped you!
If you have any questions or requests or want to contribute to vue-element-resize-detector
or other packages, please write the issue or give me a Pull Request freely.
If you find a bug, please report to us opening a new Issue on GitHub.
npm run serve
Runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
FAQs
vue directive for element-resize-detector
We found that vue-element-resize-detector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.