From 353164e39393474de6d40e6fb26ac5b270446a8a Mon Sep 17 00:00:00 2001 From: vthinkxie Date: Thu, 28 Feb 2019 12:36:45 +0800 Subject: [PATCH] fix(module:select & module:table): fix table style error & select error (#2987) close #2983 --- components/core/style/index.less | 15 +++ components/dropdown/nz-dropdown.directive.ts | 4 +- .../nz-select-top-control.component.html | 10 +- rollup.config.js | 118 ------------------ scripts/site/_site/doc/index.html | 1 - 5 files changed, 21 insertions(+), 127 deletions(-) delete mode 100644 rollup.config.js diff --git a/components/core/style/index.less b/components/core/style/index.less index f668e895ac6..d23c0af7948 100644 --- a/components/core/style/index.less +++ b/components/core/style/index.less @@ -110,6 +110,12 @@ background: @component-background; } +.ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-header > table > .ant-table-thead > tr > th ,.ant-table-small > .ant-table-content > .ant-table-scroll > .ant-table-body > table > .ant-table-thead > tr > th { + &.ant-table-th-left-sticky, &.ant-table-th-right-sticky { + background: @component-background; + } +} + .ant-table-tbody { & > tr { &:hover { @@ -126,6 +132,10 @@ } } +.ant-table-thead > tr > th .ant-table-column-sorters > nz-dropdown { + position: static !important; +} + .ant-table-scroll-position-middle { .box-shadow-right; .box-shadow-left; @@ -205,6 +215,7 @@ textarea.cdk-textarea-autosize-measuring { animation: none; transition: none; } + & > * { transition: none; } @@ -214,6 +225,7 @@ textarea.cdk-textarea-autosize-measuring { .ant-modal-mask, .ant-modal { animation: none; transition: none; + &.zoom-enter, &.zoom-leave, &.zoom-enter-active, &.zoom-leave-active { animation: none; @@ -224,11 +236,14 @@ textarea.cdk-textarea-autosize-measuring { // menu &.ant-menu { transition: none; + .ant-menu-item, .ant-menu-submenu-title { transition: none; } + .ant-menu-item .anticon, .ant-menu-submenu-title .anticon { transition: none; + & + span { transition: none; } diff --git a/components/dropdown/nz-dropdown.directive.ts b/components/dropdown/nz-dropdown.directive.ts index 1029edfc334..c5782dfc8e3 100644 --- a/components/dropdown/nz-dropdown.directive.ts +++ b/components/dropdown/nz-dropdown.directive.ts @@ -1,6 +1,6 @@ import { Directive, ElementRef, Renderer2 } from '@angular/core'; import { fromEvent, merge, Observable } from 'rxjs'; -import { mapTo } from 'rxjs/operators'; +import { mapTo, tap } from 'rxjs/operators'; @Directive({ selector: '[nz-dropdown]' @@ -11,7 +11,7 @@ export class NzDropDownDirective { fromEvent(this.el, 'mouseenter').pipe(mapTo(true)), fromEvent(this.el, 'mouseleave').pipe(mapTo(false)) ); - $click: Observable = fromEvent(this.el, 'click').pipe(mapTo(true)); + $click: Observable = fromEvent(this.el, 'click').pipe(tap(e => e.stopPropagation()), mapTo(true)); setDisabled(disabled: boolean): void { if (disabled) { diff --git a/components/select/nz-select-top-control.component.html b/components/select/nz-select-top-control.component.html index 0d110c10f00..29df8ab3f87 100644 --- a/components/select/nz-select-top-control.component.html +++ b/components/select/nz-select-top-control.component.html @@ -17,16 +17,14 @@ -
- {{ nzSelectService.listOfCachedSelectedOption[0].nzLabel }} + {{ nzSelectService.listOfCachedSelectedOption[0]?.nzLabel }}
-