Skip to content

Commit

Permalink
Merge pull request #115 from wlclass/master
Browse files Browse the repository at this point in the history
UI中json配置器,允许注释 #79
  • Loading branch information
kklldog authored Dec 27, 2022
2 parents 147bbb1 + 4a945f3 commit e20cd40
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ const JsonEditor: React.FC<JsonEditorProps> = (props) => {
defaultValue=""
value={json}
options={{ minimap: { enabled: false } }}
beforeMount={(monaco) => {
monaco.languages.json.jsonDefaults.setDiagnosticsOptions({
validate: true,
allowComments: true,//是否允许json内容中带注释
schemaValidation: 'error',
});
}}
onChange={(v, e) => {
setJson(v);
}}
Expand Down

0 comments on commit e20cd40

Please sign in to comment.