Skip to content

Commit

Permalink
fix: 插件匹配方式改为全局匹配
Browse files Browse the repository at this point in the history
  • Loading branch information
fffguo committed Aug 19, 2022
1 parent 7aa6256 commit 0daca58
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/CurlLocalRequest/CurlLocalRequest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
//初始化
Expand Down
12 changes: 7 additions & 5 deletions utools/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"explain": "快速替换本地域名并请求,方便debug解决问题",
"cmds": [
{
"type": "over",
"label": "curl"
}
]
"type": "regex",
"match": "/^(https?:\/\/|curl)/i",
"label": "curl",
"maxLength": 10000
}
]
]
}
]
}

0 comments on commit 0daca58

Please sign in to comment.