Skip to content

Commit

Permalink
阻止按钮点击事件穿透
Browse files Browse the repository at this point in the history
  • Loading branch information
qiuxiang committed Oct 10, 2023
1 parent 6032dd8 commit 8787ce7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: |
wget https://github.com/qiuxiang/genshin-maps/files/12844845/data.tar.gz
wget https://github.com/qiuxiang/ky-genshin-map/files/12854777/data.tar.gz
tar xf data.tar.gz
mv dist/data_pb.* src/
cp index.html dist/
Expand Down
3 changes: 2 additions & 1 deletion src/components/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export function Switch({
"gap-2 flex items-center",
props.className as string
)}
onClick={() => {
onClick={(event) => {
event.stopPropagation();
setValue(!value);
onChange(!value);
}}
Expand Down

0 comments on commit 8787ce7

Please sign in to comment.