yuantianjiao 6 years ago
parent
commit
97d70ba4ee
5 changed files with 13 additions and 5 deletions
  1. 4
    0
      build/webpack.base.conf.js
  2. 2
    0
      package.json
  3. 4
    2
      src/App.vue
  4. BIN
      src/assets/logo.png
  5. 3
    3
      src/router/index.js

+ 4
- 0
build/webpack.base.conf.js View File

@@ -67,6 +67,10 @@ module.exports = {
67 67
           name: utils.assetsPath('media/[name].[hash:7].[ext]')
68 68
         }
69 69
       },
70
+      {
71
+        test: /\.scss$/,
72
+        loaders: ["style", "css", "sass"]
73
+      },
70 74
       {
71 75
         test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
72 76
         loader: 'url-loader',

+ 2
- 0
package.json View File

@@ -54,6 +54,7 @@
54 54
     "jest-serializer-vue": "^0.3.0",
55 55
     "nightwatch": "^0.9.12",
56 56
     "node-notifier": "^5.1.2",
57
+    "node-sass": "^4.8.3",
57 58
     "optimize-css-assets-webpack-plugin": "^3.2.0",
58 59
     "ora": "^1.2.0",
59 60
     "portfinder": "^1.0.13",
@@ -61,6 +62,7 @@
61 62
     "postcss-loader": "^2.0.8",
62 63
     "postcss-url": "^7.2.1",
63 64
     "rimraf": "^2.6.0",
65
+    "sass-loader": "^7.1.0",
64 66
     "selenium-server": "^3.0.1",
65 67
     "semver": "^5.3.0",
66 68
     "shelljs": "^0.7.6",

+ 4
- 2
src/App.vue View File

@@ -1,6 +1,5 @@
1 1
 <template>
2 2
   <div id="app">
3
-    <img src="./assets/logo.png">
4 3
     <router-view/>
5 4
   </div>
6 5
 </template>
@@ -12,12 +11,15 @@ export default {
12 11
 </script>
13 12
 
14 13
 <style>
14
+@import 'style/main.sass';
15 15
 #app {
16 16
   font-family: 'Avenir', Helvetica, Arial, sans-serif;
17 17
   -webkit-font-smoothing: antialiased;
18 18
   -moz-osx-font-smoothing: grayscale;
19 19
   text-align: center;
20 20
   color: #2c3e50;
21
-  margin-top: 60px;
21
+  width: 100%;
22
+  height: 100%;
23
+  position: relative;
22 24
 }
23 25
 </style>

BIN
src/assets/logo.png View File


+ 3
- 3
src/router/index.js View File

@@ -1,6 +1,6 @@
1 1
 import Vue from 'vue'
2 2
 import Router from 'vue-router'
3
-import HelloWorld from '@/components/HelloWorld'
3
+import userCenter from '../page/userCenter/userCenter'
4 4
 
5 5
 Vue.use(Router)
6 6
 
@@ -8,8 +8,8 @@ export default new Router({
8 8
   routes: [
9 9
     {
10 10
       path: '/',
11
-      name: 'HelloWorld',
12
-      component: HelloWorld
11
+      name: 'userCenter',
12
+      component: userCenter
13 13
     }
14 14
   ]
15 15
 })