初始化

This commit is contained in:
陈昱达
2025-06-05 13:57:58 +08:00
commit 979fde4c85
92 changed files with 17729 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<template>
<div class="hot-products">
<h2>热销产品</h2>
<ul>
<li v-for="(product, index) in hotProducts" :key="index">
<div class="product-card">
<img :src="product.image" :alt="product.name" />
<h3>{{ product.name }}</h3>
<p>{{ product.description }}</p>
<button>查看详情</button>
</div>
</li>
</ul>
</div>
</template>
<script>
</script>
<style scoped lang="scss">
.hot-products {
background: #fff;
padding: 10px;
border-radius: 5px;
h2 {
color: #2E5CA9;
font-size: 24px;
margin-bottom: 20px;
}
ul {
list-style-type: none;
padding: 0;
margin: 0;
display: flex;
gap: 20px;
overflow-x: auto; /* 添加横向滚动 */
white-space: nowrap; /* 防止换行 */
}
.product-card {
width: 200px;
border: 1px solid #ddd;
border-radius: 8px;
padding: 10px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
img {
width: 100%;
height: auto;
border-radius: 8px;
}
h3 {
color: #333;
font-size: 18px;
margin: 10px 0;
}
p {
color: #666;
font-size: 14px;
margin-bottom: 15px;
}
button {
background-color: #2E5CA9;
color: #fff;
border: none;
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s ease;
&:hover {
background-color: #1E4082;
}
}
}
}
</style>