优化样式

This commit is contained in:
2025-07-16 22:18:38 +08:00
parent b30e4c92c8
commit a7474d7fc4
2 changed files with 11 additions and 3 deletions
+10 -2
View File
@@ -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' : ''}>
+1 -1
View File
@@ -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