Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
icebob committed May 4, 2016
1 parent 00999d2 commit 3d7c3a4
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,41 @@ https://github.com/icebob/vue-form-generator/archive/master.zip
```

## Usage
Simply require it and add as a component:
```html
<template>
<div class="panel-body">
<vue-form-generator :schema="schema" :model="model" :options="formOptions"></vue-form-generator>
</div>
</template>

```
```js
<script>
import VueFormGenerator from "vue-form-generator";

export default {
...
components: {
VueFormGenerator: VueFormGenerator.component
},

data: {
schema: { ... },
model:
id: 1,
name: "John Doe",
password: "J0hnD03!x4",
skills: ["Javascript", "VueJS"],
email: "[email protected]",
status: true
},
formOptions: {
validateAfterLoad: true,
validateAfterChanged: true
}
}
...
</script>
```

## Examples
Expand Down

0 comments on commit 3d7c3a4

Please sign in to comment.