(el, state)
| 14801 | // hoist static sub-trees out 将静态子树吊出 |
| 14802 | //将子节点导出虚拟dom 渲染函数的参数形式 |
| 14803 | function genStatic(el, state) { |
| 14804 | //标记已经处理过 |
| 14805 | el.staticProcessed = true; |
| 14806 | //添加渲染函数 |
| 14807 | //genElement根据el判断是否是组件,或者是否含有v-once,v-if,v-for,是否有template属性,或者是slot插槽,转换style,css等转换成虚拟dom需要渲染的参数函数 |
| 14808 | state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}")); |
| 14809 | |
| 14810 | //返回虚拟dom渲染需要的参数格式 |
| 14811 | return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")") |
| 14812 | } |
| 14813 | |
| 14814 | // v-once |
| 14815 | //文档https://cn.vuejs.org/v2/api/#v-once |
no test coverage detected