(el)
| 13784 | |
| 13785 | // 判断虚拟dom 是否有 :is属性,是否有inline-template 内联模板属性 如果有则标记下 为el 虚拟dom 添加component属性或者inlineTemplate 标志 |
| 13786 | function processComponent(el) { |
| 13787 | var binding; |
| 13788 | if ((binding = getBindingAttr(el, 'is'))) { //获取:is 或者是 v-bind:is 属性 |
| 13789 | el.component = binding; //如果有 把他绑定在属性中 |
| 13790 | } |
| 13791 | if (getAndRemoveAttr(el, 'inline-template') != null) { //当 inline-template 这个特殊的特性出现在一个子组件上时,这个组件将会使用其里面的内容作为模板,而不是将其作为被分发的内容。这使得模板的撰写工作更加灵活。 |
| 13792 | el.inlineTemplate = true; //标志有内联模板 |
| 13793 | } |
| 13794 | } |
| 13795 | //检查属性,为虚拟dom属性转换成对应需要的虚拟dom vonde数据 为el虚拟dom 添加muted, events,nativeEvents,directives |
| 13796 | function processAttrs(el) { |
| 13797 | var list = el.attrsList; //获取属性列表 |
no test coverage detected