From 67b0dcd90b3f4d5fa8a5b3935a496550a176ffa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Fri, 31 May 2019 11:55:34 +0800 Subject: [PATCH] blocks: change block base url --- config/config.ts | 3 +++ src/components/CopyBlock/index.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/config.ts b/config/config.ts index b7d2a6f0..6673a548 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 682e77cf..27661e1a 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 (
-- GitLab