vap1 0.2.3 → 0.2.4

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.
Files changed (268) hide show
  1. package/components/Box/Box.js +75 -42
  2. package/components/Box/SelectBar.js +51 -24
  3. package/components/Box/_register.d.ts +4 -0
  4. package/components/Box/_register.js +10 -8
  5. package/components/Box/index.js +1 -1
  6. package/components/Lists/SList.js +76 -48
  7. package/components/SearchBar/ActionButtons.js +75 -42
  8. package/components/SearchBar/ByField.js +80 -52
  9. package/components/SearchBar/ByKeyword.js +44 -17
  10. package/components/SearchBar/SearchField.js +8 -8
  11. package/components/SearchBar/SearchTags.js +4 -4
  12. package/components/SearchBar/_register.js +9 -8
  13. package/components/SearchBar/index.js +22 -11
  14. package/components/Tables/ApiTable.d.ts +1 -1
  15. package/components/Tables/ApiTable.js +19 -8
  16. package/components/Tables/ApiTableModal.d.ts +1 -1
  17. package/components/Tables/ApiTableModal.js +40 -13
  18. package/components/Tables/Components/ActionBar.js +53 -26
  19. package/components/Tables/Components/Actions.js +40 -29
  20. package/components/Tables/Components/Summary.js +2 -2
  21. package/components/Tables/Components/index.js +3 -3
  22. package/components/Tables/STable.js +21 -10
  23. package/components/Tables/TopTable.d.ts +3 -2
  24. package/components/Tables/TopTable.js +64 -37
  25. package/components/Tables/TopTableModal.js +21 -10
  26. package/components/Tables/Util.d.ts +2 -2
  27. package/components/Tables/Util.js +11 -9
  28. package/components/Tables/VTable.d.ts +2 -2
  29. package/components/Tables/VTable.js +137 -65
  30. package/components/Tables/index.d.ts +7 -2
  31. package/components/Tables/index.js +5 -5
  32. package/components/TreeSelect/BaseTreeSelect.js +81 -45
  33. package/components/TreeSelect/DTreeSelect.js +191 -66
  34. package/components/TreeSelect/FTreeSelect.js +67 -20
  35. package/components/TreeSelect/STreeSelect.js +22 -11
  36. package/components/Trees/ActionTree.js +562 -431
  37. package/components/Trees/BaseTree.js +85 -38
  38. package/components/Trees/COTree/COButton.js +48 -21
  39. package/components/Trees/COTree/COSelect.js +31 -20
  40. package/components/Trees/COTree/COTree.js +223 -107
  41. package/components/Trees/COTree/COTreeUtil.js +160 -115
  42. package/components/Trees/DTree.js +139 -68
  43. package/components/Trees/FTree.js +76 -29
  44. package/components/Trees/STree.js +59 -23
  45. package/components/UForm/FormWrapper.js +70 -53
  46. package/components/UForm/UDescriptions.js +38 -38
  47. package/components/UForm/UForm.js +240 -135
  48. package/components/UForm/UFormModal.js +99 -44
  49. package/components/UForm/UInfo.js +33 -22
  50. package/components/UForm/UInfoModal.js +31 -20
  51. package/components/UForm/UModal.js +40 -13
  52. package/components/UForm/_FormUtils.js +29 -18
  53. package/components/UForm/_input.js +75 -39
  54. package/components/UForm/_register.js +11 -9
  55. package/components/Upload/UploadFile.js +38 -11
  56. package/components/Upload/UploadImage.js +50 -23
  57. package/components/Upload/UploadModal.js +149 -84
  58. package/components/Upload/useUpload.js +35 -19
  59. package/components/_RegisterUtil.js +20 -8
  60. package/components/_adapt/Alert.js +20 -9
  61. package/components/_adapt/Breadcrumb.js +18 -7
  62. package/components/_adapt/Button.js +24 -13
  63. package/components/_adapt/Col.js +34 -23
  64. package/components/_adapt/Collapse.js +21 -10
  65. package/components/_adapt/ColorPicker.js +55 -28
  66. package/components/_adapt/ConfigProvider.js +14 -3
  67. package/components/_adapt/Drawer.js +18 -7
  68. package/components/_adapt/Dropdown.js +23 -12
  69. package/components/_adapt/FloatButton.js +21 -10
  70. package/components/_adapt/Icon.js +18 -7
  71. package/components/_adapt/Input.js +17 -6
  72. package/components/_adapt/InputNumber.js +16 -5
  73. package/components/_adapt/Layout.js +84 -28
  74. package/components/_adapt/Menu.js +28 -17
  75. package/components/_adapt/Modal.js +72 -25
  76. package/components/_adapt/Pagination.js +14 -3
  77. package/components/_adapt/Popconfirm.js +17 -6
  78. package/components/_adapt/Popover.js +17 -6
  79. package/components/_adapt/Progress.js +42 -11
  80. package/components/_adapt/Radio.js +21 -10
  81. package/components/_adapt/Row.js +18 -7
  82. package/components/_adapt/Select.js +54 -43
  83. package/components/_adapt/Slider.js +1 -1
  84. package/components/_adapt/Space.js +2 -2
  85. package/components/_adapt/Table.js +16 -5
  86. package/components/_adapt/Tabs.js +17 -6
  87. package/components/_adapt/Tag.js +19 -8
  88. package/components/_adapt/Tooltip.js +15 -4
  89. package/components/_adapt/TreeSelect.js +18 -7
  90. package/components/_adapt/notification.js +1 -1
  91. package/components/_adapt/todo/Image.js +2 -2
  92. package/components/_adapt/todo/NotEffectOnV15.js +1 -1
  93. package/components/_adapt/todo/Segmented.js +2 -2
  94. package/components/_adapt/utils.js +28 -8
  95. package/components/_common/AutoComplete.js +101 -34
  96. package/components/_common/CountUp.js +30 -14
  97. package/components/_common/DateRange.js +36 -20
  98. package/components/_common/HighLight.js +22 -6
  99. package/components/_common/I18N.js +27 -2
  100. package/components/_common/Loading.js +25 -9
  101. package/components/_common/MonthRange.js +26 -26
  102. package/components/_common/PromiseLabel.js +68 -15
  103. package/components/_common/Role.js +2 -2
  104. package/components/_common/Upagination.js +45 -34
  105. package/components/_setup/Const.js +2 -2
  106. package/components/_setup/I18N/enUS.js +2 -2
  107. package/components/_setup/I18N/zhCN.js +3 -3
  108. package/components/_setup/I18N/zhHK.js +2 -2
  109. package/components/_setup/ICON/IconTypes.js +2 -2
  110. package/components/_setup/SearchField/SearchFieldAdvance.js +22 -11
  111. package/components/_setup/SearchField/SearchFieldDate.js +114 -77
  112. package/components/_setup/SearchField/SearchFieldInput.js +21 -10
  113. package/components/_setup/SearchField/SearchFieldSelect.js +55 -44
  114. package/components/_setup/SearchField/SearchFieldTree.js +63 -52
  115. package/components/_setup/SelectBar/SelectList.js +21 -10
  116. package/components/_setup/SelectBar/SelectTree.js +17 -6
  117. package/components/_setup/UForm/UFormAdvanceInput.js +105 -78
  118. package/components/_setup/UForm/UFormCOTree.js +21 -10
  119. package/components/_setup/UForm/UFormCrontab.js +51 -35
  120. package/components/_setup/UForm/UFormDate.js +158 -122
  121. package/components/_setup/UForm/UFormInput.js +110 -73
  122. package/components/_setup/UForm/UFormJSON.js +95 -57
  123. package/components/_setup/UForm/UFormJSONTable.js +79 -41
  124. package/components/_setup/UForm/UFormOrg.js +112 -48
  125. package/components/_setup/UForm/UFormRole.js +31 -20
  126. package/components/_setup/UForm/UFormSelect.js +106 -79
  127. package/components/_setup/UForm/UFormTree.js +52 -41
  128. package/components/_setup/UForm/UFormUpload.js +62 -34
  129. package/components/_setup/UForm/_utils.js +9 -9
  130. package/deps/JsonView.js +18 -7
  131. package/deps/SpringBoot.js +1 -1
  132. package/deps/SpringCloud.js +4 -4
  133. package/deps/_editor/advance/_Image.js +33 -20
  134. package/deps/_editor/base/Element.js +28 -17
  135. package/deps/_editor/base/Leaf.js +18 -7
  136. package/deps/_editor/base/Support.js +4 -4
  137. package/deps/_editor/i18n.js +1 -1
  138. package/deps/_editor/tools/Button.js +31 -19
  139. package/deps/_editor/tools/ToolBar.js +3 -3
  140. package/deps/_editor/tools/_BlockButton.js +49 -27
  141. package/deps/_editor/tools/_InsertButton.js +32 -28
  142. package/deps/_editor/tools/_MarkButton.js +15 -14
  143. package/deps/_editor/tools/_TxtButton.js +90 -58
  144. package/deps/api-audit.js +1 -1
  145. package/deps/echarts.js +58 -17
  146. package/deps/editor.js +52 -26
  147. package/deps/registerEditor.js +18 -7
  148. package/hooks/_list.js +1 -1
  149. package/hooks/useAjax.js +43 -19
  150. package/hooks/useAjaxAction.js +57 -20
  151. package/hooks/useAjaxQuery.js +121 -51
  152. package/hooks/useApi.js +35 -8
  153. package/hooks/useApiBase.js +291 -184
  154. package/hooks/useApiGlobal.js +40 -13
  155. package/hooks/useApp.js +4 -4
  156. package/hooks/useArray.js +114 -52
  157. package/hooks/useDefault.js +19 -3
  158. package/hooks/useDoLoad.js +25 -9
  159. package/hooks/useEffectFunction.js +4 -3
  160. package/hooks/useEffectOnce.js +5 -5
  161. package/hooks/useError.js +21 -5
  162. package/hooks/useFirstMountState.js +3 -3
  163. package/hooks/useGenkey.js +7 -7
  164. package/hooks/useGetSet.js +9 -9
  165. package/hooks/useGlobal.js +58 -29
  166. package/hooks/useHover.js +25 -9
  167. package/hooks/useMemoPromise.js +62 -22
  168. package/hooks/useModals.js +71 -36
  169. package/hooks/useMountedState.js +6 -6
  170. package/hooks/useOpenState.js +26 -10
  171. package/hooks/usePromise.js +15 -13
  172. package/hooks/useQueue.js +35 -8
  173. package/hooks/useSetState.js +25 -8
  174. package/hooks/useStateList.js +30 -18
  175. package/hooks/useSyncExternalStore.js +31 -15
  176. package/hooks/useToggle.js +6 -3
  177. package/hooks/useUnmountPromise.js +11 -11
  178. package/hooks/useUpdate.js +20 -4
  179. package/hooks/useUpdateEffect.js +5 -5
  180. package/login/Base65.js +15 -14
  181. package/login/Password.js +91 -38
  182. package/login/SM4.js +50 -49
  183. package/login/cems/index.js +2 -2
  184. package/login/jit/index.js +16 -71
  185. package/login/jit/pnxclient.js +6 -4
  186. package/login/vap/index.js +1 -1
  187. package/login/xrtx/index.js +2 -2
  188. package/package.json +1 -1
  189. package/screen/Comment.js +16 -5
  190. package/screen/Page.js +14 -14
  191. package/screen/render.js +2 -2
  192. package/uform/FormEditor.js +43 -26
  193. package/uform/FormViewer.js +30 -19
  194. package/uform/hooks/useEditor.js +83 -47
  195. package/uform/hooks/useForm.js +2 -2
  196. package/uform/index.js +10 -10
  197. package/uform/inputs/_advance.js +12 -12
  198. package/uform/inputs/_date.js +63 -52
  199. package/uform/inputs/_input.js +49 -38
  200. package/uform/inputs/_select.js +53 -42
  201. package/uform/inputs/_specific.js +33 -22
  202. package/uform/inputs/index.js +5 -5
  203. package/uform/inputs/register.js +14 -14
  204. package/uform/panel/Editor/GroupEditor.js +31 -31
  205. package/uform/panel/Editor/ListEditor.js +22 -22
  206. package/uform/panel/Editor/_FieldItems.js +16 -16
  207. package/uform/panel/Editor/_GroupCollapse.js +9 -9
  208. package/uform/panel/Editor/_GroupDefault.js +9 -9
  209. package/uform/panel/Editor/_GroupStep.js +18 -18
  210. package/uform/panel/Editor/_GroupTab.js +16 -16
  211. package/uform/panel/Editor/index.js +17 -17
  212. package/uform/panel/Items/index.js +22 -11
  213. package/uform/panel/Propreties/CanvasProperties.js +14 -14
  214. package/uform/panel/Propreties/Component/FieldPlugin.js +5 -5
  215. package/uform/panel/Propreties/Component/LinkAsyncFunction.js +22 -47
  216. package/uform/panel/Propreties/Component/LinkSyncFunction.js +20 -43
  217. package/uform/panel/Propreties/Component/Links.js +40 -29
  218. package/uform/panel/Propreties/Component/OptionTable.js +97 -52
  219. package/uform/panel/Propreties/Component/RegexpModal.js +11 -11
  220. package/uform/panel/Propreties/Component/Validate.js +35 -24
  221. package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +13 -24
  222. package/uform/panel/Propreties/Component/ValidateSyncFunction.js +15 -38
  223. package/uform/panel/Propreties/FieldOptions.js +78 -44
  224. package/uform/panel/Propreties/FieldProperties.js +47 -20
  225. package/uform/panel/Propreties/GroupProperties.js +9 -9
  226. package/uform/panel/Propreties/_ItemAdvance.js +37 -26
  227. package/uform/panel/Propreties/_ItemBase.js +30 -19
  228. package/uform/panel/Propreties/_ItemLink.js +20 -9
  229. package/uform/panel/Propreties/_ItemValidate.js +33 -22
  230. package/uform/plugins/index.js +7 -7
  231. package/uform/utils/Convert.js +137 -94
  232. package/uform/utils/SchemaConvert.js +43 -68
  233. package/uform/utils/arr.js +103 -75
  234. package/utils/Ajax.d.ts +1 -11
  235. package/utils/Ajax.js +154 -68
  236. package/utils/ArrayUtil.js +14 -12
  237. package/utils/CacheUtil.js +19 -13
  238. package/utils/Const.js +13 -13
  239. package/utils/CustomApp.js +15 -10
  240. package/utils/EventUtil.js +78 -14
  241. package/utils/Format.js +59 -38
  242. package/utils/Global.js +8 -8
  243. package/utils/Logger.js +56 -11
  244. package/utils/PageUtil.d.ts +12 -6
  245. package/utils/PageUtil.js +105 -35
  246. package/utils/Renders/ApiGetRender.js +187 -100
  247. package/utils/Renders/ApiPostRender.js +123 -69
  248. package/utils/Renders/DateRender.js +9 -9
  249. package/utils/Renders/DictRender.js +82 -55
  250. package/utils/Renders/FileRender.js +34 -12
  251. package/utils/Renders/ListRender.js +21 -21
  252. package/utils/Renders/NumberRender.js +14 -13
  253. package/utils/Renders/StatusRender.js +20 -20
  254. package/utils/Renders/StringRender.js +17 -17
  255. package/utils/Renders/_define.d.ts +2 -2
  256. package/utils/Renders/_define.js +7 -7
  257. package/utils/StringUtil.js +98 -67
  258. package/utils/TreeUtil.js +71 -20
  259. package/utils/VAP.js +14 -14
  260. package/utils/XHR.js +27 -11
  261. package/utils/_AjaxUtil.d.ts +10 -0
  262. package/utils/_AjaxUtil.js +35 -12
  263. package/utils/_Support.js +26 -26
  264. package/utils/i18n.js +78 -44
  265. package/utils/index.d.ts +9 -1
  266. package/utils/index.js +34 -5
  267. package/utils/screenful.js +82 -29
  268. package/widget/index.js +4 -4
@@ -4,19 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.switchHideRender = exports.switchShowRender = exports.switchCloseRender = exports.switchOpenRender = exports.switchDisableRender = exports.switchEnableRender = exports.switchYesNoRender = exports.ListRender = void 0;
7
- const lodash_1 = __importDefault(require("lodash"));
8
- const i18n_1 = require("../i18n");
9
- const Const_1 = require("../../components/_setup/Const");
10
- const _define_1 = require("./_define");
11
- const Const_2 = require("../Const");
12
- const ListRender = (options) => {
13
- const MAP = new Map();
14
- let labelField = 'label';
15
- let valueField = 'value';
16
- let def = null;
17
- let showValue = false;
18
- let list;
19
- const isArr = lodash_1.default.isArray(options);
7
+ var lodash_1 = __importDefault(require("lodash"));
8
+ var i18n_1 = require("../i18n");
9
+ var Const_1 = require("../../components/_setup/Const");
10
+ var _define_1 = require("./_define");
11
+ var Const_2 = require("../Const");
12
+ var ListRender = function (options) {
13
+ var MAP = new Map();
14
+ var labelField = 'label';
15
+ var valueField = 'value';
16
+ var def = null;
17
+ var showValue = false;
18
+ var list;
19
+ var isArr = lodash_1.default.isArray(options);
20
20
  if (isArr) {
21
21
  list = options;
22
22
  }
@@ -31,7 +31,7 @@ const ListRender = (options) => {
31
31
  if (options.valueField)
32
32
  valueField = options.valueField;
33
33
  }
34
- list.map(item => {
34
+ list.map(function (item) {
35
35
  if (lodash_1.default.has(item, valueField) && item[valueField] !== null) {
36
36
  if (lodash_1.default.has(item, 'ik') && lodash_1.default.isString(item['ik']) && (0, i18n_1.hasKey)(item['ik'])) {
37
37
  MAP.set(lodash_1.default.trim(item[valueField]), (0, i18n_1.txt)(item['ik']));
@@ -41,10 +41,10 @@ const ListRender = (options) => {
41
41
  }
42
42
  }
43
43
  });
44
- const fn = (value) => {
44
+ var fn = function (value) {
45
45
  if (value === null)
46
46
  return Const_2.NONE;
47
- const key = lodash_1.default.trim(value + '');
47
+ var key = lodash_1.default.trim(value + '');
48
48
  var text = '';
49
49
  if (!MAP.has(key)) {
50
50
  if (def)
@@ -63,10 +63,10 @@ const ListRender = (options) => {
63
63
  return text;
64
64
  return (0, _define_1.getValue)(text, options);
65
65
  };
66
- fn.getText = (value, def) => {
66
+ fn.getText = function (value, def) {
67
67
  if (value === null)
68
68
  return def || '';
69
- const key = lodash_1.default.trim(value + '');
69
+ var key = lodash_1.default.trim(value + '');
70
70
  var text = '';
71
71
  if (!MAP.has(key)) {
72
72
  if (def)
@@ -84,8 +84,8 @@ const ListRender = (options) => {
84
84
  }
85
85
  return text;
86
86
  };
87
- fn.options = (config) => {
88
- let rtnOptions = [];
87
+ fn.options = function (config) {
88
+ var rtnOptions = [];
89
89
  if (config && config.shift) {
90
90
  if (config.shift === true) {
91
91
  rtnOptions.push({ label: (0, i18n_1.txt)(Const_1.V.TXT_ALL), value: '' });
@@ -94,7 +94,7 @@ const ListRender = (options) => {
94
94
  rtnOptions.push(config.shift);
95
95
  }
96
96
  }
97
- list.map(item => {
97
+ list.map(function (item) {
98
98
  rtnOptions.push({ label: (0, i18n_1.getText)(item['ik'], item[labelField]), value: (0, _define_1.convertValue)(item[valueField], config) });
99
99
  });
100
100
  return rtnOptions;
@@ -4,17 +4,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.percentRender = exports.chineseRender = exports.usdRender = exports.sizeRender = exports.numberRender = exports.intRender = exports.NumberRender = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const Format_1 = require("../Format");
10
- const Const_1 = require("../Const");
11
- const NumberRender = (options) => {
12
- const config = options ? options : {};
13
- const formater = (0, Format_1.getFormater)(config.format, options.len);
14
- const fn = (txt) => {
7
+ var react_1 = __importDefault(require("react"));
8
+ var lodash_1 = __importDefault(require("lodash"));
9
+ var Format_1 = require("../Format");
10
+ var Const_1 = require("../Const");
11
+ var NumberRender = function (options) {
12
+ var config = options ? options : {};
13
+ var formater = (0, Format_1.getFormater)(config.format, options.len);
14
+ var fn = function (txt) {
15
15
  if (txt === null)
16
16
  return options.default || Const_1.NONE;
17
- let num = null;
17
+ var num = null;
18
18
  if (lodash_1.default.isString(txt)) {
19
19
  try {
20
20
  num = parseFloat(txt);
@@ -26,15 +26,16 @@ const NumberRender = (options) => {
26
26
  else if (lodash_1.default.isNumber(txt)) {
27
27
  num = txt;
28
28
  }
29
- const rtn = formater(num);
29
+ var rtn = formater(num);
30
30
  if (options.onlyText || options.className == null)
31
31
  return rtn + '';
32
32
  return react_1.default.createElement("span", { className: options.className }, rtn);
33
33
  };
34
- fn.getText = (txt, def = '0') => {
34
+ fn.getText = function (txt, def) {
35
+ if (def === void 0) { def = '0'; }
35
36
  if (txt === null)
36
37
  return def;
37
- let num = null;
38
+ var num = null;
38
39
  if (lodash_1.default.isString(txt)) {
39
40
  try {
40
41
  num = parseFloat(txt);
@@ -46,7 +47,7 @@ const NumberRender = (options) => {
46
47
  else if (lodash_1.default.isNumber(txt)) {
47
48
  num = txt;
48
49
  }
49
- const rtn = formater(num);
50
+ var rtn = formater(num);
50
51
  return rtn;
51
52
  };
52
53
  return fn;
@@ -4,25 +4,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.StatusRender = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const antd_1 = require("antd");
10
- const _define_1 = require("./_define");
11
- const i18n_1 = require("../i18n");
12
- const Const_1 = require("../Const");
13
- const Const_2 = require("../../components/_setup/Const");
14
- const STATUS = ["success", "processing", "error", "default", "warning"];
15
- const StatusRender = (options) => {
16
- const StatusMap = new Map();
17
- STATUS.map((key) => {
7
+ var react_1 = __importDefault(require("react"));
8
+ var lodash_1 = __importDefault(require("lodash"));
9
+ var antd_1 = require("antd");
10
+ var _define_1 = require("./_define");
11
+ var i18n_1 = require("../i18n");
12
+ var Const_1 = require("../Const");
13
+ var Const_2 = require("../../components/_setup/Const");
14
+ var STATUS = ["success", "processing", "error", "default", "warning"];
15
+ var StatusRender = function (options) {
16
+ var StatusMap = new Map();
17
+ STATUS.map(function (key) {
18
18
  if (lodash_1.default.has(options, key)) {
19
19
  StatusMap.set(options[key].value + '', { label: (0, i18n_1.getText)(options[key].ik, options[key].label), status: key });
20
20
  }
21
21
  });
22
- const fn = (value) => {
22
+ var fn = function (value) {
23
23
  // "success", "processing", "error", "default", "warning"
24
- const key = value + '';
25
- let info = null;
24
+ var key = value + '';
25
+ var info = null;
26
26
  if (StatusMap.has(key)) {
27
27
  info = StatusMap.get(key);
28
28
  }
@@ -33,8 +33,8 @@ const StatusRender = (options) => {
33
33
  return react_1.default.createElement(antd_1.Badge, { status: info.status, text: info.label });
34
34
  return Const_1.NONE;
35
35
  };
36
- fn.options = (config) => {
37
- let rtnOptions = [];
36
+ fn.options = function (config) {
37
+ var rtnOptions = [];
38
38
  if (config && config.shift) {
39
39
  if (config.shift === true) {
40
40
  rtnOptions.push({ label: (0, i18n_1.txt)(Const_2.V.TXT_ALL), value: '' });
@@ -43,16 +43,16 @@ const StatusRender = (options) => {
43
43
  rtnOptions.push(config.shift);
44
44
  }
45
45
  }
46
- STATUS.map((key) => {
46
+ STATUS.map(function (key) {
47
47
  if (lodash_1.default.has(options, key)) {
48
48
  rtnOptions.push({ label: options[key].label, value: (0, _define_1.convertValue)(options[key].value, config) });
49
49
  }
50
50
  });
51
51
  return rtnOptions;
52
52
  };
53
- fn.getText = (value, def) => {
54
- const key = value + '';
55
- let info = null;
53
+ fn.getText = function (value, def) {
54
+ var key = value + '';
55
+ var info = null;
56
56
  if (StatusMap.has(key)) {
57
57
  info = StatusMap.get(key);
58
58
  }
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.strCopyRender = exports.StrCopyRender = exports.htmlRender = exports.strRender = exports.HTMRender = exports.StrRender = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const Icon_1 = require("../../components/_adapt/Icon");
10
- const _define_1 = require("./_define");
11
- const index_1 = require("../index");
12
- const antd_1 = require("antd");
13
- const StrRender = (options) => {
7
+ var react_1 = __importDefault(require("react"));
8
+ var lodash_1 = __importDefault(require("lodash"));
9
+ var Icon_1 = require("../../components/_adapt/Icon");
10
+ var _define_1 = require("./_define");
11
+ var index_1 = require("../index");
12
+ var antd_1 = require("antd");
13
+ var StrRender = function (options) {
14
14
  var config;
15
15
  if (options == null) {
16
16
  config = { len: 24 };
@@ -21,12 +21,12 @@ const StrRender = (options) => {
21
21
  else {
22
22
  config = options;
23
23
  }
24
- const fn = (value) => {
24
+ var fn = function (value) {
25
25
  if (value == null)
26
26
  return config.default || '';
27
27
  return (0, _define_1.getValue)(value + '', config);
28
28
  };
29
- fn.getText = (str, def) => {
29
+ fn.getText = function (str, def) {
30
30
  return str;
31
31
  };
32
32
  return fn;
@@ -36,14 +36,14 @@ exports.StrRender = StrRender;
36
36
  * 返回一个 htmlRender,用于显示自定义的html,会用div包住
37
37
  * @param className 包住自定义html的 className 默认为空
38
38
  */
39
- const HTMRender = (options) => {
40
- const config = options == null ? {} : options;
41
- const fn = (value) => {
39
+ var HTMRender = function (options) {
40
+ var config = options == null ? {} : options;
41
+ var fn = function (value) {
42
42
  if (value == null)
43
43
  return config.default || index_1.Const.NONE;
44
44
  return react_1.default.createElement("span", { className: config.className, dangerouslySetInnerHTML: { __html: value + '' } });
45
45
  };
46
- fn.getText = (str, def) => {
46
+ fn.getText = function (str, def) {
47
47
  return str;
48
48
  };
49
49
  return fn;
@@ -51,7 +51,7 @@ const HTMRender = (options) => {
51
51
  exports.HTMRender = HTMRender;
52
52
  exports.strRender = (0, exports.StrRender)();
53
53
  exports.htmlRender = (0, exports.HTMRender)();
54
- const StrCopyRender = (options) => {
54
+ var StrCopyRender = function (options) {
55
55
  var config;
56
56
  if (options == null) {
57
57
  config = { len: 24 };
@@ -62,18 +62,18 @@ const StrCopyRender = (options) => {
62
62
  else {
63
63
  config = options;
64
64
  }
65
- const fn = (str) => {
65
+ var fn = function (str) {
66
66
  if (str === null || str === undefined)
67
67
  return '';
68
68
  return react_1.default.createElement("span", { className: 'c-copy', title: str },
69
- react_1.default.createElement(Icon_1.Icon, { type: 'copy', onClick: () => {
69
+ react_1.default.createElement(Icon_1.Icon, { type: 'copy', onClick: function () {
70
70
  index_1.StringUtil.copy(str + '');
71
71
  antd_1.message.success('文本已复制');
72
72
  }, title: '\u70B9\u51FB\u590D\u5236' }),
73
73
  (0, _define_1.getValue)(str + '', config),
74
74
  " ");
75
75
  };
76
- fn.getText = (str, def) => {
76
+ fn.getText = function (str, def) {
77
77
  return (str || def);
78
78
  };
79
79
  return fn;
@@ -20,7 +20,7 @@ export type OptionConvertConfig = {
20
20
  };
21
21
  export declare const convertValue: (value: any, config?: OptionConvertConfig) => any;
22
22
  export interface Render {
23
- (value: string | number): (string | React.ReactNode);
24
- getText: (value: string | number, def?: string) => string;
23
+ (value: string | number, ...args: any[]): (string | React.ReactNode);
24
+ getText: (value: string | number | boolean, def?: string) => string;
25
25
  }
26
26
  export declare const getList: (result: any) => PlainObject[];
@@ -4,13 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getList = exports.convertValue = exports.getValue = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- const lodash_1 = __importDefault(require("lodash"));
9
- const Const_1 = require("../Const");
10
- const getValue = (txt, options) => {
7
+ var react_1 = __importDefault(require("react"));
8
+ var lodash_1 = __importDefault(require("lodash"));
9
+ var Const_1 = require("../Const");
10
+ var getValue = function (txt, options) {
11
11
  if (options == null)
12
12
  return txt || Const_1.NONE;
13
- let str;
13
+ var str;
14
14
  if (txt == null) {
15
15
  if (options.default)
16
16
  return options.default;
@@ -29,7 +29,7 @@ const getValue = (txt, options) => {
29
29
  return react_1.default.createElement("span", { className: options.className, title: txt }, str);
30
30
  };
31
31
  exports.getValue = getValue;
32
- const convertValue = (value, config) => {
32
+ var convertValue = function (value, config) {
33
33
  if (config == null || config.valueFormat == null)
34
34
  return value;
35
35
  if (config.valueFormat == 'number') {
@@ -43,7 +43,7 @@ const convertValue = (value, config) => {
43
43
  return value + '';
44
44
  };
45
45
  exports.convertValue = convertValue;
46
- const getList = (result) => {
46
+ var getList = function (result) {
47
47
  if (lodash_1.default.has(result, 'code')) {
48
48
  if (result.code != '0') {
49
49
  return [];