Commit 379ab1b7 authored by chenshouchao's avatar chenshouchao

Merge branch 'feat-20220801' into 'release'

cn-Feat 20220801

See merge request !88
parents 21df7ddd d10e919b
...@@ -27,56 +27,46 @@ const MySwitch = (props: IMySwitchProps) => { ...@@ -27,56 +27,46 @@ const MySwitch = (props: IMySwitchProps) => {
...other ...other
} = props; } = props;
const bgColor = useMemo(() => { const theme = useMemo(() => {
if (disabled) { return createTheme({
if (value) { components: {
return "rgba(166, 211, 255, 1)"; MuiSwitch: {
} else { styleOverrides: {
return "rgba(221, 225, 230, 1)"; root: {
} boxSizing: "border-box",
} else { padding: "0",
if (value) { },
return "rgba(19, 112, 255, 1)"; switchBase: {
} else { top: "4px",
return "rgba(221, 225, 230, 1)"; left: "4px",
} padding: 0,
} "&.Mui-checked": {
}, [disabled, value]); left: "2px",
"& + .MuiSwitch-track": {
const theme = createTheme({ backgroundColor: disabled
components: { ? "rgba(166, 211, 255, 1)"
MuiSwitch: { : "rgba(19, 112, 255, 1)",
styleOverrides: { opacity: 1,
root: { },
boxSizing: "border-box",
padding: "0",
},
switchBase: {
top: "4px",
left: "4px",
padding: 0,
"&.Mui-checked": {
left: "2px",
"& + .MuiSwitch-track": {
backgroundColor: bgColor,
opacity: 1,
}, },
}, },
}, thumb: {
thumb: { width: "14px",
width: "14px", height: "14px",
height: "14px", color: "#fff",
color: "#fff", },
}, track: {
track: { borderRadius: "11px",
borderRadius: "11px", backgroundColor: disabled
backgroundColor: "rgba(221, 225, 230, 1)", ? "RGBA(240, 242, 245, 1)"
opacity: 1, : "RGBA(221, 225, 230, 1)",
opacity: 1,
},
}, },
}, },
}, },
}, });
}); }, [disabled]);
return ( return (
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
......
.reactFlowBox > div:last-child { .reactFlowBox > div:last-child {
display: none; display: none;
} }
.reactFlowBox > div:first-child { /* .reactFlowBox > div:first-child {
margin-top: 32px; margin-top: 32px;
} } */
...@@ -668,7 +668,6 @@ const Flow = (props: IProps) => { ...@@ -668,7 +668,6 @@ const Flow = (props: IProps) => {
className={styles.reactFlowBox} className={styles.reactFlowBox}
nodes={nodes} nodes={nodes}
edges={edges} edges={edges}
fitView={flowType === "default" ? true : false}
{...reactFlowParams} {...reactFlowParams}
// proOptions={{ hideAttribution: true, account: "" }} // proOptions={{ hideAttribution: true, account: "" }}
nodeTypes={nodeTypes} nodeTypes={nodeTypes}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment