您现在的位置是:首页 > 经典句子

vite+ts 找不到模块“@/views/AboutView.vue”或其相应的类型声明。ts

作者:往北时间:2024-04-28 10:40:49分类:经典句子

简介  文章浏览阅读1.4k次,点赞26次,收藏11次。出现问题不要慌,先看一下是什么问题,这里出现了找不到模块“@/views/AboutView.vue”或其相应的类型声明。ts(2307),所以是ts的问题。此时我们要做的就是喝口水,冷静一下,然后在env.d.

点击全文阅读

出现问题不要慌,先看一下是什么问题,这里出现了找不到模块“@/views/AboutView.vue”或其相应的类型声明。ts(2307),所以是ts的问题
在这里插入图片描述
此时我们要做的就是喝口水,冷静一下,然后在env.d.ts里加一段代码就好了
在这里插入图片描述

declare module '*.vue' {    import type { DefineComponent } from 'vue'    const component: DefineComponent<{}, {}, any>    export default component }

或者加一段别的代码也可以

declare module '*.vue' {   import type { DefineComponent } from 'vue'   const component: ComponentOptions | ComponentOptions['setup']   export default component}

这样报错就解决了
在这里插入图片描述
同志们,喝口水冷静一下

点击全文阅读

郑重声明:

本站所有活动均为互联网所得,如有侵权请联系本站删除处理

我来说两句

fetch1("select plface from {$dbtbpre}enewspl_set limit 1"); $facer=explode("||",$r[plface]); $count=count($facer); $plface=''; $plfacereply=''; for($i=1;$i<$count-1;$i++) { $face=explode("##",$facer[$i]); $img = $public_r[newsurl].'e/data/face/'.$face[1]; $plface.='
  • '; $plfacereply.='
  • '; } $userpiclink = ''; $username = getcvar('mlusername'); $userid=getcvar('mluserid'); $rnd = getcvar('mlrnd'); if($username&&$userid&&$rnd){ $user_r = sys_ShowMemberInfo($userid,'ui.userpic'); $userpic=$user_r[userpic]?$user_r[userpic]:$public_r[newsurl].'e/extend/lgyPl/assets/nouserpic.gif'; $userpiclink = ''; $userlink=''.$username.''; } ?>
    请先说点什么
    热门评论
    0人参与,0条评论
    正在载入评论列表...