vap1 0.4.3 → 0.4.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.
- package/_mixin.scss +89 -0
- package/components/Box/Box.d.ts +3 -3
- package/components/Box/Box.js +38 -29
- package/components/Box/SelectBar.d.ts +3 -3
- package/components/Lists/SList.d.ts +4 -5
- package/components/Lists/SList.js +1 -2
- package/components/SearchBar/ActionButtons.d.ts +4 -4
- package/components/SearchBar/ActionButtons.js +26 -3
- package/components/SearchBar/ByField.d.ts +1 -1
- package/components/SearchBar/ByField.js +2 -2
- package/components/SearchBar/ByKeyword.d.ts +2 -2
- package/components/SearchBar/ByKeyword.js +2 -2
- package/components/SearchBar/SearchField.d.ts +2 -2
- package/components/SearchBar/index.js +1 -1
- package/components/Tables/Components/ActionBar.d.ts +2 -3
- package/components/Tables/Components/Actions.d.ts +7 -7
- package/components/Tables/Components/Actions.js +4 -4
- package/components/Tables/Components/index.d.ts +6 -6
- package/components/Tables/TopTable.d.ts +2 -2
- package/components/Tables/TopTable.js +5 -19
- package/components/Tables/TopTableModal.d.ts +2 -2
- package/components/Tables/TopTableModal.js +1 -1
- package/components/Tables/Util.d.ts +5 -1
- package/components/Tables/Util.js +69 -2
- package/components/Tables/VTable.js +45 -74
- package/components/Tables/index.d.ts +5 -4
- package/components/TreeSelect/BaseTreeSelect.d.ts +3 -3
- package/components/TreeSelect/BaseTreeSelect.js +8 -5
- package/components/TreeSelect/DTreeSelect.d.ts +2 -2
- package/components/TreeSelect/DTreeSelect.js +1 -1
- package/components/TreeSelect/FTreeSelect.d.ts +2 -2
- package/components/TreeSelect/STreeSelect.d.ts +2 -2
- package/components/Trees/BaseTree.d.ts +2 -2
- package/components/Trees/COTree/COButton.js +1 -1
- package/components/Trees/COTree/COSelect.js +1 -1
- package/components/Trees/COTree/COTreeUtil.d.ts +2 -1
- package/components/Trees/DTree.d.ts +7 -0
- package/components/Trees/FTree.d.ts +2 -3
- package/components/Trees/STree.d.ts +2 -2
- package/components/UForm/FormWrapper.d.ts +2 -3
- package/components/UForm/UDescriptions.d.ts +2 -1
- package/components/UForm/UDescriptions.js +28 -5
- package/components/UForm/UForm.js +4 -4
- package/components/UForm/UFormModal.d.ts +2 -2
- package/components/UForm/UInfo.d.ts +2 -2
- package/components/UForm/UInfoModal.d.ts +2 -2
- package/components/UForm/UInfoModal.js +1 -1
- package/components/UForm/UModal.d.ts +2 -2
- package/components/UForm/_FieldType.d.ts +1 -1
- package/components/UForm/_FieldType.js +4 -0
- package/components/UForm/_input.d.ts +3 -3
- package/components/UForm/_input.js +2 -2
- package/components/UForm/_register.d.ts +2 -3
- package/components/UForm/index.d.ts +16 -13
- package/components/Upload/UploadFile.d.ts +2 -2
- package/components/Upload/UploadImage.d.ts +2 -2
- package/components/Upload/UploadImage.js +1 -1
- package/components/Upload/UploadModal.d.ts +4 -4
- package/components/Upload/UploadModal.js +2 -2
- package/components/Upload/useUpload.d.ts +2 -2
- package/components/Upload/useUpload.js +1 -1
- package/components/_RegisterUtil.d.ts +1 -1
- package/components/_RegisterUtil.js +2 -2
- package/components/_adapt/Alert.d.ts +2 -3
- package/components/_adapt/Button.d.ts +3 -4
- package/components/_adapt/Col.d.ts +8 -8
- package/components/_adapt/ColorPicker.js +2 -2
- package/components/_adapt/ConfigProvider.d.ts +3 -3
- package/components/_adapt/Drawer.d.ts +2 -3
- package/components/_adapt/Drawer.js +2 -2
- package/components/_adapt/FloatButton.d.ts +5 -5
- package/components/_adapt/Form.js +3 -3
- package/components/_adapt/Icon.d.ts +2 -1
- package/components/_adapt/Image.js +1 -1
- package/components/_adapt/Layout.d.ts +1 -2
- package/components/_adapt/Layout.js +1 -1
- package/components/_adapt/Menu.d.ts +5 -6
- package/components/_adapt/Menu.js +25 -2
- package/components/_adapt/Modal.d.ts +2 -1
- package/components/_adapt/Modal.js +1 -1
- package/components/_adapt/Progress.d.ts +3 -2
- package/components/_adapt/Progress.js +1 -1
- package/components/_adapt/Row.d.ts +2 -2
- package/components/_adapt/Select.js +1 -1
- package/components/_adapt/Slider.d.ts +7 -7
- package/components/_adapt/Space.d.ts +4 -3
- package/components/_adapt/Table.d.ts +5 -5
- package/components/_adapt/Tabs.d.ts +2 -3
- package/components/_adapt/Tag.js +25 -2
- package/components/_adapt/utils.js +10 -10
- package/components/_common/AutoComplete.d.ts +3 -3
- package/components/_common/CountUp.d.ts +3 -3
- package/components/_common/CountUp.js +1 -1
- package/components/_common/DateRange.d.ts +2 -2
- package/components/_common/HighLight.d.ts +2 -2
- package/components/_common/HighLight.js +1 -1
- package/components/_common/I18N.d.ts +2 -2
- package/components/_common/Loading.d.ts +3 -3
- package/components/_common/MonthRange.d.ts +2 -2
- package/components/_common/PromiseLabel.d.ts +4 -4
- package/components/_common/UTitle.d.ts +6 -5
- package/components/_common/UTitle.js +25 -2
- package/components/_common/Upagination.d.ts +2 -2
- package/deps/JsonView.d.ts +2 -2
- package/deps/JsonView.js +5 -2
- package/deps/app-audit/LookUp.d.ts +3 -3
- package/deps/app-audit/LookUp.js +2 -2
- package/deps/app-data/useSource.js +2 -2
- package/deps/echarts.d.ts +2 -2
- package/deps/editor/Article.d.ts +3 -3
- package/deps/editor/support/buttons/ImageButton.d.ts +2 -2
- package/deps/editor/support/buttons/ImageButton.js +1 -1
- package/deps/editor/tools/Button.d.ts +2 -2
- package/deps/editor/tools/Button.js +1 -1
- package/deps/editor/tools/ToolBar.d.ts +2 -2
- package/deps/editor/tools/_BlockButton.d.ts +2 -2
- package/deps/editor/tools/_InsertButton.d.ts +4 -4
- package/deps/editor/tools/_MarkButton.d.ts +2 -2
- package/deps/editor/tools/_TxtButton.d.ts +6 -6
- package/deps/editor/tools/_TxtButton.js +25 -5
- package/deps/editor/types.d.ts +2 -2
- package/deps/editor/utils/index.js +0 -5
- package/hooks/useApiBase.js +1 -1
- package/hooks/useApp.d.ts +3 -3
- package/hooks/useApp.js +1 -1
- package/hooks/useArray.js +5 -7
- package/hooks/useHover.d.ts +3 -3
- package/hooks/useHover.js +2 -25
- package/package.json +1 -1
- package/screen/Comment.d.ts +3 -3
- package/screen/EchartContent.js +2 -2
- package/screen/Page.d.ts +2 -2
- package/screen/render.d.ts +2 -2
- package/uform/FormEditor.d.ts +2 -2
- package/uform/FormEditor.js +3 -2
- package/uform/inputs/_date.js +1 -1
- package/uform/inputs/_input.js +1 -1
- package/uform/inputs/_select.js +1 -1
- package/uform/inputs/register.d.ts +2 -2
- package/uform/panel/Editor/GroupEditor.js +3 -3
- package/uform/panel/Editor/_GroupCollapse.js +3 -3
- package/uform/panel/Editor/_GroupDefault.js +24 -4
- package/uform/panel/Editor/_GroupStep.js +28 -5
- package/uform/panel/Editor/_GroupTab.js +25 -2
- package/uform/panel/Editor/index.js +1 -1
- package/uform/panel/Items/Fields.d.ts +2 -2
- package/uform/panel/Items/Fields.js +3 -1
- package/uform/panel/Items/InputSelector.d.ts +2 -2
- package/uform/panel/Items/InputSelector.js +2 -1
- package/uform/panel/Items/Inputs.d.ts +2 -1
- package/uform/panel/Items/Inputs.js +24 -4
- package/uform/panel/Propreties/CanvasProperties.js +25 -2
- package/uform/panel/Propreties/Component/FieldPlugin.d.ts +2 -2
- package/uform/panel/Propreties/Component/FieldPlugin.js +1 -1
- package/uform/panel/Propreties/Component/LinkAsyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/LinkAsyncFunction.js +1 -1
- package/uform/panel/Propreties/Component/LinkSyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/LinkSyncFunction.js +1 -1
- package/uform/panel/Propreties/Component/Links.js +1 -1
- package/uform/panel/Propreties/Component/OptionTable.js +25 -5
- package/uform/panel/Propreties/Component/RegexpModal.d.ts +2 -2
- package/uform/panel/Propreties/Component/Validate.js +1 -1
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +25 -2
- package/uform/panel/Propreties/Component/ValidateSyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/ValidateSyncFunction.js +25 -2
- package/uform/panel/Propreties/FieldProperties.js +1 -1
- package/uform/panel/Propreties/_ItemAdvance.js +25 -2
- package/uform/panel/Propreties/_ItemBase.js +1 -1
- package/uform/panel/Propreties/_ItemLink.js +24 -4
- package/uform/panel/Propreties/_ItemValidate.js +24 -4
- package/uform/utils/Convert.js +9 -9
- package/utils/CacheUtil.d.ts +4 -4
- package/utils/CacheUtil.js +15 -15
- package/utils/Const.d.ts +3 -2
- package/utils/Const.js +26 -5
- package/utils/CustomApp.d.ts +3 -3
- package/utils/Format.js +2 -1
- package/utils/Renders/ApiGetRender.js +3 -3
- package/utils/Renders/ApiPostRender.js +2 -2
- package/utils/Renders/CondictionRender.d.ts +5 -0
- package/utils/Renders/CondictionRender.js +163 -0
- package/utils/Renders/DateRender.js +5 -5
- package/utils/Renders/DictRender.js +5 -6
- package/utils/Renders/FileRender.d.ts +2 -1
- package/utils/Renders/FileRender.js +5 -5
- package/utils/Renders/ListRender.js +9 -9
- package/utils/Renders/NumberRender.js +4 -4
- package/utils/Renders/StatusRender.js +2 -2
- package/utils/Renders/StringRender.js +4 -4
- package/utils/Renders/_DictBaseRender.d.ts +1 -1
- package/utils/Renders/_DictBaseRender.js +23 -23
- package/utils/Renders/_define.d.ts +6 -6
- package/utils/Renders/_define.js +9 -14
- package/utils/Renders/index.d.ts +1 -0
- package/utils/Renders/index.js +3 -1
- package/utils/StringUtil.d.ts +4 -4
- package/utils/StringUtil.js +15 -14
- package/utils/VAP.d.ts +4 -4
- package/utils/VAP.js +8 -40
- package/utils/i18n.d.ts +3 -3
- package/widget/index.d.ts +2 -2
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
| text ||
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
export declare const _FieldType: readonly ["text", "textarea", "password", "color", "number", "slider", "slider-range", "slider-range", "input-with-select", "select", "multi-select", "switch", "switch-checkbox", "radio", "radio-button", "radio-with-more", "checkbox", "checkbox-with-all", "icon", "stree-select", "dtree-select", "ftree-select", "multi-stree-select", "multi-dtree-select", "multi-ftree-select", "date", "datetime", "month", "week", "time", "daterange", "datetimerange", "daterange-single", "datetimerange-single", "timerange", "monthrange", "json-array", "json-table", "file", "multi-file", "img", "idcard", "ip", "ip4", "ip6", "phone", "telephone", "mobilephone", "port", "mac", "url", "email", "crontab", "organization", "role", "roles", "cems-org-button"];
|
|
8
|
+
export declare const _FieldType: readonly ["text", "textarea", "password", "color", "number", "slider", "slider-range", "slider-range", "input-with-select", "button", "select", "multi-select", "switch", "switch-checkbox", "radio", "radio-button", "radio-with-more", "checkbox", "checkbox-with-all", "icon", "stree-select", "dtree-select", "ftree-select", "multi-stree-select", "multi-dtree-select", "multi-ftree-select", "date", "datetime", "month", "week", "time", "daterange", "datetimerange", "daterange-single", "datetimerange-single", "timerange", "monthrange", "json-array", "json-table", "file", "multi-file", "img", "idcard", "ip", "ip4", "ip6", "phone", "telephone", "mobilephone", "port", "mac", "url", "email", "crontab", "organization", "role", "roles", "cems-org-button"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
import type { UFormField } from './index';
|
|
3
3
|
import type { PlainObject } from '../../basetype';
|
|
4
4
|
import type { TableColumn } from '../Tables';
|
|
@@ -20,7 +20,7 @@ type ApiTableBuilderOptions = {
|
|
|
20
20
|
/**
|
|
21
21
|
* 选择弹框标题
|
|
22
22
|
*/
|
|
23
|
-
title:
|
|
23
|
+
title: ReactNode;
|
|
24
24
|
/**
|
|
25
25
|
* 选择弹框宽度
|
|
26
26
|
*/
|
|
@@ -50,7 +50,7 @@ type ApiTableBuilderOptions = {
|
|
|
50
50
|
/**
|
|
51
51
|
* 用于展示按钮内容的 render,优先级高于 nameField
|
|
52
52
|
*/
|
|
53
|
-
render?: (obj: PlainObject) =>
|
|
53
|
+
render?: (obj: PlainObject) => ReactNode;
|
|
54
54
|
};
|
|
55
55
|
/**
|
|
56
56
|
* 快速注册 一个 弹出ApiTable 的选择组件
|
|
@@ -140,8 +140,8 @@ var builderApiTableSerletor = function (options, nameIdx) { return function (pro
|
|
|
140
140
|
return values[1];
|
|
141
141
|
return values[0];
|
|
142
142
|
};
|
|
143
|
-
return react_1.default.createElement(react_1.
|
|
144
|
-
values[0] != undefined ? react_1.default.createElement(Button_1.Button, __assign({}, params, { onClick: function () { return setOpen(true); } }), getTip(values)) : react_1.default.createElement(Button_1.Button, __assign({}, params, { icon: 'select', onClick: function () { return setOpen(true); } }), (0, exports.getPlaceholder)(field, true)),
|
|
143
|
+
return react_1.default.createElement(react_1.Fragment, null,
|
|
144
|
+
values[0] != undefined ? react_1.default.createElement(Button_1.Button, __assign({}, params, { icon: 'select', onClick: function () { return setOpen(true); } }), getTip(values)) : react_1.default.createElement(Button_1.Button, __assign({}, params, { icon: 'select', onClick: function () { return setOpen(true); } }), (0, exports.getPlaceholder)(field, true)),
|
|
145
145
|
react_1.default.createElement(Tables_1.ApiTableModal, __assign({ title: options.title, searchBar: options.searchBar, width: options.width || 720 }, field.config, { api: options.api, columns: __spreadArray(__spreadArray([], __read(options.columns), false), [
|
|
146
146
|
Tables_1.ApiTable.COL_OPERACTION({ render: function (data) { return react_1.default.createElement(Tables_1.ApiTable.ACTION, { title: "\u9009\u62E9", icon: "select", onClick: function () { return onSelect(data); } }); } })
|
|
147
147
|
], false), open: open, onCancel: function () { return setOpen(false); } })));
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ComponentType, ReactNode } from 'react';
|
|
2
2
|
import type { BaseOption, PlainObject } from '../../basetype';
|
|
3
3
|
import type { UFormField } from './index';
|
|
4
4
|
import type { ValidationRule, WrappedFormUtils } from 'antd/es/form/Form';
|
|
5
|
-
import type { ComponentType } from 'react';
|
|
6
5
|
/**
|
|
7
6
|
* 自定义组件实现时,为组件提供的参数
|
|
8
7
|
*
|
|
@@ -65,7 +64,7 @@ export type FormFieldOptions = {
|
|
|
65
64
|
/**
|
|
66
65
|
* INFO模式下的回显方式
|
|
67
66
|
*/
|
|
68
|
-
render?: (value: any, data?: PlainObject, field?: UFormField) =>
|
|
67
|
+
render?: (value: any, data?: PlainObject, field?: UFormField) => ReactNode;
|
|
69
68
|
/**
|
|
70
69
|
* 校验规则
|
|
71
70
|
* 支持传Rule, Rule数组,及一个方法,接收一个数组
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export { UForm } from './UForm';
|
|
3
2
|
export { UFormModal } from './UFormModal';
|
|
4
3
|
export { UInfo } from './UInfo';
|
|
5
4
|
export { UInfoModal } from './UInfoModal';
|
|
6
5
|
export { UModal } from './UModal';
|
|
7
6
|
export { UDescriptions } from './UDescriptions';
|
|
7
|
+
import type { ReactNode, CSSProperties } from 'react';
|
|
8
8
|
import type { BaseOption, PlainObject, BaseItem } from '../../basetype';
|
|
9
9
|
import type { ModalProps } from '../_adapt/Modal';
|
|
10
10
|
import type { ButtonProps } from '../_adapt/Button';
|
|
@@ -16,7 +16,10 @@ import type { ValidationRule } from 'antd/es/form/Form';
|
|
|
16
16
|
* 2. 大于8个字段时,默认使用 common
|
|
17
17
|
*/
|
|
18
18
|
export type UFormLayout = 'common' | 'simple' | 'compress';
|
|
19
|
-
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export type FieldDataType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'NONE';
|
|
20
23
|
/**
|
|
21
24
|
* 分组展示的方式 default = 默认 | tabs = 标签 | collapse = 折叠风琴
|
|
22
25
|
*/
|
|
@@ -155,17 +158,17 @@ export type UFormField = BaseItem & {
|
|
|
155
158
|
* 1. 为字文本时,提示文本
|
|
156
159
|
* 2. 为对象时,提示标题,文本,提示图标可指定
|
|
157
160
|
*/
|
|
158
|
-
tip?:
|
|
161
|
+
tip?: ReactNode;
|
|
159
162
|
/**
|
|
160
163
|
* FormItem 的 extra 信息
|
|
161
164
|
* 说明 `tip` 显示在label 旁边,以 Icon图标显示
|
|
162
165
|
* extra 直接显示
|
|
163
166
|
*/
|
|
164
|
-
extra?:
|
|
167
|
+
extra?: ReactNode;
|
|
165
168
|
/**
|
|
166
169
|
* FormItem 的 help 信息
|
|
167
170
|
*/
|
|
168
|
-
help?:
|
|
171
|
+
help?: ReactNode;
|
|
169
172
|
/**
|
|
170
173
|
* rules 用法: https://github.com/yiminghe/async-validator
|
|
171
174
|
*/
|
|
@@ -195,7 +198,7 @@ export type UFormField = BaseItem & {
|
|
|
195
198
|
* render
|
|
196
199
|
* 回显方法
|
|
197
200
|
*/
|
|
198
|
-
render?: (txt: any, obj?: any) =>
|
|
201
|
+
render?: (txt: any, obj?: any) => ReactNode;
|
|
199
202
|
/**
|
|
200
203
|
* 字段选项,适用于 `table` `json-table` 等
|
|
201
204
|
*/
|
|
@@ -223,7 +226,7 @@ export type UFromProps = {
|
|
|
223
226
|
/**
|
|
224
227
|
* 自定义样式
|
|
225
228
|
*/
|
|
226
|
-
style?:
|
|
229
|
+
style?: CSSProperties;
|
|
227
230
|
/**
|
|
228
231
|
* 列表
|
|
229
232
|
*/
|
|
@@ -257,7 +260,7 @@ export type UFromProps = {
|
|
|
257
260
|
/**
|
|
258
261
|
* 提示信息
|
|
259
262
|
*/
|
|
260
|
-
tip?:
|
|
263
|
+
tip?: ReactNode;
|
|
261
264
|
/**
|
|
262
265
|
* 默认
|
|
263
266
|
*/
|
|
@@ -303,7 +306,7 @@ export type UFromAction = ButtonProps & {
|
|
|
303
306
|
/**
|
|
304
307
|
* 点击前的提示
|
|
305
308
|
*/
|
|
306
|
-
confirm?:
|
|
309
|
+
confirm?: ReactNode;
|
|
307
310
|
};
|
|
308
311
|
/**
|
|
309
312
|
* 新版本 ModalProps 只支持 open 且必传,
|
|
@@ -353,11 +356,11 @@ export type UDescriptionsProps = {
|
|
|
353
356
|
/**
|
|
354
357
|
* 样式
|
|
355
358
|
*/
|
|
356
|
-
style?:
|
|
359
|
+
style?: CSSProperties;
|
|
357
360
|
/**
|
|
358
361
|
* 标题
|
|
359
362
|
*/
|
|
360
|
-
title?:
|
|
363
|
+
title?: ReactNode;
|
|
361
364
|
/**
|
|
362
365
|
* 标题 i18n Key
|
|
363
366
|
*/
|
|
@@ -394,7 +397,7 @@ export type UDescriptionsItemProps = BaseItem & {
|
|
|
394
397
|
/**
|
|
395
398
|
* label 名称
|
|
396
399
|
*/
|
|
397
|
-
label?:
|
|
400
|
+
label?: ReactNode;
|
|
398
401
|
/**
|
|
399
402
|
* 横跨制表格数,默认:1
|
|
400
403
|
*/
|
|
@@ -406,7 +409,7 @@ export type UDescriptionsItemProps = BaseItem & {
|
|
|
406
409
|
/**
|
|
407
410
|
* 显示内容
|
|
408
411
|
*/
|
|
409
|
-
children:
|
|
412
|
+
children: ReactNode;
|
|
410
413
|
};
|
|
411
414
|
export type UFormRef = {
|
|
412
415
|
/**
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { BaseUploadProps } from './index';
|
|
3
|
-
export declare const UploadFile:
|
|
3
|
+
export declare const UploadFile: FC<BaseUploadProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { BaseUploadProps } from './index';
|
|
3
3
|
import type { PlainObject } from '../../basetype';
|
|
4
4
|
export declare const getImageUrl: (uri: string) => string;
|
|
@@ -26,4 +26,4 @@ export type UploadImageProps = BaseUploadProps & {
|
|
|
26
26
|
*/
|
|
27
27
|
builtIn?: string[];
|
|
28
28
|
};
|
|
29
|
-
export declare const UploadImage:
|
|
29
|
+
export declare const UploadImage: FC<UploadImageProps>;
|
|
@@ -103,7 +103,7 @@ var ImagePreview = function (props) {
|
|
|
103
103
|
}
|
|
104
104
|
return param;
|
|
105
105
|
}, [imgUrl]);
|
|
106
|
-
return react_1.default.createElement(react_1.
|
|
106
|
+
return react_1.default.createElement(react_1.Fragment, null,
|
|
107
107
|
react_1.default.createElement("div", __assign({}, divProps), showPreview && react_1.default.createElement(Icon_1.Icon, { type: "zoom-in" })),
|
|
108
108
|
showPreview && react_1.default.createElement(Modal_1.Modal, { className: 'picture-card-preview', style: { top: 0, backgroundImage: "url(\"".concat(imgUrl, "\")") }, open: open, maskClosable: true, width: '100%', footer: null, onCancel: show }));
|
|
109
109
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
2
|
import type { BaseUploadProps } from './index';
|
|
3
3
|
import type { ModalProps } from '../../components/_adapt/Modal';
|
|
4
4
|
import type { PlainObject } from '../../basetype';
|
|
@@ -9,7 +9,7 @@ import type { PlainObject } from '../../basetype';
|
|
|
9
9
|
* return {ok:true, message:'成功导入111条记录'}
|
|
10
10
|
*/
|
|
11
11
|
type ImportResult = boolean | {
|
|
12
|
-
message:
|
|
12
|
+
message: ReactNode;
|
|
13
13
|
ok: boolean;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
@@ -31,7 +31,7 @@ export type UploadModalProps = ModalProps & Omit<BaseUploadProps, 'onChange' | '
|
|
|
31
31
|
* 上传提示,通常包括上传数据说明,数据模板文件下载等内容。
|
|
32
32
|
* 默认 : 请注意:导入的Excel数据字段须与Excel模版保持一致,否则无法导入数据。点击确认时将仅导入正常数据。
|
|
33
33
|
*/
|
|
34
|
-
tip?:
|
|
34
|
+
tip?: ReactNode;
|
|
35
35
|
/**
|
|
36
36
|
* 二步模式,且上传接口非标准接口时,必传 onUpload
|
|
37
37
|
* 返回上传结果 boolean 成功 OR 失败
|
|
@@ -46,5 +46,5 @@ export type UploadModalProps = ModalProps & Omit<BaseUploadProps, 'onChange' | '
|
|
|
46
46
|
*/
|
|
47
47
|
onCancel: () => void;
|
|
48
48
|
};
|
|
49
|
-
export declare const UploadModal:
|
|
49
|
+
export declare const UploadModal: FC<UploadModalProps>;
|
|
50
50
|
export {};
|
|
@@ -196,9 +196,9 @@ var UploadModal = function (props) {
|
|
|
196
196
|
uploadProps.className = 'c-upload-file';
|
|
197
197
|
}
|
|
198
198
|
;
|
|
199
|
-
return react_1.default.createElement(react_1.
|
|
199
|
+
return react_1.default.createElement(react_1.Fragment, null,
|
|
200
200
|
react_1.default.createElement(antd_1.Upload, __assign({}, uploadProps, { onChange: onChange }),
|
|
201
|
-
react_1.default.createElement(Button_1.Button, { loading: state.uploading, disabled: state.uploading, icon: "upload" }, utils_1.i18n.txt(_i18n_1.V.UPLOAD_FILE))),
|
|
201
|
+
react_1.default.createElement(Button_1.Button, { loading: state.uploading, disabled: state.uploading, icon: "upload", type: "primary" }, utils_1.i18n.txt(_i18n_1.V.UPLOAD_FILE))),
|
|
202
202
|
react_1.default.createElement(Button_1.Button, { onClick: function () { return props.onCancel(); } }, utils_1.i18n.ant('Modal.cancelText')));
|
|
203
203
|
};
|
|
204
204
|
return react_1.default.createElement(Modal_1.Modal, __assign({ width: 640 }, props, { afterClose: function () { setState(DEFAULT); afterClose(); }, title: utils_1.i18n.getText(props.ik, props.title, _i18n_1.V.UPLOAD_MODAL_TITLE), className: "c-upload-modal", footer: uploaded ? react_1.default.createElement(Button_1.Button, { type: 'primary', onClick: function () { return props.onOk ? props.onOk(null) : props.onCancel(); } }, utils_1.i18n.ant('Modal.okText')) : footer() }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
2
|
import type { UploadProps as AntdUploadProps } from 'antd/es/upload';
|
|
3
3
|
import type { BaseUploadProps } from './index';
|
|
4
4
|
import type { UploadChangeParam, UploadFile } from 'antd/es/upload/interface';
|
|
@@ -7,7 +7,7 @@ export type UploadState = {
|
|
|
7
7
|
uploaded: boolean;
|
|
8
8
|
error: boolean;
|
|
9
9
|
percent: number;
|
|
10
|
-
errMsg?:
|
|
10
|
+
errMsg?: ReactNode;
|
|
11
11
|
name?: string;
|
|
12
12
|
info?: any;
|
|
13
13
|
};
|
|
@@ -24,7 +24,7 @@ var react_1 = require("react");
|
|
|
24
24
|
var lodash_1 = __importDefault(require("lodash"));
|
|
25
25
|
var antd_1 = require("antd");
|
|
26
26
|
var utils_1 = require("../../utils");
|
|
27
|
-
var _i18n_1 = require("
|
|
27
|
+
var _i18n_1 = require("../_i18n");
|
|
28
28
|
var getBaseOptions = function (props) {
|
|
29
29
|
var uploadProps = {
|
|
30
30
|
showUploadList: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const register: (map: Map<string, any>, type: string,
|
|
1
|
+
export declare const register: (map: Map<string, any>, type: string, defaultValue: object, component: any, options?: object, forceOverWrite?: boolean) => void;
|
|
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.register = void 0;
|
|
18
18
|
var lodash_1 = __importDefault(require("lodash"));
|
|
19
19
|
var StringUtil_1 = require("../utils/StringUtil");
|
|
20
|
-
var register = function (map, type,
|
|
20
|
+
var register = function (map, type, defaultValue, component, options, forceOverWrite) {
|
|
21
21
|
if (forceOverWrite === void 0) { forceOverWrite = false; }
|
|
22
22
|
var key = (0, StringUtil_1.trimLower)(type);
|
|
23
23
|
if (map.has(key)) {
|
|
@@ -30,7 +30,7 @@ var register = function (map, type, def, component, options, forceOverWrite) {
|
|
|
30
30
|
console.warn("".concat(type, " is overwite by new component"));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
var element = __assign({ component: component },
|
|
33
|
+
var element = __assign({ component: component }, defaultValue);
|
|
34
34
|
lodash_1.default.keys(options).map(function (key) { return element[key] = options[key]; });
|
|
35
35
|
map.set(key, element);
|
|
36
36
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { FC } from 'react';
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
3
2
|
import type { AlertProps as AntdAlertProps } from 'antd/es/alert';
|
|
4
3
|
/**
|
|
5
4
|
* 说明: 排除 Alert 组件已被 antd 标记为 deprecated 的属性:
|
|
6
5
|
* closeText : 使用 closeIcon替代
|
|
7
6
|
*/
|
|
8
7
|
export type AlertProps = Omit<AntdAlertProps, 'closeText'> & {
|
|
9
|
-
closeIcon?: boolean |
|
|
8
|
+
closeIcon?: boolean | ReactNode;
|
|
10
9
|
};
|
|
11
10
|
export declare const Alert: FC<AlertProps>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Button as AntdButton } from "antd";
|
|
3
|
-
import type {
|
|
4
|
-
import type { ExoticComponent } from 'react';
|
|
2
|
+
import type { ExoticComponent, ReactNode } from 'react';
|
|
5
3
|
import type { BaseItem } from '../../basetype';
|
|
4
|
+
import type { ButtonProps as AntdButtonProps } from 'antd/es/button';
|
|
6
5
|
import type { SizeType, ButtonType } from './_Antd5';
|
|
7
6
|
export type ButtonProps = Omit<AntdButtonProps, 'type' | 'icon' | 'size'> & BaseItem & {
|
|
8
7
|
danger?: boolean;
|
|
9
8
|
type?: ButtonType;
|
|
10
9
|
size?: SizeType;
|
|
11
|
-
icon?: string |
|
|
10
|
+
icon?: string | ReactNode;
|
|
12
11
|
};
|
|
13
12
|
/**
|
|
14
13
|
* 扩展 Button 支持 roleCode 和 ik
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ColProps as AntdColprops } from 'antd/es/grid/col';
|
|
1
|
+
import type { FC, CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import type { ColProps as AntdColprops } from 'antd/es/grid/col';
|
|
3
3
|
import type { ActButton } from '../SearchBar/ActionButtons';
|
|
4
4
|
import type { UTitleProps } from '../_common/UTitle';
|
|
5
5
|
export type ColProps = Omit<AntdColprops, 'title'> & UTitleProps & {
|
|
@@ -10,15 +10,15 @@ export type ColProps = Omit<AntdColprops, 'title'> & UTitleProps & {
|
|
|
10
10
|
/**
|
|
11
11
|
* 面板标题
|
|
12
12
|
*/
|
|
13
|
-
title?:
|
|
13
|
+
title?: ReactNode;
|
|
14
14
|
/**
|
|
15
15
|
* 标题下标额外内容(以 small小一号)展示
|
|
16
16
|
*/
|
|
17
|
-
titleSub?:
|
|
17
|
+
titleSub?: ReactNode;
|
|
18
18
|
/**
|
|
19
19
|
* 标题后面的帮助文案
|
|
20
20
|
*/
|
|
21
|
-
help?:
|
|
21
|
+
help?: ReactNode;
|
|
22
22
|
/**
|
|
23
23
|
* 皮肤样式,测试中
|
|
24
24
|
* grid : 网格
|
|
@@ -39,7 +39,7 @@ export type ColProps = Omit<AntdColprops, 'title'> & UTitleProps & {
|
|
|
39
39
|
/**
|
|
40
40
|
* 右上角按钮
|
|
41
41
|
*/
|
|
42
|
-
actions?: ActButton[] |
|
|
42
|
+
actions?: ActButton[] | ReactNode;
|
|
43
43
|
/**
|
|
44
44
|
* 空数据判断
|
|
45
45
|
* 传 true = 数据为空
|
|
@@ -49,6 +49,6 @@ export type ColProps = Omit<AntdColprops, 'title'> & UTitleProps & {
|
|
|
49
49
|
empty?: boolean | any[];
|
|
50
50
|
width?: number;
|
|
51
51
|
height?: number;
|
|
52
|
-
bodySytle?:
|
|
52
|
+
bodySytle?: CSSProperties;
|
|
53
53
|
};
|
|
54
|
-
export declare const Col:
|
|
54
|
+
export declare const Col: FC<ColProps>;
|
|
@@ -68,7 +68,7 @@ var ColorPicker = function (props) {
|
|
|
68
68
|
var content = (0, react_1.useMemo)(function () {
|
|
69
69
|
if (props.children)
|
|
70
70
|
return props.children;
|
|
71
|
-
return react_1.default.createElement(react_1.
|
|
71
|
+
return react_1.default.createElement(react_1.Fragment, null,
|
|
72
72
|
react_1.default.createElement("i", { style: { backgroundColor: value } }),
|
|
73
73
|
" ",
|
|
74
74
|
react_1.default.createElement("strong", null, (props.showText && value != null) ? react_1.default.createElement("span", null, value) : utils_1.Const.NONE));
|
|
@@ -124,7 +124,7 @@ var ColorPicker = function (props) {
|
|
|
124
124
|
setValue(null);
|
|
125
125
|
props.onChange(null, null);
|
|
126
126
|
};
|
|
127
|
-
return react_1.default.createElement(react_1.
|
|
127
|
+
return react_1.default.createElement(react_1.Fragment, null,
|
|
128
128
|
react_1.default.createElement("span", __assign({}, spanProps, { ref: spanRef, onClick: function (evt) { return utils_1.PageUtil.stopEvent(evt, show); } }),
|
|
129
129
|
content,
|
|
130
130
|
value != null && props.allowClear && react_1.default.createElement(Icon_1.Icon, { type: 'close', onClick: clearColor })),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-provider';
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { ConfigProviderProps as AntdConfigProviderProps } from 'antd/es/config-provider';
|
|
3
3
|
export type ConfigProviderProps = AntdConfigProviderProps & {
|
|
4
4
|
[properties: string]: any;
|
|
5
5
|
};
|
|
6
|
-
export declare const ConfigProvider:
|
|
6
|
+
export declare const ConfigProvider: FC<ConfigProviderProps>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { DrawerProps as AntdDrawerProps } from 'antd/es/drawer';
|
|
3
|
-
import type { FC } from 'react';
|
|
2
|
+
import type { FC, ReactNode } from 'react';
|
|
4
3
|
/**
|
|
5
4
|
* 说明: 排除 Drawer 组件已被 antd 标记为 deprecated 的属性:
|
|
6
5
|
* 1. visible : Please use `open` instead
|
|
@@ -12,7 +11,7 @@ export type DrawerProps = Omit<AntdDrawerProps, 'visible' | 'afterVisibleChange'
|
|
|
12
11
|
* */
|
|
13
12
|
size?: 'default' | 'large';
|
|
14
13
|
open?: boolean;
|
|
15
|
-
footer?:
|
|
14
|
+
footer?: ReactNode;
|
|
16
15
|
afterOpenChange?: (open: boolean) => void;
|
|
17
16
|
};
|
|
18
17
|
export declare const Drawer: FC<DrawerProps>;
|
|
@@ -43,12 +43,12 @@ var Drawer = function (props) {
|
|
|
43
43
|
var clazz = [];
|
|
44
44
|
if (props.className)
|
|
45
45
|
clazz.push(props.className);
|
|
46
|
-
if (props.footer && react_1.
|
|
46
|
+
if (props.footer && (0, react_1.isValidElement)(props.footer))
|
|
47
47
|
clazz.push('ant-drawer-has-footer');
|
|
48
48
|
return clazz.join(' ');
|
|
49
49
|
}, [props.className, props.footer]);
|
|
50
50
|
return react_1.default.createElement(antd_1.Drawer, __assign({ getContainer: function () { return document.body; } }, (0, utils_1.convertProps)(props, ['visible', 'open'], ['afterVisibleChange', 'afterOpenChange']), { className: className }),
|
|
51
51
|
props.children,
|
|
52
|
-
(props.footer && react_1.
|
|
52
|
+
(props.footer && (0, react_1.isValidElement)(props.footer)) && react_1.default.createElement("div", { className: 'ant-drawer-footer' }, props.footer));
|
|
53
53
|
};
|
|
54
54
|
exports.Drawer = Drawer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BackTop } from 'antd';
|
|
2
|
+
import type { CSSProperties, ReactNode, MouseEventHandler } from 'react';
|
|
3
3
|
import type { BadgeProps } from 'antd/es/badge';
|
|
4
4
|
import type { ExoticComponent } from 'react';
|
|
5
5
|
type FloatButtonType = 'default' | 'primary';
|
|
@@ -7,15 +7,15 @@ type FloatButtonShape = 'circle' | 'square';
|
|
|
7
7
|
type FloatButtonBadgeProps = Omit<BadgeProps, 'status' | 'text' | 'title' | 'children'>;
|
|
8
8
|
export type FloatButtonProps = {
|
|
9
9
|
className?: string;
|
|
10
|
-
style?:
|
|
11
|
-
icon?:
|
|
12
|
-
description?:
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
description?: ReactNode;
|
|
13
13
|
type?: FloatButtonType;
|
|
14
14
|
title?: string;
|
|
15
15
|
shape?: FloatButtonShape;
|
|
16
16
|
href?: string;
|
|
17
17
|
badge?: FloatButtonBadgeProps;
|
|
18
|
-
onClick?:
|
|
18
|
+
onClick?: MouseEventHandler<HTMLElement>;
|
|
19
19
|
};
|
|
20
20
|
type FloatButtonComponent = ExoticComponent<FloatButtonProps> & {
|
|
21
21
|
BackTop: typeof BackTop;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// import type { FC, ExoticComponent, PropsWithChildren } from 'react'
|
|
8
8
|
// export type FormProps = AntdFormProps;
|
|
9
9
|
// export type FormItemProps = AntdFormItemProps & {
|
|
10
|
-
// tooltip?:
|
|
10
|
+
// tooltip?: ReactNode
|
|
11
11
|
// }
|
|
12
12
|
// type FormComponent = ExoticComponent<PropsWithChildren<AntdFormProps>> & {
|
|
13
13
|
// Item: FC<FormItemProps>;
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
// return undefined;
|
|
20
20
|
// }
|
|
21
21
|
// if (props.tooltip) {
|
|
22
|
-
// return <
|
|
22
|
+
// return <Fragment>
|
|
23
23
|
// <Popover>
|
|
24
24
|
// <Icon type='help' />
|
|
25
25
|
// {props.label}
|
|
26
26
|
// </Popover>
|
|
27
|
-
// </
|
|
27
|
+
// </Fragment>
|
|
28
28
|
// }
|
|
29
29
|
// return props.label;
|
|
30
30
|
// }, [props.label, props.tooltip])
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { CSSProperties } from 'react';
|
|
2
3
|
export type IconProps = {
|
|
3
4
|
type: string;
|
|
4
5
|
className?: string;
|
|
5
6
|
onClick?: () => void;
|
|
6
|
-
style?:
|
|
7
|
+
style?: CSSProperties;
|
|
7
8
|
title?: string;
|
|
8
9
|
/**
|
|
9
10
|
* 说明: 默认 点击事件,会阻止事件冒泡
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// import { Image as AntdImage } from 'antd';
|
|
6
6
|
// import type { ImageProps } from 'antd/es/image';
|
|
7
7
|
// export type OImageProps = Omit<ImageProps, 'onPreviewClose'>;
|
|
8
|
-
// export interface CompositionOImage<P> extends
|
|
8
|
+
// export interface CompositionOImage<P> extends FC<P> {
|
|
9
9
|
// PreviewGroup: typeof AntdImage.PreviewGroup;
|
|
10
10
|
// }
|
|
11
11
|
// export const Image = AntdImage as CompositionOImage<OImageProps>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import type { HTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
1
|
import { Layout as AntdLayout } from 'antd';
|
|
2
|
+
import type { PropsWithChildren, HTMLAttributes, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
4
3
|
type LayoutComponent = ForwardRefExoticComponent<PropsWithChildren<HTMLAttributes<HTMLDivElement>> & RefAttributes<HTMLDivElement>> & {
|
|
5
4
|
displayName: string;
|
|
6
5
|
Header: typeof AntdLayout.Header;
|
|
@@ -129,7 +129,7 @@ var BasicLayout = /** @class */ (function (_super) {
|
|
|
129
129
|
};
|
|
130
130
|
BasicLayout.displayName = 'Layout';
|
|
131
131
|
return BasicLayout;
|
|
132
|
-
}(react_1.
|
|
132
|
+
}(react_1.Component));
|
|
133
133
|
var _Layout = (0, react_1.forwardRef)(function (props, ref) { return react_1.default.createElement(context_1.ConfigConsumer, null, function () { return react_1.default.createElement(BasicLayout, __assign({}, props, { elref: ref })); }); });
|
|
134
134
|
// const Content = generator({
|
|
135
135
|
// suffixCls: 'layout-content',
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Menu as AntdMenu } from 'antd';
|
|
3
2
|
import type { MenuProps as AntdMenuProps } from 'antd/es/menu';
|
|
4
3
|
import type { MenuItemProps as AntdMenuItemProps } from 'antd/es/menu/MenuItem';
|
|
5
4
|
import type { SubMenuProps as AntdSubMenuProps } from 'antd/es/menu/SubMenu';
|
|
6
|
-
import type { PropsWithChildren, ExoticComponent } from 'react';
|
|
5
|
+
import type { ReactNode, PropsWithChildren, ExoticComponent } from 'react';
|
|
7
6
|
import type { Key } from '../../basetype';
|
|
8
7
|
export interface MenuItemType extends AntdMenuItemProps {
|
|
9
8
|
key: Key;
|
|
10
9
|
danger?: boolean;
|
|
11
|
-
icon?: string |
|
|
10
|
+
icon?: string | ReactNode;
|
|
12
11
|
ik?: string;
|
|
13
|
-
label?:
|
|
12
|
+
label?: ReactNode;
|
|
14
13
|
title?: string;
|
|
15
14
|
}
|
|
16
15
|
export interface SubMenuType<T extends MenuItemType = MenuItemType> extends Omit<AntdSubMenuProps, 'children'> {
|
|
17
16
|
key: Key;
|
|
18
|
-
icon?: string |
|
|
17
|
+
icon?: string | ReactNode;
|
|
19
18
|
ik?: string;
|
|
20
|
-
label?:
|
|
19
|
+
label?: ReactNode;
|
|
21
20
|
children: ItemType<T>[];
|
|
22
21
|
}
|
|
23
22
|
export type ItemType<T extends MenuItemType = MenuItemType> = T | SubMenuType<T> | null;
|
|
@@ -10,12 +10,35 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
13
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
38
|
};
|
|
16
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
40
|
exports.Menu = void 0;
|
|
18
|
-
var react_1 =
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
19
42
|
var lodash_1 = __importDefault(require("lodash"));
|
|
20
43
|
var antd_1 = require("antd");
|
|
21
44
|
var i18n_1 = require("../../utils/i18n");
|
|
@@ -27,7 +50,7 @@ var getMenuProps = function (props) {
|
|
|
27
50
|
title = (0, i18n_1.txt)(props.ik);
|
|
28
51
|
}
|
|
29
52
|
if (props.icon) {
|
|
30
|
-
result.title = react_1.default.createElement(react_1.
|
|
53
|
+
result.title = react_1.default.createElement(react_1.Fragment, null,
|
|
31
54
|
lodash_1.default.isString(props.icon) ? react_1.default.createElement(Icon_1.Icon, { type: props.icon }) : props.icon,
|
|
32
55
|
" ",
|
|
33
56
|
react_1.default.createElement("span", { className: props.danger ? 'ant-typography ant-typography-danger' : undefined }, title));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
import type { ModalProps as AntdModalProps } from 'antd/es/modal';
|
|
3
4
|
import type { PlainObject } from '../../basetype';
|
|
4
5
|
export type ModalProps = Omit<AntdModalProps, 'onOk' | 'onCancel' | 'visible'> & {
|
|
@@ -18,5 +19,5 @@ export declare class Modal extends Component<ModalProps> {
|
|
|
18
19
|
static confirm: import("antd/lib/modal/Modal").ModalFunc;
|
|
19
20
|
static destroyAll: () => void;
|
|
20
21
|
renderFooter(): React.ReactNode;
|
|
21
|
-
render():
|
|
22
|
+
render(): ReactNode;
|
|
22
23
|
}
|