From aa859032b983d38d53e928d000e526104ae1d934 Mon Sep 17 00:00:00 2001 From: AMEN Date: Thu, 18 Jul 2024 12:02:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=8F=98=E7=B3=BB=E7=BB=9F=E5=A3=81?= =?UTF-8?q?=E7=BA=B8=E8=AE=BE=E7=BD=AE=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=B0=8F?= =?UTF-8?q?=E9=B8=9F=E5=A3=81=E7=BA=B8=EF=BC=8C=E5=B0=8F=E9=B8=9F=E5=A3=81?= =?UTF-8?q?=E7=BA=B8=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/cat/utils.js | 12 - src/views/desktop/background/Background.vue | 7 +- .../desktop/setting/wallpaper/CatBody.vue | 252 ++++++++++++++---- .../desktop/setting/wallpaper/CatHead.vue | 10 +- .../desktop/setting/wallpaper/GalleryBody.vue | 6 +- 5 files changed, 221 insertions(+), 66 deletions(-) delete mode 100644 src/utils/cat/utils.js diff --git a/src/utils/cat/utils.js b/src/utils/cat/utils.js deleted file mode 100644 index 7ad2553..0000000 --- a/src/utils/cat/utils.js +++ /dev/null @@ -1,12 +0,0 @@ -/* - * @作者:AMEN - * @官网:https://www.ymypay.cn/ - * @博客:https://blog.ymypay.cn/ - * 湮灭网络工作室 - */ -export const uuid = () => { - function S4() { - return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); - } - return S4() + S4() + S4() + S4() + S4() + S4() + S4() + S4(); -} diff --git a/src/views/desktop/background/Background.vue b/src/views/desktop/background/Background.vue index 2444313..17d868d 100644 --- a/src/views/desktop/background/Background.vue +++ b/src/views/desktop/background/Background.vue @@ -4,7 +4,7 @@
@@ -40,12 +40,11 @@ const getLocalBackground = async () => { let bg = ''; if (src) { - if (type === 'base64' || type === 'video') { + if (type === 'base64' || type === 'video' || type === 'cdnImage') { bg = src; } else { bg = getStaticImage(src) || defaultBackground; } - backgroundSrc.value = bg; } else { backgroundSrc.value = defaultBackground; @@ -63,7 +62,7 @@ onMounted(async () => { }); const style = computed((): CSSProperties => { - if (comBackground.value.type === 'image' || comBackground.value.type === 'base64') { + if (comBackground.value.type === 'image' || comBackground.value.type === 'base64' || comBackground.value.type === 'cdnImage') { return { background: `url('${backgroundSrc.value}')`, filter: ` diff --git a/src/views/desktop/setting/wallpaper/CatBody.vue b/src/views/desktop/setting/wallpaper/CatBody.vue index e809396..5a23acb 100644 --- a/src/views/desktop/setting/wallpaper/CatBody.vue +++ b/src/views/desktop/setting/wallpaper/CatBody.vue @@ -1,40 +1,66 @@