3cf7cfd1
梁灏
update DatePicker
|
1
2
3
4
|
const prefixCls = 'ivu-picker-panel';
const datePrefixCls = 'ivu-date-picker';
export default {
|
29a91fbb
Sergio Crisostomo
Correct passing o...
|
5
6
7
8
9
10
|
props: {
confirm: {
type: Boolean,
default: false
}
},
|
3cf7cfd1
梁灏
update DatePicker
|
11
12
13
14
15
16
|
methods: {
iconBtnCls (direction, type = '') {
return [
`${prefixCls}-icon-btn`,
`${datePrefixCls}-${direction}-btn`,
`${datePrefixCls}-${direction}-btn-arrow${type}`,
|
b0893113
jingsam
add eslint
|
17
|
];
|
3cf7cfd1
梁灏
update DatePicker
|
18
19
20
21
|
},
handleShortcutClick (shortcut) {
if (shortcut.value) this.$emit('on-pick', shortcut.value());
if (shortcut.onClick) shortcut.onClick(this);
|
b9041a0d
梁灏
DatePicker add co...
|
22
23
|
},
handlePickClear () {
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
24
|
this.resetView();
|
b9041a0d
梁灏
DatePicker add co...
|
25
26
27
|
this.$emit('on-pick-clear');
},
handlePickSuccess () {
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
28
|
this.resetView();
|
b9041a0d
梁灏
DatePicker add co...
|
29
|
this.$emit('on-pick-success');
|
68e9b100
梁灏
update DatePicker
|
30
31
32
|
},
handlePickClick () {
this.$emit('on-pick-click');
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
},
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();
},
|
90ebd5a7
Sergio Crisostomo
Expose changed da...
|
47
48
|
handleConfirm(visible, type) {
this.$emit('on-pick', this.dates, visible, type || this.type);
|
ca8e830c
Sergio Crisostomo
move files to sub...
|
49
|
},
|
6017ed75
Sergio Crisostomo
update scroll whe...
|
50
|
onToggleVisibility(open){
|
755693b5
Sergio Crisostomo
update also timeS...
|
51
|
const {timeSpinner, timeSpinnerEnd} = this.$refs;
|
6017ed75
Sergio Crisostomo
update scroll whe...
|
52
|
if (open && timeSpinner) timeSpinner.updateScroll();
|
755693b5
Sergio Crisostomo
update also timeS...
|
53
|
if (open && timeSpinnerEnd) timeSpinnerEnd.updateScroll();
|
6017ed75
Sergio Crisostomo
update scroll whe...
|
54
|
}
|
3cf7cfd1
梁灏
update DatePicker
|
55
|
}
|
b0893113
jingsam
add eslint
|
56
|
};
|