| | |
| | | <template v-for="item in sheetList"> |
| | | <el-collapse-item :title="item.title" :name="item.type"> |
| | | <div class="sheet-list grid grid-cols-5 gap-4 justify-items-center"> |
| | | <div class="sheet-item cursor-pointer flex justify-center items-center" v-for="index in item.total" @click=""> |
| | | <div class="sheet-item cursor-pointer flex justify-center items-center" v-for="index in item.total" @click="sheetClick(item,index)" :class="itemClass(item.type, index)"> |
| | | {{ index }} |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | const categroy = ref(0); |
| | | const sheetIndex = ref(0); |
| | | |
| | | const itemClass = (type,index) => { |
| | | return { |
| | | active: categroy.value === type && sheetIndex.value === index |
| | | } |
| | | } |
| | | |
| | | |
| | | const sheetList = ref([ |
| | |
| | | const handleChange = () => { |
| | | |
| | | }; |
| | | |
| | | const sheetClick = (item, index) => { |
| | | categroy.value = item.type; |
| | | sheetIndex.value = index; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | |
| | | background-color: #fff; |
| | | color: #374151; |
| | | } |
| | | |
| | | .active { |
| | | border-color: #3680fa; |
| | | } |
| | | </style> |