vue-json-viewer 展示json数据
main.js
import JsonViewer from 'vue-json-viewer'
Vue.use(JsonViewer);
vue
<el-dialog title="退款数据详情" :visible.sync="dialogvisible2" v-if="dialogvisible2"> <json-viewer :value="jsondata" sort :expand-depth="5"></json-viewer> </el-dialog>
methods: { showrawdata(data) { this.loading = true; refundAPI.refundQuery_RawData({ outRefundNo: data.outRefundNo }).then( data => { if (data.code == 0) { this.jsondata = data.data; this.dialogvisible2 = true; } else { this.$message({ message: data.message, type: 'warning', }); } this.loading = false; } ) }, },