ভিইউই scroll
🌈ভিইউই scroll কি?
📋ভিইউই scroll হলো এলিমেন্ট স্ক্রল হলে অবহিত করার পদ্ধতি।
⚒️ভিইউই scroll এলিমেন্ট স্ক্রল হলে অবহিত করতে ব্যবহৃত হয়।
ভিইউই scroll এলিমেন্ট স্ক্রল হলে অবহিত করার উদাহরণ।
vue
<!DOCTYPE html>
<html>
<body>
<div id="app">
<div
@scroll="scrolled"
style="height:100px; overflow:auto;">
<div style="height:300px;">
এই বক্সটি স্ক্রল করুন
</div>
</div>
<p>{{ message }}</p>
</div>
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>
Vue.createApp({
data() {
return {
message: ""
};
},
methods: {
scrolled() {
this.message = "";
}
}
}).mount("#app");
</script>
</body>
</html>