Applet development problems encountered

  1. radio component, if you do not do any settings, his pigeon skewed to the right

    Analysis: We give radio components set style, text-indent: 0; to

  After 2. radio components, we found click the check mark, we can not do anything on the radio components

    Analysis: We want to bind the event of checked attributes to be modified, you can solve this problem

  3. Processing events

    We like the style of the time component of the operation, the program does not find a small window and document properties is how pit, resulting in a lot of thinking before we have a problem

    Analysis: We can only attribute the above binding component's class name and bind event and upload the data in the event with a data-index attribute, you can get the data on the event object (-index can easily name)

  4. The process requires a lot of logic wx: if to operate, we deal with a lot of processing properties of the component

  5. view-swiper has a strong component is a function of the carousel components, we can achieve a very cool thing through which we can also add the class name to modify its style, did not affect his operation

  6. Public Templates: template

    We can use import components to reference a common template of what import is a radio component (like the only one)

    But we can not use a style template to the public

    We need to introduce @import in css files in the current page in the "path" you can use a common style template;

    Or writing style in app.wxss which can (but the contents of the template, but not playing in app.wxml such operations)

  7. custom components which change bad data

    So when some things appear exactly the same page before they can reference the custom component, as long as there is a data do not, we still use a common template development of ideas a little better;

Guess you like

Origin www.cnblogs.com/shangjun6/p/11032649.html