-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
谷歌翻译插件翻译页面后导致的v-if 指令不生效 #9160
Comments
I'd say it's probably the expected behavior. Google Translate mutates DOM structure and it's very hard to make modern data-driven view frameworks resilient to such services. AFAIK, React faces the same problem and they don't have a solution for this yet either. I think this would raise a much larger issue on interoperability in general and we may consider about it in the future. |
react 我也是使用react-cli 创建的,下面的代码是App.js的代码
|
If any library or extension modifies the dom then vue cannot ensure it will be kept up to date. But this problem will happen with any front end framework. |
I agree it might be very complicated to “fix” such issue so I suppose we won't invest time on this in the short term. |
我也遇到这个问题了,,,困扰了我两天,太坑了,,, |
hands up+1 |
我也遇到了相同的问题 |
Have a try (disable translation): <html lang="en" translate="no"> And fallback which should work for Edge and Chrome: <meta name="google" content="notranslate"> |
Version
2.5.2
Reproduction link
https://github.com/pillarBoy/vue-v-if
Steps to reproduce
问题出现步骤:
1.运行项目
2.然后在浏览器中,按鼠标右键,选择 【翻成中文(简体)(T)】
3.然后点击 change 按钮
问题出现了,
v-if="msg=='email'"
代码无效了,v-else不会出现我看了一下vue 项目源码,找到了processIf 函数,我想定位得更准确的位置。但是我对Vue的源码熟悉度和render过程理解不够深入,所以我找不到根本原因。请问这个问题可以解决吗?如果有解决的可能,请告诉我一下?如果不能解决,也请反馈给我一下这个导致这个问题出现的原因,非常感谢。
希望可以解决这个问题,
实际就是,使用了谷歌翻译之后,v-if 存在一些bug,if条件如果都是数字,不会有问
题,如果是一些单词,那就会被修改掉。
What is expected?
希望后期版本可以修复这个问题
What is actually happening?
谷歌翻译插件与 v-if 某些场景无法使用
如果有解决这个问题,请反馈一下给我。
The text was updated successfully, but these errors were encountered: