no message

This commit is contained in:
kuaifan 2025-04-19 22:00:02 +08:00
parent 72982387cc
commit b43cbb7afe
2 changed files with 47 additions and 25 deletions

View File

@ -1,6 +1,10 @@
<template> <template>
<div class="setting-device"> <div class="setting-device">
<ul> <ul>
<li v-if="loadIng > 0 && devices.length === 0" class="loading">
<Loading/>
</li>
<template v-else>
<li v-for="device in devices" :key="device.id"> <li v-for="device in devices" :key="device.id">
<div class="icon"> <div class="icon">
<span :class="getIcon(device.detail)"></span> <span :class="getIcon(device.detail)"></span>
@ -26,6 +30,7 @@
<Button v-else @click="onLogout(device)">{{$L('退出登录')}}</Button> <Button v-else @click="onLogout(device)">{{$L('退出登录')}}</Button>
</div> </div>
</li> </li>
</template>
</ul> </ul>
</div> </div>
</template> </template>
@ -54,7 +59,8 @@ export default {
if (typeof this.$parent.updateDeviceCount === "function") { if (typeof this.$parent.updateDeviceCount === "function") {
this.$parent.updateDeviceCount(this.devices.length); this.$parent.updateDeviceCount(this.devices.length);
} }
}).catch(() => { }).catch(({msg}) => {
$A.modalError(msg);
this.devices = [] this.devices = []
}).finally(() => { }).finally(() => {
this.loadIng--; this.loadIng--;

View File

@ -343,6 +343,13 @@
} }
.setting-device { .setting-device {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
overflow: auto;
> ul { > ul {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -358,6 +365,15 @@
border-radius: 12px; border-radius: 12px;
background: rgba(79, 89, 102, .04); background: rgba(79, 89, 102, .04);
&.loading {
background: transparent;
.common-loading {
width: 24px;
height: 24px;
}
}
.icon { .icon {
align-self: flex-start; align-self: flex-start;
display: flex; display: flex;