refactor(Calendar): refactor with composition api

This commit is contained in:
chenjiahan
2020-09-24 19:01:09 +08:00
parent 749e4ae73b
commit fc50e26416
2 changed files with 269 additions and 271 deletions
+4 -2
View File
@@ -253,7 +253,9 @@ export default createComponent({
watch(
() => props.realRowHeight,
() => {
height.value = useRect(monthRef).height;
nextTick(() => {
height.value = useRect(monthRef).height;
});
}
);
@@ -269,9 +271,9 @@ export default createComponent({
});
useExpose({
height,
getDate,
getTitle,
getHeight: () => height.value,
setVisible,
scrollIntoView,
});