$props:当前组件接收到的 props 对象。Vue 实例代理了对其 props 对象属性的访问。

$attrs:包含了父作用域中不作为 prop 被识别 (且获取) 的特性绑定 (class 和 style 除外)。

$listeners:包含了父作用域中的 (不含 .native 修饰器的) v-on 事件监听器。它可以通过 v-on="$listeners" 传入内部组件——在创建更高层次的组件时非常有用。

 

v-bind="$attrs"
v-on="$listeners"
v-bind="$props" v-on="$listeners" (这里的props 不是想的那个 是attrs是)



https://blog.csdn.net/viewyu12345/article/details/84031295

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案