Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/probil/vue-prevent-unload
Vue component that conditionaly prevents page leave/reload
https://github.com/probil/vue-prevent-unload
unload vue-components vue2
Last synced: 2 months ago
JSON representation
Vue component that conditionaly prevents page leave/reload
- Host: GitHub
- URL: https://github.com/probil/vue-prevent-unload
- Owner: probil
- License: mit
- Created: 2018-02-22T15:49:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T00:12:09.000Z (about 1 year ago)
- Last Synced: 2024-04-14T06:14:41.078Z (8 months ago)
- Topics: unload, vue-components, vue2
- Language: JavaScript
- Homepage:
- Size: 182 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# 🚪 Vue prevent unload
[![npm](https://img.shields.io/npm/v/vue-prevent-unload.svg)](https://www.npmjs.com/package/vue-prevent-unload)
[![Github file size](https://img.shields.io/github/size/probil/vue-prevent-unload/dist/vue-prevent-unload.min.js.svg)](https://raw.githubusercontent.com/probil/vue-prevent-unload/master/dist/vue-prevent-unload.min.js)
[![npm](https://img.shields.io/npm/dm/vue-prevent-unload.svg)](https://www.npmjs.com/package/vue-prevent-unload)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/probil/v-mask/master/LICENSE)
[![Vue2](https://img.shields.io/badge/Vue-2.x-brightgreen.svg)](https://vuejs.org/)> Vue component that conditionaly prevents page leave/reload
## :art: Playground on the Web
- https://jsfiddle.net/probil/fhmne57w/
## :cd: Installation
This version requires Vue 2.X.
```sh
npm install vue-prevent-unload
```## :rocket: Usage
```html
import PreventUnload from 'vue-prevent-unload';
export default {
data() {
return {
hasChanges: true,
}
},
components: {
PreventUnload,
}
}```
## :syringe: Tests
In TODO
## :anchor: Semantic Versioning Policy
This plugin follows [semantic versioning](http://semver.org/).
## :newspaper: Changelog
We're using [GitHub Releases](https://github.com/probil/vue-prevent-unload/releases).
## :beers: Contributing
We're more than happy to see potential contributions, so don't hesitate. If you have any suggestions, ideas or problems feel free to add new [issue](https://github.com/probil/vue-prevent-unload/issues), but first please make sure your question does not repeat previous ones.
**Notice:** Don't try to edit files from `dist` as it compiled from `src` by babel and shouldn't be changed manually.
## :lock: License
See the [LICENSE](LICENSE) file for license rights and limitations (MIT).