Showing
9 changed files
with
48 additions
and
27 deletions
@@ -5,13 +5,13 @@ | @@ -5,13 +5,13 @@ | ||
5 | <title>Slowpoke 系统</title> | 5 | <title>Slowpoke 系统</title> |
6 | <meta charset="UTF-8"> | 6 | <meta charset="UTF-8"> |
7 | <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"> | 7 | <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"> |
8 | - <link rel="stylesheet" href="/dist/main.css"> | 8 | + <link rel="stylesheet" href="/main.css"> |
9 | </head> | 9 | </head> |
10 | 10 | ||
11 | <body> | 11 | <body> |
12 | <div id="app"></div> | 12 | <div id="app"></div> |
13 | - <script type="text/javascript" src="/dist/vendors.js"></script> | ||
14 | - <script type="text/javascript" src="/dist/main.js"></script> | 13 | + <script type="text/javascript" src="/vendors.js"></script> |
14 | + <script type="text/javascript" src="/main.js"></script> | ||
15 | </body> | 15 | </body> |
16 | 16 | ||
17 | </html> | 17 | </html> |
index_prod.html
deleted
100644 → 0
1 | -<!DOCTYPE html> | ||
2 | -<html lang="zh-CN"> | ||
3 | - | ||
4 | -<head> | ||
5 | - <title>Slowpoke 系统</title> | ||
6 | - <meta charset="UTF-8"> | ||
7 | - <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"> | ||
8 | - <link rel="stylesheet" href="/dist/main.8deecb0c2ac04cd4c724.css"> | ||
9 | -</head> | ||
10 | - | ||
11 | -<body> | ||
12 | - <div id="app"></div> | ||
13 | - <script type="text/javascript" src="/dist/vendors.8deecb0c2ac04cd4c724.js"></script> | ||
14 | - <script type="text/javascript" src="/dist/main.8deecb0c2ac04cd4c724.js"></script> | ||
15 | -</body> | ||
16 | - | ||
17 | -</html> |
@@ -43,6 +43,7 @@ | @@ -43,6 +43,7 @@ | ||
43 | "less": "^2.7.3", | 43 | "less": "^2.7.3", |
44 | "less-loader": "^4.0.5", | 44 | "less-loader": "^4.0.5", |
45 | "node-sass": "^3.10.1", | 45 | "node-sass": "^3.10.1", |
46 | + "paper": "^0.11.5", | ||
46 | "sass-loader": "^4.0.2", | 47 | "sass-loader": "^4.0.2", |
47 | "shelljs": "^0.8.1", | 48 | "shelljs": "^0.8.1", |
48 | "shx": "^0.2.2", | 49 | "shx": "^0.2.2", |
@@ -8,12 +8,13 @@ import App from './app.vue'; | @@ -8,12 +8,13 @@ import App from './app.vue'; | ||
8 | import 'iview/dist/styles/iview.css'; | 8 | import 'iview/dist/styles/iview.css'; |
9 | 9 | ||
10 | import bus from './plugin/bus' | 10 | import bus from './plugin/bus' |
11 | +import paper from './plugin/paper' | ||
11 | 12 | ||
12 | Vue.use(VueRouter); | 13 | Vue.use(VueRouter); |
13 | 14 | ||
14 | - | ||
15 | Vue.use(iView); | 15 | Vue.use(iView); |
16 | Vue.use(bus); | 16 | Vue.use(bus); |
17 | +Vue.use(paper); | ||
17 | 18 | ||
18 | // 路由配置 | 19 | // 路由配置 |
19 | const RouterConfig = { | 20 | const RouterConfig = { |
src/plugin/paper.js
0 → 100644
1 | <template> | 1 | <template> |
2 | + <div> | ||
2 | <img src="~asset/img/1.jpg" alt="" srcset="" width="800px"> | 3 | <img src="~asset/img/1.jpg" alt="" srcset="" width="800px"> |
4 | + <canvas id="myCanvas" resize></canvas> | ||
5 | + </div> | ||
3 | </template> | 6 | </template> |
4 | 7 | ||
5 | <script> | 8 | <script> |
9 | +import * as paper from 'paper' | ||
10 | + | ||
6 | export default { | 11 | export default { |
12 | + created() { | ||
13 | + }, | ||
14 | + mounted() { | ||
15 | + var canvas = document.getElementById('myCanvas'); | ||
16 | + // Create an empty project and a view for the canvas: | ||
17 | + | ||
18 | + console.log(this.$paper) | ||
19 | + console.log(this.$bus) | ||
7 | 20 | ||
21 | + paper.setup(canvas); | ||
22 | + // Create a Paper.js Path to draw a line into it: | ||
23 | + var path = new paper.Path(); | ||
24 | + // Give the stroke a color | ||
25 | + path.strokeColor = 'black'; | ||
26 | + var start = new paper.Point(100, 100); | ||
27 | + // Move to start and draw a line from there | ||
28 | + path.moveTo(start); | ||
29 | + // Note that the plus operator on Point objects does not work | ||
30 | + // in JavaScript. Instead, we need to call the add() function: | ||
31 | + path.lineTo(start.add([ 200, -50 ])); | ||
32 | + // Draw the view now: | ||
33 | + paper.view.draw(); | ||
34 | + } | ||
8 | } | 35 | } |
9 | </script> | 36 | </script> |
10 | 37 |
1 | <template> | 1 | <template> |
2 | <div class="product-image"> | 2 | <div class="product-image"> |
3 | <span>{{skn}}</span> | 3 | <span>{{skn}}</span> |
4 | - <img :src="handle()" alt="" width="150px" height="150px"> | 4 | + <img :src="src" alt="" width="150px" height="150px"> |
5 | </div> | 5 | </div> |
6 | </template> | 6 | </template> |
7 | 7 |
@@ -13,7 +13,7 @@ fs.open('./src/config/env.js', 'w', function (err, fd) { | @@ -13,7 +13,7 @@ fs.open('./src/config/env.js', 'w', function (err, fd) { | ||
13 | module.exports = merge(webpackBaseConfig, { | 13 | module.exports = merge(webpackBaseConfig, { |
14 | devtool: '#source-map', | 14 | devtool: '#source-map', |
15 | output: { | 15 | output: { |
16 | - publicPath: '/dist', | 16 | + publicPath: '/', |
17 | filename: '[name].js', | 17 | filename: '[name].js', |
18 | chunkFilename: '[name].chunk.js' | 18 | chunkFilename: '[name].chunk.js' |
19 | }, | 19 | }, |
@@ -37,9 +37,6 @@ module.exports = merge(webpackBaseConfig, { | @@ -37,9 +37,6 @@ module.exports = merge(webpackBaseConfig, { | ||
37 | '/api': 'http://localhost:8080' | 37 | '/api': 'http://localhost:8080' |
38 | }, | 38 | }, |
39 | port: 8000, | 39 | port: 8000, |
40 | - historyApiFallback: { | ||
41 | - index: 'index.html', | ||
42 | - logger: console.log.bind(console) | ||
43 | - } | 40 | + historyApiFallback: true |
44 | } | 41 | } |
45 | }); | 42 | }); |
-
Please register or login to post a comment