Commit 56fff6aa authored by 陈帅's avatar 陈帅

edit style

parent 8d9dee97
...@@ -11,7 +11,7 @@ import React, { useState } from 'react'; ...@@ -11,7 +11,7 @@ import React, { useState } from 'react';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
import Authorized from '@/utils/Authorized'; import Authorized from '@/utils/Authorized';
import { formatMessage } from 'umi-plugin-react/locale'; import { formatMessage } from 'umi-plugin-react/locale';
import { isAntDesignProOrDev } from '@/utils/utils'; import { isAntDesignPro } from '@/utils/utils';
import { import {
BasicLayout as ProLayoutComponents, BasicLayout as ProLayoutComponents,
BasicLayoutProps as ProLayoutComponentsProps, BasicLayoutProps as ProLayoutComponentsProps,
...@@ -42,7 +42,7 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => { ...@@ -42,7 +42,7 @@ const menuDataRender = (menuList: MenuDataItem[]): MenuDataItem[] => {
}; };
const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => { const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => {
if (!isAntDesignProOrDev()) { if (!isAntDesignPro()) {
return defaultDom; return defaultDom;
} }
return ( return (
...@@ -51,7 +51,7 @@ const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => { ...@@ -51,7 +51,7 @@ const footerRender: BasicLayoutProps['footerRender'] = (_, defaultDom) => {
<div <div
style={{ style={{
textAlign: 'center', textAlign: 'center',
padding: '0px 20px 20px', padding: '0px 24px 24px',
}} }}
> >
<a href="https://www.netlify.com" target="_blank"> <a href="https://www.netlify.com" target="_blank">
......
...@@ -5,14 +5,18 @@ export function isUrl(path: string) { ...@@ -5,14 +5,18 @@ export function isUrl(path: string) {
return reg.test(path); return reg.test(path);
} }
// 给官方演示站点用,用于关闭真实开发环境不需要使用的特性 export function isAntDesignPro() {
export function isAntDesignProOrDev() {
const { NODE_ENV } = process.env;
if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') { if (ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION === 'site') {
return true; return true;
} }
return window.location.hostname === 'preview.pro.ant.design';
}
// 给官方演示站点用,用于关闭真实开发环境不需要使用的特性
export function isAntDesignProOrDev() {
const { NODE_ENV } = process.env;
if (NODE_ENV === 'development') { if (NODE_ENV === 'development') {
return true; return true;
} }
return window.location.hostname === 'preview.pro.ant.design'; return isAntDesignPro();
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment