File tree 4 files changed +70
-21
lines changed
4 files changed +70
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
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 >
File renamed without changes.
Original file line number Diff line number Diff line change 1
1
{
2
2
"scripts" : {
3
- "docs:dev" : " vuepress dev ./ " ,
4
- "docs:build" : " vuepress build ./ "
3
+ "docs:dev" : " vuepress dev docs " ,
4
+ "docs:build" : " vuepress build docs "
5
5
},
6
6
"devDependencies" : {
7
7
"vuepress" : " ^1.5.2"
You can’t perform that action at this time.
0 commit comments