diff --git a/src/views/CIDList.vue b/src/views/CIDList.vue index 74c6acc..a5772cf 100644 --- a/src/views/CIDList.vue +++ b/src/views/CIDList.vue @@ -14,6 +14,7 @@ import {ElMessage, ElLoading} from "element-plus"; export default { data() { return { + tableLoading: false, ip: "", tableData: [], tokenData: { @@ -59,11 +60,7 @@ export default { // 它们可以在模板中作为事件处理器绑定 methods: { async getCIDList() { - const loading = ElLoading.service({ - lock: true, - text: '加载中', - background: 'rgba(0, 0, 0, 0.7)', - }); + this.tableLoading = true; let result = {}; try { result = await getCIDListService(this.tokenData); @@ -72,7 +69,7 @@ export default { } catch (e) { console.log(e); } finally { - loading.close(); + this.tableLoading = false; } }, onSubmit() { @@ -109,7 +106,7 @@ export default { } catch (e) { console.log(e); } finally { - loading.close(); + this.tableLoading = false; } }, toRunCIDLog(index) { @@ -146,7 +143,7 @@ export default { } catch (e) { console.log(e); } finally { - loading.close(); + this.tableLoading = false; } }, async updateButtonCID(index) { @@ -179,7 +176,7 @@ export default { } catch (e) { console.log(e); } finally { - loading.close(); + this.tableLoading = false; } }, async updateCID() { @@ -202,7 +199,7 @@ export default { } catch (e) { console.log(e); } finally { - loading.close(); + this.tableLoading = false; } }, async getIpClient() { @@ -399,7 +396,7 @@ export default { - + :row-style="this.tableRowClassName"