style: 格式化项目代码
- 根据prettier配置格式化整个项目的代码
This commit is contained in:
@ -17,70 +17,70 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface Props {
|
||||
name: string;
|
||||
description: string;
|
||||
imageUrl: string;
|
||||
id?: string | number;
|
||||
slug?: string;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
const localePath = useLocalePath();
|
||||
|
||||
const handleClick = () => {
|
||||
// 优先使用 slug,如果没有则使用 id
|
||||
const routeParam = props.slug || props.id;
|
||||
if (routeParam) {
|
||||
navigateTo(localePath(`/productions/${routeParam}`));
|
||||
interface Props {
|
||||
name: string;
|
||||
description: string;
|
||||
imageUrl: string;
|
||||
id?: string | number;
|
||||
slug?: string;
|
||||
}
|
||||
};
|
||||
|
||||
const props = defineProps<Props>();
|
||||
const localePath = useLocalePath();
|
||||
|
||||
const handleClick = () => {
|
||||
// 优先使用 slug,如果没有则使用 id
|
||||
const routeParam = props.slug || props.id;
|
||||
if (routeParam) {
|
||||
navigateTo(localePath(`/productions/${routeParam}`));
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.production-card {
|
||||
width: 30%;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.production-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.production-name {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
font-size: 0.8rem;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.production-card .el-image {
|
||||
height: 150px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
margin: 10px auto;
|
||||
padding: 0px auto;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 1200px) {
|
||||
.production-card {
|
||||
width: 45%;
|
||||
width: 30%;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.production-card {
|
||||
width: 90%;
|
||||
.production-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.production-name {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.card-description {
|
||||
font-size: 0.8rem;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.production-card .el-image {
|
||||
height: 150px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
margin: 10px auto;
|
||||
padding: 0px auto;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@media (max-width: 1200px) {
|
||||
.production-card {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.production-card {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user