参考:【前端】Vue+Element UI案例:通用后台管理系统-项目总结_vue elementui 管理系统-CSDN博客
之前参考的el-admin-web太复杂了,不是纯净的demo.
所以找了一圈资料,找到了这个博客,很合适,有例子的代码,代码简单,可以正常启动
我先安装了nodejs 12的版本,nodejs13+版本的会报错。

然后我自己打算从0到1搞到我自己的hmblogs-ui里,复制代码后,先写登录页面,把其它代码都去掉,然后做npm install的时候,报错了

报错内容贴出来:
PS D:\workspace\hmblogs-ui> npm install
npm ERR! code CERT_HAS_EXPIRED
npm ERR! errno CERT_HAS_EXPIRED
npm ERR! request to https://registry.npm.taobao.org/vue-loader failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ISS-67\AppData\Roaming\npm-cache\_logs\2024-03-08T04_02_54_860Z-debug.log
PS D:\workspace\hmblogs-ui> npm cache clean --force
npm WARN using --force I sure hope you know what you are doing.
网上搜了解决方案,问题解决了,需要执行如下命令:
清除npm缓存
npm cache clean --force
取消ssl验证:
npm config set strict-ssl false

执行npm命令成功了。
然后执行
npm run serve
启动成功:

然后访问http://localhost:8080/#/login

登录页面的做完了。要开始对接接口,拿登录接口对接,然后开发用户分页查询添加修改删除功能。
VUE学习,参考官网:介绍 --- Vue.js