#typescript #vue.js
#typescript #vue.js
Вопрос:
Я столкнулся с ошибкой, которая не позволяет мне загружать страницу, над которой я работаю. В моем каталоге компонентов у меня есть файл MyButton.vue.
<template>
<button>My Button</button>
</template>
<script lang="ts">
import {Component, Vue} from "vue-property-decorator";
@Component
export default class MyButton extends Vue{
}
</script>
<style scoped>
</style>
И на моем Home.vue он должен загрузить страницу и отобразить саму кнопку, но почему-то я получаю сообщение об ошибке.
<template>
<div class="home">
<MyButton></MyButton>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import MyButton from "@/components/MyButton.vue";
@Component({
components:{
MyButton
},
})
export default class Home extends Vue {}
</script>