zx-infinite-scroll 1.0.0 → 1.0.1
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 +8 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# zx-infinite-scroll
|
|
2
2
|
|
|
3
3
|
Vue 3 无限滚动组件,支持下拉刷新、上拉加载。
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ Vue 3 无限滚动组件,支持下拉刷新、上拉加载。
|
|
|
15
15
|
## 安装
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npm install
|
|
18
|
+
npm install zx-infinite-scroll
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## 使用
|
|
@@ -24,7 +24,8 @@ npm install @zhixin/infinite-scroll
|
|
|
24
24
|
|
|
25
25
|
```vue
|
|
26
26
|
<script setup lang="ts">
|
|
27
|
-
import { InfiniteScrollV2 } from '
|
|
27
|
+
import { InfiniteScrollV2 } from 'zx-infinite-scroll';
|
|
28
|
+
import 'zx-infinite-scroll/dist/style.css';
|
|
28
29
|
|
|
29
30
|
interface Item {
|
|
30
31
|
id: number;
|
|
@@ -60,7 +61,8 @@ const fetchData = async ({ page, pageSize }) => {
|
|
|
60
61
|
|
|
61
62
|
```ts
|
|
62
63
|
import { createApp } from 'vue';
|
|
63
|
-
import InfiniteScrollPlugin from '
|
|
64
|
+
import InfiniteScrollPlugin from 'zx-infinite-scroll';
|
|
65
|
+
import 'zx-infinite-scroll/dist/style.css';
|
|
64
66
|
import App from './App.vue';
|
|
65
67
|
|
|
66
68
|
const app = createApp(App);
|
|
@@ -118,7 +120,8 @@ app.mount('#app');
|
|
|
118
120
|
```vue
|
|
119
121
|
<script setup lang="ts">
|
|
120
122
|
import { ref } from 'vue';
|
|
121
|
-
import { InfiniteScroll } from '
|
|
123
|
+
import { InfiniteScroll } from 'zx-infinite-scroll';
|
|
124
|
+
import 'zx-infinite-scroll/dist/style.css';
|
|
122
125
|
|
|
123
126
|
const list = ref([]);
|
|
124
127
|
const loading = ref(false);
|