GitHub
Preparing search index...
The search index is not available
ts-utils - v5.0.1-beta.1
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
Modules
mxssfd/core -
v5.0.1-
beta.1
str
Repeat
number2
Chinese
chinese2
Number
format
Date
mxssfd/dom -
v5.0.1-
beta.1
mxssfd/bom -
v5.0.1-
beta.1
copy2
Clipboard
mxssfd/types -
v5.0.1-
beta.1
mxssfd/random-
picker -
v5.0.1-
beta.1
@mxssfd/random-picker
Download
Merge
Img
support
Class
List
has
Class
Ie8
has
Class
Standard
add
Class
Standard
add
Class
Ie8
remove
Class
Ie8
remove
Class
Standard
toggle
Class
prefix
Style
判断是什么种类的浏览器并返回拼接前缀后的数据
css
Support
判断是否支持css
set
Style
load
Img
手动添加img标签下载图片
load
Script
手动添加script
no
Scroll
create
Html
Element
通过object来生成html元素
create
Hidden
Html
Element
创建一个隐藏的html元素
get
Font
Scale
获取文字缩放大小
in
Iframe
是否在iframe中
scroll
Fixed
Watcher
判断是否固定在顶部的条件
get1rem
获取等于1rem的像素值
rem2px
rem转像素
px2rem
像素转rem
percent2px
px2
Percent
像素转百分比
rem2
Percent
rem转百分比
percent2
Rem
百分百转rem
toggle
Width
Or
Height
用于类似手风琴的伸缩效果
animate
To
scroll
To
滚动到目标处
get
Current
Script
Tag
获取当前js所在的script标签
is
ChildHTMLElement
判断是否子元素
to
Webp
普通图片url转base64的webp,可通过base64ToFile转为File
has
Class
判断是否有class 必须全都存在才为true
add
Class
remove
Class
create
Element
is
Dom
Ie8
is
Dom
Standard
is
Element
Of
is
Select
Element
is
Input
Element
is
Text
Area
Element
is
Img
Element
is
Div
Element
is
Span
Element
is
Ul
Element
support
Touch
is
Node
List
is
Dom
add
Drag
Event
Listener
拖动事件 返回取消事件
on
Drag
Event
addDragEventListener的函数式用法.
add
Scale
Event
Listener
缩放
add
Resize
Listener
dom resize event
event
Proxy
事件代理
once
Event
一次性事件
is
Visible
is
Scroll
End
判断dom是否滚动到底了
is
Scroll
Start
判断dom是否滚动到顶了
blob
To
Base64
parse
Base64
base64
To
Blob
base64
To
File
img
To
Blob
get
AverageRGB
获取平均色
ts-utils - v5.0.1-beta.1
mxssfd/dom
px2rem
Function px2rem
px2rem
(
px
:
`
${
number
}
px
`
)
:
RemVal
像素转rem
Parameters
px:
`
${
number
}
px
`
Returns
RemVal
像素转rem