mirror of
https://github.com/NetEase/tango.git
synced 2026-08-30 16:55:35 +08:00
fix: variable tree remove button event handling (#134)
* docs: add StrictMode * fix: variable tree remove button event handling
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user