mirror of
https://github.com/youzan/vant.git
synced 2025-10-21 03:11:15 +00:00
chore: rename rootRef to root
This commit is contained in:
@@ -24,14 +24,14 @@ export default createComponent({
|
||||
active: false,
|
||||
});
|
||||
|
||||
const rootRef = ref();
|
||||
const height = useHeight(rootRef);
|
||||
const root = ref();
|
||||
const height = useHeight(root);
|
||||
|
||||
const { parent } = useParent(INDEX_BAR_KEY, {
|
||||
props,
|
||||
state,
|
||||
height,
|
||||
rootRef,
|
||||
root,
|
||||
});
|
||||
|
||||
const isSticky = () => state.active && parent.props.sticky;
|
||||
@@ -54,10 +54,7 @@ export default createComponent({
|
||||
const sticky = isSticky();
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={rootRef}
|
||||
style={{ height: sticky ? `${height.value}px` : null }}
|
||||
>
|
||||
<div ref={root} style={{ height: sticky ? `${height.value}px` : null }}>
|
||||
<div
|
||||
style={anchorStyle.value}
|
||||
class={[bem({ sticky }), { [BORDER_BOTTOM]: sticky }]}
|
||||
|
Reference in New Issue
Block a user