Skip to content

Commit

Permalink
Merge pull request #44 from duenyang/main
Browse files Browse the repository at this point in the history
fix(demo): html原生标签浏览器默认行为失效
  • Loading branch information
duenyang authored Jun 18, 2024
2 parents f6623ed + 416a8f8 commit ec1bf06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions site/pages/layout/td-wc-content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ export class tdWcContent extends Component<{ componentImport: () => Promise<any>
// 优化锚点滚动体验
@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);
Expand Down
4 changes: 4 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"allowImportingTsExtensions": false,
"noEmit": false,
},
"include": ["./src", "typings.d.ts"],
"exclude": [
"**/**/__tests__/*",
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"@common/*": ["src/_common/*"],
"@": ["src"]
},
"allowImportingTsExtensions": true,
"noEmit": true,
"jsx": "preserve",
"jsxFactory": "h",
"jsxFragmentFactory": "h.f",
Expand Down

0 comments on commit ec1bf06

Please sign in to comment.