Skip to content

Commit 78ca8c2

Browse files
author
张波
committed
init repo
1 parent 6cd15b6 commit 78ca8c2

File tree

4 files changed

+70
-21
lines changed

4 files changed

+70
-21
lines changed

.vuepress/components/Card.vue

-19
This file was deleted.

docs/.vuepress/components/Card.vue

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<template lang="html">
2+
<div class="main">
3+
<div v-for="item in list">
4+
<h3>{{item.title}}</h3>
5+
<div class="list">
6+
<div v-for="sub in item.data" class="sub" :style="{background: `url(${sub.img}) no-repeat`, backgroundSize: '100%'}">
7+
<div class="title">{{sub.title}}</div>
8+
</div>
9+
</div>
10+
</div>
11+
</div>
12+
</template>
13+
14+
<script>
15+
const list = [
16+
{
17+
title: '官方推荐库',
18+
data: [
19+
{
20+
desc: '',
21+
img: 'http://static.vue-js.com/feef6400-bc18-11ea-9a81-55f6f6d89e24.png',
22+
title: 'Vue Router'
23+
},
24+
{
25+
desc: '',
26+
img: 'http://static.vue-js.com/cbdf2fa0-bc18-11ea-9a81-55f6f6d89e24.png',
27+
title: 'Vuex'
28+
},
29+
{
30+
desc: '',
31+
img: 'http://static.vue-js.com/2c3c6020-bc19-11ea-9a81-55f6f6d89e24.png',
32+
title: 'Axios'
33+
},
34+
]
35+
}
36+
]
37+
export default {
38+
name: 'Card',
39+
props: {
40+
41+
},
42+
computed: {
43+
44+
},
45+
data(){
46+
return {
47+
list
48+
}
49+
},
50+
methods: {
51+
52+
}
53+
}
54+
</script>
55+
56+
<style scoped>
57+
.main{
58+
width: 100%;
59+
}
60+
.list{
61+
display: flex;
62+
}
63+
.sub{
64+
flex: 0 0 30%;
65+
height: 200px;
66+
background-size: 100%;
67+
}
68+
</style>

README.md docs/README.md

File renamed without changes.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scripts": {
3-
"docs:dev": "vuepress dev ./",
4-
"docs:build": "vuepress build ./"
3+
"docs:dev": "vuepress dev docs",
4+
"docs:build": "vuepress build docs"
55
},
66
"devDependencies": {
77
"vuepress": "^1.5.2"

0 commit comments

Comments
 (0)