1.0.1 • Published 8 years ago

vuelation-submit-button v1.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

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>
1.0.1

8 years ago

1.0.0

8 years ago