{"ast":null,"code":"//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nexport default {\n name: \"ContractFutrue\",\n props: {\n initFutrue: {\n type: Object,\n default() {\n return {};\n }\n }\n },\n data() {\n return {\n active: \"\",\n initParam: [] // 初始化参数\n };\n },\n created() {\n this.active = this.initFutrue && this.initFutrue.para ? this.initFutrue.para[0].para_id : \"\";\n this.$emit(\"paraId\", {\n id: this.active,\n index: 0\n });\n },\n methods: {\n onSelect(item, index) {\n // 选中\n this.active = item.para_id;\n this.$emit(\"paraId\", {\n id: this.active,\n index\n });\n }\n }\n};","map":{"version":3,"names":["name","props","initFutrue","type","Object","default","data","active","initParam","created","para","para_id","$emit","id","index","methods","onSelect","item"],"sources":["src/components/contract-futrue/index.vue"],"sourcesContent":["<template>\n <div class=\"contact-futrue box-show\">\n <div class=\"font-24 text-grey mb-24\">{{ $t(\"交割时间\") }}</div>\n <ul class=\"flex flex-wrap w-full\">\n <li\n v-for=\"(item, index) in initFutrue.para\"\n :key=\"item.para_id\"\n class=\"h-92 flex items-center mb-22\"\n @click=\"onSelect(item, index)\"\n >\n <p\n class=\"w-95 h-full flex justify-center items-center font-22 flex-1\"\n :class=\"\n active === item.para_id\n ? 'bg-light-blue text-white'\n : 'bgDark textColor'\n \"\n >\n {{ item.time_num + item.time_unit.substr(0, 1) }}\n </p>\n <p\n class=\"w-125 h-full flex justify-center items-center font-22 flex-1\"\n :class=\"\n active === item.para_id\n ? 'bg-dark-blue text-white'\n : 'contBackground textColor'\n \"\n >\n {{ item.profit_ratio }}%\n </p>\n </li>\n </ul>\n </div>\n</template>\n\n<script>\nexport default {\n name: \"ContractFutrue\",\n props: {\n initFutrue: {\n type: Object,\n default() {\n return {};\n },\n },\n },\n data() {\n return {\n active: \"\",\n initParam: [], // 初始化参数\n };\n },\n created() {\n this.active =\n this.initFutrue && this.initFutrue.para\n ? this.initFutrue.para[0].para_id\n : \"\";\n this.$emit(\"paraId\", { id: this.active, index: 0 });\n },\n methods: {\n onSelect(item, index) {\n // 选中\n this.active = item.para_id;\n this.$emit(\"paraId\", { id: this.active, index });\n },\n },\n};\n</script>\n<style scoped lang=\"scss\">\n.bgDark {\n @include themify() {\n background: themed(\"tab_background2\");\n }\n}\n\n.bg-light-blue {\n background: #1d91ff;\n}\n\n.bg-dark-blue {\n background: #1255a3;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;EACAA,IAAA;EACAC,KAAA;IACAC,UAAA;MACAC,IAAA,EAAAC,MAAA;MACAC,QAAA;QACA;MACA;IACA;EACA;EACAC,KAAA;IACA;MACAC,MAAA;MACAC,SAAA;IACA;EACA;EACAC,QAAA;IACA,KAAAF,MAAA,GACA,KAAAL,UAAA,SAAAA,UAAA,CAAAQ,IAAA,GACA,KAAAR,UAAA,CAAAQ,IAAA,IAAAC,OAAA,GACA;IACA,KAAAC,KAAA;MAAAC,EAAA,OAAAN,MAAA;MAAAO,KAAA;IAAA;EACA;EACAC,OAAA;IACAC,SAAAC,IAAA,EAAAH,KAAA;MACA;MACA,KAAAP,MAAA,GAAAU,IAAA,CAAAN,OAAA;MACA,KAAAC,KAAA;QAAAC,EAAA,OAAAN,MAAA;QAAAO;MAAA;IACA;EACA;AACA","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|