mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-04-20 19:07:42 +08:00
feat: message page mobile
This commit is contained in:
@@ -75,7 +75,7 @@ export default {
|
|||||||
border: 1px solid var(--normal-border-color);
|
border: 1px solid var(--normal-border-color);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
||||||
z-index: 10;
|
z-index: 1000;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<slot name="actions">
|
<slot name="actions">
|
||||||
<div v-if="!item.read" class="mark-read-button" @click="markRead(item.id)">
|
<div v-if="!item.read" class="mark-read-button" @click="markRead(item.id)">
|
||||||
标记为已读
|
{{ isMobile ? 'OK' : '标记为已读' }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="has-read-button">已读</div>
|
<div v-else class="has-read-button">已读</div>
|
||||||
</slot>
|
</slot>
|
||||||
@@ -13,11 +13,17 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { isMobile } from '../utils/screen'
|
||||||
export default {
|
export default {
|
||||||
name: 'NotificationContainer',
|
name: 'NotificationContainer',
|
||||||
props: {
|
props: {
|
||||||
item: { type: Object, required: true },
|
item: { type: Object, required: true },
|
||||||
markRead: { type: Function, required: true }
|
markRead: { type: Function, required: true }
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
return {
|
||||||
|
isMobile
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -37,6 +43,7 @@ export default {
|
|||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mark-read-button:hover {
|
.mark-read-button:hover {
|
||||||
@@ -46,4 +53,11 @@ export default {
|
|||||||
.has-read-button {
|
.has-read-button {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.has-read-button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -659,4 +659,10 @@ export default {
|
|||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
border-bottom: 2px solid var(--primary-color);
|
border-bottom: 2px solid var(--primary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.has_read_button {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user