Skip to content

vuelation/submit-button

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages