From e4cc469b281794a191cd6703bb0113d2f56cedd2 Mon Sep 17 00:00:00 2001
From: zxc <1171051090@qq.com>
Date: Fri, 7 Mar 2025 21:12:17 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E6=A8=A1=E6=9D=BF=E5=BC=B9=E7=AA=97?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/Editor/Thumbnails/Templates.vue | 76 +++++++++++++++++++----
1 file changed, 65 insertions(+), 11 deletions(-)
diff --git a/src/views/Editor/Thumbnails/Templates.vue b/src/views/Editor/Thumbnails/Templates.vue
index e7dd44c6..69b312f4 100644
--- a/src/views/Editor/Thumbnails/Templates.vue
+++ b/src/views/Editor/Thumbnails/Templates.vue
@@ -8,17 +8,28 @@
@click="changeCatalog(item.id)"
>{{ item.name }}
-
-
@@ -42,6 +53,18 @@ const slidesStore = useSlidesStore()
const { templates } = storeToRefs(slidesStore)
const slides = ref
([])
const listRef = ref()
+const types = ref<{
+ label: string
+ value: string
+}[]>([
+ { label: '全部', value: 'all' },
+ { label: '封面', value: 'cover' },
+ { label: '目录', value: 'contents' },
+ { label: '过渡', value: 'transition' },
+ { label: '内容', value: 'content' },
+ { label: '结束', value: 'end' },
+])
+const activeType = ref('all')
const activeCatalog = ref('')
@@ -68,6 +91,7 @@ onMounted(() => {
width: 500px;
height: 500px;
display: flex;
+ user-select: none;
}
.catalogs {
width: 108px;
@@ -97,6 +121,36 @@ onMounted(() => {
}
}
}
+.content {
+ display: flex;
+ flex-direction: column;
+}
+.types {
+ display: flex;
+ padding: 2px 0;
+ margin-bottom: 8px;
+
+ .type {
+ border-radius: $borderRadius;
+ padding: 3px 8px;
+ font-size: 12px;
+ cursor: pointer;
+
+ & +.type {
+ margin-left: 4px;
+ }
+
+ &.active {
+ color: $themeColor;
+ background-color: rgba($color: $themeColor, $alpha:.05);
+ font-weight: 700;
+ }
+
+ &:hover {
+ background-color: #f5f5f5;
+ }
+ }
+}
.list {
width: 392px;
padding: 2px;