|
|
|
|
<template>
|
|
|
|
|
<el-tooltip
|
|
|
|
|
effect="dark"
|
|
|
|
|
:content="t('head.fullScreen')"
|
|
|
|
|
placement="bottom"
|
|
|
|
|
:show-after="0"
|
|
|
|
|
:hide-after="10"
|
|
|
|
|
transition=""
|
|
|
|
|
:popper-options="{ modifiers: [{ name: 'eventListeners', enabled: false }] }"
|
|
|
|
|
popper-class="non-interactive-tooltip"
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-button class="head-icon" @click="fullscreen" icon="fullscreen" :size="state.size.size" circle></el-button> -->
|
|
|
|
|
<el-icon @click="fullscreen" class="head-icon">
|
|
|
|
|
<FullScreen />
|
|
|
|
|
</el-icon>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { onMounted } from "vue";
|
|
|
|
|
import { useI18n } from "vue3-i18n";
|
|
|
|
|
import { useStore } from "vuex";
|
|
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
|
|
|
|
const { state, commit, dispatch } = useStore();
|
|
|
|
|
|
|
|
|
|
const fullscreen = () => {
|
|
|
|
|
if (!document.fullscreenElement) {
|
|
|
|
|
document.documentElement.requestFullscreen();
|
|
|
|
|
} else {
|
|
|
|
|
if (document.exitFullscreen) {
|
|
|
|
|
document.exitFullscreen();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onMounted(() => {});
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.non-interactive-tooltip {
|
|
|
|
|
pointer-events: none !important;
|
|
|
|
|
}
|
|
|
|
|
</style>
|