tab2.page.html 774 B

1234567891011121314151617181920212223242526272829
  1. <ion-header [translucent]="true">
  2. <ion-toolbar>
  3. <ion-title>
  4. 示例:图片生成{{imagineWork?.progress || 0}}
  5. </ion-title>
  6. </ion-toolbar>
  7. </ion-header>
  8. <ion-content [fullscreen]="true">
  9. <!-- 生成提示词 -->
  10. <ion-textarea [value]="userPrompt" (ionInput)="promptInput($event)" placeholder="DALLE3图片提示词" autoGrow="true"></ion-textarea>
  11. <ion-button (click)="createImage()" expand="block">生成图片</ion-button>
  12. <!-- 生成结果 -->
  13. @if(images.length) {
  14. @for(imageUrl of images;track imageUrl){
  15. <img [src]="imageUrl" alt="" srcset="">
  16. }
  17. }
  18. <!-- 生成状态 -->
  19. @if(!images.length){
  20. @if(imagineWork){
  21. <h1>生成中</h1>
  22. }
  23. @if(!imagineWork){
  24. <h1>未开始</h1>
  25. }
  26. }
  27. </ion-content>