fix(DatetimePicker): getPicker method not work (#5710)

This commit is contained in:
陈嘉涵
2020-02-22 17:55:05 +08:00
parent 7cc887a20c
commit e48e5d47cd
4 changed files with 15 additions and 2 deletions
+8
View File
@@ -10,11 +10,19 @@ export default createComponent({
...DatePicker.props,
},
methods: {
// @exposed-api
getPicker() {
return this.$refs.root.getPicker();
},
},
render() {
const Component = this.type === 'time' ? TimePicker : DatePicker;
return (
<Component
ref="root"
class={bem()}
{...{
props: this.$props,