From bbfb860c7784391fdcf1d447ed00fc59e011bc2d Mon Sep 17 00:00:00 2001 From: IchliebedichZhu <54796446@qq.com> Date: Thu, 7 Mar 2024 13:52:54 +0000 Subject: [PATCH] feat: convert panel setting components to composition API --- src/api/home.ts | 1 + src/api/material.ts | 7 +- src/components/modules/panel/widgetPanel.vue | 1 + .../modules/panel/wrap/ToolsListWrap.vue | 2 +- .../settings/EffectSelect/ContainerWrap.vue | 126 ++++---- .../settings/EffectSelect/TextWrap.vue | 290 ++++++++++-------- src/types/global.d.ts | 1 + 7 files changed, 239 insertions(+), 189 deletions(-) diff --git a/src/api/home.ts b/src/api/home.ts index ed18ab3..091bfab 100644 --- a/src/api/home.ts +++ b/src/api/home.ts @@ -43,6 +43,7 @@ export const getTempList = (params: IGetTempListParam) => fetch fetch<{data: string}>('design/temp', params, 'get') diff --git a/src/api/material.ts b/src/api/material.ts index 288c33e..14e720b 100644 --- a/src/api/material.ts +++ b/src/api/material.ts @@ -32,12 +32,11 @@ export type TGetListData = { updated_time: string url: string width: number + thumbUrl: string + imgUrl: string } -type TGetListResult = TCommResResult<{ - list: TGetListData - total: number -}> +export type TGetListResult = TPageRequestResult diff --git a/src/components/modules/panel/widgetPanel.vue b/src/components/modules/panel/widgetPanel.vue index 66225b2..29963ef 100644 --- a/src/components/modules/panel/widgetPanel.vue +++ b/src/components/modules/panel/widgetPanel.vue @@ -39,6 +39,7 @@ const state = reactive({ active: true, }) const clickClassify = (index: number) => { + console.log('index' ,index) state.activeWidgetClassify = index state.active = true } diff --git a/src/components/modules/panel/wrap/ToolsListWrap.vue b/src/components/modules/panel/wrap/ToolsListWrap.vue index e2cad73..3f71c63 100644 --- a/src/components/modules/panel/wrap/ToolsListWrap.vue +++ b/src/components/modules/panel/wrap/ToolsListWrap.vue @@ -17,7 +17,7 @@
智能抠图 上传图像一键去除背景
- + diff --git a/src/components/modules/settings/EffectSelect/ContainerWrap.vue b/src/components/modules/settings/EffectSelect/ContainerWrap.vue index 313c477..4825a65 100644 --- a/src/components/modules/settings/EffectSelect/ContainerWrap.vue +++ b/src/components/modules/settings/EffectSelect/ContainerWrap.vue @@ -6,27 +6,27 @@ * @LastEditTime: 2023-06-29 17:53:39 -->