12 changed files with 236 additions and 23 deletions
@ -1,3 +1,24 @@ |
|||||||
<div class="chatbox"> |
<div class="chatbox" ngDraggable [preventDefaultEvent]="true" [handle]="dragheader"> |
||||||
|
<div class="titlebox"> |
||||||
|
<span class="titlename" #dragheader> |
||||||
|
历下区A消防救援站群聊(3) |
||||||
|
</span> |
||||||
|
<span class="close" nz-icon nzType="close" nzTheme="outline" (click)="close()"></span> |
||||||
|
</div> |
||||||
|
<div class="chatcontent" id="chatcontent"> |
||||||
|
<div class="chatitem" *ngFor="let item of data" [ngClass]="{'chatitemMe': item.name == '我'}"> |
||||||
|
<div class="name"> |
||||||
|
{{item.name}} |
||||||
|
</div> |
||||||
|
<div class="chatmessage"> |
||||||
|
{{item.content}} |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="inputarea"> |
||||||
|
<textarea rows="4" nz-input [nzBorderless]="true" [(ngModel)]="text"></textarea> |
||||||
|
</div> |
||||||
|
<div class="btnbox"> |
||||||
|
<button nz-button nzType="primary" (click)="send()">发送</button> |
||||||
|
</div> |
||||||
</div> |
</div> |
@ -1,7 +1,98 @@ |
|||||||
.chatbox { |
.chatbox { |
||||||
width: 478px; |
width: 500px; |
||||||
height: 734px; |
height: 580px; |
||||||
background: #F5F6F8; |
background: #F5F6F8; |
||||||
border-radius: 4px 4px 4px 4px; |
border-radius: 4px 4px 4px 4px; |
||||||
opacity: 1; |
opacity: 1; |
||||||
|
position: absolute; |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
border: 1px solid rgb(216, 209, 209); |
||||||
|
} |
||||||
|
|
||||||
|
.titlebox { |
||||||
|
display: flex; |
||||||
|
align-items: center; |
||||||
|
justify-content: space-between; |
||||||
|
height: 46px; |
||||||
|
border-bottom: 1px solid #E4E7EC; |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 0 18px; |
||||||
|
|
||||||
|
.titlename { |
||||||
|
flex: 1; |
||||||
|
cursor: move; |
||||||
|
text-align: left; |
||||||
|
} |
||||||
|
|
||||||
|
.close { |
||||||
|
cursor: pointer; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.chatcontent { |
||||||
|
flex: 1; |
||||||
|
overflow-y: auto; |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 0 18px; |
||||||
|
|
||||||
|
.chatitem { |
||||||
|
display: flex; |
||||||
|
flex-direction: column; |
||||||
|
margin: 12px 0; |
||||||
|
|
||||||
|
.name { |
||||||
|
text-align: left; |
||||||
|
color: gray; |
||||||
|
font-size: 12px; |
||||||
|
margin-bottom: 3px; |
||||||
|
} |
||||||
|
|
||||||
|
.chatmessage { |
||||||
|
|
||||||
|
background-color: #fff; |
||||||
|
box-sizing: border-box; |
||||||
|
padding: 6px 8px; |
||||||
|
text-align: left; |
||||||
|
width: fit-content; |
||||||
|
width: -webkit-fit-content; |
||||||
|
width: -moz-fit-content; |
||||||
|
|
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.chatitemMe { |
||||||
|
.name { |
||||||
|
text-align: right; |
||||||
|
} |
||||||
|
|
||||||
|
.chatmessage { |
||||||
|
display: flex; |
||||||
|
align-self: flex-end; |
||||||
|
background: #89d961; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
.inputarea { |
||||||
|
height: 120px; |
||||||
|
border-top: 1px solid #E4E7EC; |
||||||
|
|
||||||
|
textarea { |
||||||
|
height: 100%; |
||||||
|
background: #F5F6F8; |
||||||
|
resize: none; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.btnbox { |
||||||
|
display: flex; |
||||||
|
height: 56px; |
||||||
|
align-items: center; |
||||||
|
justify-content: flex-end; |
||||||
|
|
||||||
|
button { |
||||||
|
margin-right: 18px; |
||||||
|
} |
||||||
} |
} |
||||||
|
After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in new issue