types: using exact component instance type (#9256)

This commit is contained in:
neverland
2021-08-13 09:59:44 +08:00
committed by GitHub
parent f0f2059d91
commit 42888a1c22
14 changed files with 43 additions and 51 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
<script setup lang="ts">
import { ref } from 'vue';
import { useTranslate } from '@demo/use-translate';
import { ComponentInstance } from '../../utils';
import { Toast } from '../../toast';
import type { CountDownInstance } from '../CountDown';
const i18n = {
'zh-CN': {
@@ -31,7 +31,7 @@ const i18n = {
const t = useTranslate(i18n);
const time = ref(30 * 60 * 60 * 1000);
const countDown = ref<ComponentInstance>();
const countDown = ref<CountDownInstance>();
const start = () => {
countDown.value?.start();