thijsvdanker / vue-protect-form

Vue Component to protect users from leaving a form with changes

Home Page:https://thijsvdanker.github.io/vue-protect-form/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vue protect form CircleCInpm

Protects users from leaving a form with changes by showing a dialog.

Install

You can install it via NPM

npm install @thijsvdanker/vue-protect-form --save

Usage

Include plugin in your main.js file.

import VueProtectForm from 'vue-protect-form'

Vue.use(VueProtectForm)

To protect a form, wrap the form with a <vue-protect-form> tag.
Example:

<vue-protect-form>
    <form method="POST" action="/">
        <input type="text" name="foo">
    </form>
</vue-protect-form>

Documentation

For documentation about properties and usage checkout the docs

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Vue Component to protect users from leaving a form with changes

https://thijsvdanker.github.io/vue-protect-form/

License:MIT License


Languages

Language:Vue 53.9%Language:JavaScript 35.3%Language:HTML 6.7%Language:Shell 4.0%