小编use*_*833的帖子

VSCode 扩展:如何以编程方式在面板中显示视图容器

我正在编写一个 VSCode 扩展,其中添加了一个视图容器WebviewView

"contributes": {
    "commands": [
      {
        "command": "showView",
        "title": "Show view"
      }
    ],
    "viewsContainers": {
      "panel": [
        {
          "id": "mycontainer",
          "title": "My Container",
          "icon": "media/app.svg"
        }
      ]
    },
    "views": {
      "mycontainer": [
        {
          "type": "webview",
          "id": "myview",
          "name": "MyView"
        }
      ]
    }
  },
Run Code Online (Sandbox Code Playgroud)

showView命令执行中。我想以编程方式使视图myview显示在 VSCode UI 中。怎么做?

visual-studio-code vscode-extensions

5
推荐指数
2
解决办法
2200
查看次数