在我的分機我有一個資源管理器視圖的欄上的一些按鈕:如何在VSCode擴展的資源管理器視圖中指定圖標的順序?
我怎麼可以指定按鈕顯示的順序?
我試圖在package.json
的命令在commands
屬性的順序發生變化:
"commands": [
{
"command": "codeFragments.exportFragments",
"title": "Export all fragments to Json",
"icon": {
"light": "images/icon-export-light.png",
"dark": "images/icon-export-dark.png"
}
},
{
"command": "codeFragments.importFragments",
"title": "Import fragments from Json",
"icon": {
"light": "images/icon-import-light.png",
"dark": "images/icon-import-dark.png"
}
},
{
"command": "codeFragments.deleteAllFragments",
"title": "Delete all fragments",
"icon": {
"light": "images/icon-delete-light.png",
"dark": "images/icon-delete-dark.png"
}
}
],
還試圖在部分重新排序,其中我指定UI,在view/title
屬性:
"view/title": [
{
"command": "codeFragments.exportFragments",
"when": "view == codeFragments",
"group": "navigation"
},
{
"command": "codeFragments.importFragments",
"when": "view == codeFragments",
"group": "navigation"
},
{
"command": "codeFragments.deleteAllFragments",
"when": "view == codeFragments",
"group": "navigation"
}
],
而且當我推送命令訂閱時,還嘗試更改部分中的順序:
context.subscriptions.push(
vscode.commands.registerCommand('codeFragments.exportFragments', exportFragments));
context.subscriptions.push(
vscode.commands.registerCommand('codeFragments.importFragments', importFragments));
context.subscriptions.push(
vscode.commands.registerCommand('codeFragments.deleteAllFragments', deleteAllFragments));
但是這些方法都不影響順序,按鈕總是以看似偶然的順序出現。
指定訂單的正確方法是什麼?