✨ feat(登录登出): 已完成用户使用账号密码登录登出
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
.checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
&--text {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.checkbox_main {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -14,9 +14,10 @@ type params = {
|
||||
circle?: boolean
|
||||
round?: boolean
|
||||
size?: CheckboxSize
|
||||
children?: React.ReactNode
|
||||
}
|
||||
export default forwardRef((props: params, ref) => {
|
||||
const { onSelect, onClose, status = false, disabled = false, circle = false, round = true, size = 'normal' } = props
|
||||
const { onSelect, onClose, status = false, disabled = false, circle = false, round = true, size = 'normal', children } = props
|
||||
const [selected, SetSelected] = useState(false)
|
||||
const onSelectEven = () => {
|
||||
if (disabled) return false
|
||||
@@ -54,12 +55,13 @@ export default forwardRef((props: params, ref) => {
|
||||
SetSelected(status)
|
||||
}, [status])
|
||||
return (
|
||||
<>
|
||||
<View className={classnames(styles.checkbox_main, getMainClassName())} onClick={() => onSelectEven()}>
|
||||
<View className={styles.checkbox} onClick={() => onSelectEven()}>
|
||||
<View className={classnames(styles.checkbox_main, getMainClassName())}>
|
||||
<View className={classnames(styles.checkbox_item, getClassName())}>
|
||||
{selected && <IconFont name='icon-a-jizhumima' size={22} color='#fff'></IconFont>}
|
||||
</View>
|
||||
</View>
|
||||
</>
|
||||
{children && <View className={styles['checkbox--text']}>{children}</View>}
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
@@ -41,7 +41,6 @@ const NormalButton: FC<PropsType> = (props) => {
|
||||
[styles['button--plain']]: plain,
|
||||
[styles['button--circle']]: circle,
|
||||
}
|
||||
console.log('classObj==>button', classObject)
|
||||
return classObject
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user