fix(web): 调整样式
This commit is contained in:
@@ -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="节点编辑"
|
||||||
|
|||||||
@@ -92,8 +92,6 @@ const AmisNode = (
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
editNode(
|
editNode(
|
||||||
id,
|
id,
|
||||||
defaultNodeName,
|
|
||||||
defaultNodeDescription,
|
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
type: 'input-text',
|
type: 'input-text',
|
||||||
|
|||||||
Reference in New Issue
Block a user