Element-Plus import zhCn from 'element-plus/dist/locale/zh-cn.mjs'飘红解决办法

技术 · 2023-09-20
Element-Plus import zhCn from 'element-plus/dist/locale/zh-cn.mjs'飘红解决办法

main.ts中引入

import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

会飘红,解决办法是在上面加一行注释:

//@ts-ignore

即:

//@ts-ignore
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
element-plus
Theme Jasmine by Kent Liao