vue-fullscreen
时间: 2023-08-18 07:04:49 浏览: 160
vue-fullscreen是一个Vue.js插件,用于在Vue实例或组件中实现全屏功能。根据提供的引用内容,可以看出有三种不同的使用方式。
第一种使用方式是在页面中使用,通过调用全屏函数进行全屏操作。具体的代码实现如下:
```
onFullScreen() {
if (this.fullscreen) {
this.$fullscreen.exit(); //退出全屏
} else {
let dom = this.$refs.page; //通过ref拿到具体的、希望全屏展示的元素
this.$fullscreen.enter(dom, { wrap: false, callback: (f) => {
this.fullscreen = f;
} });
}
}
```
<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [vue-fullscreen实现全屏功能](https://blog.csdn.net/qq_36069339/article/details/130933953)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Vue全屏插件](https://blog.csdn.net/m0_51431448/article/details/122980196)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [`vue-fullscreen` 插件在vue项目中实现F11同样效果的全屏功能](https://blog.csdn.net/weixin_55115202/article/details/130320406)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文