short-generator.page.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <ion-header>
  2. <ion-toolbar>
  3. <ion-buttons slot="start">
  4. <ion-back-button defaultHref="/"></ion-back-button>
  5. </ion-buttons>
  6. <ion-title>短篇小说生成器</ion-title>
  7. </ion-toolbar>
  8. </ion-header>
  9. <ion-content class="ion-padding">
  10. <h1>标题</h1>
  11. <ion-input [value]="title" (ionInput)="titleInput($event)"></ion-input>
  12. <h1>风格</h1>
  13. <ion-input [value]="style" (ionInput)="styleInput($event)"></ion-input>
  14. <!-- 词条列表编辑区域 -->
  15. <span (click)="showEntryList()">
  16. 当前词条 数量{{entryList?.length}}
  17. </span>
  18. <comp-word-entry [entryList]="entryList" (entryListChange)="onEntryListChange($event)"></comp-word-entry>
  19. <!-- 文本域:生成提示词 -->
  20. <h1>人物词条</h1>
  21. <ion-textarea [value]="userPrompt" (ionInput)="promptInput($event)" placeholder="文本提示词"
  22. autoGrow="true"></ion-textarea>
  23. <!-- 按钮:执行消息生成函数 -->
  24. <ion-button (click)="sendMessage()" expand="block">生成大纲</ion-button>
  25. <!-- 展示:返回消息内容 -->
  26. <!-- 实时预览生成的小说大纲 -->
  27. <ion-textarea [(ngModel)]="generatedOutline" placeholder="生成的小说大纲" autoGrow="true"
  28. class="generated-outline"></ion-textarea>
  29. <!-- 按钮:执行消息生成函数 -->
  30. <ion-button (click)="sendOutline()" expand="block">生成小说</ion-button>
  31. <!-- 展示:返回消息内容 -->
  32. <!-- 实时预览生成的小说 -->
  33. <ion-textarea [(ngModel)]="generatedContent" placeholder="生成的小说" autoGrow="true"
  34. class="generated-content"></ion-textarea>
  35. <!-- 保存按钮 -->
  36. <ion-button (click)="saveNovel()" expand="block" color="success">保存小说</ion-button>
  37. </ion-content>