当前位置:网站首页>Applet record

Applet record

2022-07-26 09:49:00 ~ light boat ~

Today, according to the wechat applet learned from Qianfeng video flexbox Elastic magic box model

This is actually related to iOS There is too much difference We're doing it iOS Do this during development You can use it. xib Go drag Pretty simple

It can also be used. masonry To set up It can also be directly based on frame To set up One thing is that they fix the position when initializing , But wechat applet is not , The initialization is a place, and the setting position is another place , And is set around the control ( In fact, it's the same iOS Almost. Just not used to ), Actually, it's quite convenient .

in addition iOS And the naming rules of wechat applet are also different , This is also a problem of habit . Control is followed by class Is the name of the control, and then in wxss Set the position and size of the control in . And the tiny controls will be automatically arranged downward in the order you write , Set the specific position of the control according to the spacing you write . Therefore, the sequence of controls is particularly important in micro .

Next is the interaction of events  

Maybe I haven't touched the previous paragraph before , I feel very uncomfortable , stay iOS All operations are executed during initialization , The operation of wechat applet is js Execute data processing in , stay wxml Set the method to be added .

To judge the click between different controls, use currentTarget Medium id data-xxx And so on

wxml



js


原网站

版权声明
本文为[~ light boat ~]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/207/202207260922195327.html