-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support custom header and item height #431 #449
feat: support custom header and item height #431 #449
Conversation
@@ -1,6 +1,6 @@ | |||
<ngx-gantt-root [sideWidth]="300"> | |||
<ng-template #sideTemplate> | |||
<div class="gantt-flat-side-header">项目</div> | |||
<div class="gantt-flat-side-header" [style.height.px]="styles.headerHeight" [style.line-height.px]="styles.headerHeight">项目</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
示例无所谓,不需要改成动态的
@@ -10,7 +10,7 @@ | |||
[class.weekend]="point.additions?.isWeekend" | |||
*ngFor="let point of view.primaryDatePoints; trackBy: trackBy" | |||
[attr.x]="point.x" | |||
[attr.y]="point.y" | |||
[attr.y]="primaryDatePointTop" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 y 的计算在视图里头,尽量在视图中去计算这个 y 值,而不是在组件内去计算,不同的视图 y 的规则可能是不一样的
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个 y 的计算在视图里头,尽量在视图中去计算这个 y 值,而不是在组件内去计算,不同的视图 y 的规则可能是不一样的
可以在创建 view的时候,把需要的 height 传入进去,这样内部就可以计算 y 值了
@@ -11,14 +11,11 @@ order: 50 | |||
@use '@worktile/gantt/styles/variables.scss' with ( | |||
// basic | |||
$gantt-color: #333, | |||
$gantt-header-height: 44px, | |||
$gantt-border-color: #eee, | |||
$gantt-bg-color: #fff, | |||
$gantt-side-shadow: 12px 0 16px -10px rgba(0, 0, 0, 0.15), | |||
$gantt-container-background-color: #fafafa, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
直接去掉这些变量的话,不知道之前用到这些变量的应用会不会收到影响,得确认下
No description provided.