From b63a46629faa40ecf2b2a5fb31cc31defef2f54c Mon Sep 17 00:00:00 2001 From: mixtan <424491071@qq.com> Date: Sat, 17 May 2025 16:24:01 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E9=80=9A=E8=BF=87=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=A7=A3=E5=86=B3=E5=85=A8=E5=B1=8F=E9=A1=B5?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E4=BA=86=E9=9D=9E=E9=A1=B5=E9=9D=A2=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8D=A0=E7=94=A8=E5=86=85=E5=AD=98=E5=BC=80=E9=94=80?= =?UTF-8?q?=E5=92=8C=E5=8A=A0=E8=BD=BD=E9=80=9F=E5=BA=A6=E5=8F=8A=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=88=B7=E6=96=B0=E9=9A=90=E7=A7=81=E9=A1=B5=E4=BC=9A?= =?UTF-8?q?=E9=97=AA=E7=83=81=E9=A1=B5=E5=A4=B4=E9=A1=B5=E8=84=9A=E7=9A=84?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C=E9=97=AE=E9=A2=98=EF=BC=9B?= =?UTF-8?q?=E5=9B=A0=E4=B8=BA=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E4=BA=86=E5=8A=A8=E6=80=81=E7=BC=96=E8=AF=91=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E4=BB=A5vite=E9=85=8D=E7=BD=AE=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E8=BF=90=E8=A1=8C=E6=97=B6=E7=BC=96=E8=AF=91?= =?UTF-8?q?=EF=BC=9B=E5=88=A0=E9=99=A4=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E9=AA=8C=E8=AF=81=E7=A0=81=E5=9B=BE=E7=89=87?= =?UTF-8?q?=EF=BC=8C=E5=90=8E=E7=BB=AD=E6=B7=BB=E5=8A=A0=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E8=87=AA=E5=8A=A8=E7=A7=BB=E9=99=A4=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E5=92=8C=E6=89=93=E5=8D=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 2 ++ src/App.vue | 52 ++++---------------------------- src/components/BasicLayout.vue | 37 +++++++++++++++++++++++ src/components/DynamicLayout.vue | 22 ++++++++++++++ src/components/floatingMenu.vue | 4 +-- src/components/login.vue | 2 -- vite.config.ts | 3 +- 7 files changed, 71 insertions(+), 51 deletions(-) create mode 100644 src/components/BasicLayout.vue create mode 100644 src/components/DynamicLayout.vue diff --git a/components.d.ts b/components.d.ts index f8fcdde..6ec3ac5 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,6 +8,8 @@ export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { + BasicLayout: typeof import('./src/components/BasicLayout.vue')['default'] + DynamicLayout: typeof import('./src/components/DynamicLayout.vue')['default'] ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] ElButton: typeof import('element-plus/es')['ElButton'] ElCarousel: typeof import('element-plus/es')['ElCarousel'] diff --git a/src/App.vue b/src/App.vue index e2c0bc4..131da91 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,53 +1,13 @@ - \ No newline at end of file diff --git a/src/components/BasicLayout.vue b/src/components/BasicLayout.vue new file mode 100644 index 0000000..6880045 --- /dev/null +++ b/src/components/BasicLayout.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/src/components/DynamicLayout.vue b/src/components/DynamicLayout.vue new file mode 100644 index 0000000..5880806 --- /dev/null +++ b/src/components/DynamicLayout.vue @@ -0,0 +1,22 @@ + + + \ No newline at end of file diff --git a/src/components/floatingMenu.vue b/src/components/floatingMenu.vue index d31cea0..4a5bcf6 100644 --- a/src/components/floatingMenu.vue +++ b/src/components/floatingMenu.vue @@ -56,9 +56,9 @@ window.onscroll = function () { // 获取浏览器卷去的高度 let high = document.documentElement.scrollTop || document.body.scrollTop; //兼容各浏览器 if (high >= 900) { - backToTop.value.style.display = "block"; + backToTop.value && (backToTop.value.style.display = "block") } else { - backToTop.value.style.display = "none"; + backToTop.value && (backToTop.value.style.display = "none") } }; diff --git a/src/components/login.vue b/src/components/login.vue index cc5d2c6..debed3b 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -67,8 +67,6 @@ const refreshCaptcha = async () => { const res = await GetVerifyCode({ verify_token: verify_token.value }); if (res && res.status === 200) { captchaUrl.value = `https://mall.gpxscs.cn/api/admin/shop/shop-base-config/image?verify_token=${verify_token.value}`; - } else { - console.log("获取图形验证码失败", res); } }; diff --git a/vite.config.ts b/vite.config.ts index 1b27b8e..0a4b767 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -62,7 +62,8 @@ export default defineConfig({ , resolve: { alias: { - '@': fileURLToPath(new URL('./src', import.meta.url)) + '@': fileURLToPath(new URL('./src', import.meta.url)), + 'vue': 'vue/dist/vue.esm-bundler.js' }, }, // build: {