跳至主要内容

協助林品君把前端修正

7/19 修正

1. 去背調整

預設改成false,所以預設勾選checkbox

const [removeBg, setRemoveBg] = useState(false);
<span>
({removeBg === true ? "是" : "否"})
</span>

2. 簡易節流(拖曳中不要每毫秒觸發)

const throttleRef = useRef(0);
const handleSliderChange = (key, value) => {
const intVal = parseInt(value);
const updated = { ...sliderValues, [key]: intVal };
setSliderValues(updated);

const now = performance.now();
if (now - throttleRef.current > 100) { // 每 100ms 送一次
throttleRef.current = now;
onAdjustmentsChange && onAdjustmentsChange(updated);
}
};

首頁X4 登入 點進去的畫面 註冊

關於我們 out off