7. With respect to micro-channel applet wxml, wxss

1. wxml page structure language

  .wxml file structured language can be seen as small micro-channel program page is a page for display language skeleton structure, which is similar to the front end opening end of the PC HTML file.

  In .wxml file, we can databind --- {{name}} data binding, conditional --- wx: if, loop through --- wx: for, etc., and it is extremely vue similar, but there is the uniqueness of the self, such as encapsulation. Small micro-channel program we have prepared a lot for the height of the package label, so we use the labels directly in the course of daily development of the selection to finish the corresponding function module.

  .Wxml file for each module, we can also be packaged separately, thereby achieving a high degree of code reuse. I am not here to define and call a detailed description of the component, and also in the previous blog to explain in detail.

2. wxss style file

  Css files and the PC side of the same function for describing the structure of beautification .wxml file. Of course, for style files here need to focus on to explain the following points:

  1. Size (RPX)

    Front-end development process, one unavoidable question is responsive, so that the elements show different styles sizes in different sizes. The same is true of small micro-channel program.

    For the small size of the unit micro-channel program is rpx, scaling between different mobile devices px and rpx are different, in the course of daily development, we generally iPhone6 ​​bit standard for page layout.

    

  2. Selector

    

  3. Official Style Library

    WeUI is a micro letter native visual experience on a consistent basis style library, tailored to micro letter pages and small micro-channel micro-channel official program by the design team, so that the user's perception of a more unified. Comprising a button, cell, dialog, progress, toast, article, actionsheet, icon and other kinds of native.

  Download: https://github.com/Tencent/weui-wxss

Guess you like

Origin www.cnblogs.com/qfshini/p/12124393.html