From 37a5081027c374d7b457ad9e4cdbfd49ea6f49a8 Mon Sep 17 00:00:00 2001 From: Mathieu NICOLAS <65437872+mathieunicolas@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:55:36 +0200 Subject: [PATCH 1/2] apply a breaking change Apply vanilla-jsoneditor v1 breaking change related to the createJSONEditor instead of new JSONEditor --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 0d82436..ffef391 100644 --- a/src/index.ts +++ b/src/index.ts @@ -201,7 +201,7 @@ const JsonEditorVue = defineComponent({ }, ) - jsonEditor.value = new JSONEditor({ + jsonEditor.value = createJSONEditor({ target: currentInstance?.$refs.jsonEditorRef as Element, props: initialAttrs, }) From d14696022896046a798a026b26bc2bd6bf762a0c Mon Sep 17 00:00:00 2001 From: Cloyd Lau <31238760+cloydlau@users.noreply.github.com> Date: Tue, 8 Oct 2024 20:19:15 +0800 Subject: [PATCH 2/2] fix: #98 --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index ffef391..094ddd5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import type { JSONContent, JSONEditorPropsOptional, TextContent } from 'vanilla- import type { App, Plugin, PropType } from 'vue-demi' import { destr, safeDestr } from 'destr' import { debounce } from 'lodash-es' -import { JSONEditor, Mode } from 'vanilla-jsoneditor' +import { createJSONEditor, Mode } from 'vanilla-jsoneditor' import { computed, defineComponent, getCurrentInstance, h, isVue3, onMounted, onUnmounted, ref, unref, watch, watchEffect } from 'vue-demi' import { conclude, resolveConfig } from 'vue-global-config' import { PascalCasedName as name } from '../package.json'