File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Vue-Json-Edit
2
2
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
4
4
5
5
6
6
</br >
@@ -28,16 +28,31 @@ import vue from 'vue'
28
28
import JsonEditor from ' vue-json-edit'
29
29
30
30
Vue .use (JsonEditor)
31
-
32
31
```
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
+
33
41
</br >
34
42
35
43
## Example
36
44
Single file component
37
45
``` html
38
46
39
47
<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 >
41
56
</template >
42
57
<script >
43
58
export default {
@@ -46,17 +61,18 @@ export default {
46
61
return {
47
62
jsonData: {
48
63
name: ' mike' ,
49
- age: 22 ,
64
+ age: 23 ,
50
65
phone: ' 18552129932' ,
51
66
address: [' AAA C1' , ' BBB C2' ]
52
67
}
53
68
}
54
69
}
55
70
}
56
71
</script >
57
-
58
72
```
59
73
74
+ </br >
75
+
60
76
## Changelog
61
77
62
78
v1.3.0
You can’t perform that action at this time.
0 commit comments