vue-prevent-unload

Vue component that conditionaly prevents page leave/reload
22,913 8
Install
npm install vue-prevent-unload
Latest Version:0.2.3
License:MIT
Last Updated:Sep 26, 2024
Links: GitHub  ·  npm
Maintainer: probil

🚪 Vue prevent unload

Vue component that conditionaly prevents page leave/reload

:art: Playground on the Web

In TODO

:cd: Installation

This version requires Vue 2.X.

npm install vue-prevent-unload

:rocket: Usage

<template>
  <PreventUnload :when="hasChanges"/>
</template>
<script>
  import PreventUnload from 'vue-prevent-unload';
  export default {
    data() {
      return {
        hasChanges: true,
      }
    },
    components: {
      PreventUnload,
    }
  }
</script>

:syringe: Tests

In TODO

:anchor: Semantic Versioning Policy

This plugin follows semantic versioning.

:newspaper: Changelog

We're using GitHub 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, 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 file for license rights and limitations (MIT).

Related Packages

vue

The progressive JavaScript framework for building modern web UI.

588,019,132 54,801
vue
eslint-plugin-vue

Official ESLint plugin for Vue.js

266,364,830 4,591
@vueuse/shared
372,738,348 22,398
@vitejs/plugin-vue

The official plugin for Vue SFC support in Vite.

333,357,380 686
@vueuse/core

Collection of essential Vue Composition Utilities

367,188,523 22,398

Version History

Version Released License
0.2.3 MIT
0.2.2 MIT
0.2.1 MIT
0.2.0 MIT