当前位置:网站首页>Common view container class components
Common view container class components
2022-07-05 20:26:00 【'wx】
1view
Normal view area
Be similar to html Medium div, Is a block level element
Commonly used to achieve the layout effect of the page
<view>
I am a view
</view>2.scroll-view
Scrollable view area
It is often used to achieve the effect of scrolling lists
<scroll-view class="container" scroll-y>
<view>A</view>
<view>B</view>
<view>C</view>
</scroll-view>3.swiper and swiper-item
The carousel chart container component and the carousel map item Components
<swiper class="swiper-container" indicator-dots="true" indicator-color="pink" indicator-active-color="orange" autoplay interval="1000" circular="true">
<swiper-item>
<view class="item">item1</view>
</swiper-item>
<swiper-item>
<view class="item">item2</view>
</swiper-item>
<swiper-item>
<view class="item">item3</view>
</swiper-item>
</swiper>swiper Component common properties
attribute | type | The default value is | explain |
indicator-dots | boolean | false | Display panel indicator |
indicator-color | color | rgba(0, 0, 0, .3) | Indicate the color |
indicator-active-color | color | #000000 | The currently selected indicator color |
autoplay | boolean | false | Auto switch or not |
interval | number | 5000 | Auto switch interval |
circular | boolean | false | Whether to adopt the joint sliding |
4.text Text component
Be similar to HTML Medium span label , It's an in-line element
adopt text Component's selectable attribute , Long press the selected text content
5.rich-text Rich text component
Support HTML The string is rendered as WXML structure
adopt rich-text Component's nodes Attribute node , hold HTML The string is rendered as the corresponding UI structure
6.button
Button components
Functional ratio html Medium button Rich buttons
adopt open-type Attribute can call various functions provided by wechat ( Customer service , forward , Get user authorization , Access to user information, etc )
7.image
Picture components
image The default width of the component is about 300px, The height is about 200px
image Of mode Property is used to specify the cropping and scaling mode of the picture , frequently-used mode The property values are as follows
mode value | explain |
scaleToFill | ( The default value is ) Zoom mode , Do not keep aspect ratio zooming picture , Stretch the width and height of the picture completely to fill image Elements |
aspectFit | Zoom mode , Keep the aspect ratio scaled , Make the long edges of the picture fully visible . in other words , The picture can be displayed completely . |
aspectFill | Zoom mode , Keep the aspect ratio scaled , Only make sure that the short side of the picture is fully displayed . in other words , Pictures are usually complete only horizontally or vertically , Intercept will occur in the other direction . |
widthFix | Zoom mode , The width does not change , Automatic height change , Keep the aspect ratio of the original image unchanged |
heightFix | Zoom mode , The height remains the same , The width changes automatically , Keep the aspect ratio of the original image unchanged |
8.navigator
Page navigation component
Be similar to html Medium a label
边栏推荐
- Leetcode brush questions: binary tree 11 (balanced binary tree)
- CVPR 2022 | common 3D damage and data enhancement
- 资源道具化
- How to select the Block Editor? Impression notes verse, notation, flowus
- 解决php无法将string转换为json的办法
- 实操演示:产研团队如何高效构建需求工作流?
- Minimum commission for stock trading account opening, where to open an account with low commission? Is it safe to open an account on your mobile phone
- 常用的视图容器类组件
- nprogress插件 进度条
- Is it safe for CICC fortune to open an account online?
猜你喜欢

零道云新UI设计中

Fundamentals - configuration file analysis

【数字IC验证快速入门】9、Verilog RTL设计必会的有限状态机(FSM)

无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...

Leetcode brush questions: binary tree 18 (largest binary tree)

基础篇——配置文件解析

全国爱眼教育大会,2022第四届北京国际青少年眼健康产业展会

Practical demonstration: how can the production research team efficiently build the requirements workflow?

Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)

Classic implementation method of Hongmeng system controlling LED
随机推荐
y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
银河证券在网上开户安全吗?
[quick start of Digital IC Verification] 9. Finite state machine (FSM) necessary for Verilog RTL design
c語言oj得pe,ACM入門之OJ~
Go language learning tutorial (XV)
. Net distributed transaction and landing solution
[C language] three implementations of quick sorting and optimization details
信息学奥赛一本通 1338:【例3-3】医院设置 | 洛谷 P1364 医院设置
【数字IC验证快速入门】2、通过一个SoC项目实例,了解SoC的架构,初探数字系统设计流程
USACO3.4 “破锣摇滚”乐队 Raucous Rockers - DP
- Oui. Net Distributed Transaction and Landing Solution
National Eye Care Education Conference, 2022 the Fourth Beijing International Youth eye health industry exhibition
CTF reverse Foundation
1: Citation;
About the priority of Bram IP reset
小程序事件绑定
【c语言】归并排序
本季度干货导航 | 2022年Q2
欢迎来战,赢取丰厚奖金:Code Golf 代码高尔夫挑战赛正式启动
Introduction to dead letter queue (two consumers, one producer)