const result = createTemplate(); if(result) { inputBox.hide(); window.showInformationMessage('创建成功成功,请查看!!!'); } else { window.showInformationMessage('创建失败,请重试!!!'); } inputBox.enabled = true; inputBox.busy = false; }); /** 展示input输入框 */ inputBox.show(); }...
const inputBox = window.createInputBox(); /** 配置placeholder */ inputBox.placeholder = '请输入你的组件名称,按Enter确认'; /** 获取输入框的值 */ const inputValue = inputBox.value; /** input值更新回调 */ inputBox.onDidChangeValue(async (value: string) => { /** 判断输入的名称是否为...
const text: string | undefined = await vscode.window.showInputBox({ '最后一步,输入文案' }) 1. 2. 3. quick pick 用于从一组选项中选择一个,类似于select组件。使用vscode.window.showQuickPick,同样返回一个Promise,resolve时得到被选中的选项或undefined: const lang: string | undefined = await vscode...
import vscode, { QuickPickItem } from "vscode"; export const createTestFile = async ( { basename, ext, parent, root }: CreateTestFileOption, manualCreate: boolean = true ) => { // 显示输入框 const userInputPath = await vscode.window.showInputBox({ prompt: NEW_TEST_FILE_PROMPT, value...
input box 在编辑器顶部展示一个input输入框,使用vscode.window.showInputBox,会返回一个Promise: 1 2 3 const text: string |undefined =await vscode.window.showInputBox({ '最后一步,输入文案' }) quick pick 用于从一组选项中选择一个,类似于select组件。使用vscode.window.showQuickPick,同样返回一个Promis...
**/constresult =vscode.window.showInputBox({ prompt:"请输入版本号,", value:"默认值", placeHolder:"提示", valueSelection: [len, len] }); result.then(inputValue=>{//是按下ESC键if(typeof_versionName ==="undefined")return;//按下enter键}); ...
在编辑器顶部展示一个input输入框,使用vscode.window.showInputBox,会返回一个Promise: 代码语言:javascript 复制 consttext:string|undefined=awaitvscode.window.showInputBox({'最后一步,输入文案'}) quick pick 用于从一组选项中选择一个,类似于select组件。使用vscode.window.showQuickPick,同样返回一个Promise,reso...
match) {+ vscode.window.showErrorMessage('Invalid selection.');+ return;+ }const inputOptions: vscode.InputBoxOptions = {prompt: 'setHeadingLevelPrompt',@@ -31,6 +36,16 @@ exportasyncfunctionsetHeadingLevel() {if (headingLevel) {const newHeadingLevel = parseInt(headingLevel);- ...
vscode.window.showInformationMessage(`${element.id} forward port: ${rPort} success`); } else { @@ -83,29 +88,32 @@ export class LocalDeviceView { public tcpConnect() { const inputBox = vscode.window.createInputBox(); let prompt = "If use emulator, you should know emulator port."...
val createOutputChannel : name:string -> ?languageId:string -> unit -> OutputChannel.t [@@js.global "vscode.window.createOutputChannel"] val createInputBox : unit -> InputBox.t [@@js.global "vscode.window.createInputBox"] val showOpenDialog @@ -2995,9 +3075,6 @@ module ...