💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 1.安装 ~~~ go get fyne.io/fyne/v2 ~~~ ## 2.示例 ~~~ type App struct { output *widget.Label } var myapp App func main() { a := app.New() w := a.NewWindow("Hello World") output, entry, btn := myapp.makeUI() w.SetContent(container.NewVBox(output, entry, btn)) w.Resize(fyne.Size{Width: 500, Height: 500}) w.ShowAndRun() } func (app *App) makeUI() (*widget.Label, *widget.Entry, *widget.Button) { output := widget.NewLabel("Hello, World!") entry := widget.NewEntry() btn := widget.NewButton("Enter", func() { app.output.SetText(entry.Text) }) app.output = output return output, entry, btn } ~~~