File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/vuetify/src/mixins/selectable Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ import { h } from 'vue'
1111
1212export function prevent ( e : Event ) {
1313 e . preventDefault ( )
14- // всплытие провоцирует двойной onChange
15- e . stopPropagation ( )
1614}
1715
1816/* @vue /component */
@@ -118,7 +116,14 @@ export default mixins(
118116 } )
119117 } ,
120118 onClick ( e : Event ) {
121- this . onChange ( )
119+ // тут задваиваются клики
120+ const target = e . target as HTMLElement
121+ const isCurrentClick = target . id === this . computedId
122+ const isRippleClick = target . classList . contains ( 'v-input--selection-controls__ripple' )
123+
124+ if ( isCurrentClick || isRippleClick || ! this . computedId ) {
125+ this . onChange ( ) ;
126+ }
122127 this . $emit ( 'click' , e )
123128 } ,
124129 onChange ( ) {
You can’t perform that action at this time.
0 commit comments