mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
fix: type error
This commit is contained in:
parent
0ae66f8230
commit
ba6433700c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user