From eb16800904be1193c3eb7b87ff67048f22011a5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B3=B0?= <348018533@qq.com> Date: Mon, 2 Jul 2018 17:24:12 +0800 Subject: [PATCH] Update README.md --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ca692ad..ebf8aa1 100644 --- a/README.md +++ b/README.md @@ -1 +1,55 @@ -# vue-json-viewer \ No newline at end of file +# vue-json-viewer + +Simple json display component, based on vue + +## Installing: +Using npm: +``` +$ npm install vue-json-viewer +``` +Using bower: + + +``` +$ yarn add vue-json-viewer +``` + +## Example: + +``` html + +``` + +``` js +export default { + name: 'Page', + data() { + return { + jsonData: { + name: [ + {key: 2}, + {key: 'hello word'}, + ], + val: { + b: 'a', + a: 'hello word', + asd2: 1, + asd: false + } + } + } + } +} +``` +## Result +![ABC](http://oxqqtdux0.bkt.clouddn.com/WX20180702-172158.png) + + +## Options: + +| Property | Description | +| ----------- |:-------------| +| value | json data | +| show-copy | display the copy button | +| show-bigger | display the bigger button | +| icon-prefix | Custom Font icon prefix |