fix: variable tree remove button event handling (#134)

* docs: add StrictMode

* fix: variable tree remove button event handling
This commit is contained in:
Wells
2024-04-16 15:25:09 +08:00
committed by GitHub
parent 27166ec949
commit 52864b5400
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
import React from 'react';
import React, { StrictMode } from 'react';
import { Outlet } from 'umi';
import './index.less';
export default function Layout() {
return (
<div>
<StrictMode>
<Outlet />
</div>
</StrictMode>
);
}
@@ -204,7 +204,8 @@ export function VariableTree(props: VariableTreeProps) {
{node.showRemoveButton && (
<Popconfirm
title={`确认删除吗 ${node.title}?该操作会导致引用此模型的代码报错,请谨慎操作!`}
onConfirm={() => {
onConfirm={(e) => {
e.stopPropagation();
if (isStoreVariablePath(node.key)) {
onRemoveStoreVariable(node.key);
} else {