fix: 9/14场排序

main
jcgitadmin 2026-01-14 22:05:28 +08:00
parent 671ec7e158
commit c8966e62af
1 changed files with 8 additions and 2 deletions

View File

@ -1,9 +1,9 @@
<template>
<div class="bg-white" :class="props.isInCart?'q-px-xl':''">
<div v-for="item,index in props.item.matches" :key="index"
<div v-for="item,index in matches" :key="index"
class="row no-wrap items-center q-py-md q-px-sm relative-position">
<div v-if="!props.isInCart" class="column text-center text-caption q-py-xs">
<span class="text-grey">场次{{ index+1 }}</span>
<span class="text-grey">场次{{ item.no }}</span>
<span class="text-green">{{ item.competition_name }}</span>
<span class="text-grey">{{ item.match_time_hour }}</span>
<span class="text-red" v-if="item.match_id" @click="router.push({path:'/score/detail/jczq',query:{id: item.match_id}})"></span>
@ -59,6 +59,12 @@ const props = defineProps({
const emit = defineEmits(['select'])
const cart = useCartStore()
const matches = computed(()=>{
return JSON.parse(JSON.stringify(props.item.matches)).sort((a,b)=>{
return a.no > b.no ? 1 : -1
})
})
function onClickItem(item,playType, value) {
cart.selectOdd(item, playType, value)
emit('select', item, playType, value)