mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-30 23:26:36 +08:00
### What problem does this PR solve? Feat: Add tooltip to question item of ChunkCreatingModal #3873 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,8 +1,21 @@
|
||||
.tweenGroup {
|
||||
display: inline-block;
|
||||
:global(.ant-tag) {
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
padding: 2px 8px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.tag {
|
||||
max-width: 100%;
|
||||
margin: 0;
|
||||
padding: 2px 20px 2px 4px;
|
||||
font-size: 14px;
|
||||
.textEllipsis();
|
||||
position: relative;
|
||||
:global(.ant-tag-close-icon) {
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,8 +45,10 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
|
||||
};
|
||||
|
||||
const forMap = (tag: string) => {
|
||||
const tagElem = (
|
||||
return (
|
||||
<Tag
|
||||
key={tag}
|
||||
className={styles.tag}
|
||||
closable
|
||||
onClose={(e) => {
|
||||
e.preventDefault();
|
||||
@ -56,11 +58,6 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
|
||||
{tag}
|
||||
</Tag>
|
||||
);
|
||||
return (
|
||||
<span key={tag} style={{ display: 'inline-block' }}>
|
||||
{tagElem}
|
||||
</span>
|
||||
);
|
||||
};
|
||||
|
||||
const tagChild = tags?.map(forMap);
|
||||
@ -71,8 +68,8 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<span>
|
||||
<div>
|
||||
{Array.isArray(tagChild) && tagChild.length > 0 && (
|
||||
<TweenOneGroup
|
||||
className={styles.tweenGroup}
|
||||
enter={{
|
||||
@ -91,7 +88,7 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
|
||||
>
|
||||
{tagChild}
|
||||
</TweenOneGroup>
|
||||
</span>
|
||||
)}
|
||||
{inputVisible ? (
|
||||
<Input
|
||||
ref={inputRef}
|
||||
@ -107,7 +104,7 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
|
||||
<PlusOutlined />
|
||||
</Tag>
|
||||
)}
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user