感觉很像
是一个key嘛
用于更方便的查询某个tag

暂时这么理解吧 2018.6.14

更新: 20180620
Q: Since Max uses 'ref' as the key to identify a tag, i guess maybe it's similar with the 'id' in html ?

A: Not really. "id" doesn't give you any access to the element - ref does though. With ref, you get a reference that allows you to directly work on the underlying DOM element from within your JS code.

With "id", you could get that access via getElementById and then it would be equivalent but ref doesn't need that extra step.

标签: ref, vue

添加新评论