Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
ac2beea7
Commit
ac2beea7
authored
Apr 28, 2024
by
love_飞影
Committed by
Chunchi Che
May 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 移除音效代理
parent
3413d383
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
src/infra/audio/effect/index.ts
src/infra/audio/effect/index.ts
+0
-26
No files found.
src/infra/audio/effect/index.ts
View file @
ac2beea7
import
{
Button
}
from
"
antd
"
;
import
{
settingStore
}
from
"
@/stores/settingStore
"
;
import
{
settingStore
}
from
"
@/stores/settingStore
"
;
import
{
audioContextManger
}
from
"
../core/manager
"
;
import
{
audioContextManger
}
from
"
../core/manager
"
;
...
@@ -12,27 +10,3 @@ export function playEffect(effect: AudioActionType) {
...
@@ -12,27 +10,3 @@ export function playEffect(effect: AudioActionType) {
settingStore
.
audio
.
soundEffectsVolume
,
settingStore
.
audio
.
soundEffectsVolume
,
);
);
}
}
// 代理所有 antd button 音效
Reflect
.
set
(
Button
,
"
render
"
,
new
Proxy
(
Reflect
.
get
(
Button
,
"
render
"
),
{
apply
(
target
,
thisArg
,
args
)
{
const
[
props
]
=
args
;
const
{
onClick
}
=
props
;
// onClick is read-only, so we need to use the following code
const
_onClick
:
React
.
MouseEventHandler
<
HTMLElement
>
=
(...
args
)
=>
{
playEffect
(
AudioActionType
.
SOUND_BUTTON
);
onClick
(...
args
);
};
return
target
.
apply
(
thisArg
,
[
{
...
props
,
onClick
:
_onClick
,
},
...
args
.
slice
(
1
),
]);
},
}),
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment