发布页开发

This commit is contained in:
筱野
2025-08-17 22:58:00 +08:00
parent 68a6558776
commit 2b3caf027b
76 changed files with 6173 additions and 1610 deletions

View File

@@ -0,0 +1,50 @@
@use '~@/scss/themeColor.scss' as theme;
.activity-type-switch {
display: flex;
gap: 12px;
margin-bottom: 12px;
padding: 0 4px;
border: 1px solid rgba(0, 0, 0, 0.06);
height: 40px;
border-radius: 12px;
padding: 4px;
overflow: hidden;
.switch-tab {
flex: 1;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
cursor: pointer;
border: 1px solid #e5e5e5;
color: theme.$primary-color;
opacity: 0.3;
box-shadow: none;
border: none;
.icon-style {
width: 20px;
height: 20px;
}
&.active {
background: white;
border: 1px solid rgba(0, 0, 0, 0.06);
box-shadow: 0px 4px 48px 0px rgba(0, 0, 0, 0.08);
opacity: 1;
}
.tab-icon {
font-size: 18px;
line-height: 1;
}
.tab-text {
font-size: 14px;
color: #333;
font-weight: 500;
}
}
}

View File

@@ -0,0 +1,37 @@
import React from 'react'
import { View, Text, Image } from '@tarojs/components'
import images from '@/config/images'
import './index.scss'
export type ActivityType = 'individual' | 'group'
interface ActivityTypeSwitchProps {
value: ActivityType
onChange: (type: ActivityType) => void
}
const ActivityTypeSwitch: React.FC<ActivityTypeSwitchProps> = ({ value, onChange }) => {
return (
<View className='activity-type-switch'>
<View
className={`switch-tab ${value === 'individual' ? 'active' : ''}`}
onClick={() => onChange('individual')}
>
<View className='tab-icon'>
<Image src={images.ICON_PERSONAL} className='icon-style' />
</View>
<Text className='tab-text'></Text>
</View>
<View
className={`switch-tab ${value === 'group' ? 'active' : ''}`}
onClick={() => onChange('group')}
>
<Image src={images.ICON_CHANGDA} className='icon-style' />
<Text className='tab-text'></Text>
</View>
</View>
)
}
export default ActivityTypeSwitch