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
           name: utils.assetsPath('media/[name].[hash:7].[ext]')
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
         test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
75
         test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
72
         loader: 'url-loader',
76
         loader: 'url-loader',

+ 2
- 0
package.json View File

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

+ 4
- 2
src/App.vue View File

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

BIN
src/assets/logo.png View File


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

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