|
@@ -1,33 +1,51 @@
|
|
|
<ion-header [translucent]="true">
|
|
|
- <ion-toolbar>
|
|
|
- <ion-title>
|
|
|
- 症状图{{imagineWork?.progress || 0}}
|
|
|
- </ion-title>
|
|
|
+ <ion-toolbar color="primary">
|
|
|
+ <ion-title class="ion-text-center">
|
|
|
+ 症状图 {{imagineWork?.progress || 0}}%
|
|
|
+ </ion-title>
|
|
|
</ion-toolbar>
|
|
|
</ion-header>
|
|
|
|
|
|
-<ion-content [fullscreen]="true">
|
|
|
- <!-- 生成提示词 -->
|
|
|
- <ion-textarea [value]="userPrompt" (ionInput)="promptInput($event)" placeholder="症状描述填写" autoGrow="true"></ion-textarea>
|
|
|
- <ion-button (click)="createImage()" expand="block">生成症状图</ion-button>
|
|
|
- <!-- 意境画面提示词 -->
|
|
|
- <div>
|
|
|
- {{PictureDescResult}}
|
|
|
- </div>
|
|
|
- <!-- 生成结果 -->
|
|
|
- @if(images.length) {
|
|
|
- @for(imageUrl of images;track imageUrl){
|
|
|
- <img [src]="imageUrl" alt="" srcset="">
|
|
|
- }
|
|
|
- }
|
|
|
- <!-- 生成状态 -->
|
|
|
- @if(!images.length){
|
|
|
- @if(imagineWork){
|
|
|
- <h1>生成中</h1>
|
|
|
- }
|
|
|
- @if(!imagineWork){
|
|
|
- <h1>未开始</h1>
|
|
|
- }
|
|
|
- }
|
|
|
+<ion-content [fullscreen]="true" class="ion-padding">
|
|
|
+ <ion-card>
|
|
|
+ <ion-card-header>
|
|
|
+ <ion-card-title>症状描述</ion-card-title>
|
|
|
+ </ion-card-header>
|
|
|
+ <ion-card-content>
|
|
|
+ <ion-textarea
|
|
|
+ [value]="userPrompt"
|
|
|
+ (ionInput)="promptInput($event)"
|
|
|
+ placeholder="请填写症状描述"
|
|
|
+ autoGrow="true"
|
|
|
+ class="textarea-custom">
|
|
|
+ </ion-textarea>
|
|
|
+ <ion-button
|
|
|
+ (click)="createImage()"
|
|
|
+ expand="full"
|
|
|
+ class="button-custom">
|
|
|
+ 生成症状图
|
|
|
+ </ion-button>
|
|
|
+ </ion-card-content>
|
|
|
+ </ion-card>
|
|
|
+
|
|
|
+ <ion-card *ngIf="PictureDescResult">
|
|
|
+ <ion-card-header>
|
|
|
+ <ion-card-title>症状描述</ion-card-title>
|
|
|
+ </ion-card-header>
|
|
|
+ <ion-card-content>
|
|
|
+ <div>{{PictureDescResult}}</div>
|
|
|
+ </ion-card-content>
|
|
|
+ </ion-card>
|
|
|
|
|
|
-</ion-content>
|
|
|
+ <div class="image-container">
|
|
|
+ <ng-container *ngIf="images.length; else loadingTemplate">
|
|
|
+ <ng-container *ngFor="let imageUrl of images; trackBy: trackImage">
|
|
|
+ <img [src]="imageUrl" alt="生成的症状图" class="generated-image">
|
|
|
+ </ng-container>
|
|
|
+ </ng-container>
|
|
|
+ <ng-template #loadingTemplate>
|
|
|
+ <h1 *ngIf="imagineWork">生成中...</h1>
|
|
|
+ <h1 *ngIf="!imagineWork">未开始</h1>
|
|
|
+ </ng-template>
|
|
|
+ </div>
|
|
|
+</ion-content>
|