up. 格式化代码
This commit is contained in:
parent
874d611efa
commit
f04586718f
@ -20,7 +20,11 @@
|
||||
autofocus
|
||||
/>
|
||||
<div style="margin-top: 20px">
|
||||
<el-button class="ele-fluid" type="primary" :loading="lockLoading" @click="confirmLock"
|
||||
<el-button
|
||||
class="ele-fluid"
|
||||
type="primary"
|
||||
:loading="lockLoading"
|
||||
@click="confirmLock"
|
||||
>锁定客户端</el-button
|
||||
>
|
||||
</div>
|
||||
@ -30,8 +34,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import { wsInstance, WsSendEventType } from '@/plugins/websocket';
|
||||
import { ElMessage } from "element-plus";
|
||||
import {LockScreenStatus, useClientStore} from "@/store/modules/client";
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { LockScreenStatus, useClientStore } from '@/store/modules/client';
|
||||
|
||||
/** 弹窗是否打开 */
|
||||
const visible = defineModel({ type: Boolean });
|
||||
@ -43,15 +47,15 @@
|
||||
* 确定锁屏
|
||||
*/
|
||||
const confirmLock = () => {
|
||||
if(lockLoading.value){
|
||||
if (lockLoading.value) {
|
||||
return;
|
||||
}
|
||||
lockLoading.value = true;
|
||||
if(wsInstance) {
|
||||
if (wsInstance) {
|
||||
/*
|
||||
* 先快速锁定当前窗口的
|
||||
*/
|
||||
useClientStore().setLockScreen(LockScreenStatus.LOCK)
|
||||
useClientStore().setLockScreen(LockScreenStatus.LOCK);
|
||||
/*
|
||||
* 通知设备下的窗口全部锁屏
|
||||
*/
|
||||
@ -60,8 +64,8 @@
|
||||
});
|
||||
visible.value = false;
|
||||
lockPassword.value = ''; // 清空密码
|
||||
}else{
|
||||
ElMessage.error("锁屏功能不可用");
|
||||
} else {
|
||||
ElMessage.error('锁屏功能不可用');
|
||||
}
|
||||
lockLoading.value = false;
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user