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

How to use WeUI

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains "how to use WeUI". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to use WeUI.

Before use

The extended component library is based on Mini Program custom components. Before using the extended component library, it is recommended to read familiar with Mini Program custom components.

Introduction of components

You can download and build through npm, and the npm package is named weui-miniprogram.

It can also be downloaded on demand through the page

How to use

Assuming that the directory of the component is weui-miniprogram, first introduce weui.wxss into the app.wxss

@ import'. / weui-miniprogram/weui-wxss/dist/style/weui.wxss'

Then you can introduce the dialog pop-up window component into the page

First, add the usingComponents configuration field to the json file of the page

{"usingComponents": {"mp-dialog": "/ path/components/dialog/dialog"}}

You can then use the component directly in the wxml of the corresponding page

Test content

For complete documentation on the use of components, please refer to the documentation for specific components.

Modify the internal style of a component

Each component can set the ext-class property, which provides the class of the element set at the top of the component WXML, and the options of the component's addGlobalClass is set to true, so you can set the wxss style on the page to override the internal style of the component. It is important to note that if you want to override the internal styles of the component, the style selector of the wxss must take precedence over the internal styles of the component. AddGlobalClass is supported in the base library 2.2.3.

Thank you for your reading, the above is the content of "how to use WeUI", after the study of this article, I believe you have a deeper understanding of how to use WeUI, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report