update
1.修改特殊大屏(宽度200%,偏移中心) 2.设置特殊参数/specialScreen 3.添加隐藏退出功能
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div class="button-d" @click="clickLoginOut"> </div>
|
||||
<a-modal v-model:visible="visible" title="提示" @ok="loginOut">
|
||||
<p>是否退出</p>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { propTypes } from '/@/utils/propTypes.ts';
|
||||
import router from '/@/router';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
outUrl: propTypes.string.def(''),
|
||||
});
|
||||
|
||||
const visible = ref(false);
|
||||
const count = ref(0);
|
||||
const setTimeOutE = ref(null);
|
||||
|
||||
function clickLoginOut() {
|
||||
setTimeOutE.value && clearTimeout(setTimeOutE.value);
|
||||
count.value++;
|
||||
if (count.value >= 5) {
|
||||
count.value = 0;
|
||||
visible.value = true;
|
||||
} else {
|
||||
setTimeOutE.value = setTimeout(() => {
|
||||
count.value = 0;
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
|
||||
function loginOut() {
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
if (props.outUrl) {
|
||||
router.replace(props.outUrl);
|
||||
} else {
|
||||
router.replace('/login');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="less">
|
||||
.button-d {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
z-index: 9999;
|
||||
color: transparent;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
outline: none;
|
||||
padding: 20px 45px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user