resetInitialData
This commit is contained in:
parent
8713ba7b00
commit
a32b72452e
|
|
@ -12,8 +12,8 @@ export default OakComponent({
|
|||
printRunningTree() {
|
||||
console.log(this.features.runningTree.getRoot());
|
||||
},
|
||||
setInitialData() {
|
||||
this.features.cache.setInitialData();
|
||||
resetInitialData() {
|
||||
this.features.cache.resetInitialData();
|
||||
},
|
||||
setVisible(visible: boolean) {
|
||||
this.setState({
|
||||
|
|
|
|||
|
|
@ -55,17 +55,18 @@ export default function render() {
|
|||
C
|
||||
</Button>
|
||||
<Button
|
||||
theme="primary"
|
||||
theme="warning"
|
||||
shape="circle"
|
||||
onClick={() => {
|
||||
const confirmDia = DialogPlugin.confirm({
|
||||
header: '重置数据',
|
||||
body: '重置后,原来的数据不可恢复?',
|
||||
body: '重置后,原来的数据不可恢复',
|
||||
confirmBtn: '确定',
|
||||
cancelBtn: '取消',
|
||||
onConfirm: ({ e }) => {
|
||||
this.setInitialData();
|
||||
this.resetInitialData();
|
||||
confirmDia.hide();
|
||||
window.location.reload();
|
||||
},
|
||||
onClose: ({ e, trigger }) => {
|
||||
confirmDia.hide();
|
||||
|
|
@ -73,7 +74,7 @@ export default function render() {
|
|||
});
|
||||
}}
|
||||
>
|
||||
Rest
|
||||
Reset
|
||||
</Button>
|
||||
</Space>
|
||||
</Drawer>
|
||||
|
|
|
|||
Loading…
Reference in New Issue