Skip to content

pantoken / formats/interactions/src / initTruncateAuto

函式: initTruncateAuto()

initTruncateAuto(host, target, options?): TruncateAutoHandle

--lines 與可用高度保持同步,以配合自動夾持的截斷目標。

  • CSS 用法:作為 hosttarget 傳入相同的元素。
  • Web 元件用法:傳入自訂元素的 host 與 shadow 中的截斷目標 span。

參數

host

HTMLElement

target

HTMLElement

options?

TruncateAutoOptions

回傳

TruncateAutoHandle