Skip to content

Commit c4cdefa

Browse files
committed
Merge branch 'main' of github.com:cuixueshe/earthworm
2 parents c66fb66 + 60a4abf commit c4cdefa

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

apps/client/components/courses/CourseCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ onMounted(() => {
5757

5858
<style scoped>
5959
.course-card {
60-
@apply relative h-[160px] w-full rounded-xl border border-gray-400 p-4 pb-6 transition-all duration-300 dark:text-gray-100;
60+
@apply relative h-[160px] w-full cursor-pointer rounded-xl border border-gray-400 p-4 pb-6 transition-all duration-300 dark:text-gray-100;
6161
@apply hover:text-purple-500 hover:shadow-lg hover:shadow-gray-300 hover:dark:text-purple-400 dark:hover:shadow-gray-500;
6262
}
6363

apps/client/pages/course-pack/index.vue

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
<template>
22
<div class="flex w-full flex-col">
3-
<h2 class="my-10 text-2xl font-bold">多课程包</h2>
3+
<h2 class="mb-4 text-2xl font-bold">多课程包</h2>
44
<template v-if="isLoading">
55
<Loading></Loading>
66
</template>
77
<template v-else>
8-
<div
9-
class="grid grid-cols-1 justify-items-center gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"
10-
>
11-
<template v-for="coursePack in coursePackStore.coursePacks">
12-
<CoursePackCard :coursePack="coursePack"></CoursePackCard>
13-
</template>
8+
<div class="h-[79vh] overflow-y-auto overflow-x-hidden scrollbar-hide">
9+
<div
10+
class="grid grid-cols-1 justify-items-center gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4"
11+
>
12+
<template v-for="coursePack in coursePackStore.coursePacks">
13+
<CoursePackCard :coursePack="coursePack"></CoursePackCard>
14+
</template>
15+
</div>
1416
</div>
1517
</template>
1618
</div>

apps/client/tailwind.config.js

+13-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default {
5656
// 来这里找 https://icones.js.org/
5757
collections: getIconCollections(["ph", "simple-icons"]),
5858
}),
59-
function ({ addComponents }) {
59+
function ({ addComponents, addUtilities }) {
6060
const buttons = {
6161
".tw-btn-blue": {
6262
backgroundColor: "#4e80ee",
@@ -69,6 +69,18 @@ export default {
6969
};
7070

7171
addComponents(buttons);
72+
73+
const scrollbar = {
74+
".scrollbar-hide": {
75+
"-ms-overflow-style": "none" /* 适用于 IE 和 Edge */,
76+
"scrollbar-width": "none" /* 适用于 Firefox */,
77+
},
78+
".scrollbar-hide::-webkit-scrollbar": {
79+
display: "none",
80+
},
81+
};
82+
83+
addUtilities(scrollbar, ["responsive"]);
7284
},
7385
],
7486
};

0 commit comments

Comments
 (0)