oak-general-business/app/pages/userRelation/detail2/index.tsx

43 lines
1.4 KiB
TypeScript

import React, { Component } from 'react';
import { Cell, Image, Tag, Checkbox } from 'tdesign-mobile-react';
import { Button } from 'tdesign-react';
export default function render() {
const {t} = this;
const { entity } = this.props;
const { avatar, nickname, name, mobile, relationArr } = this.state;
return (
<div>
<Cell
title={nickname || '未设置'}
image={
<Image
src={avatar}
alt="头像"
style={{ width: 80, height: 80 }}
/>
}
description={
<div className="description">
<div className="name">: {name || '未设置'}</div>
<div className="mobile">: {mobile || '未设置'}</div>
</div>
}
/>
{relationArr?.map((item) => (
<Checkbox
checked={item.checked}
label={t(entity + ':r.' + item.value)}
onChange={(checked) => {
this.onChangeValue(item.value, checked);
}}
/>
))}
<Button theme="primary" block onClick={() => this.onConfirm()}>
</Button>
</div>
);
}