File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1020,9 +1020,12 @@ Including the boolean properties of svelte-jsoneditor like `readOnly` with no va
10201020
10211021``` vue
10221022<script setup>
1023- import { onMounted, ref } from 'vue'
1023+ import { onMounted, useTemplateRef } from 'vue'
10241024
1025- const jsonEditorVueRef = ref()
1025+ // Vue ≥ v3.5
1026+ const jsonEditorVueRef = useTemplateRef('jsonEditorVueRef')
1027+ // Vue < v3.5
1028+ // const jsonEditorVueRef = ref()
10261029
10271030onMounted(() => {
10281031 jsonEditorVueRef.value.jsonEditor.focus()
Original file line number Diff line number Diff line change @@ -1018,9 +1018,12 @@ import { Mode } from 'vanilla-jsoneditor'
10181018
10191019``` vue
10201020<script setup>
1021- import { onMounted, ref } from 'vue'
1021+ import { onMounted, useTemplateRef } from 'vue'
10221022
1023- const jsonEditorVueRef = ref()
1023+ // Vue ≥ v3.5
1024+ const jsonEditorVueRef = useTemplateRef('jsonEditorVueRef')
1025+ // Vue < v3.5
1026+ // const jsonEditorVueRef = ref()
10241027
10251028onMounted(() => {
10261029 jsonEditorVueRef.value.jsonEditor.focus()
You can’t perform that action at this time.
0 commit comments