mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-29 05:33:14 +08:00
fix: 仅对长度大于等于2的文本提供分词
This commit is contained in:
parent
7e71c7845c
commit
9c3114828f
@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"pluginName": "超级剪贴板",
|
||||
"description": "强大的剪贴板管理工具",
|
||||
"author": "ZiuChen",
|
||||
|
@ -46,7 +46,10 @@
|
||||
(id === 'view' && item.type !== 'image') ||
|
||||
(id === 'open-folder' && item.type === 'file') ||
|
||||
(id === 'un-collect' && item.collect === true) ||
|
||||
(id === 'word-break' && item.type === 'text' && item.data.length <= 500)
|
||||
(id === 'word-break' &&
|
||||
item.type === 'text' &&
|
||||
item.data.length <= 500 &&
|
||||
item.data.length >= 2)
|
||||
"
|
||||
:class="id"
|
||||
:title="title"
|
||||
@ -182,8 +185,8 @@ const operation = [
|
||||
{ id: 'view', title: '查看全部', icon: '💬' },
|
||||
{ id: 'open-folder', title: '打开文件夹', icon: '📁' },
|
||||
{ id: 'collect', title: '收藏', icon: '⭐' },
|
||||
{ id: 'word-break', title: '分词', icon: '💣' },
|
||||
{ id: 'un-collect', title: '取消收藏', icon: '📤' },
|
||||
{ id: 'word-break', title: '分词', icon: '💣' },
|
||||
{ id: 'remove', title: '删除', icon: '❌' }
|
||||
]
|
||||
const handleOperateClick = ({ id, item }) => {
|
||||
@ -204,7 +207,11 @@ const handleOperateClick = ({ id, item }) => {
|
||||
window.db.updateDataBaseLocal(db)
|
||||
break
|
||||
case 'word-break':
|
||||
utools.redirect('超级分词', item.data)
|
||||
const success = utools.redirect('超级分词', item.data)
|
||||
if (success) {
|
||||
} else {
|
||||
utools.shellOpenExternal('https://ziuchen.github.io/project/SmartWordBreak/')
|
||||
}
|
||||
break
|
||||
case 'un-collect':
|
||||
item.collect = undefined
|
||||
|
Loading…
x
Reference in New Issue
Block a user