@faasjs/ant-design 0.0.3-beta.94 → 0.0.3-beta.96
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.
- package/dist/index.js +18 -21
- package/dist/index.mjs +18 -21
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -332,11 +332,25 @@ function DescriptionItemContent(props) {
|
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
334
|
function Description(props) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
335
|
+
if (props.faasData && !props.dataSource)
|
|
336
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
337
|
+
FaasDataWrapper,
|
|
338
|
+
{
|
|
339
|
+
render: ({ data }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
340
|
+
Description,
|
|
341
|
+
{
|
|
342
|
+
...props,
|
|
343
|
+
dataSource: data
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
...props.faasData
|
|
347
|
+
}
|
|
348
|
+
);
|
|
349
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
350
|
+
antd.Descriptions,
|
|
351
|
+
{
|
|
338
352
|
...props,
|
|
339
|
-
title: lodashEs.isFunction(props.renderTitle)
|
|
353
|
+
title: lodashEs.isFunction(props.renderTitle) ? props.renderTitle(props.dataSource) : props.title,
|
|
340
354
|
items: props.items.filter((item) => item && (!item.if || item.if(props.dataSource))).map((item) => ({
|
|
341
355
|
...item,
|
|
342
356
|
key: item.id,
|
|
@@ -351,23 +365,6 @@ function Description(props) {
|
|
|
351
365
|
}
|
|
352
366
|
)
|
|
353
367
|
}))
|
|
354
|
-
});
|
|
355
|
-
}, [props]);
|
|
356
|
-
if (!computedProps)
|
|
357
|
-
return null;
|
|
358
|
-
if (props.dataSource)
|
|
359
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Descriptions, { ...computedProps });
|
|
360
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
361
|
-
FaasDataWrapper,
|
|
362
|
-
{
|
|
363
|
-
render: ({ data }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
364
|
-
Description,
|
|
365
|
-
{
|
|
366
|
-
...computedProps,
|
|
367
|
-
dataSource: data
|
|
368
|
-
}
|
|
369
|
-
),
|
|
370
|
-
...props.faasData
|
|
371
368
|
}
|
|
372
369
|
);
|
|
373
370
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -329,11 +329,25 @@ function DescriptionItemContent(props) {
|
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
function Description(props) {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
332
|
+
if (props.faasData && !props.dataSource)
|
|
333
|
+
return /* @__PURE__ */ jsx(
|
|
334
|
+
FaasDataWrapper,
|
|
335
|
+
{
|
|
336
|
+
render: ({ data }) => /* @__PURE__ */ jsx(
|
|
337
|
+
Description,
|
|
338
|
+
{
|
|
339
|
+
...props,
|
|
340
|
+
dataSource: data
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
...props.faasData
|
|
344
|
+
}
|
|
345
|
+
);
|
|
346
|
+
return /* @__PURE__ */ jsx(
|
|
347
|
+
Descriptions,
|
|
348
|
+
{
|
|
335
349
|
...props,
|
|
336
|
-
title: isFunction(props.renderTitle)
|
|
350
|
+
title: isFunction(props.renderTitle) ? props.renderTitle(props.dataSource) : props.title,
|
|
337
351
|
items: props.items.filter((item) => item && (!item.if || item.if(props.dataSource))).map((item) => ({
|
|
338
352
|
...item,
|
|
339
353
|
key: item.id,
|
|
@@ -348,23 +362,6 @@ function Description(props) {
|
|
|
348
362
|
}
|
|
349
363
|
)
|
|
350
364
|
}))
|
|
351
|
-
});
|
|
352
|
-
}, [props]);
|
|
353
|
-
if (!computedProps)
|
|
354
|
-
return null;
|
|
355
|
-
if (props.dataSource)
|
|
356
|
-
return /* @__PURE__ */ jsx(Descriptions, { ...computedProps });
|
|
357
|
-
return /* @__PURE__ */ jsx(
|
|
358
|
-
FaasDataWrapper,
|
|
359
|
-
{
|
|
360
|
-
render: ({ data }) => /* @__PURE__ */ jsx(
|
|
361
|
-
Description,
|
|
362
|
-
{
|
|
363
|
-
...computedProps,
|
|
364
|
-
dataSource: data
|
|
365
|
-
}
|
|
366
|
-
),
|
|
367
|
-
...props.faasData
|
|
368
365
|
}
|
|
369
366
|
);
|
|
370
367
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
3
|
+
"version": "0.0.3-beta.96",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@faasjs/react": "0.0.3-beta.
|
|
25
|
+
"@faasjs/react": "0.0.3-beta.96",
|
|
26
26
|
"@ant-design/icons": "*",
|
|
27
27
|
"lodash-es": "*",
|
|
28
28
|
"dayjs": "*"
|