(一)element框架(element-ui,emelemt-plus)安装和引用
(一):vue2.6以下使用elemtnt-ui:
1:安装命令
yarn add element-ui --save
2:删除
yarn remove element-ui --save
安装如果出现下面问题:
error Couldn't find package "fsevents@~2.3.2" required by "chokidar@^3.5.3" on the "npm" registry.
解决方法:
找到package.json,移除 "dependencies": {} 节点
然后:yarn install=>yarn add element-ui,然后会重新生成"dependencies": {} 节点=>然后刚刚移除的内容拷贝到"dependencies": {} 节点下面
=>然后yarn install去还原拷贝到dependencies": {} 下的呢些组件,最后yarn run serve就可以了
=>如果yarn add element-ui报下面的错
error An unexpected error occurred: "https://registry.yarnpkg.com/element-ui: connect ETIMEDOUT 104.16.16.35:443".
info If you think this is a bug, please open a bug report with the information provided in "E:\\vscode\\vue\\vue\\vue\\vue\\webapiroots3diyipian\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
就重复上面的操作
3:在main.js引用element
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
(二):vue3.x使用entment-ui
1:安装elemtnt-plus:
yarn add element-plus
2:引用element-plus
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!