Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of WeChat Mini Programs component list

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail the example analysis of WeChat Mini Programs's component list. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Basic component

The framework provides a series of basic components for developers, and developers can develop quickly by combining these basic components.

What are components:

The component is the basic unit of the view layer.

The component comes with some features and Wechat style.

A component usually includes a start tag and an end tag, attributes are used to decorate the component, and the content is within two tags.

Content goes here...

Note: all components and properties are lowercase and hyphen-concatenated

Attribute type description Note Boolean Boolean component writes this attribute, no matter what the attribute equals, its value is true, and the property value is false only if the attribute is not written on the component. If the attribute value is a variable, the value of the variable is converted to the Boolean type Number number 1, the 2.5String string "string" Array array [1, "string"] Object object {key: value} EventHandler event handler function name "handlerName" is the event handler name Any any property common property type defined in Page

Properties that all components have:

Attribute name type description unique indication of the idString component keeps the style class of the classString component unique throughout the page the inline style of the styleString component defined in the corresponding wxss can be set dynamically whether the inline style hiddenBoolean component displays all components display events triggered on the data-*Any custom property component by default, events are sent to the event handler function bind* / catch*EventHandler component for details of event special properties

Almost all components have their own defined properties, and the function or style of the component can be modified. Please refer to the definition of each component.

Component list

The basic components are divided into the following eight categories:

View container (View Container):

Component name description view view container scroll-view scrollable view container swiper slidable view container

Basic content (Basic Content):

Component name description icon icon text text progress progress bar

Form (Form):

Tag name description button button form form input input box checkbox multiple selector radio single selector picker list selector picker-view embedded list selector slider sliding selector switch switch selector label tag

Navigation (Navigation):

Component name indicates the jump within the navigator application

Multimedia (Media):

Component name description audio Audio image Picture video Video

Map (Map):

Component name description map map

Canvas (Canvas)

Component name description canvas canvas

Customer service conversation:

Component name description contact-button enter customer service session button on the "sample analysis of WeChat Mini Programs component list" this article is shared here, I hope the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report