File tree 4 files changed +8164
-108
lines changed
4 files changed +8164
-108
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
- <div class =" cnt" >
3
- <div >
4
- 首页文章内容页 id = {{this.$route.params.id}} <br >
5
- </div >
2
+ <div class =" page_article" >
3
+ <header class =" header" >
4
+ <h1 class =" title" >
5
+ {{ article.title }} + {{ this.$route.params.id }}
6
+ </h1 >
7
+ <p class =" desc" >
8
+ {{ article.description }}
9
+ </p >
10
+ </header >
11
+ <article class =" content" >
12
+ 这里面是内容
13
+ </article >
6
14
</div >
7
15
</template >
8
16
@@ -11,8 +19,39 @@ import Vue from 'vue'
11
19
12
20
export default Vue .extend ({
13
21
name: ' Article' ,
22
+ data () {
23
+ return {
24
+ article: {
25
+ author: {
26
+ avatar: ' http://img1.3lian.com/gif/more/11/2012/03/d037a77443c0a72a1432d815cd3b5724.jpg' ,
27
+ nickname: ' 昵称'
28
+ },
29
+ title: ' 什么是协程(goroutine),它们是怎样作的呢?' ,
30
+ description: ' 这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述这是描述' ,
31
+ like: 6 ,
32
+ comments: 10 ,
33
+ id: 12 ,
34
+ cover: ' '
35
+ }
36
+ }
37
+ }
14
38
})
15
39
</script >
16
40
<style lang="less">
17
-
41
+ .page_article {
42
+ padding : 0 20px ;
43
+ .header {
44
+ .title {
45
+ color :#333 ;
46
+ font-size : 34 rpx;
47
+ border-bottom : 2px solid #eee ;
48
+ padding : 10px 0 ;
49
+ }
50
+ .desc {
51
+ color :#555 ;
52
+ font-size : 30 rpx;
53
+ margin : 20px 0 30px ;
54
+ }
55
+ }
56
+ }
18
57
</style >
Original file line number Diff line number Diff line change 1
1
<template >
2
- <view >
2
+ <view class = " page_doc " >
3
3
<view class =" doc_info" >
4
4
<view class =" doc_item"
5
5
v-for =" (item,index) in docTitleList"
@@ -45,39 +45,43 @@ export default Vue.extend({
45
45
46
46
</script >
47
47
<style lang="less">
48
- .doc_info {
49
- width : 100% ;
50
- box-sizing : border-box ;
51
- -webkit-box-sizing : border-box ;
52
- padding : 10px 20px 20px 20px ;
53
- }
48
+ .page_doc {
54
49
55
- .doc_item {
56
- width :100% ;
57
- height :80px ;
58
- background :rgba (255 ,255 ,255 ,1 );
59
- border-radius :4px ;
60
- line-height :80px ;
61
- margin-bottom : 10px ;
62
- position : relative ;
63
- }
50
+ .doc_info {
51
+ width : 100% ;
52
+ box-sizing : border-box ;
53
+ -webkit-box-sizing : border-box ;
54
+ padding : 10px 20px 20px 20px ;
55
+ }
64
56
65
- .doc_item_title {
66
- position : absolute ;
67
- left : 20px ;
68
- font-family : PingFangSC- Regular;
69
- font-size : 16px ;
70
- color : #333333 ;
71
- letter-spacing : 0 ;
72
- line-height : 80px ;
73
- font-weight : 400 ;
74
- }
57
+ .doc_item {
58
+ width :100% ;
59
+ height :160 rpx;
60
+ background :rgba (255 ,255 ,255 ,1 );
61
+ border-radius :4px ;
62
+ line-height :160 rpx;
63
+ margin-bottom : 10px ;
64
+ position : relative ;
65
+ }
75
66
76
- .doc_item_icon_right {
77
- position : absolute ;
78
- width : 12px ;
79
- height : 15px ;
80
- top : 35px ;
81
- right : 16px ;
67
+ .doc_item_title {
68
+ position : absolute ;
69
+ left : 20px ;
70
+ font-family : PingFangSC- Regular;
71
+ font-size : 34 rpx;
72
+ color : #333333 ;
73
+ letter-spacing : 0 ;
74
+ line-height : 160 rpx;
75
+ font-weight : 700 ;
76
+ }
77
+
78
+ .doc_item_icon_right {
79
+ position : absolute ;
80
+ width : 12px ;
81
+ height : 15px ;
82
+ top : 35px ;
83
+ right : 16px ;
84
+ }
82
85
}
86
+
83
87
</style >
Original file line number Diff line number Diff line change 1
1
/* eslint-disable vue/no-shared-component-data */
2
2
<template >
3
- <view >
3
+ <view class = " page_me " >
4
4
<img class =" bg" :src =" bgImg" />
5
5
<view class =" baseinfo1" >
6
6
<!-- <image class="head" src="{{headUrl}}"/> -->
@@ -79,75 +79,78 @@ export default Vue.extend({
79
79
})
80
80
</script >
81
81
<style lang="less">
82
- .bg {
83
- width : 100% ;
84
- position : absolute ;
85
- z-index : 1 ;
86
- height : 146px ;
87
- top : 0 ;
88
- }
89
- .baseinfo1 {
90
- width : 94% ;
91
- height : 170px ;
92
- margin : 40px auto 23px ;
93
- background : #FFFFFF ;
94
- box-shadow : 0 2px 10px 4px rgba (239 ,68 ,49 ,0.12 );
95
- border-radius : 10px ;
96
- position : relative ;
97
- z-index : 2 ;
98
- }
99
- .head {
100
- display : block ;
101
- margin : 21px auto 0 ;
102
- padding-top : 21px ;
103
- width : 82px ;
104
- height : 82px ;
105
- border-radius : 82px ;
106
- }
107
- .name {
108
- display : block ;
109
- margin-top : 14px ;
110
- width : 100% ;
111
- text-align : center ;
112
- font-family : PingFangSC- Medium;
113
- font-size : 16px ;
114
- color : #4A4A4A ;
115
- letter-spacing : 0 ;
116
- line-height : 25px ;
117
- }
118
- .info {
119
- margin-bottom : 24px ;
120
- width : 100% ;
121
- border-top : .5px solid #DCDEDF ;
122
- background : white ;
123
- }
124
- .info-item {
125
- width : 100% ;
126
- min-height : 46px ;
127
- position : relative ;
128
- border-bottom : .5px solid #DCDEDF ;
129
- }
130
- .item-icon {
131
- position : absolute ;
132
- width : 18px ;
133
- top : 14px ;
134
- left : 17px ;
135
- height : 18px ;
136
- }
137
- .info-title {
138
- position : absolute ;
139
- left : 54px ;
140
- font-family : PingFangSC- Regular;
141
- font-size : 16px ;
142
- color : #4A4A4A ;
143
- letter-spacing : 0 ;
144
- line-height : 46px ;
145
- }
146
- .right-icon {
147
- position : absolute ;
148
- width : 12px ;
149
- height : 15px ;
150
- top : 17px ;
151
- right : 16px ;
82
+ .page_me {
83
+ .bg {
84
+ width : 100% ;
85
+ position : absolute ;
86
+ z-index : 1 ;
87
+ height : 352 rpx;
88
+ top : 0 ;
89
+ }
90
+ .baseinfo1 {
91
+ width : 94% ;
92
+ height : 240 rpx;
93
+ margin : 40px auto 23px ;
94
+ background : #FFFFFF ;
95
+ box-shadow : 0 2px 10px 4px rgba (239 ,68 ,49 ,0.12 );
96
+ border-radius : 10px ;
97
+ position : relative ;
98
+ z-index : 2 ;
99
+ }
100
+ .head {
101
+ display : block ;
102
+ margin : 21px auto 0 ;
103
+ padding-top : 21px ;
104
+ width : 164 rpx;
105
+ height : 164 rpx;
106
+ border-radius : 82px ;
107
+ }
108
+ .name {
109
+ display : block ;
110
+ margin-top : 14px ;
111
+ width : 100% ;
112
+ text-align : center ;
113
+ font-family : PingFangSC- Medium;
114
+ font-size : 32 rpx;
115
+ color : #4A4A4A ;
116
+ letter-spacing : 0 ;
117
+ line-height : 32 rpx;
118
+ }
119
+ .info {
120
+ margin-bottom : 24px ;
121
+ width : 100% ;
122
+ border-top : .5px solid #DCDEDF ;
123
+ background : white ;
124
+ }
125
+ .info-item {
126
+ width : 100% ;
127
+ display : flex ;
128
+ align-items : center ;
129
+ height : 82 rpx;
130
+ position : relative ;
131
+ border-bottom : .5px solid #DCDEDF ;
132
+ }
133
+ .item-icon {
134
+ position : absolute ;
135
+ width : 36 rpx;
136
+ left : 34 rpx;
137
+ height : 32 rpx;
138
+ }
139
+ .info-title {
140
+ position : absolute ;
141
+ left : 54px ;
142
+ font-family : PingFangSC- Regular;
143
+ font-size : 32 rpx;
144
+ color : #4A4A4A ;
145
+ letter-spacing : 0 ;
146
+ }
147
+ .right-icon {
148
+ position : absolute ;
149
+ width : 24 rpx;
150
+ height : 30 rpx;
151
+ top : 34 rpx;
152
+ right : 32 rpx;
153
+ }
152
154
}
155
+
153
156
</style >
You can’t perform that action at this time.
0 commit comments