vue-fullscreen - A simple Vue.js component for fullscreen
A simple and free Vue.js component for fullscreen.
Demo
http://mirari.cc/vue-fullscreen/
Installation
Install from GitHub via NPM
npm install vue-fullscreen
Usage
To use vue-fullscreen, simply import it, and call Vue.use() to install.
<template>
<div id="app">
<fullscreen :fullscreen.sync="fullscreen">
Content
</fullscreen>
<button type="button" @click="toggle" >Fullscreen</button>
</div>
</template>
<script>
import fullscreen from 'vue-fullscreen'
import Vue from 'vue'
Vue.use(fullscreen)
export default {
methods: {
toggle () {
this.fullscreen = !this.fullscreen
}
},
data() {
return {
fullscreen: false
}
}
}
</script>
This post is submitted by our members. Submit a new post.
Topics: Javascript VueJS VueJS 2