chore: format ref name

This commit is contained in:
chenjiahan
2020-08-26 11:49:35 +08:00
parent b0ea4bc1f6
commit e3a59afb07
3 changed files with 16 additions and 16 deletions
+3 -3
View File
@@ -27,12 +27,12 @@ export default createComponent({
emits: ['click-left', 'click-right'],
setup(props, { emit, slots }) {
const navBar = ref(null);
const height = ref(null);
const navBarRef = ref(null);
onMounted(() => {
if (props.placeholder && props.fixed) {
height.value = navBar.value.getBoundingClientRect().height;
height.value = navBarRef.value.getBoundingClientRect().height;
}
});
@@ -69,7 +69,7 @@ export default createComponent({
const { title, fixed, border, zIndex } = props;
return (
<div
ref={navBar}
ref={navBarRef}
style={{ zIndex }}
class={[bem({ fixed }), { [BORDER_BOTTOM]: border }]}
>