1.0.5 • Published 1 year ago
wechat_ellipsis v1.0.5
wechat_ellipsis
介绍
一个小程序文本可控展开收起的组件
引入
在app.json
或index.json
中引入组件
"usingComponents": {
"wechat-ellipsis": "wechat-ellipsis"
}
代码演示
一行省略
通过content注入展示的文本, 通过row
属性控制展示多少行。
<wechat-ellipsis content="这是一行示例文本展示" row="1" />
API
Props
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
content | 内容 | string | - |
row | 展示多少行 | number | 1 |
actionText | 展开标签内容 | string | 展开 |
actionColor | 展开标签字体样式 | string | cornflowerblue |
expandText | 收缩标签内容 | string | 收起 |
expandColor | 收起标签字体样式 | string | cornflowerblue |