From 3c7a4a74ede231ba54a8dac313001d8d56b55484 Mon Sep 17 00:00:00 2001 From: Nevermore <15972699417@163.com> Date: Fri, 1 Dec 2023 15:58:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=85=A8=E9=83=A8=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/image/types.ts | 4 +- src/configs/images.ts | 32 ++-- .../ImageComponents/ImageCategory.vue | 167 +++++++++++------- .../CanvasMenu/components/MaterialPool.vue | 5 +- 4 files changed, 123 insertions(+), 85 deletions(-) diff --git a/src/api/image/types.ts b/src/api/image/types.ts index 2a8627c7..29130179 100644 --- a/src/api/image/types.ts +++ b/src/api/image/types.ts @@ -1,5 +1,5 @@ export interface QueryPgaes { - q: string + t: string page: number } @@ -47,7 +47,7 @@ export interface ImagePage { export interface ImagePageResult { code: number msg: string - data: ImagePage + data: ImageHit[] } export interface ImageCategoryResult { diff --git a/src/configs/images.ts b/src/configs/images.ts index c98d4516..a3de219a 100644 --- a/src/configs/images.ts +++ b/src/configs/images.ts @@ -262,21 +262,19 @@ export const EmbossMatrix = [ 1, 1, 1, 1, 0.7, -1, -1, -1, -1 ] // places, animals, industry, computer, food, sports, transportation, travel, buildings, business, music export const ImageCategoryInfo = [ {id: 0, name: '背景', type: 'backgrounds', category: [], total: []}, - {id: 1, name: '时尚', type: 'fashion', category: [], total: []}, - {id: 2, name: '自然', type: 'nature', category: [], total: []}, - {id: 3, name: '科学', type: 'science', category: [], total: []}, - {id: 4, name: '教育', type: 'education', category: [], total: []}, - {id: 5, name: '情感', type: 'feelings', category: [], total: []}, - {id: 6, name: '健康', type: 'health', category: [], total: []}, - {id: 7, name: '人物', type: 'people', category: [], total: []}, - {id: 9, name: '场所', type: 'places', category: [], total: []}, - {id: 10, name: '动物', type: 'animals', category: [], total: []}, - {id: 11, name: '工业', type: 'industry', category: [], total: []}, - {id: 12, name: '计算机', type: 'computer', category: [], total: []}, - {id: 13, name: '食品', type: 'food', category: [], total: []}, - {id: 14, name: '体育', type: 'sports', category: [], total: []}, - {id: 15, name: '交通', type: 'transportation', category: [], total: []}, - {id: 16, name: '旅游', type: 'travel', category: [], total: []}, - {id: 17, name: '建筑', type: 'buildings', category: [], total: []}, - {id: 18, name: '商业', type: 'business', category: [], total: []}, + {id: 1, name: '自然', type: 'nature', category: [], total: []}, + {id: 2, name: '科学', type: 'science', category: [], total: []}, + {id: 3, name: '教育', type: 'education', category: [], total: []}, + {id: 4, name: '情感', type: 'feelings', category: [], total: []}, + {id: 5, name: '健康', type: 'health', category: [], total: []}, + {id: 6, name: '场所', type: 'places', category: [], total: []}, + {id: 7, name: '动物', type: 'animals', category: [], total: []}, + {id: 8, name: '工业', type: 'industry', category: [], total: []}, + {id: 9, name: '计算机', type: 'computer', category: [], total: []}, + {id: 10, name: '食品', type: 'food', category: [], total: []}, + {id: 11, name: '体育', type: 'sports', category: [], total: []}, + {id: 12, name: '交通', type: 'transportation', category: [], total: []}, + {id: 13, name: '旅游', type: 'travel', category: [], total: []}, + {id: 14, name: '建筑', type: 'buildings', category: [], total: []}, + {id: 15, name: '商业', type: 'business', category: [], total: []}, ] \ No newline at end of file diff --git a/src/views/Editor/CanvasMenu/components/ImageComponents/ImageCategory.vue b/src/views/Editor/CanvasMenu/components/ImageComponents/ImageCategory.vue index 67700c48..4c17a556 100644 --- a/src/views/Editor/CanvasMenu/components/ImageComponents/ImageCategory.vue +++ b/src/views/Editor/CanvasMenu/components/ImageComponents/ImageCategory.vue @@ -1,38 +1,42 @@