File tree Expand file tree Collapse file tree 10 files changed +42
-45
lines changed Expand file tree Collapse file tree 10 files changed +42
-45
lines changed Original file line number Diff line number Diff line change 1
- # message-board
1
+ # message
2
2
3
3
> A Vue.js project
4
4
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ module.exports = {
55
55
// Paths
56
56
assetsRoot : path . resolve ( __dirname , '../dist' ) ,
57
57
assetsSubDirectory : 'static' ,
58
- assetsPublicPath : '/' ,
58
+ assetsPublicPath : '. /' ,
59
59
60
60
/**
61
61
* Source Maps
Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta charset ="utf-8 ">
5
5
< meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
6
- < title > message-board </ title >
6
+ < title > message</ title >
7
7
</ head >
8
8
< body >
9
9
< div id ="app "> </ div >
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " message-board " ,
2
+ "name" : " message" ,
3
3
"version" : " 1.0.0" ,
4
4
"description" : " A Vue.js project" ,
5
5
"author" :
" bai3 <[email protected] >" ,
14
14
"build" : " node build/build.js"
15
15
},
16
16
"dependencies" : {
17
- "vue " : " ^2.5.2 " ,
18
- "vue-router " : " ^3.0.1 "
17
+ "element-ui " : " ^2.0.7 " ,
18
+ "vue" : " ^2.5.2 "
19
19
},
20
20
"devDependencies" : {
21
21
"autoprefixer" : " ^7.1.2" ,
50
50
"html-webpack-plugin" : " ^2.30.1" ,
51
51
"jest" : " ^21.2.0" ,
52
52
"jest-serializer-vue" : " ^0.3.0" ,
53
+ "less" : " ^2.7.3" ,
54
+ "less-loader" : " ^4.0.5" ,
53
55
"nightwatch" : " ^0.9.12" ,
54
56
"node-notifier" : " ^5.1.2" ,
55
57
"optimize-css-assets-webpack-plugin" : " ^3.2.0" ,
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app" >
3
- <img src =" ./assets/logo.png" >
4
- <router-view />
3
+ <Message />
5
4
</div >
6
5
</template >
7
6
8
7
<script >
8
+ import Message from ' ./components/Message'
9
9
export default {
10
- name: ' app'
10
+ name: ' app' ,
11
+ components: {
12
+ Message
13
+ }
11
14
}
12
15
</script >
13
16
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" hello" >
3
3
<h1 >{{ msg }}</h1 >
4
- <h2 >Essential Links</h2 >
5
- <ul >
6
- <li ><a href =" https://vuejs.org" target =" _blank" >Core Docs</a ></li >
7
- <li ><a href =" https://forum.vuejs.org" target =" _blank" >Forum</a ></li >
8
- <li ><a href =" https://chat.vuejs.org" target =" _blank" >Community Chat</a ></li >
9
- <li ><a href =" https://twitter.com/vuejs" target =" _blank" >Twitter</a ></li >
10
- <br >
11
- <li ><a href =" http://vuejs-templates.github.io/webpack/" target =" _blank" >Docs for This Template</a ></li >
12
- </ul >
13
- <h2 >Ecosystem</h2 >
14
- <ul >
15
- <li ><a href =" http://router.vuejs.org/" target =" _blank" >vue-router</a ></li >
16
- <li ><a href =" http://vuex.vuejs.org/" target =" _blank" >vuex</a ></li >
17
- <li ><a href =" http://vue-loader.vuejs.org/" target =" _blank" >vue-loader</a ></li >
18
- <li ><a href =" https://github.com/vuejs/awesome-vue" target =" _blank" >awesome-vue</a ></li >
19
- </ul >
4
+ <el-button @click =" visible = true" >按钮</el-button >
5
+ <el-dialog :visible.sync =" visible" title =" Hello world" >
6
+ <p >欢迎使用 Element</p >
7
+ </el-dialog >
20
8
</div >
21
9
</template >
22
10
@@ -25,16 +13,20 @@ export default {
25
13
name: ' HelloWorld' ,
26
14
data () {
27
15
return {
28
- msg: ' Welcome to Your Vue.js App'
16
+ msg: ' Welcome to Your Vue.js App' ,
17
+ visible: false
29
18
}
30
19
}
31
20
}
32
21
</script >
33
22
34
23
<!-- Add "scoped" attribute to limit CSS to this component only -->
35
- <style scoped>
24
+ <style lang="less">
25
+ @bg : red ;
26
+
36
27
h1 , h2 {
37
28
font-weight : normal ;
29
+ color : @bg ;
38
30
}
39
31
ul {
40
32
list-style-type : none ;
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div class =" message" >
3
+ <h1 >留言板</h1 >
4
+ </div >
5
+ </template >
6
+ <style lang="less">
7
+ @bg : blue ;
8
+ h1 {
9
+ color : @bg
10
+ }
11
+
12
+ </style >
13
+
Original file line number Diff line number Diff line change 2
2
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
3
3
import Vue from 'vue'
4
4
import App from './App'
5
- import router from './router'
5
+ import ElementUI from 'element-ui'
6
+ import 'element-ui/lib/theme-chalk/index.css'
7
+ import 'element-ui/lib/index.js'
6
8
7
9
Vue . config . productionTip = false
8
10
11
+ Vue . use ( ElementUI )
12
+
9
13
/* eslint-disable no-new */
10
14
new Vue ( {
11
15
el : '#app' ,
12
- router,
13
16
template : '<App/>' ,
14
17
components : { App }
15
18
} )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ module.exports = {
24
24
collectCoverageFrom : [
25
25
'src/**/*.{js,vue}' ,
26
26
'!src/main.js' ,
27
- '!src/router/index.js' ,
28
27
'!**/node_modules/**'
29
28
]
30
29
}
You can’t perform that action at this time.
0 commit comments