style(index): 更新首页样式和快速操作组件
- 更改页面背景渐变颜色 - 调整购买按钮背景渐变颜色 - 修改购物车图标背景渐变颜色 - 重构快速操作组件布局结构 - 更新快速操作图标尺寸和样式 - 移除快速操作标题和描述文字 - 简化快速操作组件渲染逻辑 - 添加图标颜色分类样式类
This commit is contained in:
@@ -14,28 +14,28 @@ const QuickActions: React.FC = () => {
|
||||
|
||||
const actions = [
|
||||
{
|
||||
icon: <Star size={28} />,
|
||||
icon: <Star size={22} />,
|
||||
title: '我要推荐',
|
||||
subtitle: '推荐赚佣金',
|
||||
path: '/dealer/index'
|
||||
path: '/dealer/index',
|
||||
iconClass: 'qa-icon--orange'
|
||||
},
|
||||
{
|
||||
icon: <People size={28} />,
|
||||
icon: <People size={22} />,
|
||||
title: '我的客户',
|
||||
subtitle: '查看客户列表',
|
||||
path: '/dealer/customer/index'
|
||||
path: '/dealer/customer/index',
|
||||
iconClass: 'qa-icon--blue'
|
||||
},
|
||||
{
|
||||
icon: <AddCircle size={28} />,
|
||||
icon: <AddCircle size={22} />,
|
||||
title: '邀请好友',
|
||||
subtitle: '分享赚收益',
|
||||
path: '/dealer/qrcode/index'
|
||||
path: '/dealer/qrcode/index',
|
||||
iconClass: 'qa-icon--cyan'
|
||||
},
|
||||
{
|
||||
icon: <Wallet size={28} />,
|
||||
icon: <Wallet size={22} />,
|
||||
title: '我的钱包',
|
||||
subtitle: '收益与提现',
|
||||
path: '/user/wallet/wallet'
|
||||
path: '/user/wallet/wallet',
|
||||
iconClass: 'qa-icon--red'
|
||||
}
|
||||
]
|
||||
|
||||
@@ -53,41 +53,18 @@ const QuickActions: React.FC = () => {
|
||||
|
||||
return (
|
||||
<View className='quick-actions'>
|
||||
<View className='quick-actions__header'>
|
||||
<Text className='quick-actions__title'>快捷服务</Text>
|
||||
</View>
|
||||
<View className='quick-actions__row'>
|
||||
<View className='quick-actions__item' onClick={() => handleClick(actions[0])}>
|
||||
<View className='quick-actions__icon-box'>
|
||||
{React.cloneElement(actions[0].icon as React.ReactElement, { color: '#ffffff' })}
|
||||
{actions.map((action, index) => (
|
||||
<View
|
||||
key={index}
|
||||
className='quick-actions__item'
|
||||
onClick={() => handleClick(action)}
|
||||
>
|
||||
<View className={`quick-actions__icon ${action.iconClass}`}>
|
||||
{React.cloneElement(action.icon as React.ReactElement, { color: '#ffffff' })}
|
||||
</View>
|
||||
<Text className='quick-actions__item-title'>{actions[0].title}</Text>
|
||||
<Text className='quick-actions__item-desc'>{actions[0].subtitle}</Text>
|
||||
<Text className='quick-actions__label'>{action.title}</Text>
|
||||
</View>
|
||||
<View className='quick-actions__item' onClick={() => handleClick(actions[1])}>
|
||||
<View className='quick-actions__icon-box quick-actions__icon-box--light'>
|
||||
{React.cloneElement(actions[1].icon as React.ReactElement, { color: '#ffffff' })}
|
||||
</View>
|
||||
<Text className='quick-actions__item-title'>{actions[1].title}</Text>
|
||||
<Text className='quick-actions__item-desc'>{actions[1].subtitle}</Text>
|
||||
</View>
|
||||
</View>
|
||||
<View className='quick-actions__row'>
|
||||
<View className='quick-actions__item' onClick={() => handleClick(actions[2])}>
|
||||
<View className='quick-actions__icon-box quick-actions__icon-box--deep'>
|
||||
{React.cloneElement(actions[2].icon as React.ReactElement, { color: '#ffffff' })}
|
||||
</View>
|
||||
<Text className='quick-actions__item-title'>{actions[2].title}</Text>
|
||||
<Text className='quick-actions__item-desc'>{actions[2].subtitle}</Text>
|
||||
</View>
|
||||
<View className='quick-actions__item' onClick={() => handleClick(actions[3])}>
|
||||
<View className='quick-actions__icon-box quick-actions__icon-box--navy'>
|
||||
{React.cloneElement(actions[3].icon as React.ReactElement, { color: '#ffffff' })}
|
||||
</View>
|
||||
<Text className='quick-actions__item-title'>{actions[3].title}</Text>
|
||||
<Text className='quick-actions__item-desc'>{actions[3].subtitle}</Text>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user