From 0dbc7465447164fef24327b5d494870832d798dd Mon Sep 17 00:00:00 2001
From: 李 <344137771@qq.com>
Date: Tue, 26 May 2026 11:15:18 +0800
Subject: [PATCH] 1
---
src/components/Transform/contract-futrue/index.vue | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/components/Transform/contract-futrue/index.vue b/src/components/Transform/contract-futrue/index.vue
index a4efed4..b90c753 100644
--- a/src/components/Transform/contract-futrue/index.vue
+++ b/src/components/Transform/contract-futrue/index.vue
@@ -3,7 +3,7 @@
<div class="contact-futrue">
<div class="text-24 text-grey mb-6">{{ $t('交割时间') }}</div>
<ul class="flex flex-wrap w-full">
- <li v-for="(item, index) in initFutrue.para" v-if="initFutrue.para" :key="item.uuid"
+ <li v-for="(item, index) in paraList" :key="item.uuid"
class="h-24 flex items-center mb-6" @click="onSelect(item, index)">
<p class="w-24 h-full flex justify-center items-center text-22 flex-1"
:class="active === item.para_id ? 'bg-light-blue text-white' : 'delivery_left_tab_background textColor'">{{
@@ -29,6 +29,12 @@
}
}
},
+ computed: {
+ paraList() {
+ const para = this.initFutrue && this.initFutrue.para
+ return Array.isArray(para) ? para : []
+ }
+ },
data() {
return {
active: '',
@@ -36,8 +42,8 @@
}
},
created() {
- if (this.initFutrue.para.length > 0) {
- this.active = this.initFutrue.para[0].para_id || ''
+ if (this.paraList.length > 0) {
+ this.active = this.paraList[0].para_id || ''
this.$emit('paraId', { id: this.active, index: 0 })
}
},
--
Gitblit v1.9.3