Created
November 6, 2020 07:51
-
-
Save jhd124/1e4830ff9b8e2667da2b5a9235a7f518 to your computer and use it in GitHub Desktop.
vue 事件透传v-on="$listeners"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vm.$listeners | |
2.4.0 新增 | |
类型:{ [key: string]: Function | Array<Function> } | |
只读 | |
详细: | |
包含了父作用域中的 (不含 .native 修饰器的) v-on 事件监听器。它可以通过 v-on="$listeners" 传入内部组件——在创建更高层次的组件时非常有用。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment