Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>my-snippets(支付宝小程序snippets)New to Visual Studio Code? Get it now.
my-snippets(支付宝小程序snippets)

my-snippets(支付宝小程序snippets)

freedy

|
297 installs
| (1) | Free
支付宝小程序snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

my-snippets(Alipay tiny program snippets)

The snippets is used for Alipay tiny program.

Installation

In order to install an extension you need to launch the Command Palette (Ctrl + Shift + P or Cmd + Shift + P) and type my-snippets. There you have either the option to show the already installed snippets or install new ones.

Snippets

Below is a list of all available snippets and the triggers of each one. The → means the Enter key.

Triger Content
[toast,showToast,my.toast,, my.showToast]→ my.show({content:''})
[alert, my.alert]→ my.alert({content: ''})
[loading, showLoading,my.showLoading]→ my.showLoading({content: })
[reLaunch,my.reLaunch]→ my.reLaunch({url: ''})
[redirect,redirectTo, my.redirectTo]→ my.redirectTo({url:'' })
[navigate,navigateTo, my.navigateTo]→ my.navigateTo({url: })
openUrl→ openUrl({url: ''})
setData→ my.setData({'': ''})
[create,createSelector,createSelectorQuery,my.create]→ create the template of my.createSelectorQuery
[storage,setStorage,my.setStorage]→ create the template of my.setStorage
[setStorageSync,my.setStorageSync]→ create the template of my.setStorageSync
[storage,getStorage,my.getStorage]→ create the template of my.getStorage
[getStorageSync,my.getStorageSync]→ create the template of my.getStorageSync
[removeStorage,my.removeStorage]→ create the template of my.removeStorage
[removeStorageSync,my.removeStorageSync]→ create the template of my.removeStorageSync
[clearStorage,my.clearStorage]→ create the template of my.clearStorage
[clearStorageSync,my.clearStorageSync]→ create the template of my.clearStorageSync
[confirm,my.confirm]→ create the template of my.confirm

Example

createSelector

my.createSelectorQuery()
        .select('')
        .boundingClientRect()
        .exec(rets => {
          if (rets && rets[0]) {
          
          }
        }) 

setStorage

 my.setStorage({
          key: '',
          data: '',
          success: (res)=>{},
          fail: (cause) => {},
        })

confirm

  my.confirm({
          title: '',
          content: '',
          confirmButtonText: '',
          cancelButtonText: '',
          success: (result) => {
          },
        })   

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