<template>
  <view class="box defaultBgc">
    <uni-segmented-control :current="current" :values="controlList" @clickItem="handleChange" styleType="text" activeColor="#00897B" style="background-color: #fff"></uni-segmented-control>
    <scroll-view class="scrollBox" scroll-y="true" @scrolltolower="loadingMore">
      <view v-if="position.length"></view>
      <view v-else class="text-center">
        <view class="nodata-img-parent">
          <image src="https://minio.citupro.com/dev/static/nodata.png" mode="widthFix" style="width: 100vw;height: 100vh;"></image>
        </view>
        <view class="color-999">暂无职位</view>
      </view>
      <uni-fab ref="fab" :pattern="{ iconColor: '#fff', buttonColor : '#00897B' }" :popMenu="false" vertical="bottom" horizontal="right" @fabClick="fabClick" />
    </scroll-view>
  </view>
</template>

<script setup>
import { ref } from 'vue'

const current = ref(0)
const controlList = ['招聘中', '已关闭']
const position = ref([])
const fab = ref()

const handleChange = (e) => {
  current.value = e.currentIndex
}

const loadingMore = () => {}

// 发布职位
const fabClick = () => {
  
}

</script>

<style scoped lang="scss">
.box {
  height: 100vh;
  overflow: hidden;
  padding-bottom: 120rpx;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
</style>
