diff --git a/config/config.ts b/config/config.ts index b7d2a6f0d088352be3bb50c833d6918dd1920ce7..6673a548e8f67b32ab444158435870c0447deeb8 100644 --- a/config/config.ts +++ b/config/config.ts @@ -90,6 +90,9 @@ export default { ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION || '', // preview.pro.ant.design only do not use in your production ; preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。 }, + block: { + defaultGitUrl: 'https://github.com/ant-design/pro-blocks', + }, treeShaking: true, targets: { ie: 11, diff --git a/src/components/CopyBlock/index.tsx b/src/components/CopyBlock/index.tsx index 682e77cfa288e5e18dce8451600f1bce4329b959..27661e1adbdf9b032473a8c9f8dbf386f2eb4bb8 100644 --- a/src/components/CopyBlock/index.tsx +++ b/src/components/CopyBlock/index.tsx @@ -16,7 +16,7 @@ const firstUpperCase = (pathString: string) => { const BlockCodeView: React.SFC<{ url: string; }> = ({ url }) => { - const blockUrl = `npx umi block add ant-design-pro/${firstUpperCase(url)} --path=${url}`; + const blockUrl = `npx umi block add ${firstUpperCase(url)} --path=${url}`; return (