Skip to content

Commit

Permalink
fix(monitor):修改高亮为json非js
Browse files Browse the repository at this point in the history
  • Loading branch information
zy445566 committed Jan 18, 2021
1 parent 3a1248f commit 8631a27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "before-server",
"version": "1.0.68",
"version": "1.0.69",
"description": "before server for query client request",
"main": "index.js",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion ui/src/pages/myMonitor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {HTMLContent, MyRouter} from 'web-components-content'
const {getQuery} = MyRouter;
import apiMarkDownTemplate from './api-template.md'
import * as prismjs from 'prismjs'
import * as _prismjsJson from 'prismjs/components/prism-json';
export default class myMonitor extends HTMLContent {
connectedCallback() {
this.ws = null;
Expand Down Expand Up @@ -159,7 +160,7 @@ export default class myMonitor extends HTMLContent {

getJsonPrettyCode(jsonBodyData) {
if(jsonBodyData.isJson) {
jsonBodyData.body = prismjs.highlight(jsonBodyData.body,prismjs.languages.javascript,'javascript');
jsonBodyData.body = prismjs.highlight(jsonBodyData.body,prismjs.languages.json,'json');
}
return jsonBodyData;
}
Expand Down

0 comments on commit 8631a27

Please sign in to comment.