You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
643 B
26 lines
643 B
6 months ago
|
<template>
|
||
|
<el-tooltip effect="dark" :content="t('head.fullScreen')" placement="bottom">
|
||
|
<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";
|
||
|
const { t } = useI18n();
|
||
|
|
||
|
const fullscreen = () => {
|
||
|
if (!document.fullscreenElement) {
|
||
|
document.documentElement.requestFullscreen();
|
||
|
} else {
|
||
|
if (document.exitFullscreen) {
|
||
|
document.exitFullscreen();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
onMounted(() => { });
|
||
|
</script>
|
||
|
<style lang="scss" scoped></style>
|