• 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

38.46
/src/dialog/footer/dialog-footer.component.ts
1
import { coerceBooleanProperty } from 'ngx-tethys/util';
2
import { useHostRenderer } from '@tethys/cdk/dom';
3
import { Component, ContentChild, Inject, Input, OnInit, TemplateRef } from '@angular/core';
4

5
import { THY_DIALOG_LAYOUT_CONFIG, ThyDialogFooterAlign, ThyDialogLayoutConfig } from '../dialog.config';
6
import { NgIf, NgTemplateOutlet } from '@angular/common';
7
import { InputBoolean } from 'ngx-tethys/core';
8

9
/**
10
 * 模态框底部组件
11
 * @name thy-dialog-footer
12
 * @order 60
13
 */
14
@Component({
1✔
15
    selector: 'thy-dialog-footer',
16
    templateUrl: './dialog-footer.component.html',
×
17
    // changeDetection: ChangeDetectionStrategy.OnPush,
18
    exportAs: 'thyDialogFooter',
19
    standalone: true,
×
20
    imports: [NgIf, NgTemplateOutlet]
21
})
22
export class DialogFooterComponent implements OnInit {
×
23
    /**
×
24
     * 自定义弹出框底部的描述模板
×
25
     * @type TemplateRef
26
     */
27
    @ContentChild('description') description: TemplateRef<any>;
×
28

29
    /**
30
     * 底部是否有分割线,可全局配置默认值
31
     * @type boolean
32
     * @default false
33
     */
1✔
34
    @Input()
35
    @InputBoolean()
36
    set thyDivided(value: boolean) {
1✔
37
        this.divided = coerceBooleanProperty(value);
38
    }
39

40
    /**
41
     * 对齐方式,可全局配置默认值
42
     * @type left | right | center
1✔
43
     * @default left
44
     */
45
    @Input() thyAlign: ThyDialogFooterAlign;
46

47
    private divided: boolean;
1✔
48

49
    private hostRenderer = useHostRenderer();
50

51
    private get align() {
52
        return !!this.thyAlign ? this.thyAlign : this.dialogLayoutConfig.footerAlign;
53
    }
54

55
    constructor(@Inject(THY_DIALOG_LAYOUT_CONFIG) private dialogLayoutConfig: ThyDialogLayoutConfig) {
56
        this.divided = this.dialogLayoutConfig.footerDivided;
57
    }
58

59
    ngOnInit() {
60
        this.hostRenderer.updateClassByMap({
61
            'dialog-footer': true,
62
            [`dialog-footer-actions-align-${this.align}`]: true,
63
            'dialog-footer-border-top': this.divided
64
        });
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