-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components): set height after bottom changed #PJM-21216 (#155)
- Loading branch information
Showing
6 changed files
with
100 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/components/board/examples/custom-template/add/add.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<div class="card-add-btn py-1 ml-2 mb-1" [class.d-none]="isAdded"> | ||
<a | ||
href="javascript:;" | ||
class="link-has-icon link-muted add-btn d-flex align-items-center" | ||
[class.d-none]="isAdded" | ||
#addWorkItem | ||
(click)="goAddStep()" | ||
>新建工作项</a | ||
> | ||
</div> | ||
<div class="card-add-creating" *ngIf="isAdded"> | ||
<textarea | ||
class="form-control" | ||
(thyEnter)="create($event)" | ||
#workItemTitleInput | ||
name="workItemTitle" | ||
[(ngModel)]="title" | ||
[thyAutofocus]="true" | ||
[maxlength]="titleMaxLength" | ||
></textarea> | ||
|
||
<div class="d-flex mt-2"> | ||
<div class="flex-grow-1 btn-pair-sm"> | ||
<button thyButton="primary" thySize="sm" [thyLoading]="saving" (click)="create($event)">确定</button> | ||
<a thyButton="link-secondary" thySize="sm" (click)="cancel()">取消</a> | ||
</div> | ||
</div> | ||
</div> |
38 changes: 38 additions & 0 deletions
38
packages/components/board/examples/custom-template/add/add.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Component, HostBinding, OnInit, input } from '@angular/core'; | ||
import { ThyBoardCard } from '@tethys/pro/board'; | ||
|
||
interface CardInfo extends ThyBoardCard { | ||
title: string; | ||
} | ||
|
||
@Component({ | ||
selector: 'thy-board-custom-template-add', | ||
templateUrl: './add.component.html', | ||
host: { | ||
class: 'card-add-container' | ||
} | ||
}) | ||
export class ThyBoardCustomTemplateAddComponent implements OnInit { | ||
@HostBinding('class.card-add-container--creating') isCreating = false; | ||
|
||
isAdded = false; | ||
|
||
constructor() {} | ||
|
||
ngOnInit() {} | ||
|
||
goAddStep() { | ||
this.isAdded = true; | ||
this.isCreating=true | ||
} | ||
|
||
create(event: Event) { | ||
this.isAdded = false; | ||
this.isCreating=false | ||
} | ||
|
||
cancel() { | ||
this.isAdded = false; | ||
this.isCreating=false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters