功能需求:项目中用到的$message消息提示的方式,但是停留时间过长,用到的地方太多,想全局改掉。
在main.js中添加一下配置:
import ElementUI from "element-ui"; //原先已引入ElementUI组件 //或者 import {Message} from 'element-ui' //注意:页面this.$message Vue.prototype.$message = function(msg) { return ElementUI.Message({ message: msg, duration: 1500 }) }; //分别对success、warning和error等样式进行设置 Vue.prototype.$message.success = function(msg) { return ElementUI.Message.success({ message: msg, duration: 1500 }) }; Vue.prototype.$message.warning = function(msg) { return ElementUI.Message.warning({ message: msg, duration: 1500 }) }; Vue.prototype.$message.error = function(msg) { return ElementUI.Message.error({ message: msg, duration: 1500 }) }
上面是“ElementUI全局修改el-message停留时间”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_2106.html
workflows工作流
1个很漂亮的单身小女孩ComfyUI工作流
水晶玉雕巨龙ComfyUI工作流
金色玫瑰花comfyui工作流
一盒用五颜六色的食材烹制的热气腾腾的寿司
一座古老的石阶,旁边有一棵树
森林里一只邪恶的树妖ComfyUI工作流
海中一头鲸鱼ComfyUI工作流
葡萄庄园白葡萄酒ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

纯css制作卡通头像(随鼠标转头)
一起去看流星雨(代码)
在线生成金属文字
canvas经线动画走到效果
js实现下雪特效
HTML5 Canvas 刻度尺






