Skip to content

Commit 670e48f

Browse files
author
rxsun
committed
修改路径
1 parent b1dd25f commit 670e48f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+297
-54
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ vue、react 实现的效果一致,只是运用了不同的框架。其中 vue
1212
用 css 布局实现转盘效果,包括闪烁的灯、转盘、指针等,没有应用任何图片,js 实现抽奖效果。目的是练习自己的基本功,css布局 + 原生js的能力。
1313

1414
## 项目预览
15-
1. vue demo:[vue](./dist/index.html)
16-
2. 原生 js demo: [js](./demo/index.html)
17-
3. react demo: [react](./dist/index.html)
15+
1. [vue](https://esnail.github.io/turntable/vue-turntable/dist/index.html)
16+
2. [css + 原生 js](https://esnail.github.io/turntable/css-js-turntable/index.html)
17+
3. [react](https://esnail.github.io/turntable/react-turntable/build/index.html)

react-turntable/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/coverage
1010

1111
# production
12-
build
1312

1413
# misc
1514
.DS_Store

react-turntable/README.md

+6-38
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,8 @@
1-
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
1+
# react项目 - 转盘抽奖
22

3-
## Available Scripts
4-
5-
In the project directory, you can run:
6-
7-
### `npm start`
8-
9-
Runs the app in the development mode.<br>
10-
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11-
12-
The page will reload if you make edits.<br>
13-
You will also see any lint errors in the console.
14-
15-
### `npm test`
16-
17-
Launches the test runner in the interactive watch mode.<br>
18-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19-
20-
### `npm run build`
21-
22-
Builds the app for production to the `build` folder.<br>
23-
It correctly bundles React in production mode and optimizes the build for the best performance.
24-
25-
The build is minified and the filenames include the hashes.<br>
26-
Your app is ready to be deployed!
27-
28-
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29-
30-
### `npm run eject`
31-
32-
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33-
34-
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
35-
36-
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
37-
38-
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
3+
1. 借助`create-react-app`脚手架搭建环境
4+
2. 采用`lib-flexible``px2rem-loader`适配移动端
5+
3. 采用`sass``react-transition-group`编写 css 及实现进场及出场动画
396

407
## 移动端适配
418
1.采用`lib-flexible``px2rem-loader`进行适配
@@ -57,7 +24,8 @@ const loaders = [
5724
}
5825
```
5926

60-
## build 路径为相对地址,在 package.json 文件中加入`"homepage":"."`
27+
## build 路径为相对地址
28+
在 package.json 文件中加入`"homepage":"."`
6129
```
6230
{
6331
... // 省略
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"main.css": "./static/css/main.9800e957.chunk.css",
3+
"main.js": "./static/js/main.7ecd1429.chunk.js",
4+
"main.js.map": "./static/js/main.7ecd1429.chunk.js.map",
5+
"static/js/1.c771ae26.chunk.js": "./static/js/1.c771ae26.chunk.js",
6+
"static/js/1.c771ae26.chunk.js.map": "./static/js/1.c771ae26.chunk.js.map",
7+
"runtime~main.js": "./static/js/runtime~main.4a686d48.js",
8+
"runtime~main.js.map": "./static/js/runtime~main.4a686d48.js.map",
9+
"static/media/Header.scss": "./static/media/header-bg.8800d61e.png",
10+
"static/media/Turntable.scss": "./static/media/turntable-bg.e4b4446a.png",
11+
"static/css/main.9800e957.chunk.css.map": "./static/css/main.9800e957.chunk.css.map",
12+
"index.html": "./index.html",
13+
"precache-manifest.e26f24e233de7b4246ec8b67e9fa9c8f.js": "./precache-manifest.e26f24e233de7b4246ec8b67e9fa9c8f.js",
14+
"service-worker.js": "./service-worker.js"
15+
}

react-turntable/build/common.css

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/* reset css begin */
2+
html, body, div, span, applet, object, iframe,
3+
h1, h2, h3, h4, h5, h6, p,
4+
blockquote, pre, a, abbr, acronym, address, big,
5+
cite, code, del, dfn, em, font, img,
6+
ins, kbd, q, s, samp, small, strike,
7+
strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li,
8+
fieldset, form, label, legend,
9+
table, caption, tbody, tfoot, thead, tr, th, td,
10+
center, u, b, i {
11+
margin: 0;
12+
padding: 0;
13+
border: 0;
14+
outline: 0;
15+
font-weight: normal;
16+
font-style: normal;
17+
font-size: 100%;
18+
font-family: inherit;
19+
vertical-align: baseline
20+
}
21+
body {
22+
line-height: 1;
23+
}
24+
:focus {
25+
outline: 0
26+
}
27+
ol, ul {
28+
list-style: none
29+
}
30+
table {
31+
border-collapse: collapse;
32+
border-spacing: 0
33+
}
34+
blockquote:before, blockquote:after, q:before, q:after {
35+
content: ""
36+
}
37+
blockquote, q {
38+
quotes: ""
39+
}
40+
input, textarea {
41+
margin: 0;
42+
padding: 0
43+
}
44+
hr {
45+
margin: 0;
46+
padding: 0;
47+
border: 0;
48+
color: #000;
49+
background-color: #000;
50+
height: 1px
51+
}
52+
.router-link-exact-active {
53+
p {
54+
color: red !important;
55+
}
56+
}
57+
/* reset css end */
58+
59+
/* 全局样式 begin */
60+
body {
61+
background: #e74143;
62+
color: #fff;
63+
}
64+
html, body, #root, .app, .loading {
65+
height: 100%;
66+
}
67+
.loading {
68+
display: flex;
69+
flex-direction: column;
70+
justify-content: center;
71+
align-items: center;
72+
background: url('./loading-puff.svg') no-repeat center center;
73+
background-size: 50%;
74+
}
75+
/* 全局样式 end */

react-turntable/build/favicon.ico

3.78 KB
Binary file not shown.

react-turntable/build/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"><link rel="shortcut icon" href="./favicon.ico"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><title>React - 转盘抽奖</title><link rel="stylesheet" href="common.css"/><link href="./static/css/main.9800e957.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div class="loading">正在努力加载</div></div><script>!function(l){function e(e){for(var r,t,n=e[0],o=e[1],u=e[2],f=0,i=[];f<n.length;f++)t=n[f],p[t]&&i.push(p[t][0]),p[t]=0;for(r in o)Object.prototype.hasOwnProperty.call(o,r)&&(l[r]=o[r]);for(s&&s(e);i.length;)i.shift()();return c.push.apply(c,u||[]),a()}function a(){for(var e,r=0;r<c.length;r++){for(var t=c[r],n=!0,o=1;o<t.length;o++){var u=t[o];0!==p[u]&&(n=!1)}n&&(c.splice(r--,1),e=f(f.s=t[0]))}return e}var t={},p={2:0},c=[];function f(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return l[e].call(r.exports,r,r.exports,f),r.l=!0,r.exports}f.m=l,f.c=t,f.d=function(e,r,t){f.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(r,e){if(1&e&&(r=f(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var t=Object.create(null);if(f.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var n in r)f.d(t,n,function(e){return r[e]}.bind(null,n));return t},f.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(r,"a",r),r},f.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},f.p="./";var r=window.webpackJsonp=window.webpackJsonp||[],n=r.push.bind(r);r.push=e,r=r.slice();for(var o=0;o<r.length;o++)e(r[o]);var s=n;a()}([])</script><script src="./static/js/1.c771ae26.chunk.js"></script><script src="./static/js/main.7ecd1429.chunk.js"></script></body></html>
+37
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
self.__precacheManifest = [
2+
{
3+
"revision": "7ecd142988f2a94353ce",
4+
"url": "./static/css/main.9800e957.chunk.css"
5+
},
6+
{
7+
"revision": "7ecd142988f2a94353ce",
8+
"url": "./static/js/main.7ecd1429.chunk.js"
9+
},
10+
{
11+
"revision": "c771ae267235099d8abf",
12+
"url": "./static/js/1.c771ae26.chunk.js"
13+
},
14+
{
15+
"revision": "4a686d48d5a089750c49",
16+
"url": "./static/js/runtime~main.4a686d48.js"
17+
},
18+
{
19+
"revision": "6514dcc68b517654edba2eb5f9c14e2d",
20+
"url": "./static/media/header-title.6514dcc6.png"
21+
},
22+
{
23+
"revision": "8800d61e29c5c6e3d469bb8c5dc543ee",
24+
"url": "./static/media/header-bg.8800d61e.png"
25+
},
26+
{
27+
"revision": "ffbf3fff754bebfd77dd8c3d1e29e464",
28+
"url": "./static/media/decorate1.ffbf3fff.png"
29+
},
30+
{
31+
"revision": "0b17de70bb00b43212770a8540d6b9f9",
32+
"url": "./static/media/turntable.0b17de70.png"
33+
},
34+
{
35+
"revision": "70fc49c00a95cc12b84e93a5e50c2edc",
36+
"url": "./static/media/turntable-pointer.70fc49c0.png"
37+
},
38+
{
39+
"revision": "6033ad092853fc6dd11e6c531dadf620",
40+
"url": "./static/media/decorate2.6033ad09.png"
41+
},
42+
{
43+
"revision": "e4b4446a25df1445c854899361bc02cc",
44+
"url": "./static/media/turntable-bg.e4b4446a.png"
45+
},
46+
{
47+
"revision": "093c67776c204ae045cb8bc8f1155987",
48+
"url": "./index.html"
49+
}
50+
];
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Welcome to your Workbox-powered service worker!
3+
*
4+
* You'll need to register this file in your web app and you should
5+
* disable HTTP caching for this file too.
6+
* See https://goo.gl/nhQhGp
7+
*
8+
* The rest of the code is auto-generated. Please don't update this file
9+
* directly; instead, make changes to your Workbox build configuration
10+
* and re-run your build process.
11+
* See https://goo.gl/2aRDsh
12+
*/
13+
14+
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js");
15+
16+
importScripts(
17+
"./precache-manifest.e26f24e233de7b4246ec8b67e9fa9c8f.js"
18+
);
19+
20+
workbox.clientsClaim();
21+
22+
/**
23+
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
24+
* requests for URLs in the manifest.
25+
* See https://goo.gl/S9QRab
26+
*/
27+
self.__precacheManifest = [].concat(self.__precacheManifest || []);
28+
workbox.precaching.suppressWarnings();
29+
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
30+
31+
workbox.routing.registerNavigationRoute("./index.html", {
32+
33+
blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/],
34+
});

react-turntable/build/static/css/main.9800e957.chunk.css

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-turntable/build/static/css/main.9800e957.chunk.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-turntable/build/static/js/1.c771ae26.chunk.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-turntable/build/static/js/1.c771ae26.chunk.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-turntable/build/static/js/main.7ecd1429.chunk.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-turntable/build/static/js/main.7ecd1429.chunk.js.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react-turntable/build/static/js/runtime~main.4a686d48.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)