antd-mobile v5 & v2

Time:2022-5-7

Antd mobile V5 it’s coming

As of September 1, 2021, it is now in beta. New projects can be used boldly. Remember to read the update log in time~
👉antd-mobile-v5

👉⚠️ The official documents suggest that V5 should be used for new projects, and the old projects can be gradually replaced by iteration

Difference between V5 and V2

  1. V5 exposes CSS, which can be queried according to the component APIno needdirectRough style overlayIn the “CSS variables” table of the component document, you can see which CSS variables are exposed by each component. Of course, you can also find them directly in the TS definition of the component
  2. V5 theme style changesNoYou can directly set the global style or local style by relying on or importing CSS files for style overrides
  3. V5 compatible with IOS > = 10 and Android > = 5
    V2 compatible with IOS and Android > = 4
  4. V5 adds 2x HD adaptation(Experimental
  5. All components of V5 are completely rewritten and the API is redesigned
  6. V5 usesuse-gestureAs gesture libraryreact-springAs an animation library, it has more smooth and delicate gesture interaction and animation effects.
  7. Adjust the AM prefix in CSS class name toadm-To avoid CSS interference between V2 and V5 ⚠️

    Component differences

Style adjustment and fillet adjustment provide more configurable items. You can view the components for details

New components

  • Progresscircle progress circle
  • FloatingPanel
  • Indexbar sequence
  • Divider divider
  • Watermark watermark
  • Ellipsis text ellipsis
  • Image image
  • ImageViewer picture viewer

Experimental component

  • Cascade selector
  • Desenstext desensitization

After looking at the official documents, many original components have been expanded and customized. I’m eager to try~~