Ng-zorro-antd: 树组件使用自定义模板后节点无法拖拽

Created on 11 Oct 2019  ·  4Comments  ·  Source: NG-ZORRO/ng-zorro-antd

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-tree-drag

Steps to reproduce

代码所示

What is expected?

自定义模板也应支持拖放

What is actually happening?

不支持

| Environment | Info |
|---|---|
| ng-zorro-antd | 8.3.0 |
| Browser | Chrome |

Most helpful comment

看了下源码,自定义模板的节点加上下面的属性即可
[attr.draggable]="true" [class.draggable]="true"

All 4 comments

Translation of this issue:

After using a custom template node you can not drag and drop

Reproduction link

Https://stackblitz.com/edit/ng-zorro-antd-tree-drag

Steps to reproduce

FIG Code

What is expected?

Custom template should also support drag and drop

What is actually happening?

not support

| Environment | Info |
| --- | --- |
| Ng-zorro-antd | 8.3.0 |
| Browser | Chrome |

看了下源码,自定义模板的节点加上下面的属性即可
[attr.draggable]="true" [class.draggable]="true"

看了下源码,自定义模板的节点加上下面的属性即可
[attr.draggable]="true" [class.draggable]="true"

谢谢,帮大忙了 :-)

亲测可以,灰常感谢,v587

Was this page helpful?
0 / 5 - 0 ratings

Related issues

linjianhong picture linjianhong  ·  3Comments

JCqiu picture JCqiu  ·  3Comments

C-racker picture C-racker  ·  3Comments

zhouwf108 picture zhouwf108  ·  3Comments

vthinkxie picture vthinkxie  ·  3Comments