Skip to content

Commit

Permalink
新增手机端暂时适配的样式
Browse files Browse the repository at this point in the history
  • Loading branch information
DL若影 committed Aug 18, 2024
1 parent e120095 commit 4cd19c9
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 37 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@

- 在Issues中分享您的想法或建议,无论大小。
- 如果您做了什么有趣的改进,也欢迎在Issues里告诉大家。

您的每一个反馈都可能成为这个小工具进步的契机,我会非常感激。

## 反馈与交流

如果您在使用过程中有任何问题、建议或想法,欢迎提Issue交流。
Expand Down
80 changes: 79 additions & 1 deletion src/components/board.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</div>
</div>
</div>
<el-button type="primary" @click="debug">调试</el-button>
<!-- <el-button type="primary" @click="debug">调试</el-button>-->
</div>
</template>

Expand Down Expand Up @@ -242,4 +242,82 @@ $noteWidth: 700px;
flex-grow: 1;
}
}
@media screen and (max-width: 768px) {
.outBox {
width: 100%;
padding: 10px;
box-sizing: border-box;
}
.note {
width: 100%;
margin: 0 auto 20px;
}
.players-container {
display: flex;
justify-content: space-between;
width: 100%;
}
.players-column {
width: 49%; /* 略微小于50%以确保两列之间有一点间隔 */
}
.player-item {
margin-bottom: 10px;
}
.messageInfo {
display: flex;
align-items: flex-start;
}
.messageInfo-left {
width: 40px; /* 保持固定宽度以确保一致性 */
margin-right: 5px;
}
.messageInfo-left img {
width: 20px;
height: 20px;
}
.player-number {
font-size: 12px;
}
.messageInfo-right {
flex-grow: 1;
width: calc(100% - 45px); /* 减去左侧宽度和间距 */
}
.note h2 {
font-size: 16px;
padding: 8px;
margin-bottom: 10px;
}
.note-textarea {
width: 100%;
}
:deep(.el-textarea__inner) {
width: 100%;
box-sizing: border-box;
font-size: 14px;
padding: 5px;
}
/* 确保 RoleSelector 组件在移动设备上也能正确显示 */
.messageInfo-left .el-select {
width: 100%;
}
.messageInfo-left .el-select .el-input__inner {
padding: 0 5px;
font-size: 12px;
}
}
</style>
13 changes: 0 additions & 13 deletions src/components/nav.vue

This file was deleted.

35 changes: 15 additions & 20 deletions src/views/home.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<template>
<div class="container">
<div class="bgColor">
<div class="title">这是标题</div>
<router-link to="/board">
<el-button color="#6633cc">开始使用</el-button>
</router-link>
<router-link to="/test">
<el-button color="#6633cc" class="btnOld">测试组件</el-button>
</router-link>
<router-link to="/add">
<el-button color="#6633cc" class="btnOld">测试组合</el-button>
</router-link>
</div>
<div class="bgColor">
<div class="title">在线笔记</div>
<router-link to="/board">
<el-button color="#6633cc">开始使用</el-button>
</router-link>
<router-link to="/test">
<el-button color="#6633cc" class="btnOld">beta1</el-button>
</router-link>
<router-link to="/add">
<el-button color="#6633cc" class="btnOld">beta2</el-button>
</router-link>
</div>
</template>

Expand All @@ -33,6 +31,10 @@
.btnOld {
margin-top: 20px;
}
.bgColor {
text-align: center;
}
</style>

<style lang="scss">
Expand All @@ -43,12 +45,5 @@
flex-direction: column;
flex: 1;
background-color: #20240427;
//text-align: center;
}
</style>

<style lang="scss" scoped>
.bgColor {
text-align: center;
}
</style>

0 comments on commit 4cd19c9

Please sign in to comment.