@wanjunshijie/vue-seamless-scroll 0.1.8 → 0.1.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 +46 -41
- package/package.json +39 -35
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# vue-seamless-scroll
|
|
2
2
|
|
|
3
|
-
> github: https://github.com/yelingkong/vue-seamless-scroll
|
|
3
|
+
> github: https://github.com/yelingkong/vue-seamless-scroll/tree/vue2
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
[Document for
|
|
7
|
+
[Document for vue3](https://github.com/yelingkong/vue-seamless-scroll#readme)
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
@@ -28,24 +28,20 @@ npm i @wanjunshijie/vue-seamless-scroll@latest-v2 --save-dev
|
|
|
28
28
|
|
|
29
29
|
## Use
|
|
30
30
|
|
|
31
|
-
`main.
|
|
31
|
+
`main.js`
|
|
32
32
|
|
|
33
|
-
```
|
|
34
|
-
import
|
|
33
|
+
```js
|
|
34
|
+
import Vue from 'vue'
|
|
35
35
|
import App from './App.vue'
|
|
36
|
-
import { VueSeamlessScroll } from '@wanjunshijie/vue-seamless-scroll'
|
|
37
|
-
|
|
38
|
-
const app = createApp(App)
|
|
39
|
-
app.use(VueSeamlessScroll)
|
|
40
|
-
app.mount('#app')
|
|
41
|
-
```
|
|
42
|
-
|
|
43
36
|
|
|
37
|
+
Vue.config.productionTip = false
|
|
44
38
|
|
|
45
|
-
|
|
39
|
+
import VueSeamlessScroll from '@wanjunshijie/vue-seamless-scroll'
|
|
40
|
+
Vue.use(VueSeamlessScroll)
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
new Vue({
|
|
43
|
+
render: h => h(App),
|
|
44
|
+
}).$mount('#app')
|
|
49
45
|
```
|
|
50
46
|
|
|
51
47
|
|
|
@@ -54,40 +50,48 @@ declare module '@wanjunshijie/vue-seamless-scroll'
|
|
|
54
50
|
|
|
55
51
|
```vue
|
|
56
52
|
<template>
|
|
57
|
-
<div
|
|
58
|
-
<
|
|
59
|
-
<
|
|
60
|
-
|
|
53
|
+
<div id="app">
|
|
54
|
+
<div class="box">
|
|
55
|
+
<vue-seamless-scroll class="list" :data="data" direction="top" :steep="0.5" roller :distance="20">
|
|
56
|
+
<div class="list-item" v-for="item, index in data" :key="index">{{ item.text }}</div>
|
|
57
|
+
</vue-seamless-scroll>
|
|
58
|
+
</div>
|
|
61
59
|
</div>
|
|
62
60
|
</template>
|
|
63
61
|
|
|
64
|
-
<script
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
62
|
+
<script>
|
|
63
|
+
export default {
|
|
64
|
+
name: 'App',
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
data: [
|
|
68
|
+
{ text: 'test' },
|
|
69
|
+
{ text: 'test' },
|
|
70
|
+
{ text: 'test' },
|
|
71
|
+
{ text: 'test' },
|
|
72
|
+
{ text: 'test' },
|
|
73
|
+
{ text: 'test' },
|
|
74
|
+
{ text: 'test' },
|
|
75
|
+
{ text: 'test' },
|
|
76
|
+
{ text: 'test' },
|
|
77
|
+
{ text: 'test' },
|
|
78
|
+
{ text: 'test' },
|
|
79
|
+
{ text: 'test' },
|
|
80
|
+
{ text: 'test' },
|
|
81
|
+
{ text: 'test' },
|
|
82
|
+
{ text: 'test' },
|
|
83
|
+
{ text: 'test' },
|
|
84
|
+
{ text: 'test' },
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
}
|
|
86
89
|
</script>
|
|
87
90
|
|
|
88
91
|
<style scoped>
|
|
89
92
|
.box {
|
|
90
93
|
width: 100%;
|
|
94
|
+
height: 200px;
|
|
91
95
|
padding-top: 50px;
|
|
92
96
|
display: flex;
|
|
93
97
|
justify-content: center;
|
|
@@ -107,6 +111,7 @@ let data = ref([
|
|
|
107
111
|
background-color: aliceblue;
|
|
108
112
|
}
|
|
109
113
|
</style>
|
|
114
|
+
|
|
110
115
|
```
|
|
111
116
|
|
|
112
117
|
|
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wanjunshijie/vue-seamless-scroll",
|
|
3
|
+
"version": "0.1.9",
|
|
3
4
|
"private": false,
|
|
4
|
-
"version": "0.1.8",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"author": "wanjunshijie",
|
|
7
6
|
"license": "MIT",
|
|
8
7
|
"description": "A simple vue seamless scroll component.",
|
|
@@ -13,51 +12,56 @@
|
|
|
13
12
|
"typescript",
|
|
14
13
|
"scroll"
|
|
15
14
|
],
|
|
16
|
-
"scripts": {
|
|
17
|
-
"dev": "vite",
|
|
18
|
-
"build": "vue-tsc && vite build",
|
|
19
|
-
"preview": "vite preview",
|
|
20
|
-
"pub": "npm publish --tag latest"
|
|
21
|
-
},
|
|
22
15
|
"repository": {
|
|
23
16
|
"type": "git",
|
|
24
17
|
"url": "git+https://github.com/yelingkong/vue-seamless-scroll.git"
|
|
25
18
|
},
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/yelingkong/vue-seamless-scroll/issues"
|
|
28
|
-
},
|
|
29
|
-
"homepage": "https://github.com/yelingkong/vue-seamless-scroll#readme",
|
|
30
19
|
"publishConfig": {
|
|
31
20
|
"access": "public",
|
|
32
21
|
"registry": "https://registry.npmjs.org"
|
|
33
22
|
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"serve": "vue-cli-service serve",
|
|
25
|
+
"build": "vue-cli-service build",
|
|
26
|
+
"lib": "vue-cli-service build --target lib --name vue-seamless-scroll packages/index.js",
|
|
27
|
+
"lint": "vue-cli-service lint",
|
|
28
|
+
"pub": "npm publish --tag latest-v2"
|
|
29
|
+
},
|
|
34
30
|
"dependencies": {
|
|
35
|
-
"
|
|
31
|
+
"core-js": "^3.8.3",
|
|
32
|
+
"vue": "^2.6.14"
|
|
36
33
|
},
|
|
37
34
|
"devDependencies": {
|
|
38
|
-
"@
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"vue-
|
|
35
|
+
"@babel/core": "^7.12.16",
|
|
36
|
+
"@babel/eslint-parser": "^7.12.16",
|
|
37
|
+
"@vue/cli-plugin-babel": "~5.0.0",
|
|
38
|
+
"@vue/cli-plugin-eslint": "~5.0.0",
|
|
39
|
+
"@vue/cli-service": "~5.0.0",
|
|
40
|
+
"eslint": "^7.32.0",
|
|
41
|
+
"eslint-plugin-vue": "^8.0.3",
|
|
42
|
+
"vue-template-compiler": "^2.6.14"
|
|
43
43
|
},
|
|
44
|
+
"eslintConfig": {
|
|
45
|
+
"root": true,
|
|
46
|
+
"env": {
|
|
47
|
+
"node": true
|
|
48
|
+
},
|
|
49
|
+
"extends": [
|
|
50
|
+
"plugin:vue/essential",
|
|
51
|
+
"eslint:recommended"
|
|
52
|
+
],
|
|
53
|
+
"parserOptions": {
|
|
54
|
+
"parser": "@babel/eslint-parser"
|
|
55
|
+
},
|
|
56
|
+
"rules": {}
|
|
57
|
+
},
|
|
58
|
+
"browserslist": [
|
|
59
|
+
"> 1%",
|
|
60
|
+
"last 2 versions",
|
|
61
|
+
"not dead"
|
|
62
|
+
],
|
|
44
63
|
"files": [
|
|
45
64
|
"dist"
|
|
46
65
|
],
|
|
47
|
-
"main": "dist/vue-seamless-scroll.umd.js"
|
|
48
|
-
|
|
49
|
-
"types": "dist/index.d.ts",
|
|
50
|
-
"exports": {
|
|
51
|
-
".": {
|
|
52
|
-
"import": {
|
|
53
|
-
"default": "./dist/vue-seamless-scroll.es.js",
|
|
54
|
-
"types": "./dist/index.d.ts"
|
|
55
|
-
},
|
|
56
|
-
"require": {
|
|
57
|
-
"default": "./dist/vue-seamless-scroll.umd.js",
|
|
58
|
-
"types": "./dist/index.d.ts"
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"./dist/style.css": "./dist/style.css"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
66
|
+
"main": "dist/vue-seamless-scroll.umd.min.js"
|
|
67
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Jiang Yingqi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|