diff --git a/site/pages/layout/td-wc-content/index.tsx b/site/pages/layout/td-wc-content/index.tsx index a595eff..c581627 100644 --- a/site/pages/layout/td-wc-content/index.tsx +++ b/site/pages/layout/td-wc-content/index.tsx @@ -77,8 +77,6 @@ export class tdWcContent extends Component<{ componentImport: () => Promise // 优化锚点滚动体验 @bind proxyTitleAnchor(e: MouseEvent) { - e.preventDefault(); - e.stopPropagation(); const { target } = e as MouseEvent & { target: HTMLAnchorElement }; if (target?.tagName !== 'A') return; const href = decodeURIComponent(target?.href); diff --git a/tsconfig.build.json b/tsconfig.build.json index f60eed9..4d7cea7 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,5 +1,9 @@ { "extends": "./tsconfig", + "compilerOptions": { + "allowImportingTsExtensions": false, + "noEmit": false, + }, "include": ["./src", "typings.d.ts"], "exclude": [ "**/**/__tests__/*", diff --git a/tsconfig.json b/tsconfig.json index 6f349dc..c51472a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,8 @@ "@common/*": ["src/_common/*"], "@": ["src"] }, + "allowImportingTsExtensions": true, + "noEmit": true, "jsx": "preserve", "jsxFactory": "h", "jsxFragmentFactory": "h.f",