feat: add useRect

This commit is contained in:
chenjiahan
2020-08-26 15:24:50 +08:00
parent b12fdad916
commit 216d326158
3 changed files with 20 additions and 3 deletions
+4 -1
View File
@@ -4,6 +4,9 @@ import { ref, onMounted } from 'vue';
import { createNamespace } from '../utils';
import { BORDER_BOTTOM } from '../utils/constant';
// Compositions
import { useHeight } from '../api/use-rect';
// Components
import Icon from '../icon';
@@ -32,7 +35,7 @@ export default createComponent({
onMounted(() => {
if (props.placeholder && props.fixed) {
height.value = navBarRef.value.getBoundingClientRect().height;
height.value = useHeight(navBarRef);
}
});