| | |
| | | return res; |
| | | } |
| | | |
| | | const RAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback) { |
| | | window.setTimeout(callback, 1000 / 60); |
| | | }; |
| | | const CAF = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || window.msCancelAnimationFrame || clearTimeout; |
| | | |
| | | export default { |
| | | transSize, |
| | | isSetOption, |
| | |
| | | permitsToObj, |
| | | objFormat, |
| | | getCurrentDate, |
| | | RAF, |
| | | CAF, |
| | | // throttle, |
| | | setLocalStorage(key,val){ |
| | | const _val = (typeof val == 'object') ? JSON.stringify(val) : val; |