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 cf1531d52a2..91900fd8d39 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',