ic-vue-fullsceen
v1.1.0
Published
A Vue directive for browser into a fullscreen mode
Downloads
1
Readme
v-fullscreen
A Vue directive for browser into fullscreen mode.
Install
$ npm i ic-vue-fullscreen || yarn add ic-vue-fullscreen
Usage
import Vue from 'vue'
import IcVueFullscreen from 'ic-vue-fullscreen'
Vue.use(IcVueFullscreen, options) // options is an optional object
<div v-fullscreen>
</div>
If you want to do some stuff when browser into fullscreen mode or exiting fullscreen mode, you can use it with a handler:
<component v-fullscreen="handler"></component>
{
methods: {
handler (fullscreenElement) {
// fullscreenElement is exists when browser into fullscreen
// or is null when browser exited fullscreen
}
}
}
options.events
Currently,
options
only supports aevents
prop. It's an array of events, defaults to ['click'].
More informations about Fullscreen API
, see here