diff --git a/src/components/order-list/order-list-com.vue b/src/components/order-list/order-list-com.vue index 8b92f04d582f2bf3f97843be7ffa4767bced3ba3..f7a1ab139847b154b958fd723b21b9f0c4fba951 100644 --- a/src/components/order-list/order-list-com.vue +++ b/src/components/order-list/order-list-com.vue @@ -127,7 +127,7 @@ export default { buttonList.forEach((item) => { item.state = false; }); - buttonList.unshift({ id: 0, name: "全部", state: false }); + buttonList.unshift({ id: 0, name: "全部", state: true }); buttonList.push({ id: "cloud", name: "云资源", state: false }); buttonList.push({ id: "app", name: "应用镜像", state: false }); this.buttonList = buttonList; @@ -147,6 +147,12 @@ export default { } this.buttonList[0].state = !this.buttonList[0].state; } + let i = this.buttonList.findIndex((item) => { + return item.state == true; + }); + if (i == -1) { + this.buttonList[0].state = true; + } this.pagination.page = 1; this.getData(); }, @@ -179,11 +185,7 @@ export default { } } }); - if (arr.length == 0) { - service = 1; - app = 1; - resource = 1; - } + // console.log(service, app, resource); let params = { select: this.search, page: this.pagination.page, diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue index 037fa439a81aef147518df9e2d80cec69a7cadb5..97fcef751422f9695bb4333b0135bda5ec644907 100644 --- a/src/components/shop-cloud/shop-cloud.vue +++ b/src/components/shop-cloud/shop-cloud.vue @@ -564,7 +564,7 @@ -