A
A
Anton Anton2017-06-06 13:05:07
css
Anton Anton, 2017-06-06 13:05:07

Make a component that appears by stretching from zero width/height like slideToggle from jquery?

api.jquery.com/slideToggle
0042_06_26.png
I want that when sending a request to the server, the input decreases a little and an icon appears on the right.
I'm trying to do this:

.scaleX-enter-active , .scaleX-leave-active {
    transition: all .4s;
  }
  .scaleX-enter, .scaleX-leave-to
  /* .slide-fade-leave-active для <2.1.8 */ {
    transform: scaleX(0);
  }

...
        <transition name="scaleX">
          <span v-if="processing" class="fa fa-circle-o-notch fa-spin fa-fw" aria-hidden="true"/></span>
        </transition>
...

The icon appears and disappears instantly. At the same time, everything works fine with fade.
made a small example, https://jsfiddle.net/5wcrfqdb/3/ , want the scale block to appear from left to right (zero width to full width)
upd: advanced a bit : https://jsfiddle.net/5wcrfqdb/60/
ideally make it so that the scale is up to the actual width of the element

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Kulakov, 2017-06-06
@Fragster

And if div instead of span?
<div v-if="processing">scaleX</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question