NG-ZORRO / ng-zorro-antd

Angular UI Component Library based on Ant Design
https://ng.ant.design
MIT License
8.87k stars 3.94k forks source link

modalService.create 创造出来的弹窗设置了nzzindex之后显示异常 #7072

Closed shetz163 closed 2 years ago

shetz163 commented 2 years ago

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-ivy-qn2ncx

Steps to reproduce

点击click me 按钮显示效果

What is expected?

弹窗的正常显示

What is actually happening?

弹窗在遮罩层下方

Environment Info
ng-zorro-antd 12.0.2
Browser chrome

cdk-global-overlay-wrapper的z-index的数值依旧为1000, 而非传递的1001, 在stackblitz里的 ng-zorro 11 我无法重现这个情况, 12上面现在是这样的

zorro-bot[bot] commented 2 years ago

Translation of this issue:

ModalService.create created pop-up setting NZZINDEX displayed abnormal

reproduction link

[https://stackblitz.com/Edit/ng- Zorro-antd-ivy-qn2ncx](https://stackblitz.com/edit/ng- ze --antd-ivy-qn2ncx)

steps to reproduce

Click the Click ME button to display the effect

What is expected?

Normal display of pop-up window

What is actually happens?

Bowl under the mask layer

ENVIRONMENT INFO
Ng-Zorro-ANTD 12.0.2
Browser Chrome

The value of CDK-Global-Overlay-Wrapper's Z-Index is still 1000, not 1001, Ng-Zorro 11 in StackBlitz I can't reproduce this situation, 12 is like this

simplejason commented 2 years ago
...
constructor(public modal: NzModalService) {}
  // Duplicate identifier 'modal', please rename `modal()` to be `createModal()`
  modal() {
    this.modal.create({
      nzContent: '在ng-zorro 11上无法复现这个情况,但12上可以',
      nzZIndex: 1001,
    });
}
shetz163 commented 2 years ago
...
constructor(public modal: NzModalService) {}
  // Duplicate identifier 'modal', please rename `modal()` to be `createModal()`
  modal() {
    this.modal.create({
      nzContent: '在ng-zorro 11上无法复现这个情况,但12上可以',
      nzZIndex: 1001,
    });
}

rename completed

shetz163 commented 2 years ago

@simplejason how can I REOPEN it?