zoukankan      html  css  js  c++  java
  • ngzorro draw 第一次打开 ERROR TypeError: Cannot read property 'overlayElement' of undefined

    at NzDrawerComponent.push../node_modules/ng-zorro-antd/fesm5/ng-zorro-antd.js.NzDrawerComponent.trapFocus (ng-zorro-antd.js:18330)
    at NzDrawerComponent.push../node_modules/ng-zorro-antd/fesm5/ng-zorro-antd.js.NzDrawerComponent.ngOnChanges (ng-zorro-antd.js:18149)
    at checkAndUpdateDirectiveInline (core.js:9239)
    at checkAndUpdateNodeInline (core.js:10507)
    at checkAndUpdateNode (core.js:10469)
    at debugCheckAndUpdateNode (core.js:11102)
    at debugCheckDirectivesFn (core.js:11062)
    at Object.eval [as updateDirectives] (NewApplicationComponent.html:1)
    at Object.debugUpdateDirectives [as updateDirectives] (core.js:11054)
    at checkAndUpdateView (core.js:10451)
    报错如下,经验证后发现 只能

    <nz-drawer [nzClosable]="true" [nzVisible]="visible" nzPlacement="left" [nzWidth]='width' nzMask='false'
    (nzOnClose)="close()">
    <app-threat-detail *ngIf='riskId' [inputThreatId]="riskId"></app-threat-detail>
    </nz-drawer>
    1.不能在嵌套组件内在包含drawer
    2.如果按钮唤醒抽屉打开,那么按钮和抽屉得在同一个组件中 
    不然就会报错。
  • 相关阅读:
    excel unixtime与北京时间互转
    vim的漫漫长征路
    const常量
    第一章:绪论
    2.4奇偶校验
    2.3数据校验的基本原理
    2.2定点与浮点数据表示
    2.1机器数及其特点
    1.2计算机系统性能评价
    冯诺依曼结构原理及层次分析
  • 原文地址:https://www.cnblogs.com/fuzitu/p/11685352.html
Copyright © 2011-2022 走看看