位置:- 正文

vue3 Element Plus按钮点击之后颜色不会还原的解决方案(element ui vue 3)

编辑:rootadmin
思路:Element Plus提供了样式变量,我的解决思路就是修改其样式变量。 新建外部样式 xxx.css 加入内容: .el-button--primary { --el-button-bg-color: #409eff; --el-button-hover-bg-color: #409eff; ... 思路:Element Plus提供了样式变量,我的解决思路就是修改其样式变量。

推荐整理分享vue3 Element Plus按钮点击之后颜色不会还原的解决方案(element ui vue 3),希望有所帮助,仅作参考,欢迎阅读内容。

vue3 Element Plus按钮点击之后颜色不会还原的解决方案(element ui vue 3)

文章相关热门搜索词:element ui vue 3,vue3.0 element ui,element ui vue 3,vue3.0 element plus,vue3+element,vue3 element-plus,element-plus vue,element-plus vue,内容如对您有帮助,希望把文章链接给更多的朋友!

新建外部样式 xxx.css

加入内容:

.el-button--primary { --el-button-bg-color: #409eff; --el-button-hover-bg-color: #409eff;}.el-button--primary:hover { --el-button-hover-bg-color: #79bbff;}.el-button--warning.is-plain { --el-button-bg-color: #fdf6ec; --el-button-hover-text-color: #e6a23c; --el-button-hover-bg-color: #fdf6ec;}.el-button--warning.is-plain:hover { --el-button-hover-text-color: #fff; --el-button-hover-bg-color: #e6a23c;}.el-button--danger.is-plain { --el-button-bg-color: #fef0f0; --el-button-hover-text-color: #f56c6c; --el-button-hover-bg-color: #fef0f0;}.el-button--danger.is-plain:hover { --el-button-hover-text-color: #fff; --el-button-hover-bg-color: #f56c6c;}然后将xxx.css 引入到页面中。注:不知道怎么滴,全局引入页面的按钮不起作用,需要的单个页面中引入。以上内容只修改部分按钮的点击效果,如需修改多个按钮,依次添加。如有更好的解决思路和方案欢迎回复,如有更好的解决思路和方案欢迎回复,如有更好的解决思路和方案欢迎回复如有更好的解决思路和方案欢迎回复,
本文链接地址:https://www.jiuchutong.com/zhishi/304553.html 转载请保留说明!
下一篇链接:https://www.jiuchutong.com/zhishi/304554.html
免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

鄂ICP备2023003026号

友情链接: 武汉网站建设 电脑维修 湖南楚通运网络