# util

# timeFix() ⇒ string

根据时间获取xx号欢迎

# triggerWindowResizeEvent()

触发 window.resize

# handleScrollHeader(callback)

滚动回调,添加延迟防止多次触发

Param Type
callback function

# isIE() ⇒ boolean

是否为IE浏览器

Returns: boolean - true/false

# removeLoadingAnimate(id, timeout)

移除加载动画

Param Type Description
id string parent element id or class
timeout number 延迟

# getUniqueID(prefix) ⇒ string

生成一个指定前缀的 unique ID

Param Type Description
prefix string | number 前缀

# isArray(obj) ⇒ boolean

检查对象是否是数组类型

Returns: boolean - true/false

Param Type Description
obj object 待检查对象

# isString(obj) ⇒ boolean

判断是否为字符串类型

Returns: boolean - true/false

Param Type Description
obj object 待检查对象

# isBlank(str) ⇒ boolean

判断字符串是否为undefinednull'',反方法isNotBlank(str)

Returns: boolean - true/false

Param Type Description
str string 待检查字符串

# isNotBlank(str) ⇒ boolean

判断字符串是否不为undefinednull'',反方法isBlank(str)

Returns: boolean - true/false

Param Type Description
str string 待检查字符串

# convertTree(data, root, idTxt, pidTxt, pushTxt) ⇒ array

一维数组转树形结构

Param Type Description
data array 数组
root string 根节点
idTxt string id属性名
pidTxt string pId属性名
pushTxt string children属性名

# getElementOffset(element) ⇒ Object

获取某dom到根元素的offsetLeft/offsetTop

Param Description
element element

# openView(router, to, tabName, query)

打开页面

Param Type Description
router router
to string 路由地址
tabName string 标签页名称
query object 参数

# deepClone(source, ignore) ⇒ object

克隆对象

Param Type Description
source object 被克隆对象
ignore string 忽略属性

# formatDate(date, datePattern)

格式化时间

Param Type Description
date Date 时间
datePattern string 格式

# fromNow(date)

格式化时间

Param Type Description
date date 时间

# downloadFileById(id)

下载文件

Param Type Description
id string 文件下载id

# downloadFile(url)

下载文件

Param Type Description
url string 下载地址(必要)

# getTableNode(vm) ⇒ Vue | Element | Array.<Vue> | Array.<Element>

在父节点中查找table

Returns: Vue | Element | Array.<Vue> | Array.<Element> - table table

Param Description
vm vm

# refreshList(vm)

查询

Param Description
vm vm

# launchFullScreen(element)

全屏

Param Type Description
element object 要全屏的元素

# exitFullscreen()

退出全屏

# getSysDictArrayByDictType(dictType) ⇒ null | array

根据字典类型获取字典数组

Param Description
dictType 字典类型

# getSysDictionariesObjectByDictType(dictType) ⇒ null | object

根据字典类型获取字典对象

Param Description
dictType 字典类型

# getSysDictObjectByQuery(dictType, code) ⇒ null | object

根据字典类型与编码获取字典信息

Param Description
dictType 字典类型
code 代码

# getSysDictNameByQuery(dictType, code) ⇒ null | String

根据字典类型与编码获取字典名称

Param Description
dictType 字典类型
code 编码
Last Updated: 2/22/2021, 3:51:31 PM