mirror of
https://github.com/directus/directus.git
synced 2026-01-28 03:58:02 -05:00
Fix type mismatches + set min height and width of code
This commit is contained in:
@@ -72,7 +72,7 @@ export default defineComponent({
|
||||
|
||||
await getImports(cmOptions.value);
|
||||
codemirror.value = CodeMirror.fromTextArea(codemirrorElVal, cmOptions.value);
|
||||
codemirror.value.setValue(stringValue.value || props.template);
|
||||
codemirror.value.setValue(stringValue.value || props.template || '');
|
||||
await setLanguage();
|
||||
codemirror.value.on('change', (cm) => {
|
||||
const content = cm.getValue();
|
||||
@@ -152,7 +152,7 @@ export default defineComponent({
|
||||
}
|
||||
await import(`codemirror/mode/${lang}/${lang}.js`);
|
||||
await import(`codemirror/addon/lint/${linter}-lint.js`);
|
||||
codemirror.value.setOption('lint', CodeMirror.lint[linter]);
|
||||
codemirror.value.setOption('lint', (CodeMirror as any).lint[linter]);
|
||||
} else {
|
||||
await import(`codemirror/mode/${lang}/${lang}.js`);
|
||||
codemirror.value.setOption('mode', { name: lang });
|
||||
@@ -278,8 +278,8 @@ export default defineComponent({
|
||||
.interface-code {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
font-size: 12px;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--primary-125);
|
||||
}
|
||||
|
||||
12
src/shims.d.ts
vendored
12
src/shims.d.ts
vendored
@@ -19,17 +19,21 @@ declare module 'vuedraggable' {
|
||||
}
|
||||
|
||||
declare module 'jsonlint-mod' {
|
||||
export default any;
|
||||
const x: any;
|
||||
export default x;
|
||||
}
|
||||
|
||||
declare module 'jshint' {
|
||||
export default any;
|
||||
const x: any;
|
||||
export default x;
|
||||
}
|
||||
|
||||
declare module 'csslint' {
|
||||
export default any;
|
||||
const x: any;
|
||||
export default x;
|
||||
}
|
||||
|
||||
declare module 'js-yaml' {
|
||||
export default any;
|
||||
const x: any;
|
||||
export default x;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,9 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
|
||||
|
||||
.CodeMirror-scroll {
|
||||
position: relative;
|
||||
height: 100%; margin-right: -50px;
|
||||
height: 100%;
|
||||
min-height: var(--input-height-tall);
|
||||
margin-right: -50px;
|
||||
|
||||
/* 50px is the magic margin used to hide the element's real scrollbars */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user