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; } ) }, },
标签:vue,viewer,json,JsonViewer,message,data From: https://www.cnblogs.com/huanyun/p/17237189.html