-
Notifications
You must be signed in to change notification settings - Fork 1
[QUIZ-144][QUIZ-167] feat: handle realtime comment #105
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
Conversation
} | ||
|
||
const props = defineProps<{ | ||
refComment?: boolean |
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.
focusOnMount
} | ||
|
||
const props = defineProps<{ | ||
refComment?: boolean | ||
idPost: 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.
postId
const metaPage = ref<IPaging>() | ||
const isLoading = ref(true) | ||
|
||
onMounted(() => { |
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.
onBeforeMount
}) | ||
|
||
watch(getMessage, (val: any) => { | ||
if (val.event === 'commentPost') { |
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.
if (val.event === 'commentPost' && val.data.parent_comment_id)
<PopoverContent class="p-0 w-full"> | ||
<div | ||
class="rounded-md cursor-pointer py-1 px-1.5 shadow-md bg-white" | ||
@click.prevent.stop="handleDeleteComment(el.id)" |
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.
delete comment k cần confirm hà
onMounted(() => { | ||
if (useAuthStore().getUser?.id) { | ||
useSocketStore().setupGroupSocketStore() | ||
console.log('group socket init') |
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.
xoa console log
|
||
onMounted(() => { | ||
if (useAuthStore().getUser?.id) { | ||
useSocketStore().setupGroupSocketStore() |
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.
sao k setup socket ở main.js luôn m
}) | ||
|
||
watch(getMessage, (val: any) => { | ||
if (val.event === 'commentPost') { |
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.
if (val.event === 'commentPost' && val.data.parent_comment_id) {
src/stores/group/post.ts
Outdated
}) | ||
} | ||
}, | ||
setCommentByPostId(data: any) { |
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.
dont use any
src/stores/group/post.ts
Outdated
el.isShowReply = false | ||
}) | ||
}, | ||
handleCommentByPostId(data: any) { |
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.
done use any
No description provided.