VUE组件中name的作用

福尔摩斯对我笑 2019-04-13 15926 次 3134条

最近在使用VUE的过程中,发现组件中有个name的属性,可写可不写,就比较奇怪,这个属性用来做什么的。经过学习的深入也基本了解了该属性的作用,在此记录下。

递归组件时使用

比如我下面的例子中,list数组里有子项数据,那么就可以直接通过name值调用自身的组件,用来实现递归

使用keep-live包裹组件时,可通过exclude直接设置对某些组件不缓存

这里的Detail就是之前组件的name属性

VUE浏览器插件

使用VUE调式插件时,dom结构中的名称就是name的属性值了

标签:

非特殊说明,本博所有文章均为博主原创。

头像也是LOGO
未来博客 博主大人
到了这个年纪,不应该再彷徨!

发表评论



 


已有 3134 条评论 1


  1. modern era construction

    Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates. I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

    回复 2020年2月26日
  2. f2280 tc bolts

    Hi would you mind sharing which blog platform you’re using? I’m planning to start my own blog in the near future but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique. P.S Sorry for getting off-topic but I had to ask!

    回复 2020年2月25日
  3. Evacycle 回复 2020年2月25日
  4. rachel cusk mother

    Hmm is anyone else encountering problems with the pictures on this blog loading? I’m trying to figure out if its a problem on my end or if it’s the blog. Any responses would be greatly appreciated.

    回复 2020年2月25日
  5. rachel cusk on becoming a mother

    Today, while I was at work, my cousin stole my iphone and tested to see if it can survive a twenty five foot drop, just so she can be a youtube sensation. My iPad is now broken and she has 83 views. I know this is totally off topic but I had to share it with someone!

    回复 2020年2月25日
  6. house cleaning

    Do you have a spam problem on this site; I also am a blogger, and I was wondering your situation; many of us have developed some nice methods and we are looking to trade strategies with others, be sure to shoot me an email if interested.

    回复 2020年2月24日
  7. Evacycle 回复 2020年2月23日
  8. Evacycle 回复 2020年2月23日
  9. Tractor Workshop Manuals

    There are actually a trio of different years while using Chicago Diet and each and every very first is absolutely vital. The pioneer step is your the actual fat reduction . for this kilograms. lose belly fat

    回复 2020年2月22日
  10. Evacycle 回复 2020年2月22日
  11. Evacycle 回复 2020年2月20日
  12. forum.teamspeak.com

    I really like what you guys tend to be up too. This sort of clever work
    and coverage! Keep up the good works guys I’ve you guys to our blogroll.

    回复 2020年2月20日
  13. holiday ins pre existing conditions

    Today, I went to the beach with my children. I found a sea shell and gave it to my 4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is totally off topic but I had to tell someone!

    回复 2020年2月19日
  14. national geographic expeditions travel catalog 2019

    Wonderful blog! I found it while searching on Yahoo News. Do you have any suggestions on how to get listed in Yahoo News? I’ve been trying for a while but I never seem to get there! Appreciate it

    回复 2020年2月19日
  15. mbt shoes

    I not to mention my guys were actually following the excellent strategies on your site while unexpectedly came up with a horrible feeling I never thanked the web blog owner for those techniques. All of the guys ended up for this reason glad to see them and now have really been using them. Thanks for truly being very helpful and then for pick out this form of tremendous subject areas most people are really needing to be aware of. Our sincere apologies for not expressing appreciation to you earlier.

    回复 2020年2月19日
  16. vagabonding rolf potts

    Howdy just wanted to give you a quick heads up. The words in your content seem to be running off the screen in Internet explorer. I’m not sure if this is a formatting issue or something to do with web browser compatibility but I thought I’d post to let you know. The style and design look great though! Hope you get the problem fixed soon. Many thanks

    回复 2020年2月19日
  17. norwegian cruise travel protection

    Howdy! This is my first comment here so I just wanted to give a quick shout out and tell you I really enjoy reading through your blog posts. Can you suggest any other blogs/websites/forums that go over the same subjects? Appreciate it!

    回复 2020年2月19日
  18. cheap family holidays abroad

    Admiring the persistence you put into your blog and detailed information you present. It’s good to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read! I’ve saved your site and I’m including your RSS feeds to my Google account.

    回复 2020年2月19日
  19. google travel guide

    My programmer is trying to convince me to move to .net from PHP. I have always disliked the idea because of the expenses. But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for about a year and am nervous about switching to another platform. I have heard good things about blogengine.net. Is there a way I can import all my wordpress posts into it? Any help would be greatly appreciated!

    回复 2020年2月19日
  20. family holiday deals

    I’m really enjoying the design and layout of your site. It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a developer to create your theme? Excellent work!

    回复 2020年2月18日
  21. digital marketing company near me

    Hello there! I know this is somewhat off topic but I was wondering which blog platform are you using for this site? I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at options for another platform. I would be fantastic if you could point me in the direction of a good platform.

    回复 2020年2月18日
  22. Evacycle 回复 2020年2月18日
  23. https://issuu.com/

    Yay google is my king aided me to find this outstanding website!

    回复 2020年2月18日
  24. https://500px.com

    Keep up the excellent work, I read few content on this website and I conceive that your web blog
    is really interesting and has circles of wonderful information.

    回复 2020年2月18日
  25. http://myfolio.com/jouvest7

    Whats up very nice site!! Guy .. Beautiful .. Wonderful ..
    I’ll bookmark your website and take the feeds additionally?
    I am happy to find numerous useful information right here in the
    put up, we’d like work out more strategies on this regard,
    thanks for sharing. . . . . .

    回复 2020年2月18日
  26. Mitsuko Zambarano

    Thanks for the best blog.it was very useful for me.keep sharing such ideas in the future as well. address |

    回复 2020年2月18日
  27. Evacycle 回复 2020年2月17日
  28. Evacycle 回复 2020年2月17日
  29. buddypress.org

    Currently it looks like WordPress is the best blogging platform
    out there right now. (from what I’ve read) Is that what
    you’re using on your blog?

    回复 2020年2月16日
  30. Evacycle 回复 2020年2月16日
  31. gitlab.com

    Way cool! Some extremely valid points! I appreciate you writing
    this post and the rest of the site is very good.

    回复 2020年2月16日
  32. Evacycle 回复 2020年2月16日
  33. balenciaga sneakers

    I just wanted to post a brief note in order to express gratitude to you for the splendid techniques you are posting on this website. My long internet look up has at the end been recognized with sensible information to write about with my friends and classmates. I would repeat that many of us website visitors are unquestionably blessed to dwell in a good community with many awesome professionals with great points. I feel pretty lucky to have discovered your entire site and look forward to really more enjoyable times reading here. Thanks once again for a lot of things.

    回复 2020年2月15日