We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TextEllipsis 文本省略,http://vant-contrib.gitee.io/vant/#/zh-CN/text-ellipsis 请问vant-weapp 能实现这个组件吗,或者有别的实现方式,请教一下
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
这个组件在vant-weapp 2.x版本计划加入,对齐vant 以下内容来自GPT,可以参考一下 使用 createSelectorQuery 创建查询上下文,以获取文本元素和容器元素的尺寸信息。 通过 boundingClientRect 方法获取文本元素和容器元素的宽度、高度等信息。 比较文本元素的高度和容器元素高度乘以行数限制,判断文本是否超出容器高度,如果超出则显示省略号和展开/收起按钮。 根据当前展开/收起状态和文本长度,截取合适的文本内容并更新 ellipsisText 数据。 在模板中根据 ellipsisText 和 showEllipsis 的值展示相应的文本和按钮。
No branches or pull requests
这个功能解决了什么问题?
TextEllipsis 文本省略,http://vant-contrib.gitee.io/vant/#/zh-CN/text-ellipsis
请问vant-weapp 能实现这个组件吗,或者有别的实现方式,请教一下
你期望的 API 是什么样子的?
The text was updated successfully, but these errors were encountered: