ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
[TOC] ## useDebouncedRefHistory 根据防抖设置 ``` const counter =ref<number>(0); const { history, undo, redo } = useDebouncedRefHistory(counter, { deep: true, debounce: 1000 }) ``` ## useThrottledRefHistory 节流生成历史 ``` const { history, undo, redo } = useThrottledRefHistory(counter, { deep: true, throttle: 1000 }) ``` ## useManualRefHistory 设置可撤回的值 ``` const counter =ref<number>(0); const { history, commit, undo, redo }=useManualRefHistory(counter) ``` ## useRefHistory 更改后就产生历史 ``` const counter =ref<number>(0); const { history, undo, redo } = useRefHistory(counter) ```