1、安装
npm install vue-json-viewer --save
2、main.js中引用
import JsonViewer from 'vue-json-viewer' Vue.use(JsonViewer)
3、使用
<json-viewer :value="jsonData" //指定的json数据,在data中声明定义 :expand-depth="5" copyable boxed sort > </json-viewer>
npm install vue-json-viewer --save
import JsonViewer from 'vue-json-viewer' Vue.use(JsonViewer)
<json-viewer :value="jsonData" //指定的json数据,在data中声明定义 :expand-depth="5" copyable boxed sort > </json-viewer>
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。