update DatePicker
update DatePicker
This commit is contained in:
parent
13be443453
commit
2533a192dd
4 changed files with 76 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div :class="[prefixCls + '-body-wrapper']">
|
||||
<div :class="classes">
|
||||
<div :class="[prefixCls + '-sidebar']" v-if="shortcuts">
|
||||
<div
|
||||
:class="[prefixCls + '-shortcut']"
|
||||
|
@ -91,6 +91,14 @@
|
|||
}
|
||||
},
|
||||
computed: {
|
||||
classes () {
|
||||
return [
|
||||
`${prefixCls}-body-wrapper`,
|
||||
{
|
||||
[`${prefixCls}-with-sidebar`]: this.shortcuts.length
|
||||
}
|
||||
]
|
||||
},
|
||||
yearLabel () {
|
||||
const year = this.year;
|
||||
if (!year) return '';
|
||||
|
@ -122,7 +130,8 @@
|
|||
this.$emit('on-pick', '');
|
||||
},
|
||||
handleShortcutClick (shortcut) {
|
||||
|
||||
if (shortcut.value) this.$emit('on-pick', shortcut.value());
|
||||
if (shortcut.onClick) shortcut.onClick(this);
|
||||
},
|
||||
iconBtnCls (direction, type = '') {
|
||||
return [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue