Skip to content

Commit f3fe870

Browse files
committed
optimize UI
1 parent 3d3bafb commit f3fe870

File tree

14 files changed

+42
-35
lines changed

14 files changed

+42
-35
lines changed

example/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
@media screen and (max-width: 42rem)
8585
margin-bottom: 0.5rem
8686
.btn
87-
min-width: 6rem
87+
min-width: 7rem
8888
8989
.main-content
9090
.site-footer

example/common/images/back.svg

+1-1
Loading

example/common/images/index-list.jpeg

-3.07 KB
Loading

example/common/images/picker.jpeg

5.9 KB
Loading
14.8 KB
Loading

example/common/stylus/variable.styl

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// 颜色定义规范
22
//// 主基调
3+
$color-main = #007bff
4+
$color-main-ll = #5aaaff
5+
$color-main-l = #3b99fc
6+
$color-main-d = #0069d9
7+
38
$color-orange = #fc9153
49
$color-regular-blue= #4a4c5b
510
$color-background = #f3f4f5

example/components/index-list/index-list.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276
font-size: $fontsize-small
277277
color: $color-grey
278278
&.active
279-
color: $color-green
279+
color: $color-main-l
280280
@media (max-height: 480px)
281281
li
282282
padding-top: 3px

example/components/input-option/input-option.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
box-shadow: 0 0 1px 1px #eee inset
5353
outline: none
5454
&:focus
55-
border: 1px solid $color-green
55+
border: 1px solid $color-main
5656
5757
</style>

example/components/optional-demo/optional-demo.vue

+13-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="flex-box">
44
<header class="header">
55
<h1>{{title}}</h1>
6-
<span @click="back" class="back">back</span>
6+
<img class="back" :src="backIcon" @click="back" alt="back"/>
77
</header>
88
<div ref="wrapper" class="page-content">
99
<main class="main-content">
@@ -50,6 +50,11 @@
5050
default: ''
5151
}
5252
},
53+
data() {
54+
return {
55+
backIcon: require('../../common/images/back.svg')
56+
}
57+
},
5358
methods: {
5459
back() {
5560
this.$router.back()
@@ -86,14 +91,13 @@
8691
h1
8792
margin: 0
8893
font-size: 16px
89-
font-weight: 700
94+
color: $color-main
9095
.back
9196
position: absolute
92-
top: 0
93-
left: 0
94-
padding: 0 15px
95-
font-size: 14px
96-
color: $color-green
97+
top: 9px
98+
left: 15px
99+
width: 26px
100+
color: $color-main
97101
.page-content
98102
flex: 1 0 95%
99103
overflow scroll
@@ -175,8 +179,8 @@
175179
height: 2.5rem
176180
border-bottom-left-radius: $radius-size-medium
177181
border-bottom-right-radius: $radius-size-medium
178-
background-color: $color-green
179-
box-shadow: 0 0 0 1px $color-green
182+
background-color: $color-main-l
183+
box-shadow: 0 0 0 1px $color-main-l
180184
border: none
181185
outline: none
182186
color: $color-white

example/components/page/page.vue

+11-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="page">
33
<header class="header">
44
<h1>{{title}}</h1>
5-
<span @click="back" class="back">back</span>
5+
<img class="back" :src="backIcon" @click="back" alt="back"/>
66
</header>
77
<div class="wrapper">
88
<section v-show="desc" class="desc">
@@ -32,6 +32,11 @@
3232
default: ''
3333
}
3434
},
35+
data() {
36+
return {
37+
backIcon: require('../../common/images/back.svg')
38+
}
39+
},
3540
methods: {
3641
back() {
3742
this.$router.back()
@@ -64,14 +69,13 @@
6469
h1
6570
margin: 0
6671
font-size: 16px
67-
font-weight: 700
72+
color: $color-main
6873
.back
6974
position: absolute
70-
top: 0
71-
left: 0
72-
padding: 0 15px
73-
font-size: 14px
74-
color: $color-green
75+
top: 9px
76+
left: 15px
77+
width: 26px
78+
color: $color-main
7579
.wrapper
7680
width: 100%
7781
display: flex

example/components/picker/picker.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@
288288
font-size: $fontsize-medium
289289
.confirm
290290
right: 0
291-
color: $color-orange
291+
color: $color-main
292292
&:active
293-
color: $color-active-light-orange-fe
293+
color: $color-main-ll
294294
.cancel
295295
left: 0
296296
&:active

example/components/select-option/select-option.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@
6060
outline: none
6161
border-radius: 0
6262
&:focus
63-
border: 1px solid $color-green
63+
border: 1px solid $color-main
6464
6565
</style>

example/components/switch-option/switch-option.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
border: 2px solid rgba(0, 0, 0, .1)
6363
transition: all 0.1s
6464
&.active
65-
background-color: $color-green
65+
background-color: $color-main-l
6666
border-color: transparent
6767
transition: all 0.2s ease 0.2s
6868
.switch-circle

static/css/stylesheet.css

+5-11
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ a {
1919
.btn {
2020
display: inline-block;
2121
margin-bottom: 1rem;
22-
color: rgba(255, 255, 255, 0.7);
23-
background-color: rgba(255, 255, 255, 0.08);
22+
padding: 0.75rem 1rem;
23+
color: rgba(255, 255, 255, 0.8);
24+
background-color: rgba(255, 255, 255, 0.1);
2425
border-color: rgba(255, 255, 255, 0.2);
2526
border-style: solid;
2627
border-width: 1px;
@@ -30,18 +31,13 @@ a {
3031
margin-left: 1rem; }
3132

3233
.btn:hover {
33-
color: rgba(255, 255, 255, 0.8);
34+
color: rgba(255, 255, 255, 0.9);
3435
text-decoration: none;
3536
background-color: rgba(255, 255, 255, 0.2);
3637
border-color: rgba(255, 255, 255, 0.3); }
3738

38-
@media screen and (min-width: 64em) {
39-
.btn {
40-
padding: 0.75rem 1rem; } }
41-
4239
@media screen and (min-width: 42em) and (max-width: 64em) {
4340
.btn {
44-
padding: 0.6rem 0.9rem;
4541
font-size: 0.9rem; } }
4642

4743
@media screen and (max-width: 42em) {
@@ -111,9 +107,7 @@ a {
111107
max-width: 100%; }
112108
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
113109
margin-top: 1rem;
114-
margin-bottom: 1rem;
115-
font-weight: normal;
116-
color: #159957; }
110+
margin-bottom: 1rem; }
117111
.main-content code {
118112
padding: 2px 4px;
119113
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;

0 commit comments

Comments
 (0)