优化样式
This commit is contained in:
@@ -131,7 +131,7 @@ const MultiCascader: React.FC<MultiCascaderProps> = ({
|
|||||||
toggleExpand(option.value);
|
toggleExpand(option.value);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isExpanded ? '▼' : '▶'}
|
<i className={isExpanded ? "ri-arrow-down-s-line" : "ri-arrow-right-s-line"}></i>
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -151,7 +151,15 @@ const MultiCascader: React.FC<MultiCascaderProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div ref={containerRef} className="relative inline-block w-full">
|
<div ref={containerRef} className="relative inline-block w-full">
|
||||||
<div
|
<div
|
||||||
className="border border-gray-300 rounded px-3 py-2 cursor-pointer bg-white flex justify-between items-center"
|
className="border border-gray-300 rounded px-3 py-2 cursor-pointer bg-white flex justify-between items-center focus:outline-none focus:ring-2 focus:ring-[var(--color-primary,#00684a)] focus:border-[var(--color-primary,#00684a)]"
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.key === 'Enter' || e.key === ' ') {
|
||||||
|
e.preventDefault();
|
||||||
|
setVisible(!visible);
|
||||||
|
}
|
||||||
|
}}
|
||||||
onClick={() => setVisible(!visible)}
|
onClick={() => setVisible(!visible)}
|
||||||
>
|
>
|
||||||
<span className={selected.length === 0 ? 'text-gray-400' : ''}>
|
<span className={selected.length === 0 ? 'text-gray-400' : ''}>
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ const TreeNodeCheckbox: React.FC<{
|
|||||||
onKeyDown={e => (e.key === 'Enter' || e.key === ' ') && setExpanded(e => !e)}
|
onKeyDown={e => (e.key === 'Enter' || e.key === ' ') && setExpanded(e => !e)}
|
||||||
style={{ width: 16, display: "inline-block", textAlign: "center" }}
|
style={{ width: 16, display: "inline-block", textAlign: "center" }}
|
||||||
>
|
>
|
||||||
{expanded ? "▼" : "▶"}
|
<i className={expanded ? "ri-arrow-down-s-line" : "ri-arrow-right-s-line"}></i>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<input
|
<input
|
||||||
|
|||||||
Reference in New Issue
Block a user