Là một dự án mã nguồn mở, Akryum/vue-observe-visibility đã đạt 1.6k sao trên GitHub, ngôn ngữ JavaScript. Detect when an element is becoming visible or hidden on the page.
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Detect when an element is becoming visible or hidden on the page. Demo
Sponsors
Table of contents
Installation
Usage
Example
Installation
npm install --save vue-observe-visibility
⚠️ This plugin uses the Intersection Observer API that is not supported in every browser (currently supported in Edge, Firefox and Chrome). You need to include a polyfill to make it work on incompatible browsers.
Import
import Vue from 'vue'
import VueObserveVisibility from 'vue-observe-visibility'
Vue.use(VueObserveVisibility)
Or:
import Vue from 'vue'
import { ObserveVisibility } from 'vue-observe-visibility'
Vue.directive('observe-visibility', ObserveVisibility)
The function will be called whenever the visiblity of the element changes with the argument being a boolean (true means the element is visible on the page, false means that it is not).
The second argument is the corresponding IntersectionObserverEntry object.
You can use the throttle options (in ms) specifying minimal state duration after which an event will be fired. It's useful when you are tracking visibility while scrolling and don't want events from fastly scrolled out elements.
You can also pass a leading option to trigger the callback the first time when the visibility changes without waiting for the throttle delay.
I can either be visible, hidden or both.
Akryum/vue-observe-visibility có phải mã nguồn mở không?
TopGit chưa ghi nhận license cho Akryum/vue-observe-visibility. Phần lớn repo public trên GitHub là mã nguồn mở, nhưng điều khoản khác nhau từng repo — mở file LICENSE để xác nhận.
Akryum/vue-observe-visibility là gì?
Akryum/vue-observe-visibility (Akryum/vue-observe-visibility) là dự án JavaScript trên GitHub. Theo mô tả gốc: Detect when an element is becoming visible or hidden on the page.
Đọc thêm về Akryum/vue-observe-visibility ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Akryum/vue-observe-visibility là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về vue-observe-visibility?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về vue-observe-visibility.