| | |
| | | <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'">{{ |
| | |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | paraList() { |
| | | const para = this.initFutrue && this.initFutrue.para |
| | | return Array.isArray(para) ? para : [] |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | active: '', |
| | |
| | | } |
| | | }, |
| | | 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 }) |
| | | } |
| | | }, |