From 1bdfc745efb183aab881fb6eae982e41d3ad106c Mon Sep 17 00:00:00 2001 From: lin-xin <2981207131@qq.com> Date: Mon, 20 Feb 2017 11:15:58 +0800 Subject: [PATCH] Add vue-core-image-upload --- config/index.js | 74 +++++++++++++++++------------- index.html | 12 ++--- package.json | 1 + src/components/common/sidebar.vue | 2 +- src/components/page/Upload.vue | 60 ++++++++++++++++++++++++ src/components/page/VueTable.vue | 1 - src/router/index.js | 4 ++ static/img/img.jpg | Bin 0 -> 46879 bytes 8 files changed, 113 insertions(+), 41 deletions(-) create mode 100644 src/components/page/Upload.vue create mode 100644 static/img/img.jpg diff --git a/config/index.js b/config/index.js index 196da1f..04e8ca2 100644 --- a/config/index.js +++ b/config/index.js @@ -2,37 +2,45 @@ var path = require('path') module.exports = { - build: { - env: require('./prod.env'), - index: path.resolve(__dirname, '../dist/index.html'), - assetsRoot: path.resolve(__dirname, '../dist'), - assetsSubDirectory: 'static', - assetsPublicPath: '/', - productionSourceMap: true, - // Gzip off by default as many popular static hosts such as - // Surge or Netlify already gzip all static assets for you. - // Before setting to `true`, make sure to: - // npm install --save-dev compression-webpack-plugin - productionGzip: false, - productionGzipExtensions: ['js', 'css'], - // Run the build command with an extra argument to - // View the bundle analyzer report after build finishes: - // `npm run build --report` - // Set to `true` or `false` to always turn it on or off - bundleAnalyzerReport: process.env.npm_config_report - }, - dev: { - env: require('./dev.env'), - port: 8080, - autoOpenBrowser: true, - assetsSubDirectory: 'static', - assetsPublicPath: '/', - proxyTable: {}, - // CSS Sourcemaps off by default because relative paths are "buggy" - // with this option, according to the CSS-Loader README - // (https://github.com/webpack/css-loader#sourcemaps) - // In our experience, they generally work as expected, - // just be aware of this issue when enabling this option. - cssSourceMap: false - } + build: { + env: require('./prod.env'), + index: path.resolve(__dirname, '../dist/index.html'), + assetsRoot: path.resolve(__dirname, '../dist'), + assetsSubDirectory: 'static', + assetsPublicPath: '/', + productionSourceMap: true, + // Gzip off by default as many popular static hosts such as + // Surge or Netlify already gzip all static assets for you. + // Before setting to `true`, make sure to: + // npm install --save-dev compression-webpack-plugin + productionGzip: false, + productionGzipExtensions: ['js', 'css'], + // Run the build command with an extra argument to + // View the bundle analyzer report after build finishes: + // `npm run build --report` + // Set to `true` or `false` to always turn it on or off + bundleAnalyzerReport: process.env.npm_config_report + }, + dev: { + env: require('./dev.env'), + port: 8080, + autoOpenBrowser: true, + assetsSubDirectory: 'static', + assetsPublicPath: '/', + proxyTable: { + '/api':{ + target:'http://jsonplaceholder.typicode.com', + changeOrigin:true, + pathRewrite:{ + '^/api':'' + } + } + }, + // CSS Sourcemaps off by default because relative paths are "buggy" + // with this option, according to the CSS-Loader README + // (https://github.com/webpack/css-loader#sourcemaps) + // In our experience, they generally work as expected, + // just be aware of this issue when enabling this option. + cssSourceMap: false + } } diff --git a/index.html b/index.html index 472a16c..fcc5a85 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,11 @@ -
+7RgRBH6nICnF-z3aZ YbaEyPe`kp$`Ps7$JSp3PN}4Lip*X~BS Pw+0iC7_b)UcE9n7y?6CMs89Yaa{_x9tYKBi053nSa5iev(v3~d)LvN@^E_C
z!H>e%(pt^u>(@I`vK(<$t*(i@7Rb*2z`wbW`C6>^cW+A;sVMr#q(a1;{E-w6!g-xLzBo
z;CZrLcee4*CL}W)uyvM*a|I?-5_|_g;IIRcq`cRYaIzvVB
zHPBE
lwp9>^ft8>0s&DM7Z1h4L2nm
z4QGL-e9f_U3(>NlTTCC7K}g0tHT@Zw0r1$xU6(>z=z>TqK6Aw^+aIqBtElP|~$uGTLM1F;SU4Fgg#?uv1LmmrI(E_-bILTMNaz
zw%Df%a8#=R4nGt5R=SzlUsh^pS8|z+u}m;v-!hz@-+>1_`-;uWp=!!n9`EquQ+q4;
zXO`YIM{y4P0h81D=CE*kqT{`ftiB!UR&Xmb`FP#96Tt&MlyfNV64ztgbZvS$ZIh6y
zN6N%;P0h(@V4&8dJ|Najm7JUB1xV*_L0oksz0F{LX#Uk+IEeV}>ds9=&9~0iv$%^W
zJqSJhk6QVM2I@9_1uY|E=jh|pB)n4%&)LgzBW#$@(Dtr+v36&rPFLL0*L7Jev}T4-
zLbd=a(2uQiVd-9XX0;`F*&NNDqYK0$^7kw7a&uoqqulZ2tX9-#@@4Wur~~fp9jf_O
z=5FR5po=1bkaJqavRri3%9_?Sd=
#{^%@?l(