chore: rename rootRef to root

This commit is contained in:
chenjiahan
2020-09-15 19:32:45 +08:00
parent b0ca6a997b
commit 1e7e7086d6
11 changed files with 46 additions and 49 deletions
+3 -3
View File
@@ -13,15 +13,15 @@ export default createComponent({
},
setup(props) {
const rootRef = ref();
const root = ref();
usePublicApi({
getPicker: () => rootRef.value && rootRef.value.getPicker(),
getPicker: () => root.value && root.value.getPicker(),
});
return () => {
const Component = props.type === 'time' ? TimePicker : DatePicker;
return <Component ref={rootRef} class={bem()} {...props} />;
return <Component ref={root} class={bem()} {...props} />;
};
},
});