From ea4d874b14c8d24a639fee07f63349ac3d8f05b4 Mon Sep 17 00:00:00 2001 From: wuduoyi Date: Fri, 10 Jul 2020 10:25:26 +0800 Subject: [PATCH] =?UTF-8?q?Editor=20=E5=A2=9E=E5=8A=A0=20sm=20=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E7=9A=84=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/renderers/Form/Editor.md | 2 +- scss/components/form/_editor.scss | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/renderers/Form/Editor.md b/docs/renderers/Form/Editor.md index 70a606db0..9b568c2c9 100644 --- a/docs/renderers/Form/Editor.md +++ b/docs/renderers/Form/Editor.md @@ -4,7 +4,7 @@ - `type` 请设置成 `editor` 或者 `bat-editor`、`c-editor`、`coffeescript-editor`、`cpp-editor`、`csharp-editor`、`css-editor`、`dockerfile-editor`、`fsharp-editor`、`go-editor`、`handlebars-editor`、`html-editor`、`ini-editor`、`java-editor`、`javascript-editor`、`json-editor`、`less-editor`、`lua-editor`、`markdown-editor`、`msdax-editor`、`objective-c-editor`、`php-editor`、`plaintext-editor`、`postiats-editor`、`powershell-editor`、`pug-editor`、`python-editor`、`r-editor`、`razor-editor`、`ruby-editor`、`sb-editor`、`scss-editor`、`sol-editor`、`sql-editor`、`swift-editor`、`typescript-editor`、`vb-editor`、`xml-editor`、`yaml-editor`。 - `language` 默认为 `javascript` 当 `type` 为 `editor` 的时候有用。 -- `size` 编辑器高度,取值可以是 `md`、`lg`、`xl`、`xxl`。 +- `size` 编辑器高度,取值可以是 `sm`、`md`、`lg`、`xl`、`xxl`。 - `options` monaco 编辑器的其它配置,比如是否显示行号等,请参考[这里](https://microsoft.github.io/monaco-editor/api/enums/monaco.editor.editoroption.html)。 - **还有更多通用配置请参考** [FormItem](./FormItem.md) diff --git a/scss/components/form/_editor.scss b/scss/components/form/_editor.scss index f5d7d1de9..21dd25829 100644 --- a/scss/components/form/_editor.scss +++ b/scss/components/form/_editor.scss @@ -23,6 +23,14 @@ border-color: $Form-input-onFocused-borderColor; } + &--sm { + min-height: 100px; + + > .#{$ns}MonacoEditor { + min-height: 100px; + } + } + &--md { min-height: 250px;