<script setup lang="ts"> import { onMounted, ref, reactive, computed, watch, Ref } from…
- User
<!-- 模型类型选择 --> <van-row class="section" justify="center"> <van-col :span="12"> <div class="model-type"> <van-radio-group v-model="checked_type" direction="horizontal"> <van-radio name="1">SD-XL</van-radio> <van-radio name="2">FLUX</van-radio> </van-radio-group> </div> </van-col> </van-row> <!-- 模型ID输入 --> <van-row class="section" justify="center"> <van-col :span="12"> <div class="model-id"> <van-cell-group inset> <van-field v-model="model_id" label="模型ID:" left-icon="smile-o" right-icon="warning-o" placeholder="输入模型ID" clearable /> </van-cell-group> </div> </van-col> </van-row> <!-- 模型列表和代码输入区域 --> <van-row class="section align-stretch" justify="center"> <!-- 模型列表 --> <van-col :span="12" class="flex-item"> <div class="model-list"> <v-list lines="one" density="compact" max-height="300"> <v-list-item v-for="item in paginatedModels" :key="item.model_id" :title="item.model_name + ' 调用次数: ' + item.api_calls" :subtitle="'模型ID: ' + item.model_id" ></v-list-item> </v-list> <v-pagination v-model="currentPage" :length="totalPages" class="pagination" ></v-pagination> </div> </van-col> <!-- 代码输入 --> <van-col :span="12" class="flex-item"> <div class="code_input"> <v-container> <v-textarea row-height="15" bg-color="amber-lighten-4" color="orange orange-darken-4" label="代码输入" rows="10" v-model="code_input_" placeholder='{"key": "", "model_id": "your_model_id", "prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner)), blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K", "negative_prompt": "", "width": "512", "height": "512", "samples": "1", "num_inference_steps": "31", "safety_checker": "no", "enhance_prompt": "yes", "seed": null, "guidance_scale": 7.5, "panorama": "no", "self_attention": "no", "upscale": "no", "embeddings_model": null, "lora_model": null, "tomesd": "yes", "clip_skip": "2", "use_karras_sigmas": "yes", "vae": null, "lora_strength": null, "scheduler": "UniPCMultistepScheduler", "webhook": null, "track_id": null }' auto-grow > <v-btn block @click="ondraw">开始绘图
<!-- 新增:画廊部分 --> <van-row class="draw" justify="center"> <van-col :span="24"> <div class="gallery"> <h2 class="gallery-title">画廊</h2> <van-row justify="start" wrap> <van-col v-for="(image, index) in paginatedGalleryImages" :key="index" :span="4" class="gallery-item" > <img :src="image" alt="Gallery Image" class="gallery-image" /> </van-col> </van-row> <v-pagination v-model="galleryCurrentPage" :length="galleryTotalPages" class="pagination" ></v-pagination> </div> </van-col> </van-row> </div> </van-col> </van-row> </div> - Assistant