#4150·formily

[Bug Report] element-plus 组件设置中文失效

Author: qiaokeli111Created May 24, 2024Updated Feb 4, 2026
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

使用element-plus 标准化的方式去使用中文,在formily无效。

问题我已经找到了,element-plus 使用了一个symbol来作为key Symbol('localeContextKey')。 如果你们封装的element不提供出来这个key。那么我们外部使用原生element的这个key实际控制不了 你们封装后的element。

要么把el-config-provider这个组件提供出来,要么把key提供出来,不然无法设置中文

What is expected?

使用element-plus 标准化的方式去使用中文,在formily无效。

问题我已经找到了,element-plus 使用了一个symbol来作为key Symbol('localeContextKey')。 如果你们封装的element不提供出来这个key。那么我们外部使用原生element的这个key实际控制不了 你们封装后的element。

要么把el-config-provider这个组件提供出来,要么把key提供出来,不然无法设置中文

What is actually happening?

使用element-plus 标准化的方式去使用中文,在formily无效。

问题我已经找到了,element-plus 使用了一个symbol来作为key Symbol('localeContextKey')。 如果你们封装的element不提供出来这个key。那么我们外部使用原生element的这个key实际控制不了 你们封装后的element。

要么把el-config-provider这个组件提供出来,要么把key提供出来,不然无法设置中文

Package

@formily/[email protected]


请别说 爱用不用这种类似的话