vue3最基础入门,vue3 + element plus实战pc端后台管理,从零到一设计pc端项目

教程地址  https://www.bilibili.com/video/BV1C3411s7bV

 

稳定、快速、免费的前端开源项目 CDN 加速服务,共收录了 4387 个前端开源项目

https://www.bootcdn.cn/all/

Normalize.css 使浏览器呈现所有 HTML 元素更加一致,并且符合现代 web 标准。Normalize.css 只作用于需要规范化的样式。 

https://www.bootcdn.cn/normalize/  

安装 | Element Plus (element-plus.org)

pnpm  install element-plus

 

错误ERR_PNPM_REGISTRIES_MISMATCH  This modules directory was created using the following registries configuration: {"default":"https://registry.npmmirror.com/"}. The current configuration is {"default":"https://registry.npm.taobao.org/"}. To recreate the modules directory using the new settings, run "pnpm install".

解决办法:修改回原镜像:npm config set registry=https://registry.npmmirror.com

main.ts 添加

import ElementPlus from 'element-plus'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'element-plus/dist/index.css'
 
const app = createApp(App)
app.use(router)
app.use(ElementPlus, { locale: zhCn })
app.mount('#app')

错误 ts无法找到模块 element-plus/dist/locale/zh-cn.mjs 的声明文件

解决方法 在项目的 shims-vue.d.ts 文件中输入 declare module 'element-plus/dist/locale/zh-cn.mjs';

posted @ 2023-10-05 21:10  simadi  阅读(228)  评论(0编辑  收藏  举报