Comments (6)
我这边好像没这个问题,估计已经修掉了?
你试试用开发版,你 clone 这个项目下来,执行 npm run bootstrap && npm run dist
然后到你的项目下安装
# 你的项目目录
npm install [你 clone 的 element 项目目录]
from element.
@QingWei-Li 试过了,还是没有生效
from element.
第二个问题,我在文档页里并没有复现问题。你测试下文档页里会报错么,具体是哪一行?
from element.
@QingWei-Li 第二个问题使用打包过后的文件就会有这个问题存在,我中午跟进下看看,我用下面这个pickerOption,只有今天
触发了onClick并得到正确结果了,其他两项虽然触发了,也没报错,但是没得到任何结果,用日期范围选择就会有错误,clone下来的项目里面dev模式没有出错。
pickerOptions1: {
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
console.log('昨天');
picker.$emit('pick', date.getTime() - 3600 * 1000 * 24);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
console.log('一周前');
picker.$emit('pick', date.getTime() - 3600 * 1000 * 24 * 7);
}
}]
}
from element.
https://jsfiddle.net/cinwell_li/smawz7cj/ 并没有报错
from element.
@QingWei-Li 找到问题了,date-picker.md
和 datetime-picker.md
文档错误,picker.$emit('pick', date)
接收的是 date 对象,不能接收时间戳
from element.
Related Issues (20)
- [Bug Report] win11下,el-upload多选不能鼠标一次框选多个 HOT 2
- [Bug Report] date-picker组件显示异常
- [Feature Request] 能否给date-picker的cell增加一个slot
- [Bug Report] el-time-picker is-range selectableRange设置时间范围options失效
- [Bug Report] 自定义主题服务报错 HOT 2
- [Bug Report] el-date-picker组件使用format格式化为中文单位时,下拉选择日期时间时显示有bug HOT 1
- [Bug Report] transfer 穿梭框,左边选中数据传到右边,怎么展示在右边panel最上边, 同理,右边选中数据传到左边,怎么展示在左边panel最上边?
- [Bug Report] element-ui的table组件,伸缩列缩到一起后,右侧操作列冻结列会有斑马纹断掉,而且操作列那一列会多出一列空列
- [Feature Request] 级联面板(el-cascader-panel)没有搜索功能?
- [Bug Report] el-date-picker component drop-down box content duplication problem
- [Bug Report] 在 el-date-picker 日期时间范围选择器中存在一个问题:在手动输入日期时间后,更改时间时会出现时分秒被禁用的情况。 HOT 1
- [Bug Report] el-tree 点击小三角时无法加载子节点动态数据
- [Bug Report] Select component on iOS intercepts the focus
- [Feature Request] 期望el-cascader filterable开启后搜索的结果展示提供slot HOT 1
- [Bug Report] 主题功能 Server Error 500 HOT 5
- [Feature Request] el-table-column的prop属性能否支持数组类型?Can the prop attribute of el-table-column support array type?
- [Bug Report] 树形表格和展开行不能一起使用吗?
- [Feature Request] Uploader Support for Folder selection with webkitdirectory attribute
- [Bug Report] select框设置filterable,在选中一个之后切屏,再切回来,组件的options会自动打开 HOT 1
- [Feature Request] table组件的多选能够根据table绑定的data渲染是否选中,使用toggleRowSelection方法不能满足需求
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.