index.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <div class="web-index">
  3. 前端首页
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. name: 'web-index',
  9. components: {},
  10. data() {
  11. return {
  12. };
  13. },
  14. methods:{
  15. initialize:function() {
  16. let that = this;
  17. }
  18. },
  19. //计算属性
  20. computed:{
  21. },
  22. //侦听属性
  23. watch:{
  24. },
  25. //实例刚在内存中被创建出来,此时,还没有初始化好 data 和 methods 属性
  26. beforeCreate:function(){
  27. },
  28. //实例已经在内存中创建OK,此时 data 和 methods 已经创建OK,此时还没有开始 编译模板
  29. created:function(){
  30. },
  31. //此时已经完成了模板的编译,但是还没有挂载到页面中
  32. beforeMount:function(){
  33. },
  34. //此时,已经将编译好的模板,挂载到了页面指定的容器中显示
  35. mounted:function(){
  36. let that = this;
  37. that.initialize();
  38. },
  39. //状态更新之前执行此函数, 此时 data 中的状态值是最新的,但是界面上显示的 数据还是旧的,因为此时还没有开始重新渲染DOM节点
  40. beforeUpdate:function(){
  41. },
  42. //实例更新完毕之后调用此函数,此时 data 中的状态值 和 界面上显示的数据,都已经完成了更新,界面已经被重新渲染好了!
  43. updated:function(){
  44. },
  45. //实例销毁之前调用。在这一步,实例仍然完全可用。
  46. beforeDestroy:function(){
  47. },
  48. //Vue 实例销毁后调用。调用后,Vue 实例指示的所有东西都会解绑定,所有的事件监听器会被移除,所有的子实例也会被销毁。
  49. destroyed:function(){
  50. }
  51. }
  52. </script>
  53. <style scoped>
  54. /*pass*/
  55. </style>