Code Monkey home page Code Monkey logo

Comments (6)

QingWei-Li avatar QingWei-Li commented on April 20, 2024

我这边好像没这个问题,估计已经修掉了?
你试试用开发版,你 clone 这个项目下来,执行 npm run bootstrap && npm run dist 然后到你的项目下安装

# 你的项目目录
npm install [你 clone 的 element 项目目录]

from element.

isunkui avatar isunkui commented on April 20, 2024

@QingWei-Li 试过了,还是没有生效

from element.

QingWei-Li avatar QingWei-Li commented on April 20, 2024

第二个问题,我在文档页里并没有复现问题。你测试下文档页里会报错么,具体是哪一行?

from element.

isunkui avatar isunkui commented on April 20, 2024

@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.

QingWei-Li avatar QingWei-Li commented on April 20, 2024

https://jsfiddle.net/cinwell_li/smawz7cj/ 并没有报错

from element.

isunkui avatar isunkui commented on April 20, 2024

@QingWei-Li 找到问题了,date-picker.mddatetime-picker.md 文档错误,picker.$emit('pick', date) 接收的是 date 对象,不能接收时间戳

from element.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.