Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
水玉婷
ai-wechat
Commits
f056572f
Commit
f056572f
authored
Nov 27, 2025
by
水玉婷
Browse files
feat:优化体验
parent
250352be
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/views/components/VoiceRecognition.vue
View file @
f056572f
...
...
@@ -50,7 +50,7 @@
<
/template
>
<
script
setup
lang
=
"
ts
"
>
import
{
ref
,
computed
,
onUnmounted
}
from
'
vue
'
import
{
ref
,
computed
,
onUnmounted
,
nextTick
}
from
'
vue
'
import
{
AudioOutlined
}
from
'
@ant-design/icons-vue
'
import
{
post
}
from
'
@/utils/axios
'
// 导入项目中的axios
...
...
@@ -261,7 +261,7 @@ const stopRecordingTimer = () => {
}
// 停止录音
const
stopRecording
=
()
=>
{
const
stopRecording
=
async
()
=>
{
if
(
!
isRecording
.
value
)
return
if
(
mediaRecorder
.
value
&&
mediaRecorder
.
value
.
state
===
'
recording
'
)
{
...
...
@@ -277,6 +277,10 @@ const stopRecording = () => {
audioStream
.
value
=
null
;
}
// 等待Vue完成DOM更新后再退出全屏
await
nextTick
();
exitFullScreen
();
// 通知父组件停止录音
emit
(
'
recordingStop
'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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