Skip to content

Commit 0733ac0

Browse files
committed
docs: README
1 parent 8c81dc2 commit 0733ac0

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vue-Json-Edit
22

3-
> visual JSON editor built as an vue component. Provides a basic GUI
3+
> Visual JSON Editor built as an vue component. Provides a basic GUI
44
55

66
</br>
@@ -28,16 +28,31 @@ import vue from 'vue'
2828
import JsonEditor from 'vue-json-edit'
2929

3030
Vue.use(JsonEditor)
31-
3231
```
32+
### Props
33+
All props are optional.
34+
35+
* objData: json data
36+
* options
37+
* confirmText: strings of the confirm button
38+
* cancelText: strings of the cancel button
39+
40+
3341
</br>
3442

3543
## Example
3644
Single file component
3745
``` html
3846

3947
<template>
40-
<JsonEditor :objData="jsonData" v-model="jsonData" ></JsonEditor>
48+
<JsonEditor
49+
:options="{
50+
confirmText: 'confirm',
51+
cancelText: 'cancel',
52+
}"
53+
:objData="jsonData"
54+
v-model="jsonData" >
55+
</JsonEditor>
4156
</template>
4257
<script>
4358
export default {
@@ -46,17 +61,18 @@ export default {
4661
return {
4762
jsonData: {
4863
name: 'mike',
49-
age: 22,
64+
age: 23,
5065
phone: '18552129932',
5166
address: ['AAA C1', 'BBB C2']
5267
}
5368
}
5469
}
5570
}
5671
</script>
57-
5872
```
5973

74+
</br>
75+
6076
## Changelog
6177

6278
v1.3.0

0 commit comments

Comments
 (0)