fix(plugin-custom-request): improve x button style and afterSuccess not work when manualClose is enable (#2882)

* feat: improve x button style

* fix: manualClose does not enable logic
This commit is contained in:
Dunqing 2023-10-20 03:06:37 -05:00 committed by GitHub
parent f5f74382f8
commit d2bf691b69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 27 deletions

View File

@ -336,9 +336,7 @@ export function Input(props) {
{button ?? ( {button ?? (
<XButton <XButton
className={css(` className={css(`
&:not(:hover) { margin-left: -1px;
border-left-color: transparent;
}
`)} `)}
type={variable ? 'primary' : 'default'} type={variable ? 'primary' : 'default'}
/> />

View File

@ -6,7 +6,6 @@ import { css } from '@emotion/css';
export function JSONInput(props) { export function JSONInput(props) {
return ( return (
<div>
<RawTextArea <RawTextArea
buttonClass={css` buttonClass={css`
&:not(:hover) { &:not(:hover) {
@ -18,7 +17,5 @@ export function JSONInput(props) {
{...props} {...props}
component={Input.JSON} component={Input.JSON}
/> />
;
</div>
); );
} }

View File

@ -17,7 +17,6 @@ function setNativeInputValue(input, value) {
} }
export function RawTextArea(props): JSX.Element { export function RawTextArea(props): JSX.Element {
console.log('🚀 ~ file: RawTextArea.tsx:20 ~ RawTextArea ~ props:', props);
const inputRef = useRef<any>(null); const inputRef = useRef<any>(null);
const { changeOnSelect, component: Component = Input.TextArea, ...others } = props; const { changeOnSelect, component: Component = Input.TextArea, ...others } = props;
const scope = typeof props.scope === 'function' ? props.scope() : props.scope; const scope = typeof props.scope === 'function' ? props.scope() : props.scope;

View File

@ -394,14 +394,7 @@ export function TextArea(props) {
/> />
{!disabled ? ( {!disabled ? (
<VariableSelect <VariableSelect
className={css` className=""
&:not(:hover) {
border-right-color: transparent;
border-top-color: transparent;
// border-bottom-color: transparent;
}
background-color: transparent;
`}
options={options} options={options}
setOptions={setOptions} setOptions={setOptions}
onInsert={onInsert} onInsert={onInsert}

View File

@ -102,7 +102,14 @@ export const useCustomizeRequestActionProps = () => {
}, },
}); });
} else { } else {
return message.success(compile(onSuccess?.successMessage)); message.success(compile(onSuccess?.successMessage));
if (onSuccess?.redirecting && onSuccess?.redirectTo) {
if (isURL(onSuccess.redirectTo)) {
window.location.href = onSuccess.redirectTo;
} else {
navigate(onSuccess.redirectTo);
}
}
} }
} finally { } finally {
actionField.data.loading = false; actionField.data.loading = false;