We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Every time you click, Report an error in vue3 + element plus
<template> <el-tooltip v-model="visible" :hide-after="0"> <template #content> <span>{{ toolTipContent }}</span> </template> <v-svg-icon :icon-class="iconClass" @click="handleToggle" @mouseenter="visible = true" @mouseleave="visible = false" /> </el-tooltip> </template> <script setup lang="ts"> import { ref, computed, onBeforeUnmount, onMounted } from 'vue' import { ElMessage } from 'element-plus' import screenfull from 'screenfull' const visible = ref(false) const isFullscreen = ref(false) const toolTipContent = computed(() => (isFullscreen.value ? '退出全屏' : '全屏')) const iconClass = computed(() => (isFullscreen.value ? 'exit-fullscreen' : 'fullscreen')) const handleToggle = () => { if (!screenfull.isEnabled) { ElMessage({ message: 'you browser can not work', type: 'warning', }) return false } screenfull.toggle().catch(() => '') } const handleChange = () => { isFullscreen.value = screenfull.isFullscreen } onBeforeUnmount(() => { if (screenfull.isEnabled) { screenfull.off('change', handleChange) } }) onMounted(() => { if (screenfull.isEnabled) { screenfull.on('change', handleChange) } }) </script>
The text was updated successfully, but these errors were encountered:
There's no problem with the library, its the default browser behaviour that cannot be manipulated.
Sorry, something went wrong.
No branches or pull requests
Every time you click, Report an error in vue3 + element plus
The text was updated successfully, but these errors were encountered: