@beisen/ethos
Version:
beisencloud pc react components
19 lines (18 loc) • 723 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getStyleOnWindows10 = getStyleOnWindows10;
/**
* win10的ie下取消转动的动画
*/
function getStyleOnWindows10(animation) {
var userAgent = navigator.userAgent;
var isWin10 = userAgent.indexOf('Windows NT 10.0') > -1 && !!window.ActiveXObject || 'ActiveXObject' in window;
var isIEorEdge = userAgent.indexOf('Edge') > -1 || userAgent.indexOf('Trident') > -1 || userAgent.indexOf('MSIE 10') > -1;
var styleOnWin10 = isWin10 ? isIEorEdge ? {
'backgroundSize': 'auto',
'animation': 'none'
} : { 'animation': 'none' } : isIEorEdge ? { 'backgroundSize': 'auto' } : { animation: animation };
return styleOnWin10;
}