WeChat Open Platform

Mini Programs Documentation

Code editing

Basic actions, including code writing and the addition, deletion, and renaming of files for the current project, can be performed in the Edit area.

File support

This tool currently offers editing for four types of files: wxml, wxss, js, json, and image file previews.

Live preview

If "Automatically compile Mini Program when file is saved" is enabled in Settings (location: Settings - Edit - Automatically compile Mini Program when file is saved), the edit status of js, json, wxml or wxss files can be previewed in real time using the simulator when they are modified:

edit

Autosave

After code is written, the tool will automatically help the user by saving the edit status of the current code, closing the tool directly, or switching to another project, and it will not lose the status of the edited file. However, it needs to be noted that it will only save the file, the modified content will only really be written onto the hard disk. The enabling of "Autosave when file modified" (autosave when files have been modified) can be configured in Settings (Settings - Edit), the effect of this will be that there is no need to save manually. "Autosave all files when compiling" can also be enabled in order to achieve the result of automatically helping to save all files when Compile is clicked on.

Autocomplete

Like most editors, this tool offers improved autocomplete.

  • When editing js files, this will help developers to complete all APIs and their related comments and explanations, and provide code template support.
  • When editing wxml files, this will help developers to directly write the related tags and the attributes in the tags.
  • When editing json files, this will help developers to complete the related configurations and provide real time prompts.

js completion

3

Code template support

3

json completion

3

wxml completion

3

Shortcuts

See tool menu bar