EApp - 应用初始化
提供表单元素初始化、加载提示、动画等公用方法
initComponents()
初始化插件
initRadio()
初始化radio
initCheckbox()
初始化checkbox
initTooltips()
初始化tooltips
initTooltip(el)
初始化tooltip
| Param | Type | Description |
|---|---|---|
| el | object | 要初始化的元素 |
initPopovers()
初始化popovers
initPopover(el)
初始化popover
| Param | Type | Description |
|---|---|---|
| el | object | 要初始化的元素 |
initSelectPicker(selector)
初始化bootstrap select
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initSelect2Picker(selector)
初始化select2
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initInputMask(selector)
初始化input-mask
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initDateTimePicker(selector)
初始化日期插件
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initDateRangePicker(selector)
初始化日期范围插件
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initDateRange(selector)
初始化日期周期
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initTimePicker(selector)
初始化时间插件
| Param | Type | Description |
|---|---|---|
| selector | string | 选择器 |
initDropzone(options) ⇒ object
初始化文件上传
Returns: object - Dropzone
| Param | Type | Description |
|---|---|---|
| options | object | 参数 |
initMiniDropzone(options) ⇒ object
初始化文件上传
Returns: object - Dropzone
| Param | Type | Description |
|---|---|---|
| options | object | 参数 |
block(target, options)
显示加载提示
| Param | Type | Description |
|---|---|---|
| target | string | 选择器 |
| options | object | 选项 |
unblock(target)
隐藏加载提示
| Param | Type | Description |
|---|---|---|
| target | string | 选择器 |
blockPage(options)
显示页面级别加载提示
| Param | Type |
|---|---|
| options | object |
unblockPage()
隐藏页面级别加载提示
progress(target, options)
在按钮上面显示加载中图标
| Param | Type | Description |
|---|---|---|
| target | string | element | 选择器 |
| options | object | 选项 |
unProgress(target)
隐藏按钮上面显示加载中图标
| Param | Type | Description |
|---|---|---|
| target | string | 选择器 |
getStateColor(name) ⇒ string
根据状态名称获取颜色
Returns: string - 颜色
| Param | Type | Description |
|---|---|---|
| name | string | 状态名称 |
getBaseColor(type, level) ⇒ string
获取base color
Returns: string - 颜色
| Param | Type | Description |
|---|---|---|
| type | string | 类型 |
| level | number | 级别 |
initTabs()
初始化标签页
openPage(name, url, canClose, sourcePagePathname)
打开页面
| Param | Type | Description |
|---|---|---|
| name | string | 页面名称 |
| url | string | 访问地址 |
| canClose | boolean | 是否可以关闭 |
| sourcePagePathname | string | 来源页面pathname,用于关闭标签页后返回来源页面 |
closeCurrentPage()
关闭当前页面
closeTabByUrl(url)
关闭指定url页面
| Param | Type | Description |
|---|---|---|
| url | string | 页面url |
getAnimate(name) ⇒ string
根据操作获取动画class
Returns: string - class
| Param | Type | Description |
|---|---|---|
| name | string | in/out |
animateCSS(selector, animationName, callback)
animate.css 工具
| Param | Type | Description |
|---|---|---|
| selector | string | 展示动画的元素选择器 |
| animationName | string | 动画名称 |
| callback | function | 回调函数 |
removePageLoading()
移除页面加载中class