| | |
| | | <template> |
| | | <div class="ware"> |
| | | <div style="padding: 0 0.4rem 0.4rem"> |
| | | <!-- <div class="tabs-box" onscroll="handleScroll"> |
| | | <div |
| | | v-for="(item, index) in tabsArr" |
| | | :key="index" |
| | | :class=" |
| | | item.name == active ? 'tabs-item-active tabs-item' : 'tabs-item' |
| | | " |
| | | @click="onClick(item)" |
| | | > |
| | | {{ item.title }} |
| | | </div> |
| | | </div> --> |
| | | <van-tabs v-model="active" color="#0066ed"> |
| | | <van-tab :title="$t('hj52')" name="2"></van-tab> |
| | | <van-tab :title="$t('黄金原油')" name="1"></van-tab> |
| | | </van-tabs> |
| | | |
| | | <template v-if="active === '1'"> |
| | | <div v-for="(item, index) in tabsArr" :key="index"> |
| | | <card :item="item" /> |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <itemCard |
| | | @closingPosition="closingPosition" |
| | | :activeObj="activeObj" |
| | | :itemClick="itemClick" |
| | | /> |
| | | </template> |
| | | <div v-show="active !== '1'"> |
| | | <itemCard |
| | | @closingPosition="closingPosition" |
| | | :activeObj="activeObj" |
| | | :itemClick="itemClick" |
| | | /> |
| | | <div> |
| | | <dataList |
| | | ref="dataListref" |
| | | :activeObj="activeObj" |
| | |
| | | // symbol: "$", |
| | | // }, |
| | | { |
| | | title: this.$t("ydgs"), |
| | | title: this.$t("hj52"), |
| | | assname: this.$t("沙特股总资产"), |
| | | name: "2", |
| | | bgc: "rgb(12, 175, 226)", |
| | | laber: "ST", |
| | | symbolCode: "INR", |
| | | symbol: "₹" |
| | | }, |
| | | // { |
| | | // title: this.$t("ydgs"), |
| | | // assname: this.$t("印股总资产"), |
| | | } |
| | | // { |
| | | // title: this.$t("黄金原油"), |
| | | // assname: this.$t("黄金原油"), |
| | | // name: "2", |
| | | // bgc: "rgb(12, 175, 226)", |
| | | // laber: "IN", |
| | | // symbolCode: "INR", |
| | | // symbol: "₹", |
| | | // }, |
| | | // symbol: "₹" |
| | | // } |
| | | // { |
| | | // title: this.$t("马来西亚"), |
| | | // assname: this.$t("馬股总资产"), |
| | |
| | | let arr = this.tabsArr.filter( |
| | | item => item.laber == this.$route.query.buyType |
| | | )[0]; |
| | | this.onClick(arr); |
| | | // this.onClick(arr); |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }); |
| | | }); |
| | | let obj = arr.filter(item => item.name == this.active)[0]; |
| | | console.log("getMoneys: ", arr, obj); |
| | | this.activeObj = obj; |
| | | this.tabsArr = arr; |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |