【测试平台】【前端VUE】工具页面学习记录

背景:

这个我4年半以前刚接手记录,测试工具页面一般比较简单,不需要复杂东西,剩下就是维护。

工程安装

npm install

1.执行nmp install前先确认一下自己的node版本,这个项目需要是node12才可以,否则会出现各种报错

2.查看node版本 node -v

3.安装好node之后,再执行sudo ``npm install命令

4.如果遇到报错连接板不上git的报错信息.

  1. 执行命令git config --global url."https://".insteadOf git://
  2. 然后在执行npm install

工程启动

构建新页面

添加侧边栏-一级菜单

/src/router/index.js

添加侧边栏-二级菜单

src/router/modules/servicesuser.js

添加逻辑层

src/api/servicesuser.js

添加请求接口

src/api/servicesuser.js

相关报错解决

1.Npm 安装时候报错

https://github.com/PanJiaChen/vue-element-admin/issues/3859

2.本地Mac启动前端程序报js-pinyin错误

复制代码
➜  LiveMeHydra git:(master) ✗ npm run dev

> vue-element-admin@4.2.1 dev /Users/Amei/Liveme/Git/LiveMeHydra
> vue-cli-service serve

 INFO  Starting development server...
 WARN  A new version of sass-loader is available. Please upgrade for best experience.
 98% after emitting CopyPlugin                                                      

 ERROR  Failed to compile with 1 errors                                                                                                                                                           3:46:19 PM

This dependency was not found:

* js-pinyin in ./node_modules/cache-loader/dist/cjs.js??ref--13-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/versions/testplan.vue?vue&type=script&lang=js&

To install it, you can run: npm install --save js-pinyin

解决方案:

这个错误提示表明在编译 testplan.vue 文件时,缺少 js-pinyin 依赖项。为了解决这个问题,你可以运行以下命令安装 js-pinyin 依赖项

npm install --save js-pinyin

这个命令将会安装 js-pinyin 依赖项并将其添加到 package.json 文件中的 dependencies 列表中。安装完成后,你可以重新编译 testplan.vue 文件并检查是否仍然存在缺少依赖项的错误.

相关学习资料

element-ui

https://element.eleme.cn/#/zh-CN/component/installation

https://element.eleme.cn/#/zh-CN/theme/preview

vue-element-admin

演示地址:vue-element-admin

官方文档:https://panjiachen.github.io/vue-element-admin-site/zh/guide/#功能

代码github:https://github.com/PanJiaChen/vue-element-admin

相关推荐
奶茶精Gaaa几秒前
工具分享--json在线转换工具
学习
wdfk_prog17 分钟前
[Linux]学习笔记系列 -- [drivers][I2C]I2C
linux·笔记·学习
盐焗西兰花28 分钟前
鸿蒙学习实战之路-Reader Kit自定义字体最佳实践
学习·华为·harmonyos
0思必得030 分钟前
[Web自动化] Selenium处理滚动条
前端·爬虫·python·selenium·自动化
Misnice32 分钟前
Webpack、Vite、Rsbuild区别
前端·webpack·node.js
青茶36033 分钟前
php怎么实现订单接口状态轮询(二)
前端·php·接口
大橙子额1 小时前
【解决报错】Cannot assign to read only property ‘exports‘ of object ‘#<Object>‘
前端·javascript·vue.js
近津薪荼1 小时前
dfs专题5——(二叉搜索树中第 K 小的元素)
c++·学习·算法·深度优先
敏叔V5872 小时前
AI智能体的工具学习进阶:零样本API理解与调用
人工智能·学习
2501_941864962 小时前
科学方法论破解学习时间堆砌误区
学习