×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Gonzalo Nandez
Added: Sep 29, 2017 11:35 PM
Modified: Sep 29, 2017 11:47 PM
Views: 5
Plantilla para un componente vacio de vue. Sacado del predefinido de phpstorm
  1. <template>
  2.     <div>
  3.         <header-component/>
  4.         <div>this is template body</div>
  5.         <other-component/>
  6.     </div>
  7. </template>
  8. <style scoped>
  9.     body{
  10.         background-color:#ff0000;
  11.     }
  12. </style>
  13. <script>
  14.     import HeaderComponent from './components/header.vue'
  15.     import OtherComponent from './components/other.vue'
  16.     export default{
  17.         data(){
  18.             return{
  19.                 msg:'hello vue'
  20.             }
  21.         },
  22.         components:{
  23.             'other-component':OtherComponent,
  24.             HeaderComponent,
  25.         }
  26.     }
  27. </script>