vue-use-intersection-observer 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
8
|
|
|
9
|
-

|
|
10
|
-
](https://www.npmjs.com/package/vue-use-intersection-observer)
|
|
10
|
+
[](https://www.npmjs.com/package/vue-use-intersection-observer)
|
|
11
|
+
[](https://github.com/Mathiew82/vue-use-intersection-observer/blob/master/LICENSE)
|
|
11
12
|

|
|
12
13
|

|
|
13
|
-
[](https://github.com/Mathiew82/vue-use-intersection-observer/blob/master/LICENSE)
|
|
14
14
|
|
|
15
15
|
</div>
|
|
16
16
|
|
|
@@ -41,7 +41,6 @@ main.ts
|
|
|
41
41
|
|
|
42
42
|
```typescript
|
|
43
43
|
import { createApp } from 'vue';
|
|
44
|
-
import './style.css';
|
|
45
44
|
import App from './App.vue';
|
|
46
45
|
import { VisibilityPlugin } from 'vue-use-intersection-observer';
|
|
47
46
|
|
|
@@ -123,19 +122,19 @@ Start observing an element.
|
|
|
123
122
|
|
|
124
123
|
**Parameters:**
|
|
125
124
|
|
|
126
|
-
| Name | Type | Description |
|
|
127
|
-
| ------- | ------- | ---------------------- |
|
|
128
|
-
| target | ref | Element ref to observe |
|
|
129
|
-
| options | Options | Observer configuration |
|
|
125
|
+
| Name | Type | Description | Required | Default |
|
|
126
|
+
| ------- | ------- | ---------------------- | -------- | ------- |
|
|
127
|
+
| target | ref | Element ref to observe | true | — |
|
|
128
|
+
| options | Options | Observer configuration | true | — |
|
|
130
129
|
|
|
131
130
|
**Options:**
|
|
132
131
|
|
|
133
|
-
|
|
|
132
|
+
| Name | Type | Description | Required | Default |
|
|
134
133
|
| --------- | --------------- | -------------------------------- | -------- | ------- |
|
|
135
|
-
| callback | function | Called when visibility changes |
|
|
136
|
-
| offset | number | Trigger before entering viewport |
|
|
137
|
-
| threshold | number or array | Intersection threshold |
|
|
138
|
-
| once | boolean | Trigger only the first time |
|
|
134
|
+
| callback | function | Called when visibility changes | true | — |
|
|
135
|
+
| offset | number | Trigger before entering viewport | false | 0 |
|
|
136
|
+
| threshold | number or array | Intersection threshold | false | 0 |
|
|
137
|
+
| once | boolean | Trigger only the first time | false | true |
|
|
139
138
|
|
|
140
139
|
---
|
|
141
140
|
|
|
@@ -143,6 +142,6 @@ Start observing an element.
|
|
|
143
142
|
|
|
144
143
|
Stop observing a previously registered element.
|
|
145
144
|
|
|
146
|
-
| Name | Type | Description |
|
|
147
|
-
| ------ | ---- | ----------------------------- |
|
|
148
|
-
| target | ref | Element ref to stop observing |
|
|
145
|
+
| Name | Type | Description | Required | Default |
|
|
146
|
+
| ------ | ---- | ----------------------------- | -------- | ------- |
|
|
147
|
+
| target | ref | Element ref to stop observing | true | — |
|