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