diff --git a/AgileConfig.Server.UI/react-ui-antd/src/pages/Configs/comps/JsonEditor.tsx b/AgileConfig.Server.UI/react-ui-antd/src/pages/Configs/comps/JsonEditor.tsx index ac97a71d..4386dcd9 100644 --- a/AgileConfig.Server.UI/react-ui-antd/src/pages/Configs/comps/JsonEditor.tsx +++ b/AgileConfig.Server.UI/react-ui-antd/src/pages/Configs/comps/JsonEditor.tsx @@ -111,6 +111,13 @@ const JsonEditor: React.FC = (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); }}