[Bug Report] element-ui/src/locale/ index.js The source code uses obsolete attributes

mspsb9vt  于 4个月前  发布在  其他
关注(0)|答案(1)|浏览(52)

Element UI version

2.15.1

OS/Browsers version

windows 10

Vue version

2.6.12

https://codepen.io/pen/?&prefill_data_id=3800e316-5d31-4b92-8271-78fe53aecf9e

Steps to reproduce

重现链接不需要,问题出在源码上。
请查看element-ui/src/locale/index.js文件第11行有个判断语句 if (typeof vuei18n === 'function' && !!Vue.locale)
这个Vue.locale已经废弃了,导致这个判断永远都进不来,最终导致切换语言,对应语言文字不切换。

What is Expected?

切换语言,文字相对应变换。

What is actually happening?

切换语言,文字相对应不变换。

q8l4jmvw

q8l4jmvw1#

Translation of this issue:

Element UI version

2.15.1

OS/Browsers version

windows 10

Vue version

2.6.12

https://codepen.io/pen/?&prefill _ data_ id=3800e316-5d31-4b92-8271-78fe53aecf9e

Steps to reproduce

The problem lies in the source code.

See element UI / SRC / locale/ index.js There is a judgment statement on line 11 of the file if (type of vuei18n ='function '& &!! Vue.locale )
this Vue.locale It has been abandoned, resulting in the judgment never coming in, eventually leading to language switching and corresponding language text not switching.

What is Expected?

Switch language, text corresponding transformation.

What is actually happening?

Switch the language, the text should not be changed.

相关问题