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

atinc / ngx-tethys / 0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

04 Sep 2023 08:40AM UTC coverage: 15.616% (-74.6%) from 90.2%
0bbb2cec-209e-4d8a-b1b3-6bc54e05daa6

Pull #2829

circleci

cmm-va
fix: add test
Pull Request #2829: fix: add tabIndex

300 of 6386 branches covered (0.0%)

Branch coverage included in aggregate %.

78 of 78 new or added lines in 26 files covered. (100.0%)

2849 of 13779 relevant lines covered (20.68%)

83.41 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

© 2026 Coveralls, Inc