1.0.1 • Published 4 years ago

@alone-g6/history v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

基于@antv/g6的历史记录组件

使用

import History from '@alone-g6/history';
const history = new History({
    // 更新防抖延迟
    updateDebounceWait: 1000
});
new G6.Graph({
    plugins: [history]
})

属性

  • hasUndo: 是否有返回栈
  • hasRedo: 是否有前进栈

methods

  • push(data?): 新增undo操作栈,如传入data则直接使用该data,否则自动调用graph.save()
  • undo: 返回(撤销操作)
  • redo: 前进
  • proxyInputLabelUpdate(showInput, options?): 代理input-labelshowInput操作并记录历史记录
1.0.1

4 years ago

1.0.0

4 years ago