vscode扩展如何显示表单 [英] vscode extension how to display a form

查看:54
本文介绍了vscode扩展如何显示表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望创建一个带有输入表单的 VSCode 扩展 - 某种输入方式.到目前为止,我只看到了扩展的文档处理或输出.

I wish to create a VSCode extension with an entry form on it - some way of input. So far I have only seen document processing or output for an extension.

如何在 vscode 扩展中显示输入字段的形式?

How can you display a form of input fields in a vscode extension?

推荐答案

他们需要输入多少数据?如果不是很多,你应该可以用一系列的InputBox来处理

How much data do they need to enter? If it's not much, you should be able to handle it with a series of InputBoxes

来自 https://code.visualstudio.com/docs/extensionAPI/vscode-api

showInputBox(options?: InputBoxOptions): Thenable<string>

Opens an input box to ask the user for input.

The returned value will be undefined if the input box was canceled (e.g. pressing ESC). Otherwise the returned value will be the string typed by the user or an empty string if the user did not type anything but dismissed the input box with OK.

Parameter   Description
options?: InputBoxOptions   
Configures the behavior of the input box.

Returns Description
Thenable<string>    
A promise that resolves to a string the user provided or to undefined in case of dismissal.

这篇关于vscode扩展如何显示表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆