From 8350be3fc80eb67205a93c7f307f2db6237e89c6 Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Thu, 4 Jul 2019 14:21:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=A1=A3=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/renderers/{Button-Group.md => ButtonGroup.md} | 2 +- docs/renderers/Form/{Button-Group.md => ButtonGroup.md} | 0 examples/components/Doc.jsx | 6 +++--- scss/components/form/_combo.scss | 4 ++++ src/renderers/Form/ButtonGroup.tsx | 3 ++- src/types.ts | 1 + 6 files changed, 11 insertions(+), 5 deletions(-) rename docs/renderers/{Button-Group.md => ButtonGroup.md} (98%) rename docs/renderers/Form/{Button-Group.md => ButtonGroup.md} (100%) diff --git a/docs/renderers/Button-Group.md b/docs/renderers/ButtonGroup.md similarity index 98% rename from docs/renderers/Button-Group.md rename to docs/renderers/ButtonGroup.md index 863b61e8f..f1ab0082e 100644 --- a/docs/renderers/Button-Group.md +++ b/docs/renderers/ButtonGroup.md @@ -1,4 +1,4 @@ -## Button-Group +## ButtonGroup 按钮集合。 diff --git a/docs/renderers/Form/Button-Group.md b/docs/renderers/Form/ButtonGroup.md similarity index 100% rename from docs/renderers/Form/Button-Group.md rename to docs/renderers/Form/ButtonGroup.md diff --git a/examples/components/Doc.jsx b/examples/components/Doc.jsx index d356e8604..6eb04aba5 100644 --- a/examples/components/Doc.jsx +++ b/examples/components/Doc.jsx @@ -617,9 +617,9 @@ export default { }), }, { - label: 'Button-Group', - path: '/docs/renderers/Button-Group', - getComponent: (location, cb) => require(['../../docs/renderers/Button-Group.md'], (doc) => { + label: 'ButtonGroup', + path: '/docs/renderers/ButtonGroup', + getComponent: (location, cb) => require(['../../docs/renderers/ButtonGroup.md'], (doc) => { cb(null, makeMarkdownRenderer(doc)); }), }, diff --git a/scss/components/form/_combo.scss b/scss/components/form/_combo.scss index 21b8237e3..aa3591abf 100644 --- a/scss/components/form/_combo.scss +++ b/scss/components/form/_combo.scss @@ -191,6 +191,10 @@ color: $text--muted-color; font-size: $fontSizeSm; margin-left: $gap-xs; + + &:empty { + display: none; + } } .#{$ns}ComboControl.is-inline { diff --git a/src/renderers/Form/ButtonGroup.tsx b/src/renderers/Form/ButtonGroup.tsx index 0862fc6ee..f8ca3a632 100644 --- a/src/renderers/Form/ButtonGroup.tsx +++ b/src/renderers/Form/ButtonGroup.tsx @@ -81,7 +81,8 @@ export default class ButtonGroupControl extends React.Component