diff --git a/src/layouts/BasicLayout.tsx b/src/layouts/BasicLayout.tsx
index deb5407942d37543c1d10f0424f1c4927560dcde..c6cc156cc5cc986831df91997ec52424901183f8 100644
--- a/src/layouts/BasicLayout.tsx
+++ b/src/layouts/BasicLayout.tsx
@@ -50,14 +50,14 @@ const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => {
{defaultDom}
diff --git a/src/utils/utils.ts b/src/utils/utils.ts
index beddb2015250844d288b433112555d404e8ee9e6..e7c70ce38f9a2051f685688ad83c35c4b308c543 100644
--- a/src/utils/utils.ts
+++ b/src/utils/utils.ts
@@ -1,22 +1,24 @@
/* eslint no-useless-escape:0 import/prefer-default-export:0 */
const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
-export function isUrl(path: string) {
+const isUrl = (path: string): boolean => {
return reg.test(path);
-}
+};
-export function isAntDesignPro(): boolean {
+const isAntDesignPro = (): boolean => {
if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
return true;
}
return window.location.hostname === 'preview.pro.ant.design';
-}
+};
// 给官方演示站点用,用于关闭真实开发环境不需要使用的特性
-export function isAntDesignProOrDev(): boolean {
+const isAntDesignProOrDev = (): boolean => {
const { NODE_ENV } = process.env;
if (NODE_ENV === 'development') {
return true;
}
return isAntDesignPro();
-}
+};
+
+export { isAntDesignProOrDev, isAntDesignPro, isUrl };