Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c1df4ac

Browse files
committed
0.1.4 requestAnimationFrame 节流
1 parent abbd2d5 commit c1df4ac

File tree

4 files changed

+205
-222
lines changed

4 files changed

+205
-222
lines changed

‎dist/ohyeah-scroll.js‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "vue-ohyeah-scroll",
33
"description": "prettier scroll",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"author": "L <https://blog.isluo.com>",
66
"license": "MIT",
77
"private": false,
88
"main": "dist/ohyeah-scroll.js",
99
"scripts": {
10-
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot",
10+
"dev": "cross-env NODE_ENV=development webpack-dev-server --hot --progress",
1111
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
1212
},
1313
"keywords": [
@@ -21,7 +21,7 @@
2121
],
2222
"browserslist": [
2323
"> 1%",
24-
"last 1 versions",
24+
"last 2 versions",
2525
"not ie <= 10"
2626
],
2727
"dependencies": {

‎src/packages/ohyeah/ohyeah.vue‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,13 +334,13 @@ export default {
334334
this.transSpeed = 0;
335335
if (this.realShowH) {
336336
this.barHScrollTop = Math.min(
337-
Math.max(this.barHScrollTop+e.deltaY / this.slow, 0),
337+
Math.max(e.deltaY * this.slow+this.barHScrollTop, 0),
338338
this.trickH - this.barHTall
339339
);
340340
}
341341
if (this.realShowW) {
342342
this.barWScrollLeft = Math.min(
343-
Math.max(this.barWScrollLeft+e.deltaX / this.slow, 0),
343+
Math.max(e.deltaX * this.slow+this.barWScrollLeft, 0),
344344
this.trickW - this.barWTall
345345
);
346346
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /