<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
mpType: 'app',
onLaunch() {
console.log('App Launch')
},
onShow() {
console.log('App Show')
},
onHide() {
console.log('App Hide')
}
});
</script>
<style>
/每个页面公共css /
</style>
App.vue编译后报错
No overload matches this call.
The last overload gave the following error.
Argument of type '{ mpType: string; onLaunch(): void; onShow(): void; onHide(): void; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<Record<string, any>>, Record<...>>'.
2 | import Vue from 'vue'; 3 | export default Vue.extend({
4 | mpType: 'app',
| ^
5 | onLaunch() {
6 | console.log('App Launch')
7 | },
@dcloud/types是今天升级的3.0.4版本的。然后编译就出现了这个问题。
有没有大佬能帮忙解释下的!!!