Blogger Information
Blog 28
fans 0
comment 1
visits 13407
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
初学Vue
centos
Original
350 people have browsed it

初学Vue

  1. methods的结构
  2. methods:{
  3. 方法名字:function:{
  4. console.log()
  5. }
  6. }
  7. methods的简写
  8. methods:{
  9. 方法名字(){
  10. console.log()
  11. }
  12. }
  13. computed的结构
  14. computed:{
  15. 计算方法名字:{
  16. get:function(){
  17. return 需要的返回值
  18. }
  19. set(value){
  20. console.log(value)
  21. }
  22. }
  23. }
  24. conputed的简写 当只有返回值时
  25. computed:{
  26. 计算方法名字(){
  27. console.log()
  28. }
  29. }
  30. watch的结构
  31. watch:{
  32. deep:false;
  33. immediate:true//初始化时让handler调用一下
  34. handler(newvalue,oldvalue){
  35. console.log(newvalue,oldvalue)
  36. }
  37. }
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