2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
When using a component, the component user can pass in a CSS class name to the component and modify the component's style using the passed-in class name.
If you need to use external style classes to modify the style of a component, you need to define several external style classes in Component using extemalClassess.
The specific usage is as follows:
(1) Create the custom06 component in the Components file
(2) Register the custom06 component in the "usinfComponents" configuration item in app.json
(3) Add extemalClassess in custom06.js to define the external style class.
(4) Use this style class in custom06.wxml
(5) Bind the class name through the style class in the cart.wxml page
(7) Set the style by class name in cart.scss
(8) The display style is as follows
(9) Notes:
Note: On the same node, if there are external style classes and common style classes, as follows:
The precedence of the two classes is undefined
Recommendation: When using external style classes, the style needs to be given weight via !important