From 2800fa4f32f3900509cb4d6eefaf2bfaf54efdd7 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Mon, 21 Apr 2025 18:29:09 +0800
Subject: [PATCH] fix: 天气显示
---
src/components/index.js | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/components/index.js b/src/components/index.js
index 13c740d..7d7a74c 100644
--- a/src/components/index.js
+++ b/src/components/index.js
@@ -1,16 +1,15 @@
import { defineAsyncComponent } from 'vue'
export default {
- install (app) {
- // 匹配当前目录下所有.vue文件(包括子目录)
- const components = import.meta.glob('./global/*.vue', { eager: true })
+ install(app) {
+ // 匹配当前目录下所有.vue文件(包括子目录)
+ const components = import.meta.glob('./global/*.vue', { eager: true })
-
- for (const [path, module] of Object.entries(components)) {
- // 提取组件名(去除路径和扩展名)
- const name = path.split('/').pop()?.replace('.vue', '') || ''
- // 注册组件
- app.component(name, (module).default)
- }
- }
-}
\ No newline at end of file
+ for (const [path, module] of Object.entries(components)) {
+ // 提取组件名(去除路径和扩展名)
+ const name = path.split('/').pop()?.replace('.vue', '') || ''
+ // 注册组件
+ app.component(name, module.default)
+ }
+ },
+}
--
Gitblit v1.9.3