Authored by htoooth

fix

... ... @@ -5,13 +5,13 @@
<title>Slowpoke 系统</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" href="/dist/main.css">
<link rel="stylesheet" href="/main.css">
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="/dist/vendors.js"></script>
<script type="text/javascript" src="/dist/main.js"></script>
<script type="text/javascript" src="/vendors.js"></script>
<script type="text/javascript" src="/main.js"></script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>Slowpoke 系统</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="stylesheet" href="/dist/main.8deecb0c2ac04cd4c724.css">
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="/dist/vendors.8deecb0c2ac04cd4c724.js"></script>
<script type="text/javascript" src="/dist/main.8deecb0c2ac04cd4c724.js"></script>
</body>
</html>
\ No newline at end of file
... ... @@ -43,6 +43,7 @@
"less": "^2.7.3",
"less-loader": "^4.0.5",
"node-sass": "^3.10.1",
"paper": "^0.11.5",
"sass-loader": "^4.0.2",
"shelljs": "^0.8.1",
"shx": "^0.2.2",
... ...
... ... @@ -8,12 +8,13 @@ import App from './app.vue';
import 'iview/dist/styles/iview.css';
import bus from './plugin/bus'
import paper from './plugin/paper'
Vue.use(VueRouter);
Vue.use(iView);
Vue.use(bus);
Vue.use(paper);
// 路由配置
const RouterConfig = {
... ...
import * as paper from 'paper'
export default {
install(Vue) {
Object.defineProperty(Vue, '$paper', {
value() {
return paper
}
})
}
}
\ No newline at end of file
... ...
... ... @@ -2,3 +2,4 @@ import Vue from 'vue';
import iView from 'iview';
import VueRouter from 'vue-router';
import axios from 'axios';
import paper from 'paper'
\ No newline at end of file
... ...
<template>
<div>
<img src="~asset/img/1.jpg" alt="" srcset="" width="800px">
<canvas id="myCanvas" resize></canvas>
</div>
</template>
<script>
import * as paper from 'paper'
export default {
created() {
},
mounted() {
var canvas = document.getElementById('myCanvas');
// Create an empty project and a view for the canvas:
console.log(this.$paper)
console.log(this.$bus)
paper.setup(canvas);
// Create a Paper.js Path to draw a line into it:
var path = new paper.Path();
// Give the stroke a color
path.strokeColor = 'black';
var start = new paper.Point(100, 100);
// Move to start and draw a line from there
path.moveTo(start);
// Note that the plus operator on Point objects does not work
// in JavaScript. Instead, we need to call the add() function:
path.lineTo(start.add([ 200, -50 ]));
// Draw the view now:
paper.view.draw();
}
}
</script>
... ...
<template>
<div class="product-image">
<span>{{skn}}</span>
<img :src="handle()" alt="" width="150px" height="150px">
<img :src="src" alt="" width="150px" height="150px">
</div>
</template>
... ...
... ... @@ -13,7 +13,7 @@ fs.open('./src/config/env.js', 'w', function (err, fd) {
module.exports = merge(webpackBaseConfig, {
devtool: '#source-map',
output: {
publicPath: '/dist',
publicPath: '/',
filename: '[name].js',
chunkFilename: '[name].chunk.js'
},
... ... @@ -37,9 +37,6 @@ module.exports = merge(webpackBaseConfig, {
'/api': 'http://localhost:8080'
},
port: 8000,
historyApiFallback: {
index: 'index.html',
logger: console.log.bind(console)
}
historyApiFallback: true
}
});
\ No newline at end of file
... ...