Visual studio code 如何创建类似于vscode主题选择器的快速拾取
我试图创建一个快速拾取,在你上下移动时执行命令,类似于你预览主题的方式 我读过这本书,但是我找不到我想要的东西,所以非常感谢你的帮助 这是我目前拥有的Visual studio code 如何创建类似于vscode主题选择器的快速拾取,visual-studio-code,vscode-extensions,Visual Studio Code,Vscode Extensions,我试图创建一个快速拾取,在你上下移动时执行命令,类似于你预览主题的方式 我读过这本书,但是我找不到我想要的东西,所以非常感谢你的帮助 这是我目前拥有的 commands.registerCommand('terminal_themes.apply', async () => { let items = themes.map((item) => item.name) // change this to update on up&down // inst
commands.registerCommand('terminal_themes.apply', async () => {
let items = themes.map((item) => item.name)
// change this to update on up&down
// instead of on selection
window.showQuickPick(items).then((selection) => {
if (!selection) {
return
}
// do something with selection
})
})
要在用户更改选择时执行某些操作,请使用for
showQuickPick
commands.registerCommand('terminal\u themes.apply',async()=>{
让items=themes.map((item)=>item.name)
窗口。显示快速拾取(项目{
onDidSelectItem:(项目)=>{
//对这个项目做些什么
}
})。然后((选择)=>{
//用户最终选择
如果(!选择){
返回
}
})
})
要在用户更改选择时执行某些操作,请使用forshowQuickPick
commands.registerCommand('terminal\u themes.apply',async()=>{
让items=themes.map((item)=>item.name)
窗口。显示快速拾取(项目{
onDidSelectItem:(项目)=>{
//对这个项目做些什么
}
})。然后((选择)=>{
//用户最终选择
如果(!选择){
返回
}
})
})
many thanx,是否有机会发布主题选择源代码的链接?many thanx,是否有机会发布主题选择源代码的链接?