Giter Site home page Giter Site logo

关于自定义图标 about ng-tree-antd HOT 8 CLOSED

cipchk avatar cipchk commented on June 4, 2024
关于自定义图标

from ng-tree-antd.

Comments (8)

cipchk avatar cipchk commented on June 4, 2024 1

我会在晚上写一个示例放在DEMO站上中。

from ng-tree-antd.

cipchk avatar cipchk commented on June 4, 2024

你可以使用 nzTitle 属性:

<ng-template #nzTitle let-node>
{{node.displayField}}
</ng-template>

from ng-tree-antd.

xbu avatar xbu commented on June 4, 2024

这么使用吗?页面没效果,我看源代码简洁,直接改代码了,但是重复引入代码,不好的做法

<ng-template nzTitle="<i class="anticon anticon-check-circle"></i>" let-node>
           {{node.displayField}}
</ng-template>

from ng-tree-antd.

apphost avatar apphost commented on June 4, 2024

<nz-tree [nzNodes]="nodes" [nzShowLine]="true"> <ng-template #nzTitle let-node> {{node.displayField}} </ng-template> </nz-tree>

It's said:

ERROR TypeError: Cannot read property 'displayField' of undefined

from ng-tree-antd.

cipchk avatar cipchk commented on June 4, 2024

name default displayed filed, you can setting displayField of options property

from ng-tree-antd.

bokire avatar bokire commented on June 4, 2024

<ng-template #nzTitle let-node> {{node.displayField}} </ng-template>
在ng-alian中的页面试了下这样的写法,取不到node

from ng-tree-antd.

alexspring123 avatar alexspring123 commented on June 4, 2024

@cipchk 请问使用nzTitle的模板demo写好了吗?我取不到node的值

            <nz-tree #tree [nzNodes]="areas" [nzOptions]="options" [nzCheckable]="true">
                <ng-template #nzTitle let-node>
                    {{node ? 'not null':'null'}}
                </ng-template>
            </nz-tree>

界面展示
image

from ng-tree-antd.

cipchk avatar cipchk commented on June 4, 2024

抱歉,迟来的爱,给忘记了。

from ng-tree-antd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.