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

atinc / ngx-tethys / 68ef226c-f83e-44c1-b8ed-e420a83c5d84

28 May 2025 10:31AM UTC coverage: 10.352% (-80.0%) from 90.316%
68ef226c-f83e-44c1-b8ed-e420a83c5d84

Pull #3460

circleci

pubuzhixing8
chore: xxx
Pull Request #3460: refactor(icon): migrate signal input #TINFR-1476

132 of 6823 branches covered (1.93%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 1 file covered. (71.43%)

11648 existing lines in 344 files now uncovered.

2078 of 14525 relevant lines covered (14.31%)

6.69 hits per line

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

13.04
/src/popover/header/popover-header.component.ts
1
import { ChangeDetectionStrategy, Component, computed, TemplateRef, inject, input, output, contentChild } from '@angular/core';
2
import { ThyTranslate } from 'ngx-tethys/core';
3
import { ThyPopover } from '../popover.service';
4
import { ThyIcon } from 'ngx-tethys/icon';
5
import { NgTemplateOutlet } from '@angular/common';
6

7
/**
8
 * 悬浮层头部组件
9
 * @name thy-popover-header
10
 * @order 30
11
 */
12
@Component({
13
    selector: 'thy-popover-header',
14
    templateUrl: './popover-header.component.html',
1✔
15
    exportAs: 'thyPopoverHeader',
UNCOV
16
    changeDetection: ChangeDetectionStrategy.OnPush,
×
UNCOV
17
    host: {
×
UNCOV
18
        class: 'thy-popover-header'
×
UNCOV
19
    },
×
UNCOV
20
    imports: [NgTemplateOutlet, ThyIcon]
×
UNCOV
21
})
×
UNCOV
22
export class ThyPopoverHeader {
×
UNCOV
23
    private translate = inject(ThyTranslate);
×
24
    private thyPopover = inject(ThyPopover);
UNCOV
25

×
UNCOV
26
    /**
×
UNCOV
27
     * 头部标题
×
28
     */
29
    readonly thyTitle = input<string>(undefined);
×
30

UNCOV
31
    /**
×
UNCOV
32
     * 标题的多语言 Key
×
33
     */
34
    readonly thyTitleTranslationKey = input<string>(undefined);
35

36
    protected readonly titleSignal = computed(() => {
37
        const title = this.thyTitle();
UNCOV
38
        if (title) {
×
UNCOV
39
            return title;
×
40
        }
41
        const titleTranslationKey = this.thyTitleTranslationKey();
1✔
42
        if (titleTranslationKey) {
43
            return this.translate.instant(titleTranslationKey);
44
        }
45
        return '';
46
    });
47

48
    /**
1✔
49
     * 自定义头部模板
50
     * @type TemplateRef
51
     */
52
    public headerTemplate = contentChild<TemplateRef<any>>('popoverHeader');
53

54
    /**
55
     * @internal
56
     */
57
    readonly thyClosed = output<Event>();
58

59
    /**
60
     * @internal
61
     */
62
    close(event: Event) {
63
        this.thyClosed.emit(event);
64
        this.thyPopover.close();
65
    }
66
}
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