diff --git a/examples/antdp-base/config/router.json b/examples/antdp-base/config/router.json index 9760f7bc6..8d11d6347 100644 --- a/examples/antdp-base/config/router.json +++ b/examples/antdp-base/config/router.json @@ -24,7 +24,7 @@ }, { "path": "/dashboard", - "name": "页面试例", + "name": "页面实例", "locale": "dashboard", "icon": "fileText", "side": true, diff --git a/examples/antdp-base/src/layouts/BasicLayout.jsx b/examples/antdp-base/src/layouts/BasicLayout.jsx index 7b993318f..6f47509ba 100644 --- a/examples/antdp-base/src/layouts/BasicLayout.jsx +++ b/examples/antdp-base/src/layouts/BasicLayout.jsx @@ -7,7 +7,7 @@ import { import { useState } from 'react'; import { FloatButton } from 'antd'; import Authorized from '@antdp/authorized'; -import BasicLayout from '@antdp/basic-layouts'; +import BasicLayouts from '@antdp/basic-layouts'; import { SelectLang, useIntl, @@ -41,7 +41,7 @@ const Layout = () => { onClick={() => setDark(!dark)} /> - { return ( - { if (item.ext && /ts|tsx/.test(item.ext)) { transform(item.path); } else { - FS.copySync(item.path, item.path.replace(PWDEntry, PWDOutPut)); + const outPutPath = item.path.replace(PWDEntry, PWDOutPut); + // 删除 custom.d.ts 文件 + if (outPutPath.endsWith('custom.d.ts')) { + fs.unlinkSync(outPutPath); + } else { + FS.copySync(item.path, outPutPath); + } } }); };