Skip to content

Commit d8f338d

Browse files
committed
组件初始化
1 parent c5e8c5b commit d8f338d

20 files changed

+2200
-2
lines changed

.babelrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"presets": [
3+
"@babel/preset-env",
4+
"@babel/react"
5+
],
6+
"plugins": [
7+
"@babel/plugin-transform-runtime",
8+
"@babel/plugin-syntax-dynamic-import",
9+
"@babel/plugin-syntax-import-meta",
10+
"@babel/plugin-proposal-class-properties",
11+
"@babel/plugin-proposal-json-strings",
12+
["import", { "libraryName": "antd-mobile", "style": "css" }]
13+
]
14+
}

.eslintrc

Lines changed: 200 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
node_modules/
6+
/tmp
7+
report.*
8+
9+
# production
10+
/build
11+
dist
12+
13+
# misc
14+
.DS_Store
15+
.env.local
16+
.env.development.local
17+
.env.test.local
18+
.env.production.local
19+
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
package-lock.json

README.md

100644100755
Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,69 @@
1-
# number-scroll
2-
react 数字滚动组件
1+
# numbers-scroll
2+
3+
A very simple light weight react-component that animates your number updates.
4+
5+
![Scrolling Number](https://media.giphy.com/media/XZ02rGDvGc8bk9x8rq/giphy.gif)
6+
7+
## Installation
8+
9+
`npm install numbers-scroll --save`
10+
11+
12+
## Examples 1
13+
14+
15+
```javascript
16+
import React, { useState } from 'react'
17+
import NumbersScroll from 'numbers-scroll'
18+
19+
const MyNumberScroll = () => {
20+
const [number, setNumber] = useState(896507);
21+
return (
22+
<div className="example-container">
23+
<NumbersScroll
24+
split={true}
25+
value={number}
26+
numberStyle={{
27+
fontSize: 50,
28+
background: "#51a4e9",
29+
color: "#fff",
30+
marginLeft: 2,
31+
marginRight: 2
32+
}}
33+
/>
34+
</div>
35+
)
36+
}
37+
```
38+
39+
## Examples 2
40+
41+
```javascript
42+
import React, { Component } from "react"
43+
import NumbersScroll from 'numbers-scroll'
44+
45+
class MyNumberScroll extends Component {
46+
constructor(props) {
47+
super(props)
48+
this.state = {
49+
number: 896507
50+
}
51+
}
52+
render() {
53+
const { number } = this.state
54+
return <div className="example-container">
55+
<NumbersScroll
56+
split={true}
57+
value={number}
58+
numberStyle={{
59+
fontSize: 50,
60+
background: "#51a4e9",
61+
color: "#fff",
62+
marginLeft: 2,
63+
marginRight: 2
64+
}}
65+
/>
66+
</div>
67+
}
68+
}
69+
```

package.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"name": "numbers-scroll",
3+
"version": "1.0.0",
4+
"description": "",
5+
"scripts": {
6+
"dev": "webpack-dev-server --config webpack.config.dev.js --openPage 'example.html'",
7+
"publish": "webpack --config webpack.config.build.js --progress --BUILD_TYPE publish",
8+
"fix": "eslint src/ --fix"
9+
},
10+
"main": "dist/main.min.js",
11+
"author": "",
12+
"license": "ISC",
13+
"devDependencies": {
14+
"@babel/cli": "^7.14.3",
15+
"@babel/core": "^7.0.0-beta.40",
16+
"@babel/plugin-proposal-class-properties": "^7.0.0",
17+
"@babel/plugin-proposal-decorators": "^7.0.0",
18+
"@babel/plugin-proposal-do-expressions": "^7.0.0",
19+
"@babel/plugin-proposal-export-default-from": "^7.0.0",
20+
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
21+
"@babel/plugin-proposal-function-bind": "^7.0.0",
22+
"@babel/plugin-proposal-function-sent": "^7.0.0",
23+
"@babel/plugin-proposal-json-strings": "^7.0.0",
24+
"@babel/plugin-proposal-logical-assignment-operators": "^7.0.0",
25+
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0",
26+
"@babel/plugin-proposal-numeric-separator": "^7.0.0",
27+
"@babel/plugin-proposal-optional-chaining": "^7.0.0",
28+
"@babel/plugin-proposal-pipeline-operator": "^7.0.0",
29+
"@babel/plugin-proposal-throw-expressions": "^7.0.0",
30+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
31+
"@babel/plugin-syntax-import-meta": "^7.0.0",
32+
"@babel/plugin-transform-runtime": "^7.5.5",
33+
"@babel/polyfill": "^7.0.0",
34+
"@babel/preset-env": "^7.0.0",
35+
"@babel/preset-react": "^7.0.0-beta.40",
36+
"@svgr/webpack": "^4.3.2",
37+
"babel-eslint": "^10.0.2",
38+
"babel-loader": "^8.0.0-beta.0",
39+
"babel-plugin-import": "^1.12.0",
40+
"babel-plugin-lodash": "^3.3.2",
41+
"babel-plugin-react-transform": "^3.0.0",
42+
"clean-webpack-plugin": "^0.1.19",
43+
"eslint": "^4.19.1",
44+
"eslint-loader": "^2.0.0",
45+
"eslint-plugin-react": "^7.7.0",
46+
"extract-text-webpack-plugin": "^3.0.2",
47+
"happypack": "^5.0.0-beta.4",
48+
"html-webpack-inline-source-plugin": "0.0.10",
49+
"html-webpack-plugin": "^3.2.0",
50+
"mini-css-extract-plugin": "^0.4.0",
51+
"only-if-changed-webpack-plugin": "0.0.3",
52+
"postcss-loader": "^3.0.0",
53+
"postcss-pxtorem": "^4.0.1",
54+
"react-hot-loader": "^4.0.0",
55+
"react-loadable": "^5.4.0",
56+
"terser-webpack-plugin": "^2.2.1",
57+
"webpack": "^4.41.2",
58+
"webpack-cli": "^3.1.1",
59+
"webpack-dev-server": "^3.11.2",
60+
"write-file-webpack-plugin": "^4.2.0"
61+
},
62+
"dependencies": {
63+
"antd": "^3.23.2",
64+
"babel-plugin-transform-async-to-generator": "^6.24.1",
65+
"babel-plugin-transform-runtime": "^6.23.0",
66+
"copy-webpack-plugin": "^4.5.1",
67+
"css-loader": "^0.28.11",
68+
"echarts": "^5.2.2",
69+
"echarts-liquidfill": "^3.0.0",
70+
"file-loader": "^1.1.11",
71+
"html-webpack-include-assets-plugin": "^1.0.4",
72+
"jquery": "^3.6.0",
73+
"jsonwebtoken": "^8.5.1",
74+
"loading-spinner": "^1.2.1",
75+
"lz-string": "^1.4.4",
76+
"node-sass": "^4.14.1",
77+
"numeral": "^2.0.6",
78+
"optimize-css-assets-webpack-plugin": "^4.0.3",
79+
"rc-tween-one": "^2.7.3",
80+
"react": "^16.13.1",
81+
"react-dom": "^16.13.1",
82+
"rrweb": "^0.7.27",
83+
"rrweb-player": "^0.4.0",
84+
"sass-loader": "^10.1.0",
85+
"script-ext-html-webpack-plugin": "^2.0.1",
86+
"style-loader": "^0.20.3",
87+
"url-loader": "^1.0.1",
88+
"webfunny-login": "^1.0.2",
89+
"webfunny-monitor": "^1.3.3",
90+
"webpack-merge": "^4.1.5"
91+
}
92+
}

src/assets/img/scroll.gif

937 KB
Loading

src/assets/img/tuiguang.png

190 KB
Loading

0 commit comments

Comments
 (0)