|
@ -88,7 +88,7 @@ const props = defineProps({ |
|
|
type: Function, |
|
|
type: Function, |
|
|
default: undefined, |
|
|
default: undefined, |
|
|
}, |
|
|
}, |
|
|
readonlyIf: { |
|
|
readOnlyIf: { |
|
|
type: Function, |
|
|
type: Function, |
|
|
default: () => { |
|
|
default: () => { |
|
|
return false; |
|
|
return false; |
|
@ -147,7 +147,7 @@ const requiredIfComputed = computed(() => { |
|
|
return false; |
|
|
return false; |
|
|
}); |
|
|
}); |
|
|
const readonlyIfComputed = computed(() => { |
|
|
const readonlyIfComputed = computed(() => { |
|
|
return props.readonlyIf({ |
|
|
return props.readOnlyIf({ |
|
|
value: codeMirrorValue.value, |
|
|
value: codeMirrorValue.value, |
|
|
form: props.form, |
|
|
form: props.form, |
|
|
}); |
|
|
}); |
|
@ -232,7 +232,7 @@ onMounted(() => { |
|
|
basicSetup, |
|
|
basicSetup, |
|
|
language.of(getLanguage(props.lang)), |
|
|
language.of(getLanguage(props.lang)), |
|
|
tabSize.of(EditorState.tabSize.of(props.tabSize)), |
|
|
tabSize.of(EditorState.tabSize.of(props.tabSize)), |
|
|
EditorState.readOnly.of(props.readonlyIf(props.form)), |
|
|
EditorState.readOnly.of(props.readOnlyIf(props.form)), |
|
|
EditorView.theme({ |
|
|
EditorView.theme({ |
|
|
'&': { |
|
|
'&': { |
|
|
outline: 'none !important', |
|
|
outline: 'none !important', |
|
|