File tree Expand file tree Collapse file tree 1 file changed +24
-19
lines changed
src/core/components/mdInkRipple Expand file tree Collapse file tree 1 file changed +24
-19
lines changed Original file line number Diff line number Diff line change 11<template >
2- <div class =" md-ink-ripple" v-if =" !disabled" >
2+ <div class =" md-ink-ripple" v-if =" mounted || !disabled" >
33 <div class =" md-ripple" :class =" classes" :style =" styles" ref =" ripple" ></div >
44 </div >
55</template >
1212 mdDisabled: Boolean
1313 },
1414 data : () => ({
15+ mounted: false ,
1516 rippleElement: null ,
1617 parentElement: null ,
1718 parentDimensions: {
144145 }
145146 },
146147 init () {
147- this .$nextTick (() => {
148- this .rippleElement = this .$el ;
149- this .parentElement = this .getClosestPositionedParent (this .$el .parentNode );
150-
151- if (! this .parentElement ) {
152- this .$destroy ();
153- } else {
154- this .rippleElement .parentNode .removeChild (this .rippleElement );
155- this .parentElement .appendChild (this .rippleElement );
156- this .registerMouseEvent ();
157- this .setDimensions ();
158- }
159- });
148+ this .rippleElement = this .$el ;
149+ this .parentElement = this .getClosestPositionedParent (this .$el .parentNode );
150+
151+ if (! this .parentElement ) {
152+ this .$destroy ();
153+ } else {
154+ this .rippleElement .parentNode .removeChild (this .rippleElement );
155+ this .parentElement .appendChild (this .rippleElement );
156+ this .registerMouseEvent ();
157+ this .setDimensions ();
158+ }
160159 },
161160 destroy () {
162161 if (this .rippleElement && this .rippleElement .parentNode ) {
166165 }
167166 },
168167 mounted () {
169- if (! this .disabled ) {
170- this .init ();
171- } else {
172- this .destroy ();
173- }
168+ window .setTimeout (() => {
169+ if (! this .disabled ) {
170+ this .init ();
171+ } else {
172+ this .destroy ();
173+ }
174+
175+ this .$nextTick (() => {
176+ this .mounted = true ;
177+ });
178+ }, 100 );
174179 },
175180 beforeDestroy () {
176181 this .destroy ();
You can’t perform that action at this time.
0 commit comments