Comments (4)
我这边试了一下,没有报错。所以请提供你的 vue 版本、element 版本,以及使用 Notification 的代码片段
from element.
相关资源版本:
"element-ui": "^1.0.0-rc.3",
"vue": "^2.0.0-rc.6",
"vue-resource": "^1.0.1",
"vue-router": "^2.0.0-rc.5"
可能是我这用法的问题
import { Notification } from 'element-ui';
在ajax中增加了一个全局的逻辑,如果返回数据有需要提醒的提示信息就显示出来,不需要界面单独处理
Vue.http.interceptors.push((request, next) => {
next((response) => {
var data = response.data;
if (data && data.message) {
Notification({
title: '通知',
duration: 8,
message: data.message,
type: data.type || 'info'
});
}
});
}
});
from element.
duration
的单位是毫秒,改成 8000 再试试
from element.
ok了,这个没仔细看文档,以为和vue-desktop是一致的。感谢
from element.
Related Issues (20)
- [Feature Request] Uploader Support for Folder selection with webkitdirectory attribute
- [Bug Report] select框设置filterable,在选中一个之后切屏,再切回来,组件的options会自动打开 HOT 1
- [Feature Request] table组件的多选能够根据table绑定的data渲染是否选中,使用toggleRowSelection方法不能满足需求
- [Bug Report] datepicker组件type是datetime时怎么全局更改它的默认format HOT 1
- [Feature Request] DatePicker 日期选择器type="dates"时怎么限制选择的日期数量
- [Bug Report] 日期选择器type="week"时,Picker Options中设置disabledDate为昨天和firstDayOfWeek为1,点击4月1日日期选择器不作用
- [Bug Report] 多语言里繁体翻译不全
- 2.13.2版本的日期或者时间控件el-time-picker手动输入数字不会自动转时间格式 HOT 1
- [Feature Request] el-upload 如何实现取消上传后继续上传及已上传文件不移出列表?
- [Bug Report] el-body嵌套el-table只有两列时候第二列设置fixed后高度异常 HOT 1
- [Bug Report] form-item.vue validate source对象不能访问form model中的其他属性
- [Bug Report] el-table的展开行里面再放一个el-table,设置了fixed的el-table-column会显示异常
- [Feature Request] el-drawer打开想要点击页面其他元素,并且页面可以滚动
- [Bug Report] <el-time-picker is-range 时 时间范围联动限制时异常 HOT 1
- [Bug Report] Nested dialog boxes contain tables with checkbox properties set. Selecting a checkbox can cause Google Chrome to crash HOT 2
- [Bug Report] when messageBox‘s render function use a observable data, it can't update the ui HOT 1
- [Bug Report] cascader组件修改v-model值不触发lazyLoad
- [Bug Report] select组件给v-model赋值不触发远程搜索问题
- [Bug Report] 常用功能:tree组件的插槽内,应该暴露出来节点的索引, 引用即可复现,目前没有索引 HOT 2
- [Bug Report] el-cascader:panel中使用键盘向下选中数据,滚动异常
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from element.