Skip to content

pantoken / formats/interactions/src / initTruncateAuto

函数: initTruncateAuto()

initTruncateAuto(host, target, options?): TruncateAutoHandle

--lines 与可用高度保持同步,以用于自动夹持的截断目标。

  • CSS 用法:将相同的元素作为 hosttarget 传入。
  • Web-component 用法:传入 custom-element 的宿主以及 shadow 中的截断目标 span。

参数

host

HTMLElement

target

HTMLElement

options?

TruncateAutoOptions

返回值

TruncateAutoHandle