@@ -93,11 +93,10 @@ export default defineComponent({
93
93
const nonEventAttrs = computed ( ( ) => omitOn ( attrs ) ) ;
94
94
const nativeListeners : Record < string , unknown > = { } ;
95
95
96
- const realListeners : Record < string , any > = { } ;
96
+ const listeners : Record < string , any > = { } ;
97
97
98
- // We are converting all `on<Event>` props to event listeners compatible with Vue 2
99
- // and collect them into `realListeners` so that we can bind them to the chart instance
100
- // later in the same way.
98
+ // We are converting all `on<Event>` props and collect them into `listeners` so that
99
+ // we can bind them to the chart instance later.
101
100
// For `onNative:<event>` props, we just strip the `Native:` part and collect them into
102
101
// `nativeListeners` so that we can bind them to the root element directly.
103
102
Object . keys ( attrs )
@@ -124,7 +123,7 @@ export default defineComponent({
124
123
event = `~${ event . substring ( 0 , event . length - 4 ) } ` ;
125
124
}
126
125
127
- realListeners [ event ] = attrs [ key ] ;
126
+ listeners [ event ] = attrs [ key ] ;
128
127
} ) ;
129
128
130
129
function init ( option ?: Option ) {
@@ -142,8 +141,8 @@ export default defineComponent({
142
141
instance . group = props . group ;
143
142
}
144
143
145
- Object . keys ( realListeners ) . forEach ( key => {
146
- let handler = realListeners [ key ] ;
144
+ Object . keys ( listeners ) . forEach ( key => {
145
+ let handler = listeners [ key ] ;
147
146
148
147
if ( ! handler ) {
149
148
return ;
0 commit comments