Recent adjustment of the core of the company’s business small program calendar component, it took a lot of time, but also the core of the optimization of a handful of xquery code, take time to a week or so WeChat imitation of the two most common components of an index list component, a custom tabbar component, the thought of the late business risk of these two components is pretty big, is not easy, There are quite a few points to consider in the demo shown below

The index lists

It is mainly assembled by search module, list module, popover module and Touchbar module. Difficulties:

  1. The Touchbar is computed with the scrolling position number of the list
  2. Lists need to support flexible content insertion, default input, and asynchronous updating
  3. Logical relationships of interactive events
  4. Interaction events bubble with each other

tabbar

The Tabbar component is relatively simple and constructed from the list component. Difficulties:

  1. Various red dot states, 1 digit to 4 digit
  2. Tabbar style of children, no matter how many children, the red dot position can not go astray
  3. Multiple subitems can be merged
  4. Merge children can independently define their own response methods

It’s a bit difficult to implement a component that uses multiple scenarios, abstracting API methods, and making it easy for development to call components. Demo, source code, documentation, attention to the following small procedures