【发布时间】:2023-02-24 05:18:48
【问题描述】:
const q = vscode.window.createQuickPick();
q.items = [{ label: "1" }, { label: "2" }];
q.activeItems = [{ label: "2" }];
q.show();
根据我对 vscode 扩展 api 文档的理解。
/**
* Active items. This can be read and updated by the extension.
*/
activeItems: readonly T[];
当显示快速选择时,它应该激活“2”项。 但是我发现 activeItems 会在 show() 方法之后重置; 我不知道为什么,也无法在互联网上找到任何相同的问题,
【问题讨论】:
标签: javascript vscode-extensions