2022-04-21 18:20:39 +08:00
|
|
|
<script lang="ts" setup>
|
2022-04-22 12:47:04 +08:00
|
|
|
import { FullScreen } from "@element-plus/icons-vue"
|
2022-04-22 01:16:02 +08:00
|
|
|
import screenfull from "screenfull"
|
2022-04-21 18:20:39 +08:00
|
|
|
|
|
|
|
const click = () => {
|
|
|
|
if (!screenfull.isEnabled) {
|
2022-04-22 01:16:02 +08:00
|
|
|
ElMessage.warning("您的浏览器无法工作")
|
2022-04-21 18:20:39 +08:00
|
|
|
return
|
|
|
|
}
|
|
|
|
screenfull.toggle()
|
|
|
|
}
|
|
|
|
</script>
|
2022-04-22 12:47:04 +08:00
|
|
|
|
|
|
|
<template>
|
|
|
|
<div @click="click">
|
|
|
|
<el-tooltip effect="dark" content="全屏" placement="bottom">
|
|
|
|
<el-icon :size="20">
|
|
|
|
<FullScreen />
|
|
|
|
</el-icon>
|
|
|
|
</el-tooltip>
|
|
|
|
</div>
|
|
|
|
</template>
|