From 2ba4d21878419fe98361e008e329d55dd18abf04 Mon Sep 17 00:00:00 2001
From: chenhaizhao <2291973799@qq.com>
Date: Fri, 9 Jan 2026 09:21:29 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E8=A3=85card=E7=BB=84=E4=BB=B6?=
=?UTF-8?q?=E7=BB=9F=E4=B8=80=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 2 +-
components/Card/Card.vue | 38 +++++++++++++++++++
.../Loadmore.vue => LoadMore/LoadMore.vue} | 6 ++-
components/index.js | 9 +++++
main.js | 4 +-
5 files changed, 54 insertions(+), 5 deletions(-)
create mode 100644 components/Card/Card.vue
rename components/{Loadmore/Loadmore.vue => LoadMore/LoadMore.vue} (80%)
create mode 100644 components/index.js
diff --git a/App.vue b/App.vue
index 13f0d56..4e97681 100644
--- a/App.vue
+++ b/App.vue
@@ -36,7 +36,7 @@ onLaunch(() => {
/*每个页面公共css */
.main {
min-height: 95vh;
- background: linear-gradient(to top, #f2f8ff 0%, #e7f0fd 100%);
+ background: #f5f7fd;
padding-top: 20rpx;
}
diff --git a/components/Card/Card.vue b/components/Card/Card.vue
new file mode 100644
index 0000000..5745185
--- /dev/null
+++ b/components/Card/Card.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/Loadmore/Loadmore.vue b/components/LoadMore/LoadMore.vue
similarity index 80%
rename from components/Loadmore/Loadmore.vue
rename to components/LoadMore/LoadMore.vue
index 8906a01..31e72d7 100644
--- a/components/Loadmore/Loadmore.vue
+++ b/components/LoadMore/LoadMore.vue
@@ -22,5 +22,7 @@ onReachBottom(() => {
-
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/components/index.js b/components/index.js
new file mode 100644
index 0000000..912f836
--- /dev/null
+++ b/components/index.js
@@ -0,0 +1,9 @@
+import LoadMore from './LoadMore/LoadMore.vue'
+import Card from './Card/Card.vue'
+
+export default {
+ install(Vue) {
+ Vue.component("LoadMore", LoadMore),
+ Vue.component("Card", Card)
+ }
+}
\ No newline at end of file
diff --git a/main.js b/main.js
index 5d2aeee..9a538a8 100644
--- a/main.js
+++ b/main.js
@@ -1,11 +1,11 @@
import App from './App'
import { createSSRApp } from 'vue'
import pinia from './store'
-import Loadmore from "@/components/Loadmore/Loadmore.vue"
+import myComponents from "@/components"
export function createApp() {
const app = createSSRApp(App)
- app.component("Loadmore", Loadmore)
+ app.use(myComponents )
app.use(pinia)
return {
app