NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
[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) ```