Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
createInstence() {
this.editor = new JSONEditor(this.$refs.jsonEditor, {
theme: "bootstrap4",
iconlib: "fontawesome4",
schema: this.schema,
startval: this.originValue,
required_by_default: true,
disable_array_reorder: true,
no_additional_properties: true,
});
this.editor.on("change", () => {
const errors = this.editor.validate();
if (errors.length) {
this.$message.error("jsonè¯æ³•æœ‰è¯¯ï¼Œè¯·æ£€æŸ¥");
} else {
const json = this.editor.getValue();
this.originStrinfyVal = JSON.stringify(json, null, 2);
}