From 9516e7184ffa4d4deb67f409155c38d5eff74f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E5=A9=B7=28luot1=29?= <1315228474@qq.com> Date: Thu, 27 Jun 2024 17:50:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9EAI=20music?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2=E4=BB=A5=E5=8F=8A=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E8=B0=83=E6=95=B4=E4=BA=86APPview=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2min-height=E4=B8=BAheight=EF=BC=8C=E6=B3=A8=E9=87=8A?= =?UTF-8?q?=E4=BA=86=E7=99=BB=E5=BD=95=E6=97=B6dict=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=EF=BC=8C=E5=9C=A8contentWrap=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=96=B0=E5=A2=9E=E4=BA=86bodystyle=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContentWrap/src/ContentWrap.vue | 9 +- src/layout/components/AppView.vue | 12 +-- src/router/modules/remaining.ts | 20 ++++ src/store/modules/dict.ts | 8 +- .../music/components/list/audioBar/index.vue | 9 ++ src/views/ai/music/components/list/index.vue | 94 +++++++++++++++++++ .../music/components/list/songCard/index.vue | 29 ++++++ .../music/components/list/songInfo/index.vue | 33 +++++++ src/views/ai/music/components/mode/desc.vue | 55 +++++++++++ src/views/ai/music/components/mode/index.vue | 44 +++++++++ src/views/ai/music/components/mode/lyric.vue | 83 ++++++++++++++++ src/views/ai/music/components/title/index.vue | 25 +++++ src/views/ai/music/index.vue | 21 +++++ 13 files changed, 428 insertions(+), 14 deletions(-) create mode 100644 src/views/ai/music/components/list/audioBar/index.vue create mode 100644 src/views/ai/music/components/list/index.vue create mode 100644 src/views/ai/music/components/list/songCard/index.vue create mode 100644 src/views/ai/music/components/list/songInfo/index.vue create mode 100644 src/views/ai/music/components/mode/desc.vue create mode 100644 src/views/ai/music/components/mode/index.vue create mode 100644 src/views/ai/music/components/mode/lyric.vue create mode 100644 src/views/ai/music/components/title/index.vue create mode 100644 src/views/ai/music/index.vue diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue index 454e95c9..c75e4b71 100644 --- a/src/components/ContentWrap/src/ContentWrap.vue +++ b/src/components/ContentWrap/src/ContentWrap.vue @@ -10,12 +10,13 @@ const prefixCls = getPrefixCls('content-wrap') defineProps({ title: propTypes.string.def(''), - message: propTypes.string.def('') + message: propTypes.string.def(''), + bodyStyle: propTypes.object.def({ padding: '20px' }) }) diff --git a/src/layout/components/AppView.vue b/src/layout/components/AppView.vue index 44341873..88d5f0cc 100644 --- a/src/layout/components/AppView.vue +++ b/src/layout/components/AppView.vue @@ -38,24 +38,24 @@ provide('reload', reload) :class="[ 'p-[var(--app-content-padding)] w-[calc(100%-var(--app-content-padding)-var(--app-content-padding))] bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]', { - '!min-h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]': + '!h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]': (fixedHeader && (layout === 'classic' || layout === 'topLeft' || layout === 'top') && footer) || (!tagsView && layout === 'top' && footer), - '!min-h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height)-var(--tags-view-height))]': + '!h-[calc(100%-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height)-var(--tags-view-height))]': tagsView && layout === 'top' && footer, - '!min-h-[calc(100%-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-var(--top-tool-height)-var(--app-footer-height))]': + '!h-[calc(100%-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-var(--top-tool-height)-var(--app-footer-height))]': !fixedHeader && layout === 'classic' && footer, - '!min-h-[calc(100%-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]': + '!h-[calc(100%-var(--tags-view-height)-var(--app-content-padding)-var(--app-content-padding)-var(--app-footer-height))]': !fixedHeader && layout === 'topLeft' && footer, - '!min-h-[calc(100%-var(--top-tool-height)-var(--app-content-padding)-var(--app-content-padding))]': + '!h-[calc(100%-var(--top-tool-height)-var(--app-content-padding)-var(--app-content-padding))]': fixedHeader && layout === 'cutMenu' && footer, - '!min-h-[calc(100%-var(--top-tool-height)-var(--app-content-padding)-var(--app-content-padding)-var(--tags-view-height))]': + '!h-[calc(100%-var(--top-tool-height)-var(--app-content-padding)-var(--app-content-padding)-var(--tags-view-height))]': !fixedHeader && layout === 'cutMenu' && footer } ]" diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index bc62a3c4..ff2c5d92 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -70,6 +70,26 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, + { + path: '/ai/music', + component: Layout, + redirect: '/index', + name: 'AIMusic', + meta: {}, + children: [ + { + path: 'index', + component: () => import('@/views/ai//music/index.vue'), + name: 'AIMusicIndex', + meta: { + title: 'AI 音乐', + icon: 'ep:home-filled', + noCache: false, + affix: true + } + } + ] + }, { path: '/user', component: Layout, diff --git a/src/store/modules/dict.ts b/src/store/modules/dict.ts index e239fb00..1a45335c 100644 --- a/src/store/modules/dict.ts +++ b/src/store/modules/dict.ts @@ -4,7 +4,7 @@ import { store } from '../index' import { DictDataVO } from '@/api/system/dict/types' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' const { wsCache } = useCache('sessionStorage') -import { getSimpleDictDataList } from '@/api/system/dict/dict.data' +// import { getSimpleDictDataList } from '@/api/system/dict/dict.data' export interface DictValueType { value: any @@ -45,7 +45,8 @@ export const useDictStore = defineStore('dict', { this.dictMap = dictMap this.isSetDict = true } else { - const res = await getSimpleDictDataList() + const res = [] + // const res = await getSimpleDictDataList() // 设置数据 const dictDataMap = new Map() res.forEach((dictData: DictDataVO) => { @@ -75,7 +76,8 @@ export const useDictStore = defineStore('dict', { }, async resetDict() { wsCache.delete(CACHE_KEY.DICT_CACHE) - const res = await getSimpleDictDataList() + const res = [] + // const res = await getSimpleDictDataList() // 设置数据 const dictDataMap = new Map() res.forEach((dictData: DictDataVO) => { diff --git a/src/views/ai/music/components/list/audioBar/index.vue b/src/views/ai/music/components/list/audioBar/index.vue new file mode 100644 index 00000000..2b25e40f --- /dev/null +++ b/src/views/ai/music/components/list/audioBar/index.vue @@ -0,0 +1,9 @@ + + + diff --git a/src/views/ai/music/components/list/index.vue b/src/views/ai/music/components/list/index.vue new file mode 100644 index 00000000..bc21034d --- /dev/null +++ b/src/views/ai/music/components/list/index.vue @@ -0,0 +1,94 @@ + + + + + + diff --git a/src/views/ai/music/components/list/songCard/index.vue b/src/views/ai/music/components/list/songCard/index.vue new file mode 100644 index 00000000..dc1ffa8b --- /dev/null +++ b/src/views/ai/music/components/list/songCard/index.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/views/ai/music/components/list/songInfo/index.vue b/src/views/ai/music/components/list/songInfo/index.vue new file mode 100644 index 00000000..4832bfcb --- /dev/null +++ b/src/views/ai/music/components/list/songInfo/index.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/views/ai/music/components/mode/desc.vue b/src/views/ai/music/components/mode/desc.vue new file mode 100644 index 00000000..4488461e --- /dev/null +++ b/src/views/ai/music/components/mode/desc.vue @@ -0,0 +1,55 @@ + + + diff --git a/src/views/ai/music/components/mode/index.vue b/src/views/ai/music/components/mode/index.vue new file mode 100644 index 00000000..bb6cf116 --- /dev/null +++ b/src/views/ai/music/components/mode/index.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/views/ai/music/components/mode/lyric.vue b/src/views/ai/music/components/mode/lyric.vue new file mode 100644 index 00000000..f774003a --- /dev/null +++ b/src/views/ai/music/components/mode/lyric.vue @@ -0,0 +1,83 @@ + + + diff --git a/src/views/ai/music/components/title/index.vue b/src/views/ai/music/components/title/index.vue new file mode 100644 index 00000000..a0658027 --- /dev/null +++ b/src/views/ai/music/components/title/index.vue @@ -0,0 +1,25 @@ + + + diff --git a/src/views/ai/music/index.vue b/src/views/ai/music/index.vue new file mode 100644 index 00000000..b48abb6b --- /dev/null +++ b/src/views/ai/music/index.vue @@ -0,0 +1,21 @@ + + + From 75d0be9742f01ff6d759386f2a9d9ff436d63f7f Mon Sep 17 00:00:00 2001 From: xiaohong <1315228474@qq.com> Date: Thu, 27 Jun 2024 22:31:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E5=B0=86=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=94=B9=E6=88=90=E5=8D=95=E6=8E=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ai/music/components/list/index.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/ai/music/components/list/index.vue b/src/views/ai/music/components/list/index.vue index bc21034d..6dce9b8c 100644 --- a/src/views/ai/music/components/list/index.vue +++ b/src/views/ai/music/components/list/index.vue @@ -5,7 +5,7 @@ - + @@ -15,7 +15,7 @@ - +