技术 · 思考 · 实践 · 成长

首页/微信小程序/正文

基础内容组件

微信小程序315 次阅读

基础内容组件icon/prgress/rich-text/text


1、icon图标组件

https://developers.weixin.qq.com/miniprogram/dev/component/icon.html


属性:

type :    icon类型 success, success_no_circle, info, warn, waiting, cancel, download, search, clear

size:      success, success_no_circle, info, warn, waiting, cancel, download, search, clear

color:   icon的颜色,同css的color

image.png


2、progress进度条

组件属性的长度单位默认为px,2.4.0起支持传入单位(rpx/px)

https://developers.weixin.qq.com/miniprogram/dev/component/progress.html


属性:

percent 百分比

更多属性查看手册文档

image.png


3、rich-text富文本组件

https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html


4、text组件:文本展示,行内元素

属性:

user-select  文本是否可选

space  显示连续空格

    ensp    中文字符空格一半大小

    emsp    中文字符空格大小

    nbsp    根据字体设置的空格大小

decode 是否解码

decode可以解析的有   < > & '    


注意:

text 组件内只支持 text 嵌套

除了文本节点以外的其他节点都无法长按选中

各个操作系统的空格标准并不一致

参考:https://developers.weixin.qq.com/miniprogram/dev/component/text.html#Skyline-%E7%89%B9%E6%9C%89%E5%B1%9E%E6%80%A7

image.png


无才无以立足,不苦不能成才。

评论交流

0 条评论 · 支持多级回复
验证码
暂无评论,来说说你的想法吧

相关文章

继续阅读