| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <template>
- <view class="container">
- <!-- 分段器区域 -->
- <common-controlTag :tagList="tagList" :currentIndex="currentIndex" @change="changeIndex"></common-controlTag>
- <!-- 发起申请区域 -->
- <view v-if="currentIndex == 0">
- <school-form-launch @change="handleChange"></school-form-launch>
- </view>
- <!-- 申请记录区域 -->
- <view v-if="currentIndex == 1">
- <school-form-record></school-form-record>
- </view>
- </view>
- </template>
- <script setup>
- import { ref } from 'vue'
- // 分段器数组
- const tagList = ['发起申请', '申请记录']
- // 分段器当前索引
- const currentIndex = ref(0)
- // 切换分段器的回调
- const changeIndex = (e) => {
- currentIndex.value = e
- }
- // 自定义事件
- const handleChange = (e) => {
- // console.log(e)
- currentIndex.value = e
- }
- </script>
- <style lang="scss" scoped>
- .container {
- padding: 20rpx 18rpx;
- min-height: 100vh;
- }
- </style>
|