1.1.0 • Published 8 years ago
ic-vue-fullsceen v1.1.0
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,
optionsonly supports aeventsprop. It's an array of events, defaults to 'click'.
More informations about Fullscreen API, see here
1.1.0
8 years ago