WeUI·Cell is a component in WeChat mini-programs used to display basic information. It provides rich styles and layout options to help developers quickly build interfaces that are in line with WeChat style.
The WeUI·Cell component library, which is based on the WeChat client, provides a comprehensive set of basic components and styles that can help developers quickly create interfaces in line with WeChat.
The WeUI·Cell component library mainly includes components such as Cell, Cellgroup, Dialog, Toast, and ActionSheet, which can meet the requirements of most small program interfaces.
The Cell component is the core of the WeUI·Cell component, it can be regarded as a container for carrying other sub-components. The Cell component has the following features:
Cellgroup component is a container component used to group multiple Cell components together. The Cellgroup component has the following features:
The Dialog component is a pop-up layer component used to display prompt information or operation options in small programs. The Dialog component has the following features:
The Toast and ActionSheet components are used to implement message prompts and pop-up operation options. The usage of these two components is similar to the Dialog component and will not be elaborated here.
The following is a simple usage example of the WeUI·Cell component:
<!-- index.wxml -->
<view class="container">
<cellgroup>
<cell>Cell 1</cell>
<cell>Cell 2</cell>
<cell>Cell 3</cell>
...
<cell>Cell 50</cell>
<toast id="toast">Toast Message</toast>
<div class="buttons">Cancel | OK</div>
</cellgroup>
</view>
/* index.wxss */
.container {
display: flex;
justify-content: center;
align-items: center;
}
// index.js
Page({});
A: Horizontal scrolling can be achieved by setting scrollx="true" in the Cell component that requires horizontal scrolling, such as <style="scroll-x: true;"
.
Thank you for reading! If you have any comments, please leave them in the comments section below. Don't forget to follow and like!
Also, be sure to check out our other articles on WeChat mini-programs and stay tuned for more updates!