在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問(wèn)答/HTML/ VUE這個(gè)子組件為什么顯示不出來(lái)?

VUE這個(gè)子組件為什么顯示不出來(lái)?

為什么訪問(wèn)http://localhost:8080/的時(shí)候顯示不出來(lái)這個(gè)Test.vue里面的東西呢?
圖片描述

App.vue里面的代碼

<template>
  <div id="app">
    <Test></Test>
  </div>
</template>

<script>
import Test from '@/components/Test'

export default {
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

Test.vue的代碼

<template>
 <div>
  <button class="btn">{{msg}}</button>
 </div>
</template>

<script>
export default {
  name: 'Test',
  data () {
    return {
      msg: 'test'
    }
  }
}
</script>

<style scoped>
 .btn{background-color:blue;}
</style>
回答
編輯回答
晚風(fēng)眠

App.vue 中

export default {
    components: { Test }
}
2018年2月13日 15:44