@ -1,6 +1,6 @@
import { InfoCircleOutlined } from '@ant-design/icons';
import { Tiny } from '@ant-design/plots';
import { Col, Row, Tooltip } from 'antd';
import { Col, Progress, Row, Tooltip } from 'antd';
import numeral from 'numeral';
import type { DataItem } from '../data.d';
import useStyles from '../style.style';
@ -70,7 +70,11 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
yField="y"
shapeField="smooth"
height={46}
style={{ fill: 'linear-gradient(-90deg, white 0%, #975FE4 100%)', fillOpacity: 0.6 }}
style={{
fill: 'linear-gradient(-90deg, white 0%, #975FE4 100%)',
fillOpacity: 0.6,
width: '100%',
}}
data={visitData}
line={{ style: { stroke: '#975FE4' } }}
/>
@ -134,18 +138,7 @@ const IntroduceRow = ({ loading, visitData }: { loading: boolean; visitData: Dat
}
contentHeight={46}
>
<Tiny.Progress
height={12}
color={['#E9EEF4', '#13C2C2']}
percent={0.78}
annotations={[
{
type: 'lineY',
data: [0.8],
style: { stroke: '#13C2C2', strokeOpacity: 1 },
},
]}
<Progress percent={78} strokeColor={{ from: '#108ee9', to: '#87d068' }} status="active" />
</ChartCard>
</Col>
</Row>
@ -173,8 +173,8 @@ const SalesCard = ({
{rankingListData.map((item, i) => (
<li key={item.title}>
<span
className={`${styles.rankingItemNumber} ${
i < 3 ? styles.active : ''
className={`${
i < 3 ? styles.rankingItemNumberActive : styles.rankingItemNumber
}`}
{i + 1}
@ -60,6 +60,16 @@ const useStyles = createStyles(({ token }) => {
textOverflow: 'ellipsis',
rankingItemNumberActive: {
display: 'inline-block',
width: '20px',
height: '20px',
marginTop: '1.5px',
marginRight: '16px',
fontWeight: '600',
fontSize: '12px',
lineHeight: '20px',
textAlign: 'center',
borderRadius: '20px',
color: '#fff',
backgroundColor: token.colorBgSpotlight,
@ -11,7 +11,7 @@ import type { BasicListItemDataType } from '../data.d';
type OperationModalProps = {
done: boolean;
visible: boolean;
open: boolean;
current: Partial<BasicListItemDataType> | undefined;
onDone: () => void;
onSubmit: (values: BasicListItemDataType) => void;
@ -19,13 +19,13 @@ type OperationModalProps = {
};
const OperationModal: FC<OperationModalProps> = (props) => {
const { styles } = useStyles();
const { done, visible, current, onDone, onSubmit, children } = props;
if (!visible) {
const { done, open, current, onDone, onSubmit, children } = props;
if (!open) {
return null;
return (
<ModalForm<BasicListItemDataType>
visible={visible}
open={open}
title={done ? null : `任务${current ? '编辑' : '添加'}`}
className={styles.standardListForm}
width={640}
@ -70,7 +70,7 @@ const ListContent = ({
export const BasicList: FC = () => {
const [done, setDone] = useState<boolean>(false);
const [visible, setVisible] = useState<boolean>(false);
const [open, setVisible] = useState<boolean>(false);
const [current, setCurrent] = useState<Partial<BasicListItemDataType> | undefined>(undefined);
const {
data: listData,
@ -247,7 +247,7 @@ export const BasicList: FC = () => {
</Button>
<OperationModal
done={done}
current={current}
onDone={handleDone}
onSubmit={handleSubmit}
@ -111,7 +111,7 @@ const useStyles = createStyles(({ token }) => {
listCard: {
[`@media screen and (max-width: ${token.screenXS}px)`]: {
'.ant-card-head-title': {
overflow: 'visible',
overflow: 'open',
[`@media screen and (max-width: ${token.screenMD}px)`]: {
@ -14,7 +14,7 @@ const CreateForm: React.FC<CreateFormProps> = (props) => {
<Modal
destroyOnClose
title="新建规则"
visible={modalVisible}
open={modalVisible}
onCancel={() => onCancel()}
footer={null}
@ -40,7 +40,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
title="规则配置"
visible={props.updateModalVisible}
open={props.updateModalVisible}
footer={submitter}
onCancel={() => {
props.onCancel();
@ -249,7 +249,7 @@ const TableList: React.FC = () => {
<ModalForm
width="400px"
visible={createModalVisible}
open={createModalVisible}
onVisibleChange={handleModalVisible}
onFinish={async (value) => {
const success = await handleAdd(value as TableListItem);
@ -296,7 +296,7 @@ const TableList: React.FC = () => {
<Drawer
width={600}
visible={showDetail}
open={showDetail}
onClose={() => {
setCurrentRow(undefined);
setShowDetail(false);
@ -22,7 +22,7 @@ const passwordProgressMap: {
const Register: FC = () => {
const [count, setCount]: [number, any] = useState(0);
const [visible, setVisible]: [boolean, any] = useState(false);
const [open, setVisible]: [boolean, any] = useState(false);
const [prefix, setPrefix]: [string, any] = useState('86');
const [popover, setPopover]: [boolean, any] = useState(false);
const confirmDirty = false;
@ -105,7 +105,7 @@ const Register: FC = () => {
return promise.reject('请输入密码!');
// 有值的情况
setVisible(!!value);
setPopover(!popover);
@ -161,7 +161,7 @@ const Register: FC = () => {
return node;
content={
visible && (
open && (
<div
padding: '4px 0',
@ -183,7 +183,7 @@ const Register: FC = () => {
width: 240,
placement="right"
<FormItem
name="password"