From 33645da35a576ce339530451e9eaed8c69d5f220 Mon Sep 17 00:00:00 2001 From: chenc Date: Sun, 2 Jan 2022 19:55:44 +0800 Subject: [PATCH 1/3] fix(module:drawer): fix close icon position without title property --- components/drawer/drawer.component.ts | 6 +----- components/drawer/style/drawer.less | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/components/drawer/drawer.component.ts b/components/drawer/drawer.component.ts index 461293889e..774dfdcd86 100644 --- a/components/drawer/drawer.component.ts +++ b/components/drawer/drawer.component.ts @@ -75,11 +75,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer'; >
-
+
diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index 9f7dd1846f..9bc5b8179a 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -193,6 +193,7 @@ &-close-only { padding-bottom: 0; border: none; + justify-content: flex-end; } } From e9e222a9bb069a3ee54bbe8df9e44672378d4f00 Mon Sep 17 00:00:00 2001 From: chenc Date: Sun, 2 Jan 2022 20:17:37 +0800 Subject: [PATCH 2/3] fix(module:drawer): fix close icon position without title property --- components/drawer/drawer.component.ts | 6 +++++- components/drawer/style/drawer.less | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/drawer/drawer.component.ts b/components/drawer/drawer.component.ts index 774dfdcd86..a441ade822 100644 --- a/components/drawer/drawer.component.ts +++ b/components/drawer/drawer.component.ts @@ -75,7 +75,11 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer'; >
-
+
diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index 9bc5b8179a..32838b4a89 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -191,8 +191,6 @@ } &-close-only { - padding-bottom: 0; - border: none; justify-content: flex-end; } } From c29c7bc1ce62e00a4c4f9d2ddc29e504c8f62b78 Mon Sep 17 00:00:00 2001 From: chenc Date: Tue, 4 Jan 2022 17:21:50 +0800 Subject: [PATCH 3/3] chore: follow the drawer of and-design DOM structure --- components/drawer/drawer.component.ts | 32 ++++++++++++++------------- components/drawer/style/drawer.less | 3 ++- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/components/drawer/drawer.component.ts b/components/drawer/drawer.component.ts index a441ade822..91a63eff84 100644 --- a/components/drawer/drawer.component.ts +++ b/components/drawer/drawer.component.ts @@ -80,22 +80,24 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'drawer'; class="ant-drawer-header" [class.ant-drawer-header-close-only]="!nzTitle" > -
- -
-
+
+ +
+ +
+
+
-
diff --git a/components/drawer/style/drawer.less b/components/drawer/style/drawer.less index 32838b4a89..9f7dd1846f 100644 --- a/components/drawer/style/drawer.less +++ b/components/drawer/style/drawer.less @@ -191,7 +191,8 @@ } &-close-only { - justify-content: flex-end; + padding-bottom: 0; + border: none; } }