page shows nothing if you don"t write < Artical/ >
and < Write/ >
can show msg
. Why?
the terminal window did not report an error. The browser console reported this error
Blog.vue
.
<template>
<div>
{{msg}}
<Artical/>
<Write/>
</div>
</template>
<script>
import Write from "@/components/Write"
import Artical from "@/components/Artical"
export default {
name: "Artical",
data () {
return {
msg: "test"
}
},
components: {
Artical,
Write
}
}
</script>
<style scoped>
</style>
Artical.vue
<template>
<div>
<div class="content">
Artical
</div>
</div>
</template>
<script>
export default {
name: "Artical",
data () {
return {
}
}
}
</script>
<style scoped>
</style>
Write.vue
<template>
<div>
<div class="content">
Write
</div>
</div>
</template>
<script>
export default {
name: "Write",
data () {
return {
}
}
}
</script>
<style scoped>
</style>