+
{{ title.slice(0, 1) }}
@@ -101,6 +106,8 @@ const handleOperateClick = ({ id, item }) => {
window.copy(item)
break
case 'collect':
+ item.collect = true // important
+ window.db.updateDataBaseLocal(db)
break
case 'remove':
window.remove(item)
diff --git a/src/views/Main.vue b/src/views/Main.vue
index 9576336..763bc5d 100644
--- a/src/views/Main.vue
+++ b/src/views/Main.vue
@@ -39,7 +39,9 @@ const showList = ref([]) // 展示的数据
const updateShowList = (type) => {
// 更新显示列表
showList.value = list.value
- .filter((item) => (type === 'all' ? item : item.type === type)) // 是 all则返回所有 否则按照 type返回
+ .filter((item) =>
+ type === 'collect' ? item.collect === true : type === 'all' ? item : item.type === type
+ ) // 是 collect则返回所有收藏 否则按照 type返回
.filter((item) => (filterText.value ? item.type !== 'image' : item)) // 有过滤词 排除掉图片 DataURL
.filter(
(item) =>
@@ -48,6 +50,7 @@ const updateShowList = (type) => {
: item // 无过滤词 返回全部
)
.slice(0, GAP) // 重新切分懒加载列表
+ console.log(showList.value)
window.toTop()
}
From 4290f1b6ce8ecd89bd5d48e078e7dce9f5dfb0bc Mon Sep 17 00:00:00 2001
From: ZiuChen <457353192@qq.com>
Date: Sun, 4 Sep 2022 14:00:45 +0800
Subject: [PATCH 5/6] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4operation?=
=?UTF-8?q?=E9=A2=9C=E8=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/style/cpns/clip-item-list.less | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/style/cpns/clip-item-list.less b/src/style/cpns/clip-item-list.less
index fc59ea7..97f231e 100644
--- a/src/style/cpns/clip-item-list.less
+++ b/src/style/cpns/clip-item-list.less
@@ -86,7 +86,7 @@
align-items: center;
justify-content: center;
font-size: 13px;
- color: @text-color-lighter;
+ color: @primary-color;
background: @text-bg-color;
margin: 0px 2px;
border-radius: 5px;
From 11a3bc9f0d04a63f262d1af6c653a3237bcdb3f9 Mon Sep 17 00:00:00 2001
From: ZiuChen <457353192@qq.com>
Date: Sun, 4 Sep 2022 14:06:58 +0800
Subject: [PATCH 6/6] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E6=B8=85?=
=?UTF-8?q?=E7=A9=BA=E6=90=9C=E7=B4=A2=E6=A1=86=E6=8C=89=E9=92=AE=E6=A0=B7?=
=?UTF-8?q?=E5=BC=8F=20=E8=B0=83=E6=95=B4fulldata=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/style/cpns/clip-full-data.less | 2 +-
src/style/cpns/clip-search.less | 4 ++--
src/views/Main.vue | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/style/cpns/clip-full-data.less b/src/style/cpns/clip-full-data.less
index d2bd479..d7eb858 100644
--- a/src/style/cpns/clip-full-data.less
+++ b/src/style/cpns/clip-full-data.less
@@ -3,7 +3,7 @@
position: fixed;
top: 0;
height: 100%;
- width: 60%;
+ width: 70%;
color: @text-color;
background: @bg-color;
padding: 0px 20px 0px 20px;
diff --git a/src/style/cpns/clip-search.less b/src/style/cpns/clip-search.less
index e2356a8..fcc8ba1 100644
--- a/src/style/cpns/clip-search.less
+++ b/src/style/cpns/clip-search.less
@@ -19,7 +19,7 @@
}
.clip-search-suffix {
text-align: center;
- position: absolute;
+ position: fixed;
right: 20px;
top: 18px;
font-size: 13px;
@@ -27,7 +27,7 @@
width: 20px;
height: 20px;
background-color: @nav-bg-color;
- border-radius: 20px;
+ border-radius: 5px;
cursor: pointer;
&:hover {
background-color: @nav-hover-bg-color;
diff --git a/src/views/Main.vue b/src/views/Main.vue
index 763bc5d..f2ffe42 100644
--- a/src/views/Main.vue
+++ b/src/views/Main.vue
@@ -50,7 +50,6 @@ const updateShowList = (type) => {
: item // 无过滤词 返回全部
)
.slice(0, GAP) // 重新切分懒加载列表
- console.log(showList.value)
window.toTop()
}