<template>
  <view class="selector-query-child-view">
    <text class="selector-query-child-text">selector-query-child</text>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        top: 0
      }
    },
    mounted() {
      uni.createSelectorQuery().in(this).select('.selector-query-child-view').boundingClientRect().exec((ret) => {
        if (ret.length == 1) {
          const nodeInfo = ret[0] as NodeInfo;
          this.top = nodeInfo.top!
        }
      })
    }
  }
</script>

<style>
  .selector-query-child-view {
    margin-top: 15px;
  }
</style>
