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
+4 -4
View File
@@ -41,9 +41,9 @@ export default createComponent({
setup(props, { emit, slots }) {
// use sync innerLoading state to avoid repeated loading in some edge cases
const loading = ref(false);
const rootRef = ref();
const root = ref();
const placeholderRef = ref();
const scrollParent = useScrollParent(rootRef);
const scrollParent = useScrollParent(root);
const check = () => {
nextTick(() => {
@@ -67,7 +67,7 @@ export default createComponent({
scrollParentRect.bottom - scrollParentRect.top;
/* istanbul ignore next */
if (!scrollParentHeight || isHidden(rootRef.value)) {
if (!scrollParentHeight || isHidden(root.value)) {
return false;
}
@@ -153,7 +153,7 @@ export default createComponent({
);
return (
<div ref={rootRef} role="feed" class={bem()} aria-busy={loading.value}>
<div ref={root} role="feed" class={bem()} aria-busy={loading.value}>
{props.direction === 'down' ? Content : Placeholder}
{renderLoading()}
{renderFinishedText()}