Compare commits

..

2 Commits

Author SHA1 Message Date
zhangxuelin 64d2dbcabb Merge pull request '点赞疑问' (#117) from zxl into main
Reviewed-on: #117
2024-12-12 10:58:09 +08:00
zhangxuelin f4cb3a8916 点赞疑问 2024-12-12 10:57:48 +08:00
1 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@
</div>
<!-- 点赞组件 -->
<div style="z-index: 999;position: absolute;top:10px">
<upvote-vue ref="upvoteRef" :test='true' type="2"></upvote-vue>
<upvote-vue ref="upvoteRef" type="2"></upvote-vue>
</div>
<div
class="tools-right" :class="{ 'visible': rightToolsVisible }"
@ -73,6 +73,8 @@ import SlideThumbnails from './SlideThumbnails.vue'
import WritingBoardTool from './WritingBoardTool.vue'
import CountdownTimer from './CountdownTimer.vue'
import upvoteVue from '@/views/tool/components/upvote.vue' // -
import emitter from '@/utils/mitt';
const props = defineProps<{
changeViewMode: (mode: 'base' | 'presenter') => void
}>()
@ -191,13 +193,11 @@ const contextmenus = (): ContextmenuItem[] => {
},
]
}
// 1 2
emitter.on('upvoteTrigger', (type) => {
upvoteRef.value?.trigger(type)
});
watchEffect(() => {
const likeCont = screenStore.like //
const doubtCount = screenStore.doubt //
if (likeCont > 0) upvoteRef.value?.trigger?.(1)
if (doubtCount > 0) upvoteRef.value?.trigger?.(2)
})
</script>