3cf7cfd1
梁灏
update DatePicker
|
1
2
3
4
5
6
7
8
9
10
|
const prefixCls = 'ivu-picker-panel';
const datePrefixCls = 'ivu-date-picker';
export default {
methods: {
iconBtnCls (direction, type = '') {
return [
`${prefixCls}-icon-btn`,
`${datePrefixCls}-${direction}-btn`,
`${datePrefixCls}-${direction}-btn-arrow${type}`,
|
b0893113
jingsam
add eslint
|
11
|
];
|
3cf7cfd1
梁灏
update DatePicker
|
12
13
14
15
|
},
handleShortcutClick (shortcut) {
if (shortcut.value) this.$emit('on-pick', shortcut.value());
if (shortcut.onClick) shortcut.onClick(this);
|
b9041a0d
梁灏
DatePicker add co...
|
16
17
|
},
handlePickClear () {
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
18
|
this.resetView();
|
b9041a0d
梁灏
DatePicker add co...
|
19
20
21
|
this.$emit('on-pick-clear');
},
handlePickSuccess () {
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
22
|
this.resetView();
|
b9041a0d
梁灏
DatePicker add co...
|
23
|
this.$emit('on-pick-success');
|
68e9b100
梁灏
update DatePicker
|
24
25
26
|
},
handlePickClick () {
this.$emit('on-pick-click');
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
},
resetView(){
setTimeout(
() => this.currentView = this.selectionMode,
500 // 500ms so the dropdown can close before changing
);
},
handleClear() {
this.dates = this.dates.map(() => null);
this.rangeState = {};
this.$emit('on-pick', this.dates);
this.handleConfirm();
// if (this.showTime) this.$refs.timePicker.handleClear();
},
handleConfirm(visible) {
this.$emit('on-pick', this.dates, visible);
},
|
3cf7cfd1
梁灏
update DatePicker
|
45
|
}
|
b0893113
jingsam
add eslint
|
46
|
};
|