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">
|
<div class="clip-operate" v-show="activeIndex === index">
|
||||||
<template v-for="{ id, title } of operation">
|
<template v-for="{ id, title } of operation">
|
||||||
<div
|
<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"
|
:class="id"
|
||||||
:title="title"
|
:title="title"
|
||||||
@click.stop="handleOperateClick({ id, item })"
|
@click.stop="handleOperateClick({ id, item })"
|
||||||
@ -97,6 +101,7 @@ const activeIndex = ref(0)
|
|||||||
const handleMouseOver = (index) => (activeIndex.value = index)
|
const handleMouseOver = (index) => (activeIndex.value = index)
|
||||||
const operation = [
|
const operation = [
|
||||||
{ id: 'copy', title: '复制' },
|
{ id: 'copy', title: '复制' },
|
||||||
|
{ id: 'view', title: '查看全部' },
|
||||||
{ id: 'collect', title: '收藏' },
|
{ id: 'collect', title: '收藏' },
|
||||||
{ id: 'remove', title: '删除' }
|
{ id: 'remove', title: '删除' }
|
||||||
]
|
]
|
||||||
@ -105,6 +110,9 @@ const handleOperateClick = ({ id, item }) => {
|
|||||||
case 'copy':
|
case 'copy':
|
||||||
window.copy(item)
|
window.copy(item)
|
||||||
break
|
break
|
||||||
|
case 'view':
|
||||||
|
emit('onDataChange', item)
|
||||||
|
break
|
||||||
case 'collect':
|
case 'collect':
|
||||||
item.collect = true // important
|
item.collect = true // important
|
||||||
window.db.updateDataBaseLocal(db)
|
window.db.updateDataBaseLocal(db)
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-width: 100px;
|
min-width: 150px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
& * {
|
& * {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user