• 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

77.78
/src/dropdown/dropdown-menu.component.ts
1
import {
2
    Directive,
3
    HostBinding,
4
    Input,
5
    Component,
6
    ViewEncapsulation,
1✔
7
    ChangeDetectionStrategy,
8
    ViewChild,
×
9
    TemplateRef
10
} from '@angular/core';
1✔
11
import { SafeAny } from 'ngx-tethys/types';
12

13
export type ThyDropdownMenuDividerType = 'default' | 'crossing' | '';
14

1✔
15
/**
16
 * @private
17
 */
18
@Directive()
19
export class ThyDropdownAbstractMenu {
20
    @HostBinding('class.thy-dropdown-menu') addDropdownMenuClass = true;
21
}
22

23
/**
1✔
24
 * 下拉菜单组件
25
 * @name thy-dropdown-menu
×
26
 * @order 20
27
 */
28
@Component({
×
29
    selector: 'thy-dropdown-menu',
30
    template: `
31
        <ng-template>
1✔
32
            <div class="thy-dropdown-menu" [style.width.px]="width">
1✔
33
                <ng-content></ng-content>
34
            </div>
35
        </ng-template>
36
    `,
37
    encapsulation: ViewEncapsulation.None,
1✔
38
    changeDetection: ChangeDetectionStrategy.OnPush,
39
    host: {},
40
    standalone: true
41
})
42
export class ThyDropdownMenuComponent {
43
    // @HostBinding('class.dropdown-menu--group') themeClassName = false;
44

45
    width: number;
46

47
    get template() {
48
        return this.templateRef;
49
    }
50

51
    @ViewChild(TemplateRef, { static: true }) templateRef!: TemplateRef<SafeAny>;
52

53
    /**
54
     * 设置菜单宽度
55
     * @default 240px
56
     */
57
    @Input() set thyWidth(value: number) {
58
        this.width = value;
59
    }
60

1✔
61
    constructor() {}
62
}
×
63

64
/**
65
 * 下拉菜单分组
1✔
66
 * @name thy-dropdown-menu-group
1✔
67
 * @order 50
68
 */
69
@Component({
70
    selector: 'thy-dropdown-menu-group',
1✔
71
    template: `
72
        <div class="dropdown-menu-group-title">{{ title }}</div>
73
        <ng-content></ng-content>
74
    `,
75
    changeDetection: ChangeDetectionStrategy.OnPush,
76
    host: {
77
        class: 'dropdown-menu-group'
78
    },
79
    standalone: true
80
})
81
export class ThyDropdownMenuGroupComponent {
82
    title: string;
83

84
    /**
85
     * 分组标题
86
     */
87
    @Input()
88
    set thyTitle(value: string) {
89
        this.title = value;
90
    }
1✔
91

92
    constructor() {}
1✔
93
}
94

1✔
95
/**
96
 * 下拉菜单分割线
97
 * @name thy-dropdown-menu-divider
98
 */
99
@Component({
100
    selector: 'thy-dropdown-menu-divider',
101
    template: ` <!-- <div class="dropdown-menu-divider-title">{{ title }}</div> --> `,
102
    host: {
103
        class: 'dropdown-menu-divider'
104
    },
105
    changeDetection: ChangeDetectionStrategy.OnPush,
106
    standalone: true
107
})
108
export class ThyDropdownMenuDividerComponent {
109
    constructor() {}
110
}
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