Common components

view
    Alternative div
text
    Text labels
    There may be parsed decode & nbsp; & lt; & gt; & amp; & apos; & ensp; & emsp;
    Only supports text nesting.
    Long copy (only the label support) selectable by text 
rich-text
    Rich text string may be parsed into the corresponding tab
    1, string
    2, an array of objects
button
    Appearance Properties
        The size of the size of the button
        Style type (color) type button
        plain button is hollow, transparent background color
        whether disabled disabled
        With or without loading before loading the icon name
    Ability to develop open-type
        contact customer service open session
                        Implementation process: 1, AppID not test id
                                 2, log micro letter applet official website, add - Customer Service - micro letter
        share small forward current program to micro-letter friends
        getPhoneNumber get mobile phone number, can be obtained from bindgetphonenumber callbacks to user information, message encryption
        getUserInfo obtain user information can be obtained from bindgetuserinfo callbacks to user information     
        launchApp open APP in the applet, you need to open the applet via a link in the App
        openSetting Open Authorization settings page, the user clicked authority will only appear
        feedback Open the "Feedback" page
radio
    You must be the parent element and use radio-group
    color   radio的颜色
    value   radio 标识。当该radio 选中时,radio-group 的 change 事件会携带radio的value
checkbox
    与radio用法类似,必须要和 父元素 checkbox-group 使用
image
    图片标签     默认宽度300px、高度225px
    src        外网图片,上传网站:http://chuantu.biz/
    mode
        scaleToFill 不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素
        aspectFit   保持纵横比缩放图片,使图片的长边能完全显示出来 (常用)
        aspectFill  保持纵横比缩放图片,只保证图片的短边能完全显示出来。
        widthFix    宽度不变,高度自动变化,保持原图宽高比不变 (常用)
    top、bottom...  图片定位
    lazy-load       图片懒加载,在即将进入一定范围(上下三屏)时才开始加载,默认false
navigator
    导航组件       块级元素(可设置宽高)
    url         当前小程序内的跳转链接,可省后缀名,绝对/相对路径
    target      要跳转到当前小程序(默认)还是其他小程序
    open-type       跳转的方式
        navigate    默认值,保留当前页,跳转到应用内的某个页面,但不能跳转到tabbar页面
        redirect    关闭当前页,跳转到应用内的某个页面,但不能跳转到tabbar页面
        switchTab   跳转到tabbar页面,并关闭非tabbar页面
        reLaunch    跳转到应用内某个页面,并关闭所有页面
icon
    图标
    type    icon的类型
    size    icon的大小,默认23
    color   icon的颜色
swiper
    轮播图外层容器
    每一个轮播项    swiper-item 组件
    默认样式:width:100%    height:150px,无法实现由内容撑开           
    先找原图宽高,等比例给 awiper 定宽高,100vw可用 100%、750rpx
                height:100vw * 原高 / 原宽
                swiper{
                    width:100%;
                    height:calc(100vw * 原高 / 原宽)
                } 
    自动轮播    autoplay
    轮播时间    interval
    轮播衔接    circular
    显示指示器、分页器  indicator-dots
    指示器颜色          indicator-color
    选中时指示器颜色    indicator-active-color

Guess you like

Origin www.cnblogs.com/huangyuanning/p/11879698.html