Browse Source

增加测试时执行按钮置灰的逻辑

feix0518 2 days ago
parent
commit
cc1c6e7539
2 changed files with 12 additions and 4 deletions
  1. 9 1
      client/src/App.vue
  2. 3 3
      platform/src/Layout.vue

+ 9 - 1
client/src/App.vue

@@ -16,7 +16,7 @@
       <option value="https://">https://</option>
     </select>
     <input type="text" v-model="targetUrl" placeholder="请输入网站地址">
-    <button @click="fetchData">测试</button>
+    <button :disabled="loading" @click="fetchData">测试</button>
     <!-- <p style="white-space: pre-wrap; font-size: 20px; " v-show="!loading" >{{ title1 }}</p>
      <p style="white-space: pre-wrap;">{{ message }}</p>
 
@@ -281,6 +281,14 @@ table.k6-table td {
   color: #000;
   text-align: center;
 }
+button:disabled {
+  background-color: #cccccc;
+  cursor: not-allowed;
+}
+
+button:disabled:hover {
+  background-color: #cccccc;
+}
 
 /* table.k6-table th {
     text-align: center;

+ 3 - 3
platform/src/Layout.vue

@@ -72,9 +72,9 @@ const leftMenuData = ref([
     label: '节点选择',
     icon: 'fas fa-cogs',
     children: [
-      { label: '国内节点', value: 'http://192.168.0.203:8080', icon: 'fas fa-wrench' },
-      { label: '香港节点', value: 'http://192.168.0.203:8080', icon: 'fas fa-wrench' },
-      { label: '日本节点', value: '', icon: 'fas fa-wrench' },
+      { label: '香港节点', value: 'http://54.46.9.88:9001', icon: 'fas fa-wrench' },
+      { label: '国内节点(建设中)', value: 'http://54.46.9.88:9001', icon: 'fas fa-wrench' },
+      { label: '日本节点(建设中)', value: 'http://54.46.9.88:9001', icon: 'fas fa-wrench' },
     ],
   },
 ]);