浏览代码

修复bug

wzl 2 年之前
父节点
当前提交
c06150321f

+ 7 - 10
src/views/billing/plan.vue

@@ -59,15 +59,6 @@ export default class Plan extends Vue {
     this.getPlanList(this.currentPage)
   }
 
-  mounted () {
-    if (this.currentPage <= 1) {
-      this.disabledPrevBtn = true
-    }
-    if (this.currentPage > this.totalPageNum) {
-      this.disabledNextBtn = true
-    }
-  }
-
   // 获取plan列表数据
   getPlanList (page:number) {
     getBalanceRecordList({
@@ -79,7 +70,13 @@ export default class Plan extends Vue {
         for (let i = 0; i < res.data.records.length; i++) {
           this.tableData.push(res.data.records[i])
           this.totalNum = res.data.total
-          this.totalPageNum = Math.ceil((res.data.total + res.data.total % 8) / 8)
+          this.totalPageNum = Math.ceil(res.data.total / 8)
+          if (this.currentPage <= 1) {
+            this.disabledPrevBtn = true
+          }
+          if (this.currentPage >= this.totalPageNum) {
+            this.disabledNextBtn = true
+          }
         }
       } else {
         this.$message.error('Failed to connect.')

+ 5 - 0
src/views/projects/api/apiKeys.vue

@@ -346,6 +346,11 @@ export default class apikeys extends Vue {
     .secret-key-input .el-input__inner[type=''] {
       text-overflow: ellipsis;
     }
+    .el-table__body {
+      // 使表格兼容safari,不错位
+      width: 100%;
+      table-layout: fixed !important;
+    }
   }
 }
 </style>

+ 8 - 0
src/views/projects/dashboard.vue

@@ -121,6 +121,7 @@
         </div>
       </div>
       <div class="chart" ref="chart"></div>
+      <p class="stats-text">Stats are updated every hour</p>
     </div>
     <div class="cover" v-show="showCalender" @click.self="showCalender = false"></div>
   </div>
@@ -803,6 +804,13 @@ export default class dashBoard extends Vue {
         }
       }
     }
+    .stats-text {
+      text-align: left;
+      font-size: 14px;
+      line-height: 1;
+      color: #43474D;
+      margin-top: -20px;
+    }
   }
 }
 .chart {

+ 3 - 3
src/views/projects/user/webhooks.vue

@@ -393,9 +393,9 @@ export default class webhooks extends Vue {
       }
     }
     .el-table__body {
-    // 使表格兼容safari,不错位
-    width: 100%;
-    table-layout: fixed !important;
+      // 使表格兼容safari,不错位
+      width: 100%;
+      table-layout: fixed !important;
     }
   }
 }