Commit eb927398 authored by XieZhiXiong's avatar XieZhiXiong

chore: 同步能力中心修改

parent 4bd96544
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-23 09:58:42
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-06-28 17:14:03
* @LastEditTime: 2021-09-26 14:14:22
* @Description: 适用公用列表
*/
import React, { useState, useEffect } from 'react';
......@@ -59,11 +59,11 @@ const ShopList: React.FC<ApplicableListProps> = (props) => {
disabled,
} = props;
const initValue = 'value' in props ? outerValue : defaultValue;
const [value, setValue] = useState<ValueType>(initValue);
const [value, setValue] = useState<ValueType>(initValue!);
useEffect(() => {
if ('value' in props) {
setValue(props.value);
setValue(props.value!);
}
}, [props.value]);
......@@ -84,7 +84,7 @@ const ShopList: React.FC<ApplicableListProps> = (props) => {
className={styles['applicable-list-checkboxGroup']}
disabled={disabled}
>
<Row gutter={16}>
<Row gutter={[16, 16]}>
{options.map((item) => {
const itemCls = classNames(styles['applicable-list-item'], {
[styles['applicable-list-item-checked']]: Array.isArray(value) && value.includes(item.value),
......
......@@ -30,24 +30,23 @@
display: block;
}
&-descritions {
&-item {
display: flex;
align-items: flex-start;
&-label {
flex-shrink: 0;
}
&-content {
flex: 1;
.textOverflow()
}
}
}
&-more {
padding: @padding-xss @padding-xss 0;
text-align: center;
}
&-descriptions {
display: flex;
align-items: flex-start;
&-label {
margin-right: @margin-md;
font-size: 12px;
color: #91959B;
}
&-content {
flex: 1;
}
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2021-06-25 11:34:36
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-08-02 17:40:56
* @LastEditTime: 2021-09-26 14:41:00
* @Description: 会员方块复选框
*/
import React, { useState, useEffect, useRef } from 'react';
......@@ -106,7 +106,7 @@ const MemberCheckboxGroup: React.FC<MemberCheckboxGroupProps> = (props) => {
disabled,
} = props;
const initValue = 'value' in props ? outerValue : defaultValue;
const [value, setValue] = useState<ValueType>(initValue);
const [value, setValue] = useState<ValueType>(initValue!);
const [internalOptions, setInternalOptions] = useState<ResponseType>({ data: [], totalCount: 0 });
const [loading, setLoading] = useState(false);
......@@ -137,7 +137,7 @@ const MemberCheckboxGroup: React.FC<MemberCheckboxGroupProps> = (props) => {
useEffect(() => {
if ('value' in props) {
setValue(props.value);
setValue(props.value!);
}
}, [props.value]);
......@@ -202,28 +202,38 @@ const MemberCheckboxGroup: React.FC<MemberCheckboxGroupProps> = (props) => {
return (
<Col span={12} key={item.value}>
<div className={itemCls}>
<Row gutter={16}>
<Row gutter={16} style={{ width: '100%' }}>
<Col span={6}>
<Descriptions column={1}>
<Descriptions.Item label="会员类型" style={{ paddingBottom: 0 }}>{item.memberTypeName}</Descriptions.Item>
</Descriptions>
<div className={styles['member-list-descriptions']}>
<div className={styles['member-list-descriptions-label']}>
会员类型:
</div>
<div className={styles['member-list-descriptions-content']}>{item.memberTypeName}</div>
</div>
</Col>
<Col span={6}>
<Descriptions column={1}>
<Descriptions.Item label="会员角色" style={{ paddingBottom: 0 }}>{item.roleName}</Descriptions.Item>
</Descriptions>
<div className={styles['member-list-descriptions']}>
<div className={styles['member-list-descriptions-label']}>
会员角色:
</div>
<div className={styles['member-list-descriptions-content']}>{item.roleName}</div>
</div>
</Col>
<Col span={6}>
<Descriptions column={1}>
<Descriptions.Item label="等级类型" style={{ paddingBottom: 0 }}>{item.levelTypeName}</Descriptions.Item>
</Descriptions>
<div className={styles['member-list-descriptions']}>
<div className={styles['member-list-descriptions-label']}>
等级类型:
</div>
<div className={styles['member-list-descriptions-content']}>{item.levelTypeName}</div>
</div>
</Col>
<Col span={6}>
<Descriptions column={1}>
<Descriptions.Item label="等级标签" style={{ paddingBottom: 0 }}>
<LevelBrand level={item.level} />
</Descriptions.Item>
</Descriptions>
<div className={styles['member-list-descriptions']}>
<div className={styles['member-list-descriptions-label']}>
等级标签:
</div>
<div className={styles['member-list-descriptions-content']}><LevelBrand level={item.level} /></div>
</div>
</Col>
</Row>
<Checkbox value={item.value} className={styles['member-list-item-checkbox']} />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment