• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / 0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

04 Sep 2023 08:40AM UTC coverage: 15.616% (-74.6%) from 90.2%
0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

Pull #2829

circleci

cmm-va
fix: add test
Pull Request #2829: fix: add tabIndex

300 of 6386 branches covered (0.0%)

Branch coverage included in aggregate %.

78 of 78 new or added lines in 26 files covered. (100.0%)

2849 of 13779 relevant lines covered (20.68%)

83.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

15.79
/src/breadcrumb/breadcrumb.component.ts
1
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
2
import { ThyIconComponent } from 'ngx-tethys/icon';
3
import { NgIf, NgClass } from '@angular/common';
4

5
/**
6
 * 面包屑组件
7
 * @name thy-breadcrumb
8
 * @order 10
9
 */
10
@Component({
1✔
11
    selector: 'thy-breadcrumb',
12
    template: `
×
13
        <div class="thy-breadcrumb-icon" *ngIf="svgIconName || iconClasses">
14
            <thy-icon *ngIf="svgIconName; else iconFont" [thyIconName]="svgIconName"></thy-icon>
15
            <ng-template #iconFont>
×
16
                <i [ngClass]="iconClasses"></i>
×
17
            </ng-template>
×
18
        </div>
×
19
        <ng-content></ng-content>
×
20
    `,
21
    exportAs: 'ThyBreadcrumb',
×
22
    changeDetection: ChangeDetectionStrategy.OnPush,
23
    host: {
24
        class: 'thy-breadcrumb',
×
25
        '[class.thy-breadcrumb-separator]': '!!thySeparator',
26
        '[class.thy-breadcrumb-separator-slash]': 'thySeparator === "slash"',
27
        '[class.thy-breadcrumb-separator-backslash]': 'thySeparator === "backslash"',
28
        '[class.thy-breadcrumb-separator-vertical-line]': 'thySeparator === "vertical-line"'
×
29
    },
×
30
    standalone: true,
31
    imports: [NgIf, ThyIconComponent, NgClass]
32
})
1✔
33
export class ThyBreadcrumbComponent {
34
    iconClasses: string[];
35
    svgIconName: string;
36

37
    /**
1✔
38
     * 面包屑的前缀 展示图标,如 folder-fill
39
     */
40
    @Input()
41
    set thyIcon(icon: string) {
42
        this.setIcon(icon);
43
    }
44

45
    /**
46
     * 面包屑的分隔符,不传值默认为 ">"
47
     * @type slash | backslash | vertical-line
48
     */
49
    @Input() thySeparator: 'slash' | 'backslash' | 'vertical-line';
50

51
    private setIcon(icon: string) {
52
        if (icon) {
53
            if (icon.includes('wtf')) {
54
                const classes = icon.split(' ');
55
                if (classes.length === 1) {
56
                    classes.unshift('wtf');
57
                }
58
                this.iconClasses = classes;
59
            } else {
60
                this.svgIconName = icon;
61
            }
62
        } else {
63
            this.iconClasses = null;
64
            this.svgIconName = null;
65
        }
66
    }
67
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc