teradata covalent td-menu-header

时间:2017-06-06 11:23:11

标签: material-design teradata-covalent

我一直在查看https://teradata.github.io/covalent/提供的所有文档,但我没有找到任何关于Teradata Covalent Quickstart中的“td-menu-header”的文档。

这个css框架似乎很有趣,但缺乏文档 - 这将是一个很好的“API”文档或开发人员指南 - 使我们陷入困境中。

1 个答案:

答案 0 :(得分:2)

我用这种方式。代码示例存在于Teradata Quickstart项目中。

<button md-icon-button mdTooltip="Profile" [mdMenuTriggerFor]="profileMenu"><md-icon class="md-24">person</md-icon></button>
    <md-menu #profileMenu="mdMenu">
        <td-menu>
            <div td-menu-header class="md-subhead">Profile</div>
            <div flex>
                <md-list dense>
                    <!--<h3 md-subheader>Metadata</h3>-->
                    <md-list-item>
                        <md-icon md-list-avatar>location_on</md-icon>
                        <h2 md-line *ngIf='client.address!==""'><span class="text-wrap">{{client.address}}</span></h2>
                        <h2 md-line *ngIf='client.address===""'>--</h2>
                        <p md-line>Address</p>
                    </md-list-item>
                    <md-divider md-inset></md-divider>
                    <md-list-item>
                        <md-icon md-list-avatar>location_city</md-icon>
                        <h2 md-line>{{client.city}}, {{client.state}}-{{client.zip}}</h2>
                        <p md-line>City,State-Zip</p>
                    </md-list-item>
                    <md-divider md-inset></md-divider>
                    <md-list-item>
                        <md-icon md-list-avatar>flag</md-icon>
                        <h2 md-line>{{client.country}}</h2>
                        <p md-line>Country</p>
                    </md-list-item>
                    <md-list-item>
                        <md-icon md-list-avatar>call</md-icon>
                        <h2 md-line>{{client.phone}}</h2>
                        <p md-line>Primary Phone</p>
                    </md-list-item>
                    <md-divider md-inset></md-divider>
                    <md-list-item *ngIf='client.phone2!==""'>
                        <md-icon md-list-avatar>call</md-icon>
                        <h2 md-line>{{client.phone2}}</h2>
                        <p md-line>Secondary Phone</p>
                    </md-list-item>
                    <md-divider md-inset *ngIf='client.phone2!==""'></md-divider>
                    <md-list-item>
                        <md-icon md-list-avatar>email</md-icon>
                        <h1 md-line><span class="text-wrap">{{client.email}}</span></h1>
                        <!--<h1 md-line></h1>-->
                        <p md-line>Primary Email {{client.email2}}
                        </p>
                    </md-list-item>
                    <md-divider md-inset></md-divider>
                    <md-list-item *ngIf='client.email2!==""'>
                        <md-icon md-list-avatar>email</md-icon>
                        <h1 md-line><span class="text-wrap">{{client.email2}}</span></h1>
                        <!--<h1 md-line></h1>-->
                        <p md-line>Secondary Email
                        </p>
                    </md-list-item>
                    <md-divider md-inset *ngIf='client.email2!==""'></md-divider>
                    <md-list-item>
                        <md-icon md-list-avatar>print</md-icon>
                        <h2 md-line *ngIf='client.fax!==""'>{{client.fax}}</h2>
                        <h2 md-line *ngIf='client.fax===""'>--</h2>
                        <p md-line>Fax</p>
                    </md-list-item>
                </md-list>
            </div>
        </td-menu>
    </md-menu>