fix: 9/14场排序
parent
671ec7e158
commit
c8966e62af
|
|
@ -1,9 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="bg-white" :class="props.isInCart?'q-px-xl':''">
|
<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">
|
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">
|
<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-green">{{ item.competition_name }}</span>
|
||||||
<span class="text-grey">{{ item.match_time_hour }}</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>
|
<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 emit = defineEmits(['select'])
|
||||||
const cart = useCartStore()
|
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) {
|
function onClickItem(item,playType, value) {
|
||||||
cart.selectOdd(item, playType, value)
|
cart.selectOdd(item, playType, value)
|
||||||
emit('select', item, playType, value)
|
emit('select', item, playType, value)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue