From 86f8e9adecb19dfadf6fc6c3901d8048e0d89fb5 Mon Sep 17 00:00:00 2001 From: duanshuwen Date: Fri, 29 May 2026 19:51:17 +0800 Subject: [PATCH] refactor(home-components): migrate styles to tailwind and clean up legacy code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace custom CSS utility classes with Tailwind arbitrary value classes (e.g. color-CBD5E1 → text-[#cbd5e1]). Remove unused standalone SCSS style files for three home components. Swap legacy uni-icons to van-icon for arrow icons in LongTextGuideCard, and fix event emitter usage in DiscoveryCradContentList to use the imported events utility. --- .../DiscoveryCradContentList/index.vue | 22 +-- .../styles/index.scss | 33 ---- .../GeneratorPhotoComponent/index.vue | 25 ++- .../GeneratorPhotoComponent/styles/index.scss | 61 ------ .../components/LongTextGuideCard/index.vue | 87 ++++---- .../LongTextGuideCard/styles/index.scss | 185 ------------------ .../LongTextGuideCardPreview/index.vue | 2 +- .../home/components/PoiDetailCard/index.vue | 2 +- .../components/SharedVisual/ActionRow.vue | 2 +- .../components/SharedVisual/BadgePill.vue | 2 +- 10 files changed, 69 insertions(+), 352 deletions(-) delete mode 100644 src/pages/home/components/DiscoveryCradContentList/styles/index.scss delete mode 100644 src/pages/home/components/GeneratorPhotoComponent/styles/index.scss delete mode 100644 src/pages/home/components/LongTextGuideCard/styles/index.scss diff --git a/src/pages/home/components/DiscoveryCradContentList/index.vue b/src/pages/home/components/DiscoveryCradContentList/index.vue index fdc20f8..0d1ef8d 100644 --- a/src/pages/home/components/DiscoveryCradContentList/index.vue +++ b/src/pages/home/components/DiscoveryCradContentList/index.vue @@ -1,11 +1,12 @@ - - diff --git a/src/pages/home/components/DiscoveryCradContentList/styles/index.scss b/src/pages/home/components/DiscoveryCradContentList/styles/index.scss deleted file mode 100644 index 411e5d2..0000000 --- a/src/pages/home/components/DiscoveryCradContentList/styles/index.scss +++ /dev/null @@ -1,33 +0,0 @@ -.container { - .container-scroll { - display: flex; - flex-direction: row; - overflow-x: auto; - margin-top: 4px; - - .mk-card-item { - display: flex; - flex-direction: column; - align-items: start; - width: 188px; - height: 154px; - background-color: #fff; - border-radius: 10px; - margin-right: 8px; - position: relative; - - .card-img { - width: 188px; - height: 112px; - } - - .card-text { - padding: 12px; - text-align: center; - font-weight: 500; - font-size: 12px; - color: #333; - } - } - } -} diff --git a/src/pages/home/components/GeneratorPhotoComponent/index.vue b/src/pages/home/components/GeneratorPhotoComponent/index.vue index 0c5704f..4e5b63c 100644 --- a/src/pages/home/components/GeneratorPhotoComponent/index.vue +++ b/src/pages/home/components/GeneratorPhotoComponent/index.vue @@ -1,27 +1,30 @@