Skip to content

Commit

Permalink
Additional props.
Browse files Browse the repository at this point in the history
Added `id` and `key` props for better integration purposes.
  • Loading branch information
amostajo committed Sep 7, 2016
1 parent 6180977 commit 51d5c2a
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ Prop | Data Type | Default | Description
`emulate-http` | Boolean | | Flag that indicates if request should emulate HTTP ([reference](https://github.com/vuejs/vue-resource/blob/master/docs/http.md#options)).
`emulate-json` | Boolean | | Flag that indicates if request should emulate JSON ([reference](https://github.com/vuejs/vue-resource/blob/master/docs/http.md#options)).
`errors` | Object | Object | List of default validation rules error messages.
`id` | String | | Form given ID.
`key` | String | | Form given loop key (i.e. in case of being used inside a v-for).

### Request

Expand Down
22 changes: 21 additions & 1 deletion dist/vue.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Alejandro Mostajo <http://about.me/amostajo>
* @copyright 10Quality <http://www.10quality.com>
* @license MIT
* @version 1.0.4
* @version 1.0.5
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -103,6 +103,26 @@ Vue.component('vform', Vue.extend({
};
},
},
/**
* Form given ID.
* @since 1.0.5
* @var string
*/
id:
{
type: [String, Number],
default: undefined,
},
/**
* Form loop key (in case it its used inside a v-for).
* @since 1.0.5
* @var string
*/
key:
{
type: [String, Number],
default: undefined,
},
},
data: function() {
return {
Expand Down
2 changes: 1 addition & 1 deletion dist/vue.form.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-form",
"version": "1.0.4",
"version": "1.0.5",
"description": "Form component for Vue JS.",
"main": "dist/vue.social-share.js",
"repository": {
Expand Down
22 changes: 21 additions & 1 deletion src/vue.form.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Alejandro Mostajo <http://about.me/amostajo>
* @copyright 10Quality <http://www.10quality.com>
* @license MIT
* @version 1.0.4
* @version 1.0.5
*/
Vue.component('vform', Vue.extend({
props:
Expand Down Expand Up @@ -103,6 +103,26 @@ Vue.component('vform', Vue.extend({
};
},
},
/**
* Form given ID.
* @since 1.0.5
* @var string
*/
id:
{
type: [String, Number],
default: undefined,
},
/**
* Form loop key (in case it its used inside a v-for).
* @since 1.0.5
* @var string
*/
key:
{
type: [String, Number],
default: undefined,
},
},
data: function() {
return {
Expand Down

0 comments on commit 51d5c2a

Please sign in to comment.