|
@@ -5,7 +5,9 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, onMounted, computed, nextTick } from "vue";
|
|
|
|
|
|
+import { ref, onMounted, computed, nextTick, getCurrentInstance } from "vue";
|
|
|
|
+
|
|
|
|
+const { ctx } = getCurrentInstance();
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
text: {
|
|
text: {
|
|
@@ -22,7 +24,7 @@ const containerHeight = computed(() => {
|
|
});
|
|
});
|
|
|
|
|
|
const getElementTopDistance = () => {
|
|
const getElementTopDistance = () => {
|
|
- const query = uni.createSelectorQuery();
|
|
|
|
|
|
+ const query = uni.createSelectorQuery().in(ctx);
|
|
query
|
|
query
|
|
.select(".empty-container")
|
|
.select(".empty-container")
|
|
.boundingClientRect((data) => {
|
|
.boundingClientRect((data) => {
|