@cqsjjb/jjb-react-admin-component 3.0.19 → 3.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -15,6 +15,14 @@ interface FormilyDescriptionsProps extends ComponentProps {
|
|
|
15
15
|
* @description 尺寸
|
|
16
16
|
*/
|
|
17
17
|
size?: 'default' | 'middle' | 'small';
|
|
18
|
+
/**
|
|
19
|
+
* @description 列数,默认3
|
|
20
|
+
*/
|
|
21
|
+
column?: number;
|
|
22
|
+
/**
|
|
23
|
+
* @description 自定义渲染纯文本
|
|
24
|
+
*/
|
|
25
|
+
renderItemText?: (data: { text: string, name: string }) => void;
|
|
18
26
|
/**
|
|
19
27
|
* @description 图片宽度
|
|
20
28
|
*/
|
|
@@ -49,7 +49,7 @@ export default function FormilyDescriptions(props) {
|
|
|
49
49
|
title={props.title}
|
|
50
50
|
extra={props.extra}
|
|
51
51
|
layout={props.layout || 'vertical'}
|
|
52
|
-
column={
|
|
52
|
+
column={props.column}
|
|
53
53
|
labelStyle={props.labelStyle}
|
|
54
54
|
contentStyle={props.contentStyle}
|
|
55
55
|
/>
|
|
@@ -144,7 +144,13 @@ function ItemRender(props) {
|
|
|
144
144
|
</div>
|
|
145
145
|
)
|
|
146
146
|
: tools.textPlaceholder()
|
|
147
|
-
:
|
|
147
|
+
: (
|
|
148
|
+
<RenderText
|
|
149
|
+
name={data.name}
|
|
150
|
+
value={data.value}
|
|
151
|
+
renderItemText={props.renderItemText}
|
|
152
|
+
/>
|
|
153
|
+
)}
|
|
148
154
|
<Modal
|
|
149
155
|
destroyOnClose
|
|
150
156
|
title="查看PDF"
|
|
@@ -205,7 +211,7 @@ function RenderText(props) {
|
|
|
205
211
|
setText(value);
|
|
206
212
|
}
|
|
207
213
|
}
|
|
208
|
-
}, []);
|
|
214
|
+
}, [ props.value ]);
|
|
209
215
|
|
|
210
216
|
return Array.isArray(text)
|
|
211
217
|
? (
|
|
@@ -230,5 +236,10 @@ function RenderText(props) {
|
|
|
230
236
|
</div>
|
|
231
237
|
</Spin>
|
|
232
238
|
)
|
|
233
|
-
:
|
|
239
|
+
: props.renderItemText
|
|
240
|
+
? props.renderItemText({
|
|
241
|
+
text,
|
|
242
|
+
name: props.name
|
|
243
|
+
})
|
|
244
|
+
: text;
|
|
234
245
|
}
|