Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG] WebkitLineClamp 转化为内联样式时缺失- #259

Closed
briefguo opened this issue Sep 27, 2019 · 0 comments · Fixed by #264
Closed

[BUG] WebkitLineClamp 转化为内联样式时缺失- #259

briefguo opened this issue Sep 27, 2019 · 0 comments · Fixed by #264
Labels
bug Something isn't working

Comments

@briefguo
Copy link

briefguo commented Sep 27, 2019

bug 描述

CSS属性里,WebkitLineClamp属性编译后内联呈现为webkit-line-clamp。缺少-

复现步骤

  1. 复制组件文件OverflowEllipsis.tsx内容至任意一个page页面。
  2. 在页面中使用组件
<OverflowEllipsis width="4em">{some long text}</OverflowEllipsis>

期望结果

期望 WebkitLineClamp属性编译后内联样式呈现应为-webkit-line-clamp

复现代码

// OverflowEllipsis.tsx
import React from "react";
import { Text } from "remax/wechat";
import "./index.scss";

export function OverflowEllipsis({
  rows = 1,
  width = "5em",
  children = "" as React.ChildNode
}) {
  return (
    <Text
      className="overflow-ellipsis"
      style={{ maxWidth: width, WebkitLineClamp: rows }}
    >
      {children}
    </Text>
  );
}

版本信息:

  • remax 版本: [1.1.0]
  • 手机型号 [iPhone X]
  • 小程序端 [微信小程序]
  • 小程序版本[2.8.3]
  • 开发环境 [mac OS 10.15 Beta版(19A573a)]

其他信息
[如截图等其他信息可以贴在这里]

我看了下源码,问题应该是这个方法的问题

现阶段可以使用-WebkitLineClamp解决这个问题

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant