From 0d1f027d77f3c7ff95b3c837d5d83cfdb27a9956 Mon Sep 17 00:00:00 2001 From: Eve <948832626@qq.com> Date: Thu, 10 Sep 2020 15:05:31 +0800 Subject: [PATCH] fix(module:select): cursor abnormal in nz-select with nzDisabled (#5716) * fix: cursor abnormal under nz-select with nzDisabled * docs: fix markdown format close #5709 --- components/select/doc/index.zh-CN.md | 2 +- components/select/select.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/select/doc/index.zh-CN.md b/components/select/doc/index.zh-CN.md index 29f4ad65a4e..d7621924d28 100644 --- a/components/select/doc/index.zh-CN.md +++ b/components/select/doc/index.zh-CN.md @@ -31,7 +31,7 @@ import { NzSelectModule } from 'ng-zorro-antd/select'; | --- | --- | --- | --- | --- | | `[ngModel]` | 当前选中的 nz-option 的 nzValue 值,可双向绑定,当 `nzMode` 为 `multiple` 或 `tags` 时,ngModel 为数组 | `any \| any[]` | - | | `[compareWith]` | 与 [SelectControlValueAccessor](https://angular.io/api/forms/SelectControlValueAccessor#caveat-option-selection) 相同 | `(o1: any, o2: any) => boolean` | `(o1: any, o2: any) => o1===o2` | -| `[nzAutoClearSearchValue]` | 是否在选中项后清空搜索框,只在 `mode` 为 `multiple` 或 `tags` 时有效。 | boolean | `true` | +| `[nzAutoClearSearchValue]` | 是否在选中项后清空搜索框,只在 `mode` 为 `multiple` 或 `tags` 时有效。 | `boolean` | `true` | | `[nzAllowClear]` | 支持清除 | `boolean` | `false` | | `[nzBorderless]` | 是否无边框 | `boolean` | `false` | ✅ | | `[nzOpen]` | 下拉菜单是否打开,可双向绑定 | `boolean` | `false` | diff --git a/components/select/select.component.ts b/components/select/select.component.ts index 7e57bd876c5..ec07f550f2c 100644 --- a/components/select/select.component.ts +++ b/components/select/select.component.ts @@ -149,7 +149,7 @@ export type NzSelectSizeType = 'large' | 'default' | 'small'; '[class.ant-select-sm]': 'nzSize === "small"', '[class.ant-select-show-arrow]': `nzShowArrow && nzMode === 'default'`, '[class.ant-select-disabled]': 'nzDisabled', - '[class.ant-select-show-search]': `nzShowSearch || nzMode !== 'default'`, + '[class.ant-select-show-search]': `(nzShowSearch || nzMode !== 'default') && !nzDisabled`, '[class.ant-select-allow-clear]': 'nzAllowClear', '[class.ant-select-borderless]': 'nzBorderless', '[class.ant-select-open]': 'nzOpen',