• 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

41.67
/src/property/properties.component.ts
1
import { InputNumber } from 'ngx-tethys/core';
2
import { ChangeDetectionStrategy, Component, HostBinding, Input, OnInit } from '@angular/core';
3
import { BehaviorSubject } from 'rxjs';
4

5
export type ThyPropertiesLayout = 'horizontal' | 'vertical';
6

7
/**
8
 * 属性列表组件
9
 * @name thy-properties
10
 */
1✔
11
@Component({
12
    selector: 'thy-properties',
×
13
    templateUrl: './properties.component.html',
×
14
    changeDetection: ChangeDetectionStrategy.OnPush,
15
    host: {
16
        class: 'thy-properties',
×
17
        '[class.thy-properties-vertical]': 'layout === "vertical"',
18
        '[class.thy-properties-horizontal]': 'layout === "horizontal"',
19
        '[class.thy-properties-edit-trigger-hover]': 'thyEditTrigger === "hover"'
×
20
    },
×
21
    standalone: true
×
22
})
×
23
export class ThyPropertiesComponent implements OnInit {
24
    layout$ = new BehaviorSubject<ThyPropertiesLayout>('horizontal');
25

1✔
26
    layout: ThyPropertiesLayout = 'horizontal';
1✔
27

28
    /**
29
     * 展示布局
30
     * @type "horizontal" | "vertical"
31
     * @default horizontal
32
     */
33
    @Input() set thyLayout(layout: ThyPropertiesLayout) {
1✔
34
        this.layout = layout;
35
        this.layout$.next(layout);
36
    }
37

1✔
38
    /**
39
     * 设置一行的可以 property-item 的数量
40
     * @type  number
41
     */
42
    @Input() @InputNumber() thyColumn: number = 1;
43

44
    /**
45
     * 设置编辑状态触发方法
46
     * @type 'hover' | 'click'
47
     */
48
    @Input() thyEditTrigger: 'hover' | 'click' = 'hover';
49

50
    @HostBinding('style.grid-template-columns')
51
    get gridTemplateColumns() {
52
        return `repeat(${this.thyColumn}, 1fr)`;
53
    }
54

55
    constructor() {}
56

57
    ngOnInit() {}
58
}
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