Members
(inner, constant) local
带JSON格式化的local包装
Name | Type | Description |
---|---|---|
local.save | function | |
local.get | function | |
local.del | function |
- Source
Methods
(inner) copyText(text) → {Boolean}
复制文本到粘贴板
Parameters:
Name | Type | Description |
---|---|---|
text | String |
- Source
Returns:
是否复制成功
- Type:
- Boolean
(inner) del(keyName)
删除数据
Parameters:
Name | Type | Description |
---|---|---|
keyName | String |
- Source
(inner) elScroll(el, to, fromopt, durationopt, endCallbackopt, directionopt)
平滑滚动页面
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
el | HTMLElement | 需要滚动的页面元素 | ||
to | Number | 滚动结束的地点 | ||
from | Number | <optional> | 0 | 滚动的开始地点,一般取元素的 scrollTop || scrollLeft |
duration | Number | <optional> | 500 | 运动时间 |
endCallback | function | <optional> | null | 滚动结束时的回调函数 |
direction | String | <optional> | 'scrollTop' | 滚动的方向:scrollTop || scrollLeft |
- Source
(inner) exitFullScreen()
退出全屏
- Source
(inner) fullScreen()
全屏
- Source
(inner) get(keyName) → {Any}
获取数据
Parameters:
Name | Type | Description |
---|---|---|
keyName | String |
- Source
Returns:
- Type:
- Any
(inner) getActualWidthOfChars(text, options) → {*}
获取文本所占宽度
Parameters:
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
text | String | 文本内容 | |||||||||||||||
options | Object | 样式信息 Properties
|
- Source
Returns:
- Type:
- *
(inner) save(keyName, data)
保存数据
Parameters:
Name | Type | Description |
---|---|---|
keyName | String | |
data | Object | |
- Source
(inner) setRemFontSize(basicopt)
设置 css rem单位基准字体大小
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
basic | Number | <optional> | 750 | 设计图基准宽度 |
- Source
(inner) setTitle(title)
在ios上会出现spa设置title不起效的问题,使用ifarme方式兼容
Parameters:
Name | Type | Description |
---|---|---|
title | String |
- Source