diff --git a/packages/taro-components/virtual-list/react/createListComponent.js b/packages/taro-components/virtual-list/react/createListComponent.js index 19b3c73eccc1..98f43ddcc245 100644 --- a/packages/taro-components/virtual-list/react/createListComponent.js +++ b/packages/taro-components/virtual-list/react/createListComponent.js @@ -2,7 +2,7 @@ /* eslint-disable no-case-declarations */ /* eslint-disable no-void */ /* eslint-disable no-return-assign */ -import Taro from '@tarojs/taro' +import { createSelectorQuery } from '@tarojs/taro' import { getRTLOffsetType } from '../domHelpers' import { memoizeOne } from '../memoize' import { createElement, PureComponent } from 'react' @@ -22,7 +22,7 @@ export function isRtlFunc ({ direction }) { return direction === 'rtl' } export function getRectSize (id, success = () => {}, fail = () => {}) { - const query = Taro.createSelectorQuery() + const query = createSelectorQuery() query.select(id).boundingClientRect((res) => { if (res) { success(res)