| | |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <itemCard :activeObj="activeObj" :itemClick="itemClick" /> |
| | | <itemCard |
| | | @closingPosition="closingPosition" |
| | | :activeObj="activeObj" |
| | | :itemClick="itemClick" |
| | | /> |
| | | </template> |
| | | <div v-show="active !== '1'"> |
| | | <dataList ref="dataListref" :activeObj="activeObj" /> |
| | | <dataList |
| | | ref="dataListref" |
| | | :activeObj="activeObj" |
| | | @closingPosition="closingPosition" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | tabsArr: [ |
| | | { |
| | | title: this.$t("hometips"), |
| | | |
| | | name: "1", |
| | | bgc: "rgb(8, 82, 196)", |
| | | laber: "ALL", |
| | |
| | | created() { |
| | | this.getMoneys(); |
| | | }, |
| | | mounted() { |
| | | if (this.$route.query.index == "0") { |
| | | let arr = this.tabsArr.filter((item) => item.name == 4)[0]; |
| | | this.onClick(arr); |
| | | } else if (this.$route.query.index == "1") { |
| | | let arr = this.tabsArr.filter((item) => item.name == 2)[0]; |
| | | this.onClick(arr); |
| | | } else { |
| | | } |
| | | }, |
| | | methods: { |
| | | closingPosition() { |
| | | this.getMoneys(); |
| | | }, |
| | | itemClick() { |
| | | this.$refs.dataListref.getList(this.activeObj.laber); |
| | | this.getMoneys(); |
| | | }, |
| | | async getMoneys() { |
| | | const res = await getMoney(); |
| | |
| | | } |
| | | }); |
| | | }); |
| | | let obj = arr.filter((item) => item.name == this.active)[0]; |
| | | this.activeObj = obj; |
| | | console.log(obj, "0000000", res.data); |
| | | this.tabsArr = arr; |
| | | this.$forceUpdate(); // 强制Vue重新渲染 |
| | | } |
| | | }, |
| | | onClick(e) { |
| | | console.log(e, "===="); |
| | | this.active = e.name; |
| | | this.activeObj = e; |
| | | this.getMoneys(); |
| | |
| | | // padding: 0.10667rem 0.34667rem; |
| | | color: #fff; |
| | | } |
| | | </style> |
| | | </style> |