fix: type error

This commit is contained in:
Kevin 2021-10-22 12:35:41 +08:00 committed by Herrington Darkholme
parent 0ae66f8230
commit ba6433700c

View File

@ -7,8 +7,13 @@ import { useLang } from '../../composables/lang'
import { useLocale } from '../../composables/locale'
import changelogLocale from '../../../i18n/component/changelog.json'
interface Release {
id: number
name: string
}
const loading = ref(true)
const releases = ref([])
const releases = ref<Release[]>([])
const currentRelease = ref()
const changelog = useLocale(changelogLocale)
const lang = useLang()
@ -20,7 +25,7 @@ const onVersionChange = (val) => {
onMounted(async () => {
try {
const { data } = await axios.get(
const { data } = await axios.get<Release[]>(
'https://api.github.com/repos/element-plus/element-plus/releases'
)
releases.value = data