Skip to content

Image Generation ​

Vue 已实现 · 还原验收 0/1 · 上游演示 · 固定版本源码

预览 ​

A lakeside cabin beneath the mountains
1024 × 1024
Generating image“A lakeside cabin beneath the mountains”

用法 ​

vue
<script setup lang="ts">
import { ImageGeneration } from 'beui-vue'
import { ref } from 'vue'
const states = ['queued','generating','refining','complete','error'] as const
const status = ref<typeof states[number]>('generating')
</script>
<template><div class="be-agent-demo"><ImageGeneration :status="status" resolution="1024 × 1024" prompt="A lakeside cabin beneath the mountains" @retry="status = 'generating'"><img src="https://images.unsplash.com/photo-1470770841072-f978cf4d019e?auto=format&amp;fit=crop&amp;w=600&amp;q=80" alt="A lakeside cabin beneath the mountains" /></ImageGeneration><label>Generation stage <select v-model="status"><option v-for="state in states" :key="state">{{ state }}</option></select></label></div></template>

API ​

status 支持 queued、generating、refining、complete、error。传入插槽媒体、prompt、resolution、aspectRatio;interactive 启用指针响应,@retry 处理失败。

还原验收 ​

基于 beUI 的独立 Vue 移植,依 MIT 许可证分发。