Files
2022-09-13 18:23:31 +08:00

56 lines
1.1 KiB
Vue

<template>
<view>
<u-tabs class="tabs" :list="tabList" @change="handleTabClick"></u-tabs>
<!-- <scroll-view scroll-y="true"> -->
<!-- <view> -->
<QualityInspection v-if="activeIndex==0"></QualityInspection>
<SecurityInspection v-else-if="activeIndex==1"></SecurityInspection>
<!-- </view> -->
<!-- </scroll-view> -->
</view>
</template>
<script>
import QualityInspection from './quality_inspection/quality_inspection.vue'
import SecurityInspection from './security_inspection/security_inspection.vue'
export default {
name: 'MobileInspection',
components: {
QualityInspection,
SecurityInspection
},
data() {
return {
activeIndex: 0,
tabList: [{
name: '质量巡检',
}, {
name: '安全巡检',
}, ]
}
},
methods: {
handleTabClick(item) {
console.log(item);
this.activeIndex = item.index;
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .u-tabs__wrapper__nav {
justify-content: space-between;
.u-tabs__wrapper__nav__item {
width: 320rpx;
}
}
.test {
width: 370rpx;
height: 100rpx;
background-color: indianred;
}
</style>