|
@@ -1,6 +1,5 @@
|
|
|
import { useAppStore } from '@/store';
|
|
|
import { MessagePlugin } from 'tdesign-vue-next';
|
|
|
-import { onMounted } from 'vue';
|
|
|
|
|
|
export default function () {
|
|
|
const appStore = useAppStore();
|
|
@@ -35,9 +34,7 @@ export default function () {
|
|
|
document.webkitCancelFullScreen;
|
|
|
|
|
|
if (appStore.isFullscreen) {
|
|
|
- await exitFullscreen.call(document).catch((err) => {
|
|
|
- console.log(err);
|
|
|
- });
|
|
|
+ await exitFullscreen.call(document).catch(() => {});
|
|
|
} else {
|
|
|
await requestFullscreen.call(de).catch(() => {});
|
|
|
}
|
|
@@ -65,14 +62,12 @@ export default function () {
|
|
|
switchFullscreen();
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
|
|
|
- onMounted(() => {
|
|
|
- registFullscreenChange();
|
|
|
appStore.setIsFullScreen(checkDocIsFullscreen());
|
|
|
- });
|
|
|
+ }
|
|
|
|
|
|
return {
|
|
|
switchFullscreen,
|
|
|
+ registFullscreenChange,
|
|
|
};
|
|
|
}
|