index.vue 626 B

1234567891011121314151617181920212223
  1. <template>
  2. <view>
  3. <uni-segmented-control :current="current" class="MiSans-Normal" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00B760" style="background-color: #fff;"></uni-segmented-control>
  4. <Position v-if="current === 0"></Position>
  5. <Company v-else></Company>
  6. </view>
  7. </template>
  8. <script setup>
  9. import { ref } from 'vue'
  10. import Position from './position.vue'
  11. import Company from './company.vue'
  12. const current = ref(0)
  13. const controlList = ['职位', '企业']
  14. const handleChange = (e) => {
  15. current.value = e.currentIndex
  16. }
  17. </script>
  18. <style scoped lang="scss">
  19. </style>