Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>WeApp SnippetsNew to Visual Studio Code? Get it now.
WeApp Snippets

WeApp Snippets

Emeryao

|
25,485 installs
| (1) | Free
Snippets for WeApp development
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

WeApp Extension for VS Code

Visual Studio Marketplace GitHub stars

VS code extension for WeApp development
微信小程序插件 for TypeScript / wxml / config json

Welcome

It's nice to see you here getting this extension, cause you're using or gonna use the GREAT TypeScript to develop your WeApp
You can aslo take advantage of this extension for wxml and json even if you are using javascript

BTW: It is strongly recommeded to get the TypeScript declaration file for WeApp API:

  • With npm installed

    npm install typed-we-app --save-dev
    
  • With typings installed

    typings install github:Emeryao/typed-we-app -SG
    

Contact Me

Twitter

Please feel free to contact me via email or Github issue

Snippets

prefix wa- stands for WeApp
based on the official WeApp documentation

TypeScript

  • wa-page :
    let mainPage: WeApp.Page;
    
    Page({
        data: {
            message: 'hello world'
        },
        onLoad: function (): void {
            mainPage = this;
        }
    });
  • wa-app :
    let param: AppParam = {
        onLaunch: function () {

        },
        onShow: function () {

        },
        onHide: function () {

        }
    };
    App(param);

wxml

snippets output
wa-block <block></block>
wa-view <view></view>
wa-scroll-view <scroll-view></scroll-view>
wa-swiper <swiper></swiper>
wa-swiper-item <swiper-item></swiper-item>
wa-icon <icon></icon>
wa-text <text></text>
wa-textarea <textarea></textarea>
wa-progress <progress></progress>
wa-button <button></button>
wa-checkbox-group <checkbox-group></checkbox-group>
wa-checkbox <checkbox></checkbox>
wa-form <form></form>
wa-input <input></input>
wa-label <label></label>
wa-picker <picker></picker>
wa-radio-group <radio-group></radio-group>
wa-radio <radio></radio>
wa-slider <slider></slider>
wa-switch <switch></switch>
wa-navigator <navigator></navigator>
wa-audio <audio></audio>
wa-image <image></image>
wa-video <video></video>
wa-map <map></map>
wa-canvas <canvas></canvas>
wa-movable-area <movable-area></movable-area>
wa-movable-view <movable-view></movable-view>
wa-cover-view <cover-view></cover-view>
wa-cover-image <cover-image></cover-image>
wa-open-data <open-data></open-data>
wa-rich-text <rich-text></rich-text>

JSON

  • wa-page
  • wa-app-window
  • wa-app-page
  • wa-app-tab
  • wa-app-network
  • wa-app-debug

Where to get

  • Extension@Visual Studio Marketplace
  • Source@Github

Last Update

2017.07.12
WeApp Dev Tool Version: 0.19.191100

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