Commit 8ebf7808 authored by wuyongsheng's avatar wuyongsheng

Merge branch 'feat-20220801' into 'release'

Feat 20220801

See merge request !98
parents 9ca302f3 3e773173
/*
* @Author: 吴永生#A02208 yongsheng.wu@wholion.com
* @Date: 2022-07-11 11:56:58
* @LastEditors: 吴永生#A02208 yongsheng.wu@wholion.com
* @LastEditTime: 2022-07-22 10:51:10
* @LastEditors: 吴永生 15770852798@163.com
* @LastEditTime: 2022-09-08 13:55:20
* @FilePath: /bkunyun/src/components/mui/MyTooltip.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -39,7 +39,7 @@ const MyTooltip = (props: IMyTooltipProps) => {
<Tooltip
// interactive={true}
arrow
title={title}
title={title || ''}
placement={placement}
{...other}
>
......
......@@ -21,7 +21,7 @@ const useMyRequest = <TData, TParams>(
defaultParams?: TParams[];
onBefore?: (params: TParams[]) => void;
onSuccess?: (data: TData, params: TParams[]) => void;
onError?: (e: Error, params: TParams[]) => void;
onError?: (e: any, params: TParams[]) => void;
onFinally?: (params: TParams[], data?: TData, e?: Error) => void;
loadingDelay?: number;
pollingInterval?: number;
......@@ -51,9 +51,16 @@ const useMyRequest = <TData, TParams>(
const request = useRequest(api, {
...defaultOptions,
onSuccess: () => {},
onError: (data) => {
onSuccess: () => { },
onError: (data: any) => {
Message.error(data.message);
if (data.errorCode === '100003') {
setTimeout(() => {
localStorage.removeItem('token_key');
if (window.location.href && !window.location.href.includes("/login-page"))
window.location.href = '/v2/pages/login-page'
}, 4000);
}
},
...options,
});
......
......@@ -210,7 +210,7 @@ const ConfigForm = (props: ConfigFormProps) => {
</span>
</div>
<MyTooltip
title={parameter.description || parameter.name}
title={parameter.description}
placement="right"
>
<div className={styles.parameterContent}>
......
......@@ -329,7 +329,7 @@ const Flow = (props: IProps) => {
/** 坐标 */
position: {
/** 流算子生成的时候多加了15 兼容历史模版数据 直接这边减去15 */
x: Number(item.position?.x - 15) || 0,
x: Number(item.position?.x) || 0,
y: Number(item.position?.y) || 0,
},
/**
......
......@@ -190,7 +190,7 @@ const ParameterSetting = (props: IParameterSettingProps) => {
(parameter: IParameter) => {
return (
<MyTooltip
title={parameter.description || parameter.name}
title={parameter.description}
placement="right"
>
<div>
......
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