vuelation-submit-button
v1.0.1
Published
Vue.js component for submitting a form with a confirmation dialog that will add the button name to the submitted params like in Rails.
Downloads
2
Readme
Vuelation Submit Button
A Vue.js component for submitting a form with a confirmation dialog that will add the button name to the submitted params like in Rails.
Installation
Install via npm:
$ npm install vuelation-submit-button --save
Add webpack config:
{
module: {
loaders: [{
test: /\.vue$/,
loaders: ['vue']
}]
}
}
Usage
Register the Vue component:
Vue.component('submit-button', require('vuelation-submit-button'));
Use the component:
<submit-button name="save" value="Save as Draft"></submit-button>
Add a confirmation prompt:
<submit-button name="save" value="Save as Draft" confirm="Are you sure?"></submit-button>