Skip to content

Commit ec0bfcb

Browse files
committed
chore: annotations
1 parent 7bf643a commit ec0bfcb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ export default defineComponent({
9595
preventUpdate.value = false
9696
return
9797
}
98-
// vanilla-jsoneditor 不接受 undefined
99-
// 其默认值为 { text: '' }
100-
// 只有默认值才能清空编辑器
98+
// undefined is not accepted by vanilla-jsoneditor
99+
// The default value is { text: '' }
100+
// Only default value can clear the editor
101101
preventOnChange.value = true
102102
jsonEditor.value.update([undefined, ''].includes(n)
103103
? { text: '' }
104104
: {
105-
// text 模式只接受 string
105+
// Text mode take strings only
106106
// @ts-expect-error: props.mode can't be a boolean
107107
[modeToContentKey(props.mode)]: (typeof n !== 'string' && props.mode === 'text')
108108
? JSON.stringify(n)

0 commit comments

Comments
 (0)