fix(export): refine defaults modal interactions

This commit is contained in:
aits2026
2026-03-06 13:48:10 +08:00
parent 51a3ee4a9b
commit 10342be2be
3 changed files with 45 additions and 45 deletions

View File

@@ -6,7 +6,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 16px; padding: 16px;
z-index: 1015; z-index: 2400;
} }
.export-date-range-dialog { .export-date-range-dialog {

View File

@@ -126,6 +126,50 @@ export function ExportDefaultsSettingsForm({
return ( return (
<div className={`export-defaults-settings-form ${layout === 'split' ? 'layout-split' : 'layout-stacked'}`}> <div className={`export-defaults-settings-form ${layout === 'split' ? 'layout-split' : 'layout-stacked'}`}>
<div className="form-group">
<div className="form-copy">
<label></label>
<span className="form-hint">1~6</span>
</div>
<div className="form-control">
<div className="select-field" ref={exportConcurrencyDropdownRef}>
<button
type="button"
className={`select-trigger ${showExportConcurrencySelect ? 'open' : ''}`}
onClick={() => {
setShowExportConcurrencySelect(!showExportConcurrencySelect)
setShowExportFormatSelect(false)
setIsExportDateRangeDialogOpen(false)
setShowExportExcelColumnsSelect(false)
}}
>
<span className="select-value">{exportConcurrencyLabel}</span>
<ChevronDown size={16} />
</button>
{showExportConcurrencySelect && (
<div className="select-dropdown">
{exportConcurrencyOptions.map((option) => (
<button
key={option}
type="button"
className={`select-option ${exportDefaultConcurrency === option ? 'active' : ''}`}
onClick={async () => {
setExportDefaultConcurrency(option)
await configService.setExportDefaultConcurrency(option)
onDefaultsChanged?.({ concurrency: option })
notify(`已将导出并发数设为 ${option}`, true)
setShowExportConcurrencySelect(false)
}}
>
<span className="option-label">{option}</span>
</button>
))}
</div>
)}
</div>
</div>
</div>
<div className="form-group"> <div className="form-group">
<div className="form-copy"> <div className="form-copy">
<label></label> <label></label>
@@ -310,49 +354,6 @@ export function ExportDefaultsSettingsForm({
</div> </div>
</div> </div>
<div className="form-group">
<div className="form-copy">
<label></label>
<span className="form-hint">1~6</span>
</div>
<div className="form-control">
<div className="select-field" ref={exportConcurrencyDropdownRef}>
<button
type="button"
className={`select-trigger ${showExportConcurrencySelect ? 'open' : ''}`}
onClick={() => {
setShowExportConcurrencySelect(!showExportConcurrencySelect)
setShowExportFormatSelect(false)
setIsExportDateRangeDialogOpen(false)
setShowExportExcelColumnsSelect(false)
}}
>
<span className="select-value">{exportConcurrencyLabel}</span>
<ChevronDown size={16} />
</button>
{showExportConcurrencySelect && (
<div className="select-dropdown">
{exportConcurrencyOptions.map((option) => (
<button
key={option}
type="button"
className={`select-option ${exportDefaultConcurrency === option ? 'active' : ''}`}
onClick={async () => {
setExportDefaultConcurrency(option)
await configService.setExportDefaultConcurrency(option)
onDefaultsChanged?.({ concurrency: option })
notify(`已将导出并发数设为 ${option}`, true)
setShowExportConcurrencySelect(false)
}}
>
<span className="option-label">{option}</span>
</button>
))}
</div>
)}
</div>
</div>
</div>
</div> </div>
) )
} }

View File

@@ -5282,7 +5282,6 @@ function ExportPage() {
<div className="export-defaults-modal-header"> <div className="export-defaults-modal-header">
<div> <div>
<h3></h3> <h3></h3>
<p></p>
</div> </div>
<button <button
className="close-icon-btn" className="close-icon-btn"