mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-08 22:54:09 +08:00
fix: 修正匹配图片文件的正则表达式
This commit is contained in:
parent
813cc96ce0
commit
e86b10ca51
@ -22,7 +22,7 @@
|
|||||||
"id": "custom.1663468466",
|
"id": "custom.1663468466",
|
||||||
"title": "上传到图床",
|
"title": "上传到图床",
|
||||||
"icon": "🚀",
|
"icon": "🚀",
|
||||||
"match": ["image", { "type": "file", "regex": "/.*(jpg|png|jpeg|gif)$/i" }],
|
"match": ["image", { "type": "file", "regex": ".(?:jpg|jpeg|png)$" }],
|
||||||
"command": "redirect:上传到图床"
|
"command": "redirect:上传到图床"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -84,8 +84,6 @@ export default function useClipOperate({ emit }) {
|
|||||||
if (item.type === 'file') {
|
if (item.type === 'file') {
|
||||||
const fl = JSON.parse(item.data)
|
const fl = JSON.parse(item.data)
|
||||||
for (const f of fl) {
|
for (const f of fl) {
|
||||||
console.log(f.name, r.test(f.name))
|
|
||||||
// TODO: fix: 图片文件不能正确匹配
|
|
||||||
if (r.test(f.name)) {
|
if (r.test(f.name)) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user