diff --git a/src/components/CurlLocalRequest/CurlLocalRequest.vue b/src/components/CurlLocalRequest/CurlLocalRequest.vue index 3da7a96..52eff21 100644 --- a/src/components/CurlLocalRequest/CurlLocalRequest.vue +++ b/src/components/CurlLocalRequest/CurlLocalRequest.vue @@ -47,8 +47,8 @@ export default { console.log('用户进入插件', code, type, payload) this.$store.state.curl.curlText = payload let curl = CURLParser(payload); - if(curl===undefined &&this.isURL(payload)){ - curl= {method: 'GET', url: payload, header: {}, body: ''}; + if (curl === undefined && this.isURL(payload)) { + curl = {method: 'GET', url: payload, header: {}, body: ''}; } console.log("curl:", curl) //初始化 diff --git a/utools/plugin.json b/utools/plugin.json index b2d2f63..22191a0 100644 --- a/utools/plugin.json +++ b/utools/plugin.json @@ -8,10 +8,12 @@ "explain": "快速替换本地域名并请求,方便debug解决问题", "cmds": [ { - "type": "over", - "label": "curl" - } - ] + "type": "regex", + "match": "/^(https?:\/\/|curl)/i", + "label": "curl", + "maxLength": 10000 } - ] + ] + } + ] }