feat(client): improve code
This commit is contained in:
parent
28e96ed5b0
commit
91ae780e4f
@ -115,8 +115,6 @@ FormItem.Designer = () => {
|
|||||||
dn.emit('patch', {
|
dn.emit('patch', {
|
||||||
schema,
|
schema,
|
||||||
});
|
});
|
||||||
// dn.refresh();
|
|
||||||
reset();
|
|
||||||
refresh();
|
refresh();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@ import { usePrefixCls } from '@formily/antd/lib/__builtins__';
|
|||||||
import { InputProps, TextAreaProps } from 'antd/lib/input';
|
import { InputProps, TextAreaProps } from 'antd/lib/input';
|
||||||
import cls from 'classnames';
|
import cls from 'classnames';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useCompile } from '../..';
|
||||||
import { EllipsisWithTooltip } from './EllipsisWithTooltip';
|
import { EllipsisWithTooltip } from './EllipsisWithTooltip';
|
||||||
|
|
||||||
type Composed = {
|
type Composed = {
|
||||||
@ -14,11 +15,12 @@ export const ReadPretty: Composed = () => null;
|
|||||||
|
|
||||||
ReadPretty.Input = (props) => {
|
ReadPretty.Input = (props) => {
|
||||||
const prefixCls = usePrefixCls('description-input', props);
|
const prefixCls = usePrefixCls('description-input', props);
|
||||||
|
const compile = useCompile();
|
||||||
return (
|
return (
|
||||||
<div className={cls(prefixCls, props.className)} style={props.style}>
|
<div className={cls(prefixCls, props.className)} style={props.style}>
|
||||||
{props.addonBefore}
|
{props.addonBefore}
|
||||||
{props.prefix}
|
{props.prefix}
|
||||||
<EllipsisWithTooltip ellipsis={props.ellipsis}>{props.value}</EllipsisWithTooltip>
|
<EllipsisWithTooltip ellipsis={props.ellipsis}>{compile(props.value)}</EllipsisWithTooltip>
|
||||||
{props.suffix}
|
{props.suffix}
|
||||||
{props.addonAfter}
|
{props.addonAfter}
|
||||||
</div>
|
</div>
|
||||||
@ -26,13 +28,13 @@ ReadPretty.Input = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
ReadPretty.TextArea = (props) => {
|
ReadPretty.TextArea = (props) => {
|
||||||
console.log('EllipsisWithTooltip', props.ellipsis);
|
|
||||||
const prefixCls = usePrefixCls('description-textarea', props);
|
const prefixCls = usePrefixCls('description-textarea', props);
|
||||||
|
const compile = useCompile();
|
||||||
return (
|
return (
|
||||||
<div className={cls(prefixCls, props.className)} style={props.style}>
|
<div className={cls(prefixCls, props.className)} style={props.style}>
|
||||||
{props.addonBefore}
|
{props.addonBefore}
|
||||||
{props.prefix}
|
{props.prefix}
|
||||||
<EllipsisWithTooltip ellipsis={props.ellipsis}>{props.value}</EllipsisWithTooltip>
|
<EllipsisWithTooltip ellipsis={props.ellipsis}>{compile(props.value)}</EllipsisWithTooltip>
|
||||||
{props.suffix}
|
{props.suffix}
|
||||||
{props.addonAfter}
|
{props.addonAfter}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user