up. ws update.

This commit is contained in:
扶桑花间 2025-08-28 23:10:13 +08:00
parent ee08474927
commit 5682d05f9f

View File

@ -23,7 +23,11 @@
placeholder="请输入密码解锁" placeholder="请输入密码解锁"
/> />
<div style="margin-top: 20px"> <div style="margin-top: 20px">
<el-button class="ele-fluid" type="primary" @click="confirmUnlock" <el-button
:loading="unlockLoading"
class="ele-fluid"
type="primary"
@click="confirmUnlock"
>解锁客户端</el-button >解锁客户端</el-button
> >
</div> </div>
@ -38,8 +42,19 @@
const visible = ref(false); const visible = ref(false);
const lockPassword = ref(''); const lockPassword = ref('');
const unlockLoading = ref(false);
const confirmUnlock = () => { const confirmUnlock = () => {
clientScreenUnlock({ password: lockPassword.value }); unlockLoading.value = true;
clientScreenUnlock({ password: lockPassword.value })
.then(() => {
visible.value = false;
})
.catch((message) => {
alert(message);
})
.finally(() => {
unlockLoading.value = false;
});
}; };
wsEventManager.subscribe(WsEvent.LOCK_CLIENT_SCREEN, () => { wsEventManager.subscribe(WsEvent.LOCK_CLIENT_SCREEN, () => {
visible.value = true; visible.value = true;