-
Notifications
You must be signed in to change notification settings - Fork 0
class Finfosoft.Clock
Michael.Lu edited this page Dec 7, 2017
·
6 revisions
24小时表盘
容器推荐宽高比: 1 : 1
| Name | Type | Necessary | Description | Default | Arguments |
|---|---|---|---|---|---|
| el | String | true | 容器DOM选择器 | - | - |
| mainColor | String | false | 滚动条主色 | '#1ab394' | - |
| initVal | Array | false | 初始时间数据 | [ [0, 0], [0, 0] ] | - |
| initPlug | Array | false | 初始附加件数据 | [0, '-'] | - |
| onTimeChanged | Function | false | 时间变化回调 | - | timeData |
| onUnitChanged | Function | false | 单位变化回调 | - | plugVal |
如果开始时间和结束时间相同,则默认渲染整个表盘
initPlug如果不设置或者无法隐式转化为true,将不做功能渲染
new Finfosoft.Clock({
el: '.app',
mainColor: '#1ab394',
initVal: [ [4, 10], [14, 0] ],
initPlug: [10.6, 'Hz'],
onTimeChanged: function(timeData) {
console.log(timeData);
},
onUnitChanged: function(plugVal) {
console.log(plugVal);
}
});Support IE9及以上等标准浏览器