File tree Expand file tree Collapse file tree 8 files changed +64
-7
lines changed Expand file tree Collapse file tree 8 files changed +64
-7
lines changed Original file line number Diff line number Diff line change 1
1
.container {
2
2
display: flex;
3
3
height: 100%;
4
- padding: 200rpx 0;
5
4
box-sizing: border-box;
6
5
}
7
- .center {
8
- align-items: center;
9
- justify-content: center;
6
+ .flex {
7
+ display: flex;
10
8
}
11
9
.row {
12
10
flex-direction: row;
13
11
}
14
12
.col {
15
13
flex-direction: column;
16
14
}
15
+ .align_center {
16
+ align-items: center;
17
+ }
18
+ .justify_center {
19
+ justify-content: center;
20
+ }
21
+ .center {
22
+ align-items: center;
23
+ justify-content: center;
24
+ }
Original file line number Diff line number Diff line change 1
1
2
2
var app = getApp ( )
3
3
Page ( {
4
-
4
+ data : {
5
+ login : 'uniquexiaobai' ,
6
+ avatar_url : "https://avatars.githubusercontent.com/u/12796673?v=3"
7
+ }
5
8
} ) ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "navigationBarTitleText" : " Me"
3
+ }
Original file line number Diff line number Diff line change 1
- <view class="container center">
2
- <text>Me</text>
1
+ <view class="container col me">
2
+ <view class="item">
3
+ <image src="{{avatar_url}}" class="avatar"></image>
4
+ <text class="flex1">{{login}}</text>
5
+ <image src="/img/me/angle-right.png" class="icon-right"></image>
6
+ </view>
7
+ <view class="item">
8
+ <image src="/img/me/edit.png" class="icon"></image>
9
+ <text class="flex1">Edit Profile</text>
10
+ <image src="/img/me/angle-right.png" class="icon-right"></image>
11
+ </view>
12
+ <view class="item">
13
+ <image src="/img/me/cog.png" class="icon"></image>
14
+ <text class="flex1">Settings</text>
15
+ <image src="/img/me/angle-right.png" class="icon-right"></image>
16
+ </view>
3
17
</view>
Original file line number Diff line number Diff line change
1
+ .me {
2
+ background: #F0EFF5;
3
+ }
4
+ .item {
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ padding: 5px;
9
+ margin-top: 20px;
10
+ background: #fff;
11
+ }
12
+ .avatar {
13
+ width: 40px;
14
+ height: 40px;
15
+ border: 1px solid #9A9A9A;
16
+ margin-right: 10px;
17
+ }
18
+ .icon {
19
+ width: 15px;
20
+ height: 15px;
21
+ margin-right: 20px;
22
+ }
23
+ .icon-right {
24
+ width: 20px;
25
+ height: 20px;
26
+ }
27
+ .flex1 {
28
+ flex: 1;
29
+ }
You can’t perform that action at this time.
0 commit comments