| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <template>
- <view class="safe-area-inset-bottom">
- <u-sticky style="margin-top: -4rpx;">
- <view class="flex">
- <view class="" style="width: 85%;">
- <u-tabs active-color="#FF9447" :list="list" :is-scroll="false" :current="current" @change="change">
- </u-tabs>
- </view>
- <view class="bg-white center" style="width: 15%;">
- <image @click="checkAll" style="width: 50rpx;height: 50rpx;" src="../../static/icon/setting.png"></image>
- </view>
- </view>
- </u-sticky>
- <card :current="current" @checkboxChange="checkboxChange" @checkAllChange="checkAllChange" :cardList="cardList" ref="cardRef"></card>
- </view>
- </template>
- <script>
- import card from "./comps/card.vue"
- export default {
- components:{
- card
- },
- data() {
- return {
- list: [{
- name: '发起'
- }, {
- name: '可参加'
- },
- {
- name:'已参加'
- }],
- current: 0,
- cardList: [{
- id: "1",
- checked: false,
- status:0
- },
- {
- id: "2",
- checked: false,
- status:1
- },
- {
- id: "3",
- checked: false,
- status:2
- },
- ],
- }
- },
- methods:{
- checkboxChange(e){
- let index=e.name
- this.cardList[index].checked=e.value
- },
- checkAllChange(e){
- this.cardList.forEach(item=>{
- item.checked = e.value
- })
- },
- change(index) {
- this.current = index
- },
- checkAll(){
- this.$refs.cardRef.showCheckAll()
- }
- }
- }
- </script>
- <style lang="scss" scoped>
-
- </style>
|