本來好好的,忽然專案的vue只要一打開<template>就報錯,哪怕寫的代碼都去除依然報錯

報的錯誤為:

Argument of type '{ fetch({ store, params }: any): void; computed: any; }' is not assignable to parameter of type 'new (...args: any[]) => any'.
Type '{ fetch({ store, params }: any): void; computed: any; }' provides no match for the signature 'new (...args: any[]): any'.Vetur(2345)
uj5u.com熱心網友回復:
<template><div>
template標簽是不會渲染成標簽元素的,因此里面必須要有一個父級標簽,通常直接放個div即可
</div>
</template>
uj5u.com熱心網友回復:
一個空vue.js的單檔案組件是這樣的
<template>
<div>
</div>
</template>
<script>
export default {
data(){
return {}
}
}
</script>
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/48730.html
標籤:JavaScript
