ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送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) ```