解决vue3+ts+vite中启动报错No known conditions for “./lib/locale/lang/zh-cn“ entry in “element-plus“ package

解决vue3+ts+vite中启动报错No known conditions for “./lib/locale/lang/zh-cn“ entry in “element-plus“ package_第1张图片

主要是element-plus默认为英文,在设置中文的时候报了错

解决vue3+ts+vite中启动报错No known conditions for “./lib/locale/lang/zh-cn“ entry in “element-plus“ package_第2张图片

 将上面main.ts的红框代码改为如下方式即可        

import locale from "element-plus/es/locale/lang/zh-cn";

你可能感兴趣的:(前端,javascript,vue.js)