element plus 设置中文配置

main.ts文档中

import zhCn from "element-plus/dist/locale/zh-cn.mjs"
app.use(ElementPlus, {
  locale: zhCn,
})

在 d.ts文件中

declare module "element-plus/dist/locale/zh-cn.mjs"

你可能感兴趣的:(前端,javascript,开发语言)