我正在尝试用vue-class-component和typescript创建一个vue组件(这里是)。据我所知,数据是在类中定义的,就像我在下面所做的那样--但我收到了错误:
"[Vue warn]: Property or method "test" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components,
我正在尝试使用带有vuejs的typescript,通常我使用类似这样的东西
@Component({
props: ['uploadUrl'],
})
export default class SelectionModal extends Vue {
let x = this.uploadUrl // This variable `uploadUrl` is NOT resolved in my IDE
}
但在我的集成开发环境(phpStorm)中未解析uploadUrl
但是我们可以通过声明@ vue-property-decora
对以下问题的任何帮助都将不胜感激!
情况:
我的包含两个包
child-component-lib
- contains a single view `About.vue` written in composition-API-style (with vue2 helper libraries `@vue/composition-api` and `vuex-composition-helpers`)
- exports a single `RouteConfig`
- build as a lib
views/About.vue (儿童)
这是一个关于页面(作为组件库)从“@vu
我正在尝试在一个组件中创建命名导出,如下所示:
export interface ITest { t: String }
从另一个调用它:
import { ITest } from '@/components/Test.vue'
并出现以下错误:
TS2614: Module '"*.vue"' has no exported member 'ITest '. Did you mean to use 'import ITest from "*.vue"' instead?
如果我更改为:impor