$ui/utils/dom

dom操作模块, 更多dom操作可以使用 element-ui/lib/util/dom

Source:
Author:
  • 陈华春

Methods

(static) insertAfter(newEl, targetEl)

Source:

在元素前插入元素

Parameters:
Name Type Description
newEl HTMLElement

新DOM元素

targetEl HTMLElement

在指定目标DOM元素前插入

(static) isHidden(el) → {boolean}

Source:

判断元素是否隐藏

Parameters:
Name Type Description
el HTMLElement

元素DOM对象

Returns:

是否隐藏

Type
boolean

(static) scrollTop(el, fromopt, to, durationopt)

Source:

动画滚动到顶部 scrollTop animation

Parameters:
Name Type Attributes Default Description
el HTMLElement

DOM元素

from Number <optional>
0

开始位置

to Number

滚动到位置

duration Number <optional>
500

动画持续时间