我想导出几个接口Component
from .vue
file.
基本.vue:
<template>
<div class="app">
<router-view></router-view>
</div>
</template>
<script lang="ts">
import { Vue, Component } from "vue-property-decorator";
export interface IBasic {
name :string;
}
/**
* Simplest container
*/
@Component
export class Basic extends Vue {}
export default Basic;
</script>
但是当我从另一个导入它时.ts
文件,我得到:
如何才能成功导入接口?
我遇到了同样的问题,并意识到尽管我的 IDE 上没有错误,但错误仍然抛出,所以我只是重新启动服务器它工作得很好...每次我用 TS 创建导入或导出任何内容时都必须这样做。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)