| | |
| | | :empty-text="$t('message.home.noData')" |
| | | > |
| | | <!-- 合约会显示buy和杠杆 --> |
| | | <el-table-column :label="$t('message.jiaoyi.heyue')" width="280"> |
| | | <el-table-column :label="$t('message.jiaoyi.heyue')" width="180"> |
| | | <template #default="scope"> |
| | | <div class="first-column"> |
| | | <span |
| | | class="direction" |
| | | :class="`direction-${scope.row.direction}`" |
| | | ></span> |
| | | <span class="name" |
| | | >{{ scope.row.name }} {{ $t("message.home.yongxu") }}</span |
| | | > |
| | | <span class="name" style="color: rgb(98, 200, 133)" |
| | | >{{ scope.row.name }} |
| | | </span> |
| | | <!-- <span class="lever_rate">{{ |
| | | scope.row.lever_rate ? `${scope.row.lever_rate}x` : "1x" |
| | | }}</span> --> |
| | |
| | | > --> |
| | | |
| | | <el-button class="btn" size="small" @click="handleAllClose(scope)">{{ |
| | | $t("message.home.pingcang") |
| | | $t("message.home.pingcang2") |
| | | }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | prop: "trade_avg_price", |
| | | label: "message.user.kaicangjiage", |
| | | }, |
| | | // { |
| | | // prop: "mark_price", |
| | | // label: "message.home.biaojijiage", |
| | | // }, |
| | | |
| | | { |
| | | prop: "direction", |
| | | label: "message.home.fangxiang", |
| | | formatter: this.directionFormatter, |
| | | }, |
| | | |
| | | { |
| | | prop: "lever_rate", |
| | | label: "message.home.gangganbeishu", |
| | | }, |
| | | { |
| | | prop: "change_ratio", |
| | | label: "message.home.baozhengjinbilv", |
| | | formatter: this.ratioFormatter, |
| | | // formatter: this.ratioFormatter, |
| | | }, |
| | | { |
| | | prop: "deposit", |
| | |
| | | formatterData(row) { |
| | | const ratio = this.ratioFormatter(row); |
| | | const profit = Number(row.profit).toFixed(4); |
| | | return `${profit}/n(${ratio})`; |
| | | return `${profit}/(${ratio})`; |
| | | }, |
| | | //设置单个单元格样式 行下标:rowIndex 列下标:columnIndex |
| | | cellStyle({ row, column, rowIndex, columnIndex }) { |
| | |
| | | ? { color: "#62C885" } |
| | | : { color: "#E05561" }; |
| | | } |
| | | if (columnIndex == 1) { |
| | | return row.profit > 0 ? { color: "#62C885" } : { color: "#E05561" }; |
| | | } |
| | | |
| | | if (columnIndex == 4) { |
| | | return row.direction === "buy" |
| | | ? { color: "#62C885" } |
| | | : { color: "#E05561" }; |
| | | } |
| | | }, |
| | | getList() { |
| | | const data = { |