Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>My PluginNew to Visual Studio Code? Get it now.
My Plugin

My Plugin

DAY_PLUGIN

|
39 installs
| (0) | Free
A VS Code plugin with login functionality.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

扩展名称

这是一个关于您的扩展的简短描述和功能说明。

功能

  • 提供了 myPlugin.showLogin 命令,用于显示登录页面。
  • 提供了 myPlugin.forceShowLogin 命令,用于强制显示登录页面。
  • 在登录后,显示一个包含用户项目的目录树。

安装

打开 Visual Studio Code,按下 Ctrl+P,输入以下命令并按下 Enter 键:

使用

  1. 打开 Visual Studio Code
  2. 使用快捷键 Ctrl+Shift+P 打开命令面板
  3. 输入 扩展名称 并选择 myPlugin.showLogin 命令,按下 Enter 键
  4. 如果未登录,将显示登录页面;如果已登录,将显示用户项目的目录树。

示例代码

import * as vscode from 'vscode';

export function activate(context: vscode.ExtensionContext) {
  // 注册 showLogin 命令
  let showLoginCommand = vscode.commands.registerCommand('myPlugin.showLogin', async () => {
    // 实现代码...
  });

  // 注册 forceShowLogin 命令,强制显示登录页面
  let forceShowLoginCommand = vscode.commands.registerCommand('myPlugin.forceShowLogin', () => {
    // 实现代码...
  });

  // 其他代码...
}

export function deactivate() {}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft