mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 12:07:54 +08:00
14 lines
472 B
JavaScript
14 lines
472 B
JavaScript
|
function isStyleSupport(styleName) {
|
||
|
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
|
||
|
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
|
||
|
const { documentElement } = window.document;
|
||
|
|
||
|
return styleNameList.some(name => name in documentElement.style);
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
export const isFlexSupported = isStyleSupport(['flex', 'webkitFlex', 'Flex', 'msFlex']);
|
||
|
|
||
|
export default isStyleSupport;
|