@cqsjjb/jjb-react-admin-component 3.0.20 → 3.0.22
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
|
*/
|
|
@@ -35,7 +35,7 @@ export default function FormilyDescriptions(props) {
|
|
|
35
35
|
title: props.title,
|
|
36
36
|
extra: props.extra,
|
|
37
37
|
layout: props.layout || 'vertical',
|
|
38
|
-
column:
|
|
38
|
+
column: props.column,
|
|
39
39
|
labelStyle: props.labelStyle,
|
|
40
40
|
contentStyle: props.contentStyle
|
|
41
41
|
});
|
|
@@ -95,8 +95,10 @@ function ItemRender(props) {
|
|
|
95
95
|
return tools.textPlaceholder(next.name);
|
|
96
96
|
}
|
|
97
97
|
})) : tools.textPlaceholder() : /*#__PURE__*/React.createElement(RenderText, {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
name: data.name,
|
|
99
|
+
value: data.value,
|
|
100
|
+
renderItemText: props.renderItemText
|
|
101
|
+
}), /*#__PURE__*/React.createElement(Modal, {
|
|
100
102
|
destroyOnClose: true,
|
|
101
103
|
title: "\u67E5\u770BPDF",
|
|
102
104
|
open: open,
|
|
@@ -164,5 +166,8 @@ function RenderText(props) {
|
|
|
164
166
|
},
|
|
165
167
|
index: index,
|
|
166
168
|
bordered: false
|
|
167
|
-
}, item)))) :
|
|
169
|
+
}, item)))) : props.renderItemText ? props.renderItemText({
|
|
170
|
+
text,
|
|
171
|
+
name: props.name
|
|
172
|
+
}) : text;
|
|
168
173
|
}
|
|
@@ -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"
|
|
@@ -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
|
}
|