mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-05-30 11:54:06 +03:00
feat: add event update:show-time-panel (#531)
This commit is contained in:
+5
-3
@@ -482,9 +482,11 @@ export default {
|
||||
...pick(this.$props, Object.keys(Component.props)),
|
||||
value: this.currentValue,
|
||||
};
|
||||
const content = (
|
||||
<Component {...{ props, on: { select: this.handleSelectDate }, ref: 'picker' }} />
|
||||
);
|
||||
const on = {
|
||||
...pick(this.$listeners, Component.emits || []),
|
||||
select: this.handleSelectDate,
|
||||
};
|
||||
const content = <Component {...{ props, on, ref: 'picker' }} />;
|
||||
return (
|
||||
<div class={`${this.prefixClass}-datepicker-body`}>
|
||||
{this.renderSlot('content', content, {
|
||||
|
||||
@@ -10,6 +10,7 @@ export default {
|
||||
default: 'mx',
|
||||
},
|
||||
},
|
||||
emits: ['select', 'update:show-time-panel'],
|
||||
props: {
|
||||
...CalendarPanel.props,
|
||||
...TimePanel.props,
|
||||
@@ -33,6 +34,9 @@ export default {
|
||||
value(val) {
|
||||
this.currentValue = val;
|
||||
},
|
||||
defaultTimeVisible(val) {
|
||||
this.$emit('update:show-time-panel', val);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
closeTimePanel() {
|
||||
|
||||
@@ -10,6 +10,7 @@ export default {
|
||||
default: 'mx',
|
||||
},
|
||||
},
|
||||
emits: ['select', 'update:show-time-panel'],
|
||||
props: {
|
||||
...CalendarRange.props,
|
||||
...TimeRange.props,
|
||||
@@ -33,6 +34,9 @@ export default {
|
||||
value(val) {
|
||||
this.currentValue = val;
|
||||
},
|
||||
defaultTimeVisible(val) {
|
||||
this.$emit('update:show-time-panel', val);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
closeTimePanel() {
|
||||
|
||||
Reference in New Issue
Block a user