Small program Notes

Source: Internet
Author: User

This article is purely summary notes, all from the network

Official Document: Https://mp.weixin.qq.com/debug/wxadoc/dev/index.html

First, common knowledge points

1. Framework consists of configuration (JSON), Logic layer (JS, API), view layer (WXML,WXSS, component)

2. Bubbling event: Touchstart touchmove touchcancel touchend tap Longtap; bind Event bindings do not prevent bubbling events from bubbling up, and catch event bindings can prevent bubbling events from bubbling up.

3, Event object:Type: Represents the types of events; TimeStamp: The number of milliseconds that the page opened to the triggering event; target: The source component that triggered the event [id,tagname,dataset{notation: To data- begin with, multiple words - are linked by hyphens and cannot have uppercase (uppercase is automatically converted to lowercase) as in the data-element-type end Event.target.dataset will turn the hyphen into hump elementType}]; currenttarget: The current component of the event binding; Touches: [Touch {PageX, Pagey,clientx, ClientY}]; Detail: Data that is carried by custom events

4 wx:key . The value is provided in two forms: a string (representing a property of item in the for Loop's array), *this (the item itself represented in the For loop)

Ii. details of the arrangement

1, common shortcut key: code formatting : shift+alt+f code line indentation : ctrl+[ on one line: alt+up up one line : Shift+alt+down Check cursor current line : Ctrl+i Select from cursor to end of line : Shift+end Select all matches : Ctrl+shift+l to Open or hide the emulator : Ctrl + M Close the current file : Ctrl + M

2, applet default home: App.json pages in the first page

3. Automatically generate default page: After adding the path element of new page in App.json pages, click CTRL + S to automatically generate the corresponding directory and file after saving

4, <block/> not a component, it is just a wrapper element, will not do any rendering in the page, only accept control properties

5.

Third, the road of pits

1.

Small program Notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.