Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>wechat component vscodeNew to Visual Studio Code? Get it now.
wechat component vscode

wechat component vscode

ZhengWei513

|
1 install
| (0) | Free
微信小程序组件插件
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

wechat-component-vscode 微信自定义组件插件

组件跳转实现

  • 组件名称必须和 wxml 文件名相同(使用 endsWith 匹配的);

Web Components 语法(暂无)

components.d.json 自定义组件配置文件用于代码补全和提示, 组件名称支持多个用逗号分隔, attributes 会合并, description 会覆盖

// components.d.json 类型定义
export type IComponentsTags = {
  // 组件名称
  [key: string]: {
    // 组件描述
    description: string,
    attributes: {
      // 属性名称
      [key: string]: {
        // 属性描述
        description: string,
        // 属性类型
        type: string,
        // 属性可选值
        values: (string | number)[],
      },
    },
  },
};
// 例子
{
  "cf-test": {
    "description": "My component 组件",
    "attributes": {
      "type": {
        "description": "类型",
        "type": "String",
        "values": ["primary", "success", "info", "warning", "danger"]
      }
    }
  }
}

推荐插件



  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft