mirror of
https://github.com/ZiuChen/ClipboardManager.git
synced 2025-06-29 21:52:53 +08:00
feat: 支持从右侧operate进入全部数据侧栏
This commit is contained in:
parent
11a3bc9f0d
commit
8a783dc7b9
@ -50,7 +50,11 @@
|
||||
<div class="clip-operate" v-show="activeIndex === index">
|
||||
<template v-for="{ id, title } of operation">
|
||||
<div
|
||||
v-if="id !== 'collect' || (id === 'collect' && item.collect !== true)"
|
||||
v-if="
|
||||
(id !== 'collect' && id !== 'view') ||
|
||||
(id === 'collect' && item.collect !== true) ||
|
||||
(id === 'view' && item.type !== 'image')
|
||||
"
|
||||
:class="id"
|
||||
:title="title"
|
||||
@click.stop="handleOperateClick({ id, item })"
|
||||
@ -97,6 +101,7 @@ const activeIndex = ref(0)
|
||||
const handleMouseOver = (index) => (activeIndex.value = index)
|
||||
const operation = [
|
||||
{ id: 'copy', title: '复制' },
|
||||
{ id: 'view', title: '查看全部' },
|
||||
{ id: 'collect', title: '收藏' },
|
||||
{ id: 'remove', title: '删除' }
|
||||
]
|
||||
@ -105,6 +110,9 @@ const handleOperateClick = ({ id, item }) => {
|
||||
case 'copy':
|
||||
window.copy(item)
|
||||
break
|
||||
case 'view':
|
||||
emit('onDataChange', item)
|
||||
break
|
||||
case 'collect':
|
||||
item.collect = true // important
|
||||
window.db.updateDataBaseLocal(db)
|
||||
|
@ -79,7 +79,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 100px;
|
||||
min-width: 150px;
|
||||
padding: 10px;
|
||||
& * {
|
||||
display: flex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user