Skip to content

Commit 92a8ede

Browse files
committed
installed element ui
1 parent 8b0ce5f commit 92a8ede

File tree

7 files changed

+134
-4
lines changed

7 files changed

+134
-4
lines changed

package-lock.json

Lines changed: 64 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
},
1010
"dependencies": {
1111
"core-js": "^2.6.5",
12+
"element-ui": "^2.11.1",
1213
"vue": "^2.6.10"
1314
},
1415
"devDependencies": {
@@ -18,6 +19,7 @@
1819
"babel-eslint": "^10.0.1",
1920
"eslint": "^5.16.0",
2021
"eslint-plugin-vue": "^5.0.0",
22+
"vue-cli-plugin-element": "^1.0.1",
2123
"vue-template-compiler": "^2.6.10"
2224
},
2325
"eslintConfig": {

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="viewport" content="width=device-width,initial-scale=1.0">
77
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title>hello-world-2</title>
8+
<title>hello-world-2 test</title>
99
</head>
1010
<body>
1111
<noscript>

src/App.vue

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
<template>
22
<div id="app">
3-
<img alt="Vue logo" src="./assets/logo.png">
3+
<img src="./assets/logo.png">
4+
<div>
5+
<p>
6+
If Element is successfully added to this project, you'll see an
7+
<code v-text="'<el-button>'"></code>
8+
below
9+
</p>
10+
<el-button>el-button</el-button>
11+
</div>
412
<HelloWorld msg="Welcome to Your Vue.js App"/>
513
</div>
614
</template>

src/components/Todo/Todo.vue

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!--<template>
2+
<div class="todo">
3+
<h1>FHDATime</h1>
4+
<div class="todoList" v-for="todoList in todo" v-bind:key="todoList.id">
5+
{{todoList.title}}
6+
</div>
7+
<p>quarter</p>
8+
9+
10+
</div>
11+
12+
</template> -->
13+
14+
<template>
15+
<div>
16+
<el-button type="success">测试</el-button>
17+
</div>
18+
<div class = "el-row" style = "margin-left: -6px; margin-right: -6px;">
19+
20+
</div>
21+
</template>
22+
23+
<!--<script>
24+
export default {
25+
name: "Todo",
26+
data() {
27+
return {
28+
todo: [
29+
{
30+
id: 1,
31+
title: "id:one",
32+
completed: false
33+
},
34+
{
35+
id: 2,
36+
title: "id:two",
37+
completed: true
38+
}
39+
]
40+
};
41+
}
42+
};
43+
</script> -->
44+
45+
<style>
46+
47+
</style>

src/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import Vue from 'vue'
22
import App from './App.vue'
33

4+
import ElementUI from 'element-ui'
5+
import 'element-ui/lib/theme-chalk/index.css'
6+
import './plugins/element.js'
7+
Vue.use(ElementUI)
8+
49
Vue.config.productionTip = false
510

611
new Vue({
712
render: h => h(App),
813
}).$mount('#app')
14+

src/plugins/element.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Vue from 'vue'
2+
import Element from 'element-ui'
3+
import 'element-ui/lib/theme-chalk/index.css'
4+
5+
Vue.use(Element)

0 commit comments

Comments
 (0)