Skip to content

Commit

Permalink
update 样式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanm-ZH committed Jan 19, 2021
1 parent e2fa22c commit 55fc673
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
18 changes: 11 additions & 7 deletions src/views/todoList/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<input
type="checkbox"
class="toggle"
:value="todo.completed"
:value="+todo.completed"
:checked="todo.completed"
@click="optCompletedClick"
/>
Expand Down Expand Up @@ -54,9 +54,8 @@ export default defineComponent({
font-size: 24px;
border-bottom: 1px solid rgba(0, 0, 0, 0.06);
&:hover {
.destroy:after {
content: "x";
font-size: 20px;
.destroy::before {
opacity: 1;
}
}
Expand Down Expand Up @@ -120,11 +119,16 @@ export default defineComponent({
border-width: 0;
cursor: pointer;
outline: none;
}
.notPc {
.destroy:after {
&::before {
content: "x";
font-size: 20px;
opacity: 0;
transition: opacity 1s;
}
}
.notPc {
.destroy::before {
opacity: 1;
}
}
</style>
15 changes: 11 additions & 4 deletions src/views/todoList/tab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export default defineComponent({
background-color: #ffffff;
font-size: 14px;
-webkit-font-smoothing: antialiased;
position: sticky;
bottom: 0;
}
.left,
.tabs {
Expand Down Expand Up @@ -111,24 +113,28 @@ export default defineComponent({
width: 200px;
display: flex;
justify-content: space-around;
& > span {
font-weight: bold;
}
* {
display: inline-block;
padding: 0px 10px;
cursor: pointer;
border: 1px solid rgba(175, 47, 47, 0);
&.actived {
background: #42b983;
background-color: #42b983;
border-radius: 3px;
color: #fff;
font-weight: bold;
transition: background-color 0.5s;
}
}
}
@media (max-width: 28.125rem) {
.helper {
flex-direction: row;
flex-wrap: wrap;
position: relative;
position: sticky;
bottom: 0;
}
.left {
width: 6.25rem;
Expand All @@ -146,7 +152,8 @@ export default defineComponent({
.helper {
flex-direction: row;
flex-wrap: wrap;
position: relative;
position: sticky;
bottom: 0;
}
.left {
padding: 0;
Expand Down
3 changes: 2 additions & 1 deletion src/views/todoList/todo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ export default defineComponent({
}
}
.add-input {
position: relative;
margin: 0px;
width: 100%;
font-size: 24px;
Expand All @@ -154,6 +153,8 @@ export default defineComponent({
z-index: 1000;
display: flex;
text-align: center;
position: sticky;
top: 0;
@media (max-width: 18.75rem) {
font-size: 1rem;
}
Expand Down

0 comments on commit 55fc673

Please sign in to comment.