render:h=>h(App)是ES6中的箭头函数写法,等价于render:function(h){return h(App);}.

注意点:
1.箭头函数中的this是 指向 包裹this所在函数外面的对象上。

2.h是creatElement的别名,vue生态系统的通用管理

3.template:‘<app/>’,components:{App}配合使用与单独使用render:h=>h(App)会达到同样的效果
  前者识别<template>标签,后者直接解析template下的id为app的div(忽略template的存在)

相关文章:

  • 2021-12-09
  • 2022-12-23
  • 2021-12-22
  • 2021-08-29
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2021-12-09
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
相关资源
相似解决方案