vue__模板解析3一般指令解析

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