feat: 音量滑块范围改为 1-5(对应传参 0-4)
This commit is contained in:
@@ -522,21 +522,21 @@ export default function VoiceSynthesis() {
|
||||
<div className="voice-section">
|
||||
<div className="voice-section-header">
|
||||
<span className="voice-section-title">音量</span>
|
||||
<span className="speed-value">{volume}</span>
|
||||
<span className="speed-value">{volume + 1}</span>
|
||||
</div>
|
||||
<div className="speed-slider-wrap">
|
||||
<span>0</span>
|
||||
<span>1</span>
|
||||
<input
|
||||
type="range"
|
||||
className="slider-input"
|
||||
min={0}
|
||||
max={10}
|
||||
min={1}
|
||||
max={5}
|
||||
step={1}
|
||||
value={volume}
|
||||
onChange={e => { const v = parseInt(e.target.value); setVolume(v); saveMetaToLocalFile({ voiceVolume: v }); }}
|
||||
style={{ '--slider-percent': `${(volume / 10) * 100}%` } as React.CSSProperties}
|
||||
value={volume + 1}
|
||||
onChange={e => { const v = parseInt(e.target.value) - 1; setVolume(v); saveMetaToLocalFile({ voiceVolume: v }); }}
|
||||
style={{ '--slider-percent': `${((volume) / 4) * 100}%` } as React.CSSProperties}
|
||||
/>
|
||||
<span>10</span>
|
||||
<span>5</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user