-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 新增语音、图片、文件、图标头像封装等 #72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感谢 PR~, 有点内容需要修改
src/components/VideoPlayer/index.vue
Outdated
import 'xgplayer/dist/index.min.css' | ||
|
||
onMounted(() => { | ||
new Player({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
player
在 unmount
的时候是否需要手动销毁。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
视频消息本次还没正式投入使用。
src/hooks/useRecording.ts
Outdated
}, 1000) | ||
|
||
const audioChunks: Blob[] = [] | ||
mediaRecorder.value.addEventListener('dataavailable', (event) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
注意销毁事件监听
src/main.ts
Outdated
import '@/utils/websocket' | ||
import '@/assets/iconfont/index.css' | ||
import '@/assets/iconfont/index-color.css' | ||
import '@imengyu/vue3-context-menu/lib/vue3-context-menu.css' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
css 放到 src/styles/main.css 里面取导入。
src/hooks/useMockMessage.ts
Outdated
export const useMockMessage = () => { | ||
// 获取本地存储的用户信息 | ||
const userInfo = JSON.parse(localStorage.getItem('USER_INFO') || '{}') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议从 hook
computed
否则用户信息更新这里不会及时更新。
|
||
isSending.value = true | ||
// 发送消息 | ||
const send = (msgType: number, body: any, roomId = 1) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msgType 需定义成枚举
* 转换文件类型 | ||
* @param suffix 文件后缀 | ||
*/ | ||
const convertFileType = (suffix: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
工具函数提取。
28f185c
to
c0bb921
Compare
🤔 这个变动的性质是? (至少选中一项)
🔗 相关 Issue
#66
Mobile UI
💡 需求背景和解决方案
📝 更新日志
☑️ 请求合并前的自查清单
🚀 概述
copilot:summary
🔍 实现细节
copilot:walkthrough