任务视图筛选条件增加条件关系

This commit is contained in:
whyour 2022-11-09 20:43:22 +08:00
parent 5efc3d2228
commit c72abd29ec
2 changed files with 88 additions and 48 deletions

View File

@ -176,3 +176,9 @@ tr.drop-over-upward td {
padding-top: 10px;
}
}
.view-filters-container.active {
.filter-item > div > .ant-form-item-control {
padding-left: 40px;
}
}

View File

@ -164,13 +164,46 @@ const ViewCreateModal = ({
</Form.Item>
<Form.List name="filters">
{(fields, { add, remove }) => (
<div style={{ position: 'relative' }} className={`view-filters-container ${fields.length > 1 ? 'active' : ''}`}>
{
fields.length > 1 && (
<div
style={{
position: 'absolute',
width: 50,
borderRadius: 10,
border: '1px solid rgb(190, 220, 255)',
borderRight: 'none',
height: 56 * (fields.length - 1),
top: 46,
left: 15
}}
>
<Button
type="primary"
size="small"
style={{
position: 'absolute',
top: '50%',
translate: '-50% -50%',
padding: '0 5px',
}}
>
<>
</>
</Button>
</div>
)
}
<div>
{fields.map(({ key, name, ...restField }, index) => (
<Form.Item
label={index === 0 ? '筛选条件' : ''}
key={key}
style={{ marginBottom: 0 }}
required
className='filter-item'
>
<Space className="view-create-modal-filters" align="baseline">
<Form.Item
@ -214,7 +247,8 @@ const ViewCreateModal = ({
</a>
</Form.Item>
</>
</div>
</div>
)}
</Form.List>
<Form.List name="sorts">