Compare commits
2 Commits
29006f34f3
...
d47392954a
Author | SHA1 | Date |
---|---|---|
king | d47392954a | 1 year ago |
king | e97f59d7f8 | 1 year ago |
@ -0,0 +1,13 @@ |
||||
.collect { |
||||
display: flex; |
||||
align-items: center; |
||||
color: #909795; |
||||
font-size: 24rpx; |
||||
|
||||
Image { |
||||
width: 32rpx; |
||||
height: 32rpx; |
||||
margin-right: 10rpx; |
||||
//vertical-align: middle; |
||||
} |
||||
} |
@ -0,0 +1,22 @@ |
||||
import {FC} from "react"; |
||||
import star from '@/static/img/star.png' |
||||
import starLine from '@/static/img/starLine.png' |
||||
import {Image, View} from "@tarojs/components"; |
||||
import styles from './collect.module.scss' |
||||
|
||||
interface Props { |
||||
onClick?: () => void |
||||
select?: boolean |
||||
} |
||||
|
||||
/** 收藏 */ |
||||
const Collect: FC<Props> = (props) => { |
||||
return ( |
||||
<View className={styles.collect}> |
||||
<Image src={props.select ? star : starLine}/> |
||||
{props.select ? '已收藏' : '收藏'} |
||||
</View> |
||||
) |
||||
} |
||||
|
||||
export default Collect |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 770 B |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.1 KiB |
Loading…
Reference in new issue