Blogger Information
Blog 47
fans 0
comment 0
visits 21043
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Vue组件和路由
P粉036614676
Original
412 people have browsed it

1.组件

组件就是一大口代码的集合

  1. <template>
  2. <!-- <one :title="title" :arr="arr"></one> -->
  3. <p>{{teacher}}</p>
  4. <two @app_edit="app_edit"></two>
  5. </template>
  6. <script>
  7. import One from './components/One.vue'
  8. import Two from './components/Two.vue'
  9. export default{
  10. data(){
  11. return {
  12. title:'asdjk',
  13. arr:['as','df','gh'],
  14. teacher:'yk'
  15. }
  16. },
  17. methods:{
  18. app_edit(e)
  19. {
  20. console.log('我的父');
  21. this.teacher = e;
  22. },
  23. fun1()
  24. {
  25. console.log('123');
  26. },
  27. fun3()
  28. {
  29. }
  30. },
  31. components:{
  32. one:One,
  33. two:Two
  34. }
  35. }
  36. </script>
  37. <style>
  38. </style>

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post