邹方成 6f7207da2d feat: 优化UI设计并重构样式系统
refactor(components): 重构ElCard、FlipGrid、YifanSelector和PaymentPopup组件样式
refactor(pages): 优化地址管理、商品详情、订单列表、积分记录和活动页面UI
style: 更新uni.scss全局样式变量和设计系统
docs: 添加说明文档记录UI优化进度
2025-12-17 14:32:55 +08:00

56 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="ep-card" :class="shadowClass">
<view v-if="$slots.header" class="ep-card__header">
<slot name="header" />
</view>
<view class="ep-card__body">
<slot />
</view>
</view>
</template>
<script setup>
import { computed } from 'vue'
const props = defineProps({ shadow: { type: String, default: 'always' } })
const shadowClass = computed(() => {
const s = String(props.shadow || '').toLowerCase()
if (s === 'hover') return 'is-hover-shadow'
if (s === 'never') return 'is-no-shadow'
return 'is-always-shadow'
})
</script>
<style lang="scss" scoped>
.ep-card {
background: $bg-card;
border: 1rpx solid $border-color-light;
border-radius: $radius-lg;
overflow: hidden;
transition: all 0.3s ease;
}
.is-always-shadow {
box-shadow: $shadow-sm;
}
.is-hover-shadow {
/* 在移动端hover效果不如PC明显这里可以处理为点击态 */
box-shadow: $shadow-sm;
}
.is-no-shadow {
box-shadow: none;
}
.ep-card__header {
padding: $spacing-sm $spacing-md;
border-bottom: 1rpx solid $border-color-light;
font-weight: 600;
color: $text-main;
}
.ep-card__body {
padding: $spacing-md;
}
</style>