| | |
| | | </div> |
| | | </van-list> |
| | | </template> |
| | | |
| | | <div v-if="type === 'position'"> |
| | | <PerpetualPositionList |
| | | :list-data="orderHold" |
| | | ></PerpetualPositionList> |
| | | </div> |
| | | </van-tab> |
| | | </van-tabs> |
| | | </div> |
| | |
| | | import assetsHead from "@/components/assets-head"; |
| | | import PerpetualEntrustList from "@/components/perpetual-entrust-list/index.vue"; |
| | | import PerpetualHistoryPosition from "@/components/perpetual-history-position/index.vue"; |
| | | import PerpetualPositionList from "@/components/perpetual-position-list/index.vue"; |
| | | import { _orderListCur, _orderListHold } from "@/API/trade.api"; |
| | | import { _getCoins } from "@/API/home.api"; |
| | | import { List, Tab, Tabs, DropdownMenu, DropdownItem } from "vant"; |
| | |
| | | data() { |
| | | return { |
| | | type: "orders", |
| | | orderHold: [], // 永续持有仓位 |
| | | dataList: { |
| | | orders: [], |
| | | hisorders: [], |
| | |
| | | { |
| | | title: this.$t("历史委托"), |
| | | type: "hisorders", |
| | | }, |
| | | { |
| | | title: this.$t("当前持仓"), |
| | | type: "position", |
| | | }, |
| | | ], |
| | | loading: false, |
| | |
| | | this.$router.go(-1); |
| | | }, |
| | | async fetchList(symbol) { |
| | | if (this.type === "position") { |
| | | _orderListHold().then((data) => { |
| | | this.orderHold = data; |
| | | }); |
| | | return; |
| | | } |
| | | const _api = this.type === "orders" ? _orderListCur : _orderListHold; |
| | | const type = this.type; |
| | | symbol = ""; |
| | |
| | | components: { |
| | | PerpetualEntrustList, |
| | | PerpetualHistoryPosition, |
| | | PerpetualPositionList, |
| | | assetsHead, |
| | | [DropdownMenu.name]: DropdownMenu, |
| | | [DropdownItem.name]: DropdownItem, |