ant-design-vue/components/_util/isFlexSupported.js

13 lines
397 B
JavaScript
Raw Normal View History

2019-01-12 11:33:27 +08:00
export default function isFlexSupported() {
2017-11-02 10:42:34 +08:00
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
2019-01-12 11:33:27 +08:00
const { documentElement } = window.document;
return (
'flex' in documentElement.style ||
2017-11-02 10:42:34 +08:00
'webkitFlex' in documentElement.style ||
'Flex' in documentElement.style ||
'msFlex' in documentElement.style
2019-01-12 11:33:27 +08:00
);
2017-11-02 10:42:34 +08:00
}
2019-01-12 11:33:27 +08:00
return false;
2017-11-02 10:42:34 +08:00
}