We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bf643a commit ec0bfcbCopy full SHA for ec0bfcb
src/Component.ts
@@ -95,14 +95,14 @@ export default defineComponent({
95
preventUpdate.value = false
96
return
97
}
98
- // vanilla-jsoneditor 不接受 undefined
99
- // 其默认值为 { text: '' }
100
- // 只有默认值才能清空编辑器
+ // undefined is not accepted by vanilla-jsoneditor
+ // The default value is { text: '' }
+ // Only default value can clear the editor
101
preventOnChange.value = true
102
jsonEditor.value.update([undefined, ''].includes(n)
103
? { text: '' }
104
: {
105
- // text 模式只接受 string
+ // Text mode take strings only
106
// @ts-expect-error: props.mode can't be a boolean
107
[modeToContentKey(props.mode)]: (typeof n !== 'string' && props.mode === 'text')
108
? JSON.stringify(n)
0 commit comments