Common considerations for WeChat applets

1. The button button cannot be customized because you have written the type attribute . As long as you don’t write the type attribute, you can change the button style at will

2. TabBar page , you cannot jump to the page, you can only use switchTab to jump

3. The main package of the WeChat applet contains: the default startup page/TabBar page, and some common resources/JS scripts that all sub-
packages need to use. If the public resources used by the main package and sub-packages are greater than 2M, only Can think of a way to put all public resources that can be used remotely in the remote

4. ID selector cannot be used to generate small programs, but class

5, applet periodic function can not be used in a sub-assembly which, to use parent component inside

6. The applet has no window object and no document . Cannot jump to external links

7. The index must be specified in the v-for loop , and the :key attribute must be added , otherwise problems may occur in WeChat

8. There are no special requirements for the width and height of the picture. Generally, it is recommended that the width and height be written to death. It is easy to adapt to the picture drag phenomenon in the case of poor performance;

Summary: I think these precautions are the most basic, but they are also the most error-prone. As the saying goes, "details determine success or failure", "difficulty determines technology, attitude determines height", only a solid foundation can build a higher self, and thus change Before becoming the most annoying person "the rich". Hope this bit of spiritual chicken soup can stimulate a little bit of potential in your heart, come on! ! ! Every IT staff.
Welcome to
join the group for technical discussions, group number: 954314851

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_48193717/article/details/108027575