refactor: 补充组件类型

This commit is contained in:
pipipi-pikachu 2022-06-18 09:31:09 +08:00
parent 7318755011
commit e62fbd839d
2 changed files with 3 additions and 3 deletions

View File

@ -77,7 +77,7 @@ const emit = defineEmits<{
(event: 'close'): void
}>()
const writingBoardRef = ref()
const writingBoardRef = ref<typeof WritingBoard>()
const writingBoardColor = ref('#e2534d')
const writingBoardModel = ref<WritingBoardModel>('pen')
const blackboard = ref(false)
@ -88,7 +88,7 @@ const changeModel = (model: WritingBoardModel) => {
//
const clearCanvas = () => {
writingBoardRef.value.clearCanvas()
writingBoardRef.value!.clearCanvas()
}
//

View File

@ -86,7 +86,7 @@ const audioPlayerPosition = computed(() => {
}
})
const audioPlayerRef = ref()
const audioPlayerRef = ref<typeof AudioPlayer>()
const toggle = () => {
if (!audioPlayerRef.value) return
audioPlayerRef.value.toggle()