Skip to content

Commit 00043eb

Browse files
committed
updated readme
1 parent ccb7dbd commit 00043eb

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

README.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,51 @@ or if you can just include the script:
1111
```
1212

1313
##Usage
14-
```
14+
```js
1515
import VueFormly from 'vue-formly';
1616
import VueFormlyBootstrap from 'vue-formly-bootstrap';
1717
Vue.use(VueFormly);
1818
Vue.use(VueFormlyBootstrap);
19+
20+
let vm = new Vue({
21+
el: '#app',
22+
data: {
23+
form: {
24+
name: {
25+
type: 'input',
26+
label: 'Your name'
27+
},
28+
sex: {
29+
type: 'select',
30+
label: 'Sex',
31+
options: ['Male', 'Female']
32+
},
33+
comments: {
34+
type: 'textarea',
35+
label: 'Comments'
36+
}
37+
}
38+
},
39+
methods: {
40+
doSomething: function(){}
41+
}
42+
});
43+
```
44+
```html
45+
<div id="el">
46+
<formly-form :form="form" @submit="doSomething">
47+
<button>Submit</button>
48+
</formly-form>
49+
</div>
1950
```
2051
If you include the script it will be installed for you.
2152

2253
Note that this is still a work in progress so some fields are under construction. See the To Do section for what's on the watchlist.
2354

2455
##Options
25-
Coming soon...
56+
57+
###Global options
58+
There are some options that
2659

2760
##To Do
2861
* [x] Input

0 commit comments

Comments
 (0)