<template>
  <view class="child-a">
    <view class="flex justify-between flex-row mb-10">
      <text>child A limit:</text>
      <text>{{limit}}</text>
    </view>
    <child-b v-if="limit>1" :limit="limit-1" />
  </view>
</template>

<script lang='uts'>
  import ChildB from './ChildB-options.uvue'

  export default {
    components: {
      ChildB
    },
    props: {
      limit: {
        type: Number,
        default: 0
      }
    }
  }
</script>