mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
fix: incorrect variable input style (#6645)
* fix: textarea variable style issue * fix: variable input border radius not correct * fix: unit tests error
This commit is contained in:
parent
9f8fb0e362
commit
b20c8b05bd
@ -398,9 +398,8 @@ export function Input(props: VariableInputProps) {
|
|||||||
const disabled = props.disabled || form.disabled;
|
const disabled = props.disabled || form.disabled;
|
||||||
|
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
|
<>
|
||||||
<Space.Compact style={style} className={classNames(componentCls, hashId, className)}>
|
<Space.Compact style={style} className={classNames(componentCls, hashId, className)}>
|
||||||
{/* 确保所有ant input样式都已加载 */}
|
|
||||||
<AntInput style={{ display: 'none' }} />
|
|
||||||
{variable ? (
|
{variable ? (
|
||||||
<div
|
<div
|
||||||
className={cx(
|
className={cx(
|
||||||
@ -497,6 +496,9 @@ export function Input(props: VariableInputProps) {
|
|||||||
)}
|
)}
|
||||||
</Cascader>
|
</Cascader>
|
||||||
)}
|
)}
|
||||||
</Space.Compact>,
|
</Space.Compact>
|
||||||
|
{/* 确保所有ant input样式都已加载, 放到Compact中会导致Compact中的Input样式不对 */}
|
||||||
|
<AntInput style={{ display: 'none' }} />
|
||||||
|
</>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
import { css, cx } from '@emotion/css';
|
import { css, cx } from '@emotion/css';
|
||||||
import { useForm } from '@formily/react';
|
import { useForm } from '@formily/react';
|
||||||
import { Space, theme } from 'antd';
|
import { Input as AntInput, Space, theme } from 'antd';
|
||||||
import type { CascaderProps, DefaultOptionType } from 'antd/lib/cascader';
|
import type { CascaderProps, DefaultOptionType } from 'antd/lib/cascader';
|
||||||
import useInputStyle from 'antd/es/input/style';
|
import useInputStyle from 'antd/es/input/style';
|
||||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
||||||
@ -422,6 +422,7 @@ export function TextArea(props: TextAreaProps) {
|
|||||||
);
|
);
|
||||||
const disabled = props.disabled || form.disabled;
|
const disabled = props.disabled || form.disabled;
|
||||||
return wrapSSR(
|
return wrapSSR(
|
||||||
|
<>
|
||||||
<Space.Compact
|
<Space.Compact
|
||||||
className={cx(
|
className={cx(
|
||||||
componentCls,
|
componentCls,
|
||||||
@ -510,7 +511,10 @@ export function TextArea(props: TextAreaProps) {
|
|||||||
fieldNames={fieldNames || defaultFieldNames}
|
fieldNames={fieldNames || defaultFieldNames}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
/>
|
/>
|
||||||
</Space.Compact>,
|
</Space.Compact>
|
||||||
|
{/* 确保所有ant input样式都已加载, 放到Compact中会导致Compact中的Input样式不对 */}
|
||||||
|
<AntInput style={{ display: 'none' }} />
|
||||||
|
</>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user