ant a-range-picker 监听allowClear关闭事件清空日期

 <a-range-picker :default-value="[moment(form_data.date_range[0], dateFormat), moment(form_data.date_range[1], dateFormat)]" @change="onChange" allowClear @mouseenter="clear_calendar"   :format="dateFormat" />
      clear_calendar(e) {
            //监听allowClear关闭事件
            let clearDom = e.path[0].children[0].children[3]
            clearDom.addEventListener( "click", () => {
                this.form_data.date_range=[]
            })
        }

 

posted @ 2021-09-13 13:48  哪啊哪啊神去村  阅读(2)  评论(0编辑  收藏  举报