diff --git a/src/cpns/ClipFullData.vue b/src/cpns/ClipFullData.vue index f8d8c9c..74724b2 100644 --- a/src/cpns/ClipFullData.vue +++ b/src/cpns/ClipFullData.vue @@ -13,8 +13,13 @@ -
- +
+
+ +
+
+
+
diff --git a/src/cpns/ClipOperate.vue b/src/cpns/ClipOperate.vue index c7f5e68..657c279 100644 --- a/src/cpns/ClipOperate.vue +++ b/src/cpns/ClipOperate.vue @@ -7,12 +7,15 @@ id !== 'view' && id !== 'open-folder' && id !== 'un-collect' && - id !== 'word-break') || + id !== 'word-break' && + id !== 'save-file') || (id === 'collect' && item.collect !== true) || - (id === 'view' && !isFullData && item.type !== 'image') || + (id === 'view' && !isFullData) || (id === 'open-folder' && item.type === 'file') || (id === 'un-collect' && item.collect === true) || + (id === 'save-file' && isFullData && item.type !== 'file') || (id === 'word-break' && + isFullData && item.type === 'text' && item.data.length <= 500 && item.data.length >= 2) @@ -46,6 +49,7 @@ const operation = [ { id: 'collect', title: '收藏', icon: '⭐' }, { id: 'un-collect', title: '取消收藏', icon: '📤' }, { id: 'word-break', title: '分词', icon: '💣' }, + { id: 'save-file', title: '保存', icon: '💾' }, { id: 'remove', title: '删除', icon: '❌' } ] const handleOperateClick = ({ id, item }) => { @@ -66,11 +70,18 @@ const handleOperateClick = ({ id, item }) => { window.db.updateDataBaseLocal(db) break case 'word-break': - const success = utools.redirect('超级分词', item.data) - if (success) { - } else { - utools.shellOpenExternal('https://ziuchen.github.io/project/SmartWordBreak/') + utools.redirect('超级分词', item.data) + break + case 'save-file': + const typeMap = { + text: 'text', + file: 'files', + image: 'img' } + utools.redirect('收集文件', { + type: typeMap[item.type], + data: item.data + }) break case 'un-collect': item.collect = undefined diff --git a/src/style/cpns/clip-full-data.less b/src/style/cpns/clip-full-data.less index 2adc4b1..bb09ead 100644 --- a/src/style/cpns/clip-full-data.less +++ b/src/style/cpns/clip-full-data.less @@ -31,6 +31,9 @@ padding: 20px; border-radius: 5px; background-color: @text-bg-color; + img { + max-width: 100%; + } } &::-webkit-scrollbar { width: 10px; diff --git a/src/views/Main.vue b/src/views/Main.vue index 4097a08..52f5894 100644 --- a/src/views/Main.vue +++ b/src/views/Main.vue @@ -183,10 +183,7 @@ const fullData = ref({ type: 'text', data: '' }) const fullDataShow = ref(false) const toggleFullData = (item) => { // 是否显示全部数据 (查看全部) - const { type } = item - if (type === 'text' || type === 'file') { - fullData.value = item - } + fullData.value = item fullDataShow.value = !fullDataShow.value }