chore: Mv style to rc-util (#32177)

This commit is contained in:
二货机器人 2021-09-15 14:13:32 +08:00 committed by GitHub
parent 0d619be27c
commit 968590e8d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 11 deletions

View File

@ -1,16 +1,9 @@
import canUseDom from 'rc-util/lib/Dom/canUseDom';
import { isStyleSupport } from 'rc-util/lib/Dom/styleChecker';
export const canUseDocElement = () => canUseDom() && window.document.documentElement;
export const isStyleSupport = (styleName: string | Array<string>): boolean => {
if (canUseDocElement()) {
const styleNameList = Array.isArray(styleName) ? styleName : [styleName];
const { documentElement } = window.document;
return styleNameList.some(name => name in documentElement.style);
}
return false;
};
export { isStyleSupport };
let flexGapSupported: boolean | undefined;
export const detectFlexGapSupported = () => {

View File

@ -140,7 +140,7 @@
"rc-slider": "~9.7.1",
"rc-steps": "~4.1.0",
"rc-switch": "~3.2.0",
"rc-table": "~7.17.0",
"rc-table": "~7.18.0",
"rc-tabs": "~11.10.0",
"rc-textarea": "~0.3.0",
"rc-tooltip": "~5.1.1",
@ -148,7 +148,7 @@
"rc-tree-select": "~4.5.0-alpha.0",
"rc-trigger": "^5.2.10",
"rc-upload": "~4.3.0",
"rc-util": "^5.13.1",
"rc-util": "^5.14.0",
"scroll-into-view-if-needed": "^2.2.25"
},
"devDependencies": {