Skip to content
Vue component that conditionaly prevents page leave/reload
JavaScript Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist build: build 0.2.3 Mar 7, 2018
scripts fix: default export usage in browser Mar 7, 2018
src fix: chrome issue when default browser message wasn't saved Mar 7, 2018
.babelrc feat(precompile): precompile es6 and umd builds using rollup and babel Feb 23, 2018
.gitignore chore(vcs): add gitignore and npmignore files Feb 23, 2018
.npmignore chore(vcs): add gitignore and npmignore files Feb 23, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Feb 26, 2018
LICENSE Initial commit Feb 22, 2018
README.md
package-lock.json build: release 0.2.3 Mar 7, 2018
package.json build: release 0.2.3 Mar 7, 2018

README.md

🚪 Vue prevent unload

npm Github file size npm GitHub license Vue2

Vue component that conditionaly prevents page leave/reload

🎨 Playground on the Web

💿 Installation

This version requires Vue 2.X.

npm install vue-prevent-unload

🚀 Usage

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

💉 Tests

In TODO

⚓️ Semantic Versioning Policy

This plugin follows semantic versioning.

📰 Changelog

We're using GitHub Releases.

🍻 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.

🔒 License

See the LICENSE file for license rights and limitations (MIT).

You can’t perform that action at this time.