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

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 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

© 2025 Coveralls, Inc