antd-management-fast-framework 1.1.49 → 1.1.53
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/lib/customComponents/FunctionComponent/index.js +36 -8
- package/lib/framework/DataDrawer/Base/index.js +1 -1
- package/lib/utils/tools.d.ts +3 -0
- package/lib/utils/tools.js +4 -0
- package/package.json +1 -1
- package/src/customComponents/FunctionComponent/index.jsx +50 -9
- package/src/framework/DataDrawer/Base/index.jsx +1 -0
- package/src/utils/tools.js +3 -0
|
@@ -830,6 +830,8 @@ function buildCustomGrid(_ref7) {
|
|
|
830
830
|
column: 3,
|
|
831
831
|
labelStyle: {},
|
|
832
832
|
contentStyle: {},
|
|
833
|
+
emptyValue: null,
|
|
834
|
+
emptyStyle: null,
|
|
833
835
|
bordered: false,
|
|
834
836
|
colon: true,
|
|
835
837
|
size: null
|
|
@@ -838,6 +840,8 @@ function buildCustomGrid(_ref7) {
|
|
|
838
840
|
columnSource = _title$column$labelSt.column,
|
|
839
841
|
labelStyleSource = _title$column$labelSt.labelStyle,
|
|
840
842
|
contentStyleSource = _title$column$labelSt.contentStyle,
|
|
843
|
+
globalEmptyValue = _title$column$labelSt.emptyValue,
|
|
844
|
+
globalEmptyStyle = _title$column$labelSt.emptyStyle,
|
|
841
845
|
borderedSource = _title$column$labelSt.bordered,
|
|
842
846
|
colonSource = _title$column$labelSt.colon,
|
|
843
847
|
sizeSource = _title$column$labelSt.size;
|
|
@@ -922,24 +926,48 @@ function buildCustomGrid(_ref7) {
|
|
|
922
926
|
} : {
|
|
923
927
|
paddingBottom: paddingBottomNoBorder
|
|
924
928
|
};
|
|
929
|
+
|
|
930
|
+
var _key$label$value$empt = _objectSpread(_objectSpread({}, {
|
|
931
|
+
key: (0, _tools.getGuid)(),
|
|
932
|
+
label: '',
|
|
933
|
+
value: '',
|
|
934
|
+
emptyValue: null,
|
|
935
|
+
emptyStyle: null,
|
|
936
|
+
span: 1,
|
|
937
|
+
canCopy: false,
|
|
938
|
+
copyData: null,
|
|
939
|
+
props: null
|
|
940
|
+
}), item || {}),
|
|
941
|
+
itemKey = _key$label$value$empt.key,
|
|
942
|
+
itemLabel = _key$label$value$empt.label,
|
|
943
|
+
itemValue = _key$label$value$empt.value,
|
|
944
|
+
itemEmptyValue = _key$label$value$empt.emptyValue,
|
|
945
|
+
itemEmptyStyle = _key$label$value$empt.emptyStyle,
|
|
946
|
+
itemSpan = _key$label$value$empt.span,
|
|
947
|
+
itemCanCopy = _key$label$value$empt.canCopy,
|
|
948
|
+
itemCopyData = _key$label$value$empt.copyData,
|
|
949
|
+
itemProps = _key$label$value$empt.props;
|
|
950
|
+
|
|
951
|
+
var v = itemValue || itemEmptyValue || globalEmptyValue;
|
|
952
|
+
var isEmpty = (itemValue || itemEmptyValue || globalEmptyValue) == (itemEmptyValue || globalEmptyValue);
|
|
925
953
|
return /*#__PURE__*/_react["default"].createElement(_col["default"], _extends({
|
|
926
|
-
key:
|
|
954
|
+
key: itemKey,
|
|
927
955
|
style: itemStyle,
|
|
928
|
-
label:
|
|
929
|
-
span: columnSpan * (
|
|
930
|
-
},
|
|
956
|
+
label: itemLabel,
|
|
957
|
+
span: columnSpan * ((0, _tools.toNumber)(itemSpan) || 1)
|
|
958
|
+
}, itemProps || {}), /*#__PURE__*/_react["default"].createElement(_FlexBox["default"], {
|
|
931
959
|
flexAuto: "right",
|
|
932
960
|
left: /*#__PURE__*/_react["default"].createElement("div", {
|
|
933
961
|
style: labelStyle
|
|
934
|
-
}, "".concat(
|
|
962
|
+
}, "".concat(itemLabel).concat(colon ? ':' : '')),
|
|
935
963
|
right: /*#__PURE__*/_react["default"].createElement("div", {
|
|
936
|
-
style: contentStyle
|
|
937
|
-
},
|
|
964
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, contentStyle), isEmpty ? globalEmptyStyle || {} : {}), isEmpty ? itemEmptyStyle || {} : {})
|
|
965
|
+
}, v, itemCanCopy && (itemCanCopy || null) != null ? /*#__PURE__*/_react["default"].createElement("a", {
|
|
938
966
|
style: {
|
|
939
967
|
marginLeft: '10px'
|
|
940
968
|
},
|
|
941
969
|
onClick: function onClick() {
|
|
942
|
-
(0, _tools.copyToClipboard)(
|
|
970
|
+
(0, _tools.copyToClipboard)(itemCopyData || itemValue);
|
|
943
971
|
}
|
|
944
972
|
}, "[\u590D\u5236]") : null)
|
|
945
973
|
}));
|
|
@@ -144,7 +144,7 @@ var Base = /*#__PURE__*/function (_BaseWindow) {
|
|
|
144
144
|
|
|
145
145
|
var subText = _this.buildTitleSubText();
|
|
146
146
|
|
|
147
|
-
subText = stringIsNullOrWhiteSpace(subText) ? '' : "\uFF1A\u3010".concat(subText, "\u3011");
|
|
147
|
+
subText = (0, _tools.stringIsNullOrWhiteSpace)(subText) ? '' : "\uFF1A\u3010".concat(subText, "\u3011");
|
|
148
148
|
return "".concat(prevText).concat(_this.buildTitleText() || '信息详情').concat(subText);
|
|
149
149
|
};
|
|
150
150
|
|
package/lib/utils/tools.d.ts
CHANGED
|
@@ -683,6 +683,9 @@ export function removeNearestLocalhostNotifyCache(): void;
|
|
|
683
683
|
export function trySendNearestLocalhostNotify({ text }: {
|
|
684
684
|
text: any;
|
|
685
685
|
}): void;
|
|
686
|
+
/**
|
|
687
|
+
* 文本缩略
|
|
688
|
+
*/
|
|
686
689
|
export function ellipsis(value: any, length: any): string;
|
|
687
690
|
export function notifySuccess(text: any): void;
|
|
688
691
|
/**
|
package/lib/utils/tools.js
CHANGED
package/package.json
CHANGED
|
@@ -692,6 +692,8 @@ export function buildCustomGrid({ key = null, list, props }) {
|
|
|
692
692
|
column: columnSource,
|
|
693
693
|
labelStyle: labelStyleSource,
|
|
694
694
|
contentStyle: contentStyleSource,
|
|
695
|
+
emptyValue: globalEmptyValue,
|
|
696
|
+
emptyStyle: globalEmptyStyle,
|
|
695
697
|
bordered: borderedSource,
|
|
696
698
|
colon: colonSource,
|
|
697
699
|
size: sizeSource,
|
|
@@ -701,6 +703,8 @@ export function buildCustomGrid({ key = null, list, props }) {
|
|
|
701
703
|
column: 3,
|
|
702
704
|
labelStyle: {},
|
|
703
705
|
contentStyle: {},
|
|
706
|
+
emptyValue: null,
|
|
707
|
+
emptyStyle: null,
|
|
704
708
|
bordered: false,
|
|
705
709
|
colon: true,
|
|
706
710
|
size: null,
|
|
@@ -802,29 +806,66 @@ export function buildCustomGrid({ key = null, list, props }) {
|
|
|
802
806
|
paddingBottom: paddingBottomNoBorder,
|
|
803
807
|
};
|
|
804
808
|
|
|
809
|
+
const {
|
|
810
|
+
key: itemKey,
|
|
811
|
+
label: itemLabel,
|
|
812
|
+
value: itemValue,
|
|
813
|
+
emptyValue: itemEmptyValue,
|
|
814
|
+
emptyStyle: itemEmptyStyle,
|
|
815
|
+
span: itemSpan,
|
|
816
|
+
canCopy: itemCanCopy,
|
|
817
|
+
copyData: itemCopyData,
|
|
818
|
+
props: itemProps,
|
|
819
|
+
} = {
|
|
820
|
+
...{
|
|
821
|
+
key: getGuid(),
|
|
822
|
+
label: '',
|
|
823
|
+
value: '',
|
|
824
|
+
emptyValue: null,
|
|
825
|
+
emptyStyle: null,
|
|
826
|
+
span: 1,
|
|
827
|
+
canCopy: false,
|
|
828
|
+
copyData: null,
|
|
829
|
+
props: null,
|
|
830
|
+
},
|
|
831
|
+
...(item || {}),
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
const v = itemValue || itemEmptyValue || globalEmptyValue;
|
|
835
|
+
|
|
836
|
+
const isEmpty =
|
|
837
|
+
(itemValue || itemEmptyValue || globalEmptyValue) ==
|
|
838
|
+
(itemEmptyValue || globalEmptyValue);
|
|
839
|
+
|
|
805
840
|
return (
|
|
806
841
|
<Col
|
|
807
|
-
key={
|
|
842
|
+
key={itemKey}
|
|
808
843
|
style={itemStyle}
|
|
809
|
-
label={
|
|
810
|
-
span={columnSpan * (
|
|
811
|
-
{...(
|
|
844
|
+
label={itemLabel}
|
|
845
|
+
span={columnSpan * (toNumber(itemSpan) || 1)}
|
|
846
|
+
{...(itemProps || {})}
|
|
812
847
|
>
|
|
813
848
|
<FlexBox
|
|
814
849
|
flexAuto="right"
|
|
815
850
|
left={
|
|
816
|
-
<div style={labelStyle}>{`${
|
|
851
|
+
<div style={labelStyle}>{`${itemLabel}${
|
|
817
852
|
colon ? ':' : ''
|
|
818
853
|
}`}</div>
|
|
819
854
|
}
|
|
820
855
|
right={
|
|
821
|
-
<div
|
|
822
|
-
{
|
|
823
|
-
|
|
856
|
+
<div
|
|
857
|
+
style={{
|
|
858
|
+
...contentStyle,
|
|
859
|
+
...(isEmpty ? globalEmptyStyle || {} : {}),
|
|
860
|
+
...(isEmpty ? itemEmptyStyle || {} : {}),
|
|
861
|
+
}}
|
|
862
|
+
>
|
|
863
|
+
{v}
|
|
864
|
+
{itemCanCopy && (itemCanCopy || null) != null ? (
|
|
824
865
|
<a
|
|
825
866
|
style={{ marginLeft: '10px' }}
|
|
826
867
|
onClick={() => {
|
|
827
|
-
copyToClipboard(
|
|
868
|
+
copyToClipboard(itemCopyData || itemValue);
|
|
828
869
|
}}
|
|
829
870
|
>
|
|
830
871
|
[复制]
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
isUndefined,
|
|
7
7
|
isFunction,
|
|
8
8
|
defaultFormState,
|
|
9
|
+
stringIsNullOrWhiteSpace,
|
|
9
10
|
} from '../../../utils/tools';
|
|
10
11
|
import { formContentConfig, drawerConfig } from '../../../utils/constants';
|
|
11
12
|
import { buildButton } from '../../../customComponents/FunctionComponent';
|
package/src/utils/tools.js
CHANGED
|
@@ -1738,6 +1738,9 @@ export function trySendNearestLocalhostNotify({ text }) {
|
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
1740
|
|
|
1741
|
+
/**
|
|
1742
|
+
* 文本缩略
|
|
1743
|
+
*/
|
|
1741
1744
|
export function ellipsis(value, length) {
|
|
1742
1745
|
if (value && value.length > length) {
|
|
1743
1746
|
return `${toString(value).substr(0, length)}...`;
|