- 得到指令名 和指令值(表达式) text/html/class msg/myClass
- 从 data 中根据表达是得到对应的值
- 根据指令名确定需要操作元素节点的什么属性
a: v-text---text-textContent 属性
b: v-html—innerHTML 属性
c: v-class---class 属性 - 将得到的表达式的值设置到对应的属性上
- 移除元素的指令属性
vue__模板解析3一般指令解析
原文:https://www.cnblogs.com/cl1998/p/13335019.html