mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: new judge config (#533)
Co-authored-by: panda <panda_dtdyy@outlook.com>
This commit is contained in:
1 parent
f4d8cd7a5d
commit
85cb1d6dff
26 files changed
+910
-222
No files matched your search
@@ -41,6 +41,7 @@ interface MonacoOptions {
|
||||
autoLayout?: boolean;
|
||||
value?: string;
|
||||
hide?: string[];
|
||||
lineNumbers?: 'on' | 'off' | 'relative' | 'interval';
|
||||
}
|
||||
interface VditorOptions {
|
||||
theme?: 'classic' | 'dark'
|
||||
@@ -68,7 +69,7 @@ export default class Editor extends DOMAttachedObject {
|
||||
theme = UserContext.monacoTheme || 'vs-light',
|
||||
model = `file://model-${Math.random().toString(16)}`,
|
||||
autoResize = true, autoLayout = true,
|
||||
hide = [],
|
||||
hide = [], lineNumbers = 'on',
|
||||
} = this.options;
|
||||
const { monaco, registerAction } = await load([language]);
|
||||
const { $dom } = this;
|
||||
@@ -87,7 +88,7 @@ export default class Editor extends DOMAttachedObject {
|
||||
if (!this.options.model) this.model.setValue(value);
|
||||
const cfg: import('../monaco').default.editor.IStandaloneEditorConstructionOptions = {
|
||||
theme,
|
||||
lineNumbers: 'on',
|
||||
lineNumbers,
|
||||
glyphMargin: true,
|
||||
lightbulb: { enabled: true },
|
||||
model: this.model,
|
||||
|
||||
Reference in new issue
Block a user