当前位置:网站首页>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
边栏推荐
- Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
- 14、Transformer--VIT TNT BETR
- [quick start of Digital IC Verification] 1. Talk about Digital IC Verification, understand the contents of the column, and clarify the learning objectives
- A way to calculate LNX
- Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
- 解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
- sun. misc. Base64encoder error reporting solution [easy to understand]
- 关于BRAM IP复位的优先级
- CVPR 2022 | common 3D damage and data enhancement
- 19 Mongoose模块化
猜你喜欢
Oracle tablespace management
Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?
小程序事件绑定
小程序全局配置
【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)
. Net distributed transaction and landing solution
Pytorch 1.12 was released, officially supporting Apple M1 chip GPU acceleration and repairing many bugs
Classic implementation method of Hongmeng system controlling LED
Scala基础【HelloWorld代码解析,变量和标识符】
CVPR 2022 | common 3D damage and data enhancement
随机推荐
Bzoj 3747 poi2015 kinoman segment tree
Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
ROS2专题【01】:win10上安装ROS2
.Net分布式事务及落地解决方案
欢迎来战,赢取丰厚奖金:Code Golf 代码高尔夫挑战赛正式启动
Usaco3.4 "broken Gong rock" band raucous rockers - DP
1. Strengthen learning basic knowledge points
PyTorch 1.12发布,正式支持苹果M1芯片GPU加速,修复众多Bug
炒股开户最低佣金,低佣金开户去哪里手机上开户安全吗
银河证券在网上开户安全吗?
DP: tree DP
Leetcode brush questions: binary tree 11 (balanced binary tree)
document方法
Introduction to dead letter queue (two consumers, one producer)
Informatics Olympiad 1338: [example 3-3] hospital setting | Luogu p1364 hospital setting
中金财富在网上开户安全吗?
强化学习-学习笔记4 | Actor-Critic
Classic implementation of the basic method of intelligent home of Internet of things
Sort and projection
物联网智能家居基本方法实现之经典