Skip to content

Commit

Permalink
feat: addeventlistner hash change
Browse files Browse the repository at this point in the history
  • Loading branch information
xsf0105 committed Jun 12, 2023
1 parent 42bd072 commit da61cd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "quark-doc-header",
"version": "0.3.18",
"version": "0.3.19",
"keywords": [
"frontend",
"quark",
Expand Down
8 changes: 8 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,14 @@ class MyComponent extends QuarkElement {
this._quarkcLogoSwitch()
this.githubUrl = 'https://github.com/hellof2e/quark'
}

window.addEventListener(
"hashchange",
() => {
console.log("The hash has changed!");
},
false
);
}

// quark design 各类技术文档logo切换
Expand Down

0 comments on commit da61cd8

Please sign in to comment.