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

View File

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