39 lines
908 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* IE浏览器的渲染引擎版本号
* 注意此属性与浏览器版本号不同IE的渲染引擎版本号是可以通过HTML header或手动设置去更改的
* @type {Number} 6 ~ 10
*/
export var ieVersion = typeof document !== 'undefined' ? document.documentMode : undefined;
/**
* 判断是否是生产环境
* @type {Boolean}
*/
export var isProduction = function isProduction() {
var PRODUCTION_ENV = 'production';
var result = false;
try {
if (process.env.NODE_ENV === PRODUCTION_ENV) {
result = true;
}
} catch (err) {
//
}
if (!result) {
try {
if (window.process.env.NODE_ENV === PRODUCTION_ENV) {
result = true;
}
} catch (err) {
//
}
}
return result;
};
export default {
ieVersion: ieVersion,
isProduction: isProduction
};