From 32ee5aa78f835cf9a63cd6b254af31641ebe84f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= <8473136@qq.com> Date: Fri, 16 Aug 2024 17:06:54 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E5=9B=BE=E6=A0=87=E7=A6=BB=E7=BA=BF?= =?UTF-8?q?=E3=80=81=E4=BC=98=E5=8C=96=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/config/index.vue | 6 ++++-- src/views/proxy/commonIp.json | 5 +++++ src/views/proxy/index.vue | 39 ++++++++++++++++++++++++++++------- 3 files changed, 40 insertions(+), 10 deletions(-) create mode 100644 src/views/proxy/commonIp.json diff --git a/src/views/config/index.vue b/src/views/config/index.vue index 17667d4..8450321 100644 --- a/src/views/config/index.vue +++ b/src/views/config/index.vue @@ -345,8 +345,10 @@ onUnmounted(() => {
服务器配置
- - + +
diff --git a/src/views/proxy/commonIp.json b/src/views/proxy/commonIp.json new file mode 100644 index 0000000..71c9c5d --- /dev/null +++ b/src/views/proxy/commonIp.json @@ -0,0 +1,5 @@ +[ + { + "value": "127.0.0.11" + } +] \ No newline at end of file diff --git a/src/views/proxy/index.vue b/src/views/proxy/index.vue index b8c8ce2..ab4c6fb 100644 --- a/src/views/proxy/index.vue +++ b/src/views/proxy/index.vue @@ -254,6 +254,23 @@ const handleOpenLocalPortDialog = () => { handleLoadLocalPorts(); }; + +interface RestaurantItem { + value: string +} + +const commonIp = ref>([]) + +const handleIpFetchSuggestions = (queryString: string, cb: any) => { + const results = queryString + ? commonIp.value.filter(f => { + return f.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1 + }) + : commonIp.value + console.log(results, 'results') + cb(commonIp.value) +} + onMounted(() => { handleInitHook(); handleLoadProxys(); @@ -369,7 +386,7 @@ onUnmounted(() => { { > - + @@ -391,17 +408,23 @@ onUnmounted(() => { - - - + + + - + - + + + + + + + - +