fix(web): 调整样式

This commit is contained in:
v-zhangjc9
2025-06-25 10:43:26 +08:00
parent 2d2eaafcd4
commit d3c7457889
2 changed files with 10 additions and 11 deletions

View File

@@ -51,6 +51,7 @@ const FlowableDiv = styled.div`
position: absolute; position: absolute;
right: 20px; right: 20px;
top: 20px; top: 20px;
z-index: 10;
} }
.node-card { .node-card {
@@ -101,7 +102,7 @@ function FlowEditor() {
} = useFlowStore() } = useFlowStore()
const [currentNodeForm, setCurrentNodeForm] = useState<JSX.Element>() const [currentNodeForm, setCurrentNodeForm] = useState<JSX.Element>()
const editNode = (id: string, name: string, description: string, columnSchema?: Schema[]) => { const editNode = (id: string, columnSchema?: Schema[]) => {
if (!isNil(columnSchema)) { if (!isNil(columnSchema)) {
setCurrentNodeForm( setCurrentNodeForm(
amisRender( amisRender(
@@ -321,13 +322,6 @@ function FlowEditor() {
<FlowableDiv> <FlowableDiv>
{contextHolder} {contextHolder}
<Space className="toolbar"> <Space className="toolbar">
<Button type="primary" onClick={() => {
let saveData = {nodes, edges, data}
console.log(JSON.stringify(saveData, null, 2))
}}>
<SaveFilled/>
</Button>
<Dropdown <Dropdown
menu={{ menu={{
items: nodeDef.map(def => ({key: def.key, label: def.name})), items: nodeDef.map(def => ({key: def.key, label: def.name})),
@@ -352,11 +346,18 @@ function FlowEditor() {
}, },
}} }}
> >
<Button type="dashed"> <Button type="default">
<PlusCircleFilled/> <PlusCircleFilled/>
</Button> </Button>
</Dropdown> </Dropdown>
<Button type="primary" onClick={() => {
let saveData = {nodes, edges, data}
console.log(JSON.stringify(saveData, null, 2))
}}>
<SaveFilled/>
</Button>
</Space> </Space>
<Drawer <Drawer
title="节点编辑" title="节点编辑"

View File

@@ -92,8 +92,6 @@ const AmisNode = (
// @ts-ignore // @ts-ignore
editNode( editNode(
id, id,
defaultNodeName,
defaultNodeDescription,
[ [
{ {
type: 'input-text', type: 'input-text',