Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vue.js 升级Vue模板加载程序以使用Vue3_Vue.js_Vuejs3 - Fatal编程技术网

Vue.js 升级Vue模板加载程序以使用Vue3

Vue.js 升级Vue模板加载程序以使用Vue3,vue.js,vuejs3,Vue.js,Vuejs3,所以在我的Vue2项目中,我过去不需要使用.vue文件。但是,可以在.d.ts文件中看到 // TypeScript type module definition required for vue-template-loader declare module '*.html' { import Vue, { ComponentOptions } from 'vue'; interface WithRender { <V extends Vue>(options: C

所以在我的Vue2项目中,我过去不需要使用.vue文件。但是,可以在
.d.ts
文件中看到

// TypeScript type module definition required for vue-template-loader
declare module '*.html' {
  import Vue, { ComponentOptions } from 'vue';

  interface WithRender {
    <V extends Vue>(options: ComponentOptions<V>): ComponentOptions<V>
    <V extends typeof Vue>(component: V): V
  }

  const withRender: WithRender
  export = withRender
}
//vue模板加载程序需要类型脚本类型模块定义
声明模块“*.html”{
从“Vue”导入Vue,{ComponentOptions};
与Render的接口{
(选项:ComponentOptions):ComponentOptions
(构成部分:五):五
}
常量withRender:withRender
export=withRender
}
这当然与Vue3不兼容<代码>vue将与“导入{vue}一起从“vue类组件”中导入

我似乎找不到任何关于如何将下面的文件迁移到Vue3中,以便将HTML文件导入到我的.ts中的信息