1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

feat: 支持从弹窗中点击按钮快捷跳转至设置页对应配置项

This commit is contained in:
2025-12-05 11:17:36 +08:00
parent dd757e586e
commit dca8fc8758

View File

@@ -115,5 +115,23 @@ export function showConvertCaseOrderDialog() {
message += '- 重复和无效的格式配置可能会导致显示异常\n';
// 显示信息弹窗
vscode.window.showInformationMessage<vscode.MessageItem>('格式顺序配置信息', { modal: true, detail: message });
vscode.window.showInformationMessage<vscode.MessageItem>(
'格式顺序配置信息',
{ modal: true, detail: message },
// 弹窗按钮
{ title: '插件全部配置' },
{ title: '配置启用的命名方式' },
{ title: '配置转换顺序' },
).then(selection => {
if (selection) {
// 跳转到设置项
if (selection.title === '插件全部配置') {
vscode.commands.executeCommand('workbench.action.openSettings', 'variable-conversion');
} else if (selection.title === '配置启用的命名方式') {
vscode.commands.executeCommand('workbench.action.openSettings', 'variable-conversion.enabledFormats');
} else if (selection.title === '配置转换顺序') {
vscode.commands.executeCommand('workbench.action.openSettings', 'variable-conversion.formatOrder');
}
}
});
}