Commit d179d130 authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !84
parents 7f637d6c daaee6e8
......@@ -15,7 +15,7 @@ main::-webkit-scrollbar-track {
div::-webkit-scrollbar-thumb,
main::-webkit-scrollbar-thumb {
background-color: #c2c6cc;
background-color: rgba(138, 144, 153, 0.55);
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
......@@ -23,6 +23,13 @@ main::-webkit-scrollbar-thumb {
width: 6px !important;
}
div::-webkit-scrollbar-thumb:hover {
background-color: rgba(138, 144, 153, 0.8);
}
main::-webkit-scrollbar-thumb:hover {
background-color: rgba(138, 144, 153, 0.8);
}
body,
h1,
h2,
......
......@@ -54,11 +54,17 @@ const theme = createTheme({
"&.MuiButton-outlinedError": {
color: "rgba(255, 78, 78, 1)",
border: "1px solid rgba(255, 78, 78, 1)",
"&:hover": { backgroundColor: "transparent" },
"&:hover": { backgroundColor: "#FFEDED" },
},
"& .MuiLoadingButton-loadingIndicator": {
color: "#fff",
},
"&.MuiButton-containedError": {
backgroundColor: "#FF4E4E",
"&:hover": {
backgroundColor: "rgba(217, 54, 54, 1)",
},
},
},
contained: {
backgroundColor: "#1370FF",
......@@ -101,6 +107,9 @@ const theme = createTheme({
border: "1px solid rgba(221, 225, 230, 1)",
},
},
// outlinedError: {
// "&:hover": { backgroundColor: "#FFEDED " },
// },
textSecondary: {
backgroundColor: "transparent",
color: "#FF4E4E",
......
import React from "react";
import React, { useMemo } from "react";
import {
Dialog,
......@@ -42,7 +42,14 @@ export interface IDialogProps {
/** 点击遮罩是否关闭 默认为false*/
clickMaskClose?: boolean;
/** 确认按钮样式*/
okSx?: any;
okColor?:
| "inherit"
| "primary"
| "secondary"
| "success"
| "error"
| "info"
| "warning"; //按钮颜色风格
loading?: boolean; // 确认按钮是否处于loading状态
}
......@@ -66,7 +73,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
disabledConfirm,
clickMaskClose = false,
loading = false,
okSx = {},
okColor = "primary",
} = props;
const handelClose = (
......@@ -79,7 +86,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
onClose && onClose();
};
const Footer = () => {
const Footer = useMemo(() => {
if (isHideFooter) return null;
return footerRender ? (
footerRender()
......@@ -90,7 +97,6 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={cancelText || "取消"}
onClick={onClose}
variant="outlined"
// size="small"
color="secondary"
/>
) : null}
......@@ -99,16 +105,28 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
text={okText || "确定"}
onClick={onConfirm}
variant="contained"
// size="small"
color={okColor}
disabled={disabledConfirm}
isLoadingButton={true}
loading={loading}
style={{ marginLeft: "12px", ...okSx }}
style={{ marginLeft: "12px" }}
/>
) : null}
</DialogActions>
);
};
}, [
disabledConfirm,
okColor,
okText,
onConfirm,
onClose,
cancelText,
showCancel,
footerRender,
isHideFooter,
loading,
showConfirm,
]);
return (
<Dialog
open={open}
......@@ -155,7 +173,7 @@ const MyDialog: React.FunctionComponent<IDialogProps> = (props) => {
</DialogTitle>
)}
<DialogContent style={{ minWidth: 388 }}>{children}</DialogContent>
{Footer()}
{Footer}
</Dialog>
);
};
......
......@@ -89,6 +89,7 @@ const DeleteDialog = (props: IDeleteFileProps) => {
open={deleteDialogOpen}
onClose={() => setDeleteDialogOpen(false)}
onConfirm={handleSubmit}
okColor="error"
>
{currentOperateFile
? "确认删除该数据吗?"
......
......@@ -446,7 +446,7 @@ const BaseInfo = observer(() => {
onConfirm={handleSubmitDelete}
onClose={() => setDialogOpen(false)}
title="删除项目"
okSx={{ background: "#FF4E4E", color: "#fff" }}
okColor="error"
>
<div className={style.deleteBox}>
<div className={style.deleteText1}>
......
......@@ -12,7 +12,7 @@ const SimpleDialog = (props: any) => {
onClose={closeDialog}
onConfirm={onConfirm}
title={title}
okSx={{ background: "#FF4E4E", color: "#fff" }}
okColor="error"
>
<Box>
<Typography sx={{ fontSize: "14px", fontWeight: "400" }}>
......
.reactFlowBox>div:last-child {
.reactFlowBox > div:last-child {
display: none;
}
.reactFlowBox > div:first-child {
margin-top: 32px;
}
......@@ -13,7 +13,7 @@
box-shadow: 6px 8px 22px 0px rgba(0, 24, 57, 0.08);
}
.operatorItemBox:hover .footerBox {
border-bottom: none;
border-bottom: 1px solid #fff;
}
.dragBox {
......@@ -73,7 +73,7 @@
overflow-y: overlay;
height: calc(100% - 48px);
position: relative;
overflow-x: visible;
overflow: visible;
}
.noData {
display: flex;
......
......@@ -76,6 +76,9 @@
justify-content: flex-start;
align-items: center;
}
.paramsTabTitle {
margin-bottom: 0;
}
.paramsTitleDesc {
margin-left: 8px;
......@@ -84,7 +87,7 @@
.paramsList {
background-color: rgba(247, 248, 250, 1);
border-radius: 4px;
padding: 16px 20px;
padding: 16px 20px 24px;
}
.parameterBox {
......
......@@ -213,7 +213,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/>
),
}}
placeholder="请选择"
placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -238,7 +238,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/>
),
}}
placeholder="请选择"
placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -263,7 +263,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
/>
),
}}
placeholder="请选择"
placeholder={parameter.parameterGroup === "out" ? "" : "请选择"}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -275,7 +275,9 @@ const ParameterSetting = (props: IParameterSettingProps) => {
onChange={(e: any) =>
handleParameterChange(e, parameter.name || "")
}
placeholder="可输入默认值"
placeholder={
parameter.parameterGroup === "out" ? "" : "可输入默认值"
}
error={parameter.error || false}
helperText={parameter.helperText}
disabled={parameter.parameterGroup === "out"}
......@@ -505,6 +507,8 @@ const ParameterSetting = (props: IParameterSettingProps) => {
setActiveParamsTab("senior");
} else if (hardwareParameters.length !== 0) {
setActiveParamsTab("hardware");
} else {
setActiveParamsTab(""); // 会报错 不过不会有蓝色长条
}
}, [basisParameters, seniorParameters, hardwareParameters]);
......@@ -631,7 +635,12 @@ const ParameterSetting = (props: IParameterSettingProps) => {
)}
{taskInfo && (
<div className={styles.paramsGroup}>
<div className={styles.paramsTitle}>
<div
className={classNames({
[styles.paramsTitle]: true,
[styles.paramsTabTitle]: true,
})}
>
参数组
<MyTooltip
title="当某个参数项为启用状态时,代表该参数将由模板使用者在使用的时候填写赋值;当为关闭状态时,代表该参数不需要使用者来填写赋值。"
......
......@@ -44,7 +44,7 @@
}
.swFormBox {
background-color: #fff;
border-right: 1xp solid rgba(235, 237, 240, 1);
border-right: 1px solid rgba(235, 237, 240, 1);
width: 360px;
height: 100%;
/* overflow-y: scroll; */
......
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