Skip to content

Commit

Permalink
2.1.6 released, expose support attr
Browse files Browse the repository at this point in the history
  • Loading branch information
mirari committed Mar 16, 2020
1 parent 1ef54f5 commit 0801991
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ A simple Vue.js component for fullscreen
## Browser support
[Full Screen API](http://caniuse.com/fullscreen)

## Installation
## Installation
Install from GitHub via NPM
```bash
npm install vue-fullscreen
Expand Down Expand Up @@ -103,7 +103,7 @@ export default {



### Methods
### Methods & Attributes

#### toggle([target, options, force])

Expand Down Expand Up @@ -148,9 +148,9 @@ get the fullscreen state.

- Type: `Boolean`

**Caution:** The action is asynchronous, you can not get the expected state immediately following the calling method.
**Caution:** The action is asynchronous, you can not get the expected state immediately following the calling method.

#### isSupported()
#### support

check browser support for the fullscreen API.

Expand Down
5 changes: 3 additions & 2 deletions dist/vue-fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ function exit() {

/* harmony default export */ __webpack_exports__["a"] = ({
getState: getState,
support: support,
toggle: toggle,
enter: enter,
exit: exit
Expand All @@ -292,7 +293,7 @@ var Component = __webpack_require__(5)(
/* cssModules */
null
)
Component.options.__file = "D:\\Workspaces\\Web\\Git\\vue-fullscreen\\src\\component.vue"
Component.options.__file = "D:\\Workspaces\\Git\\vue-fullscreen\\src\\component.vue"
if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key !== "__esModule"})) {console.error("named exports are not supported in *.vue files.")}
if (Component.options.functional) {console.error("[vue-loader] component.vue: functional components are not supported with templates, they should use render functions.")}

Expand Down Expand Up @@ -505,7 +506,7 @@ module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c
style: (_vm.isFullscreen ? [_vm.wrapperStyle] : []),
on: {
"click": function($event) {
_vm.shadeClick($event)
return _vm.shadeClick($event)
}
}
}, [_vm._t("default")], 2)
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-fullscreen.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/views/example/ChartExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="box">
<fullscreen class="wrapper" @change="fullscreenChange" :fullscreen.sync="fullscreen" ref="fullscreen" background="#EEE">
<div class="chart-container"></div>
<button v-if="$fullscreen.isSupported()" type="button" class="btn btn-default btn-map-fullscreen" @click="toggleFullScreen">
<button v-if="$fullscreen.support" type="button" class="btn btn-default btn-map-fullscreen" @click="toggleFullScreen">
<i class="mdi" :class="[fullscreen ? 'mdi-fullscreen-exit' : 'mdi-fullscreen']"></i>
</button>
</fullscreen>
Expand Down
2 changes: 1 addition & 1 deletion example/views/example/MapExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="box">
<div class="map-example" @change="fullscreenChange" :fullscreen.sync="fullscreen" ref="fullscreen">
<div class="map-container"></div>
<button v-if="$fullscreen.isSupported()" type="button" class="btn btn-default btn-map-fullscreen" @click="toggleFullScreen">
<button v-if="$fullscreen.support" type="button" class="btn btn-default btn-map-fullscreen" @click="toggleFullScreen">
<i class="mdi" :class="[fullscreen ? 'mdi-fullscreen-exit' : 'mdi-fullscreen']"></i>
</button>
</div>
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-fullscreen",
"version": "2.1.5",
"version": "2.1.6",
"description": "A simple Vue.js component for fullscreen",
"main": "dist/vue-fullscreen.min.js",
"scripts": {
Expand Down Expand Up @@ -70,6 +70,7 @@
"progress-bar-webpack-plugin": "^1.9.1",
"sass-loader": "^6.0.3",
"serve-favicon": "^2.4.1",
"shelljs": "^0.8.3",
"style-loader": "^0.13.1",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1",
Expand All @@ -83,5 +84,7 @@
"webpack-dev-middleware": "^1.9.0",
"webpack-hot-middleware": "^2.14.0",
"webpack-merge": "^4.0.0"
},
"dependencies": {
}
}
6 changes: 1 addition & 5 deletions src/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ function getState () {
return fullScreenStatus()
}

function isSupported () {
return support
}

function toggle (target, options, force) {
if (!support) {
return
Expand Down Expand Up @@ -101,7 +97,7 @@ function exit () {

export default {
getState,
isSupported,
support,
toggle,
enter,
exit
Expand Down

0 comments on commit 0801991

Please # to comment.