kazupon/vue-i18n

V-IF with CLASS weird V-T directive behaviour

Closed this issue ยท 3 comments

vue & vue-i18n version

vue@2.4.4, vue-i18n@7.3.0

Reproduction Link

https://www.webpackbin.com/bins/-Kv7F4nCE6JXglvqh0WZ

Steps to reproduce

  • V-IF with any class attribute added, V-T directive appended inside
  • V-ELSE with V-T directive on it

What is Expected?

Toggling translation would work.

What is actually happening?

Toggling V-IF creates V-ELSE translation inside it on top of correct translation

Thank you for your reporting!

I seem that this behavior is bug of vue when used custom directive together with v-else(v-if).
see the small repro link
https://jsfiddle.net/fjfnxq2r/2/

It looks the same. Did you pass it by to Vue repository? Is there a bug reported which I can follow?

This behavior is spec of Vue.
As the workaround, You can use key special attribute.
See the docs