From c9da59114dc58b1c397726d5f1b64cbac24529a1 Mon Sep 17 00:00:00 2001 From: cipchk Date: Mon, 29 Oct 2018 13:17:22 +0800 Subject: [PATCH] fix(module:sf): fix button spanLabelFixed is zero value --- packages/form/src/sf.component.html | 6 +++--- packages/form/src/sf.component.ts | 2 +- packages/form/src/widgets/object/object.widget.ts | 8 ++++---- packages/theme/styles/app/delon/form.less | 5 +++++ 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/packages/form/src/sf.component.html b/packages/form/src/sf.component.html index f44febd28..2d78d8050 100644 --- a/packages/form/src/sf.component.html +++ b/packages/form/src/sf.component.html @@ -5,16 +5,16 @@ - + [nzLg]="_btn.render.grid.lg" [nzXl]="_btn.render.grid.xl" [nzXXl]="_btn.render.grid.xxl">
-
+
diff --git a/packages/form/src/sf.component.ts b/packages/form/src/sf.component.ts index be949c8ce..2ef9d065e 100644 --- a/packages/form/src/sf.component.ts +++ b/packages/form/src/sf.component.ts @@ -343,7 +343,7 @@ export class SFComponent implements OnInit, OnChanges, OnDestroy { }; } // fixed label - if (!this._btn.render.spanLabelFixed) { + if (this._btn.render.spanLabelFixed == null) { this._btn.render.spanLabelFixed = btnUi.spanLabelFixed; } // 固定标签宽度时,若不指定样式,则默认居中 diff --git a/packages/form/src/widgets/object/object.widget.ts b/packages/form/src/widgets/object/object.widget.ts index a0cf8d28a..5aa1918f1 100644 --- a/packages/form/src/widgets/object/object.widget.ts +++ b/packages/form/src/widgets/object/object.widget.ts @@ -7,18 +7,18 @@ import { FormProperty } from '../../model/form.property'; selector: 'sf-object', template: ` - +
- - +
- + diff --git a/packages/theme/styles/app/delon/form.less b/packages/theme/styles/app/delon/form.less index da0069b6d..4800045fa 100644 --- a/packages/theme/styles/app/delon/form.less +++ b/packages/theme/styles/app/delon/form.less @@ -87,4 +87,9 @@ } } } + &__no-error { + .ant-form-item { + margin-bottom: 8px; + } + } }