Cor*_*eZz 10 visual-studio-code
我想用来vscode.window.showInformationMessage显示一些消息。但我不能在其中换行。
我想要的是:
title:xxx
description:xxx
Run Code Online (Sandbox Code Playgroud)
我实际得到:
title:xxx description:xxx
Run Code Online (Sandbox Code Playgroud)
我的代码:
vscode.window.showInformationMessage("title:xxx\ndescription:xxx");
Run Code Online (Sandbox Code Playgroud)

这不完全是解决方案,但您可以使用模式对话框选项。
vscode.window.showInformationMessage('First line\nSecond line\nThird line', { modal: true });
Run Code Online (Sandbox Code Playgroud)
启用自定义对话框后,settings.json它看起来像:
vscode.window.showInformationMessage('First line\nSecond line\nThird line', { modal: true });
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1281 次 |
| 最近记录: |