vap1 0.4.3 → 0.4.5
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/Box/index.d.ts +1 -1
- package/components/Lists/SList.d.ts +4 -5
- package/components/Lists/SList.js +4 -4
- 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/STable.d.ts +1 -1
- package/components/Tables/TopTable.d.ts +2 -2
- package/components/Tables/TopTable.js +4 -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/ActionTree.d.ts +4 -1
- package/components/Trees/BaseTree.d.ts +3 -2
- package/components/Trees/BaseTree.js +11 -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 +8 -0
- package/components/Trees/FTree.d.ts +3 -3
- package/components/Trees/STree.d.ts +2 -2
- package/components/Trees/index.d.ts +4 -0
- 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/useApiGlobal.js +1 -1
- package/hooks/useApp.d.ts +3 -3
- package/hooks/useApp.js +1 -1
- package/hooks/useArray.js +5 -7
- package/hooks/useEffectFunction.d.ts +4 -2
- package/hooks/useGetSet.d.ts +1 -1
- package/hooks/useGlobal.d.ts +1 -1
- 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/Page.js +3 -3
- 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 +5 -5
- package/utils/Format.js +2 -1
- package/utils/Global.d.ts +5 -0
- package/utils/Global.js +1 -0
- 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.d.ts +2 -5
- package/utils/Renders/DictRender.js +19 -14
- 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 +8 -6
- package/utils/StringUtil.js +27 -17
- package/utils/TreeUtil.js +6 -5
- package/utils/VAP.d.ts +4 -4
- package/utils/VAP.js +8 -40
- package/utils/_Support.d.ts +0 -6
- package/utils/_Support.js +1 -67
- package/utils/i18n.d.ts +3 -3
- package/utils/py.d.ts +19 -0
- package/utils/py.js +174 -0
- package/widget/index.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { ModalProps } from '../_adapt/Modal';
|
|
3
3
|
import type { TopTableProps } from './TopTable';
|
|
4
4
|
export type TopTableModalProps = TopTableProps & ModalProps;
|
|
5
|
-
export declare const TopTableModal:
|
|
5
|
+
export declare const TopTableModal: FC<TopTableModalProps>;
|
|
@@ -25,7 +25,7 @@ var TOP_TABLE_PROPERTIES = [
|
|
|
25
25
|
var TopTableModal = function (props) {
|
|
26
26
|
var modalProps = lodash_1.default.omit(props, TOP_TABLE_PROPERTIES);
|
|
27
27
|
var tableProps = lodash_1.default.pick(props, TOP_TABLE_PROPERTIES);
|
|
28
|
-
return react_1.default.createElement(Modal_1.Modal, __assign({}, modalProps),
|
|
28
|
+
return react_1.default.createElement(Modal_1.Modal, __assign({ footer: null }, modalProps),
|
|
29
29
|
react_1.default.createElement(TopTable_1.TopTable, __assign({}, tableProps)));
|
|
30
30
|
};
|
|
31
31
|
exports.TopTableModal = TopTableModal;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import type { MutableRefObject } from 'react';
|
|
2
|
+
import type { BaseTableProps } from './index';
|
|
2
3
|
import type { ColumnProps } from 'antd/es/table/interface';
|
|
3
|
-
export declare const
|
|
4
|
+
export declare const convertColumns: (props: BaseTableProps, rank: {
|
|
5
|
+
ref: MutableRefObject<number>;
|
|
6
|
+
isRank?: boolean;
|
|
7
|
+
}) => ColumnProps<any>[];
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
17
|
+
exports.convertColumns = void 0;
|
|
7
18
|
var lodash_1 = __importDefault(require("lodash"));
|
|
8
19
|
var utils_1 = require("../../utils");
|
|
9
20
|
var _i18n_1 = require("../_i18n");
|
|
@@ -40,4 +51,60 @@ var getIdxColumn = function (ref, showIndex, isRank) {
|
|
|
40
51
|
render: idxRender
|
|
41
52
|
};
|
|
42
53
|
};
|
|
43
|
-
|
|
54
|
+
var convertCol = function (col) {
|
|
55
|
+
if (col.roleCode && !utils_1.PageUtil.hasRole(col.roleCode))
|
|
56
|
+
return null;
|
|
57
|
+
var item = __assign({}, col);
|
|
58
|
+
if (col.ik) {
|
|
59
|
+
var title = utils_1.i18n.txt(col.ik);
|
|
60
|
+
item.title = title == '' ? item.title : title;
|
|
61
|
+
}
|
|
62
|
+
var clazz = [];
|
|
63
|
+
if (col.wrap) {
|
|
64
|
+
clazz.push('c-table-col-wrap');
|
|
65
|
+
}
|
|
66
|
+
else if (!lodash_1.default.has(col, 'ellipsis')) {
|
|
67
|
+
item.ellipsis = true;
|
|
68
|
+
}
|
|
69
|
+
if (!lodash_1.default.has(item, 'width')) {
|
|
70
|
+
if (lodash_1.default.isString(item.title)) {
|
|
71
|
+
clazz.push('c-table-col-' + (item.title.length + (item.sorter ? 2 : 0)));
|
|
72
|
+
}
|
|
73
|
+
if (lodash_1.default.isString(col.dataIndex) && col.dataIndex.length && col.dataIndex.indexOf('.') < 0 && col.dataIndex.indexOf('[') < 0) {
|
|
74
|
+
clazz.push('table-col-' + col.dataIndex);
|
|
75
|
+
if (col.sorter) {
|
|
76
|
+
clazz.push('c-table-col-has-sorter');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (col.className) {
|
|
81
|
+
clazz.push(col.className);
|
|
82
|
+
}
|
|
83
|
+
item.className = clazz.join(' ');
|
|
84
|
+
return item;
|
|
85
|
+
};
|
|
86
|
+
var convertColumns = function (props, rank) {
|
|
87
|
+
// props.columns[0]
|
|
88
|
+
var cols = (props.showIndex == false) ? [] : [getIdxColumn(rank.ref, props.showIndex, rank.isRank)];
|
|
89
|
+
props.columns.map(function (col) {
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
var isGroup = lodash_1.default.has(col, 'children') && lodash_1.default.isArray(col.children);
|
|
92
|
+
if (isGroup) {
|
|
93
|
+
console.error('Not Support group mode in 1.5');
|
|
94
|
+
// let column: ColumnGroupType<any> = { ..._.pick(col, ['width', 'align']), children: [], title: col.title, className: 'c-table-header-group' };
|
|
95
|
+
// if (col.className) column.className = `c-table-header-group ${col.className}`;
|
|
96
|
+
// (col as TableColumnGroup).children.map((item => {
|
|
97
|
+
// let subCol = convertCol(item);
|
|
98
|
+
// if (subCol != null) column.children.push(subCol);
|
|
99
|
+
// }));
|
|
100
|
+
// if (column.children.length > 0) cols.push(column);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
var column = convertCol(col);
|
|
104
|
+
if (column != null)
|
|
105
|
+
cols.push(column);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return cols;
|
|
109
|
+
};
|
|
110
|
+
exports.convertColumns = convertColumns;
|
|
@@ -98,6 +98,13 @@ exports.getHeightByTagName = getHeightByTagName;
|
|
|
98
98
|
var _VTable = (0, react_1.forwardRef)(function (props, ref) {
|
|
99
99
|
var update = (0, hooks_1.useUpdate)();
|
|
100
100
|
var _a = (0, Box_1.useBox)(), state = _a.state, root = _a.root, resize = _a.resize;
|
|
101
|
+
var inModal = (0, react_1.useMemo)(function () {
|
|
102
|
+
if (root.current == null)
|
|
103
|
+
return false;
|
|
104
|
+
return root.current.parentElement.parentElement.classList.contains('ant-modal-body')
|
|
105
|
+
|| root.current.parentElement.parentElement.parentElement.classList.contains('ant-modal-body')
|
|
106
|
+
|| root.current.parentElement.parentElement.parentElement.parentElement.classList.contains('ant-modal-body');
|
|
107
|
+
}, []);
|
|
101
108
|
// const [scroll, setScroll] = useState<TableProps<PlainObject>['scroll']>(undefined);
|
|
102
109
|
var _b = props.model, rowKey = _b.rowKey, list = _b.list, isQuerying = _b.isQuerying, pageNo = _b.pageNo, pageSize = _b.pageSize, orderBy = _b.orderBy, query = _b.query, total = _b.total;
|
|
103
110
|
var start = (0, react_1.useRef)(0);
|
|
@@ -173,85 +180,45 @@ var _VTable = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
173
180
|
}, [isFristMounted]);
|
|
174
181
|
// 计算 clolum 及 高亮keyword
|
|
175
182
|
var columns = (0, react_1.useMemo)(function () {
|
|
176
|
-
var cols =
|
|
177
|
-
if (
|
|
178
|
-
cols
|
|
183
|
+
var cols = (0, Util_1.convertColumns)(props, { ref: start, isRank: false });
|
|
184
|
+
if (!utils_1.GLOBAL.CONFIG.SEARCHBAR.DISABLE_KEYWORD || !lodash_1.default.has(props, 'searchBar.keyword'))
|
|
185
|
+
return cols;
|
|
179
186
|
var HighKeys = new Set();
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
(props.searchBar.keyword.highlight || []).map(function (key) { return HighKeys.add(key); });
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
props.columns.map(function (col) {
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
var isGroup = lodash_1.default.has(col, 'children') && lodash_1.default.isArray(col.children);
|
|
188
|
-
if (isGroup) {
|
|
189
|
-
col.children.map((function (item) {
|
|
190
|
-
if (lodash_1.default.isString(item.dataIndex))
|
|
191
|
-
HighKeys.add(item.dataIndex);
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
var dataIndex = col.dataIndex;
|
|
196
|
-
if (lodash_1.default.isString(dataIndex))
|
|
197
|
-
HighKeys.add(dataIndex);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
187
|
+
if (lodash_1.default.isObject(props.searchBar.keyword)) {
|
|
188
|
+
(props.searchBar.keyword.highlight || []).map(function (key) { return HighKeys.add(key); });
|
|
201
189
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
item.render = function (record) {
|
|
212
|
-
if (!lodash_1.default.isString(record))
|
|
213
|
-
return record;
|
|
214
|
-
var keyword = '';
|
|
215
|
-
if (record && keyword) {
|
|
216
|
-
return react_1.default.createElement(HighLight_1.HighLight, { text: record, keyword: keyword });
|
|
217
|
-
}
|
|
218
|
-
return record;
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
if (!lodash_1.default.has(item, 'ellipsis'))
|
|
222
|
-
item.ellipsis = true;
|
|
223
|
-
if (!lodash_1.default.has(item, 'width') && lodash_1.default.isString(item.title)) {
|
|
224
|
-
var clz = item.title.length + (item.sorter ? 2 : 0);
|
|
225
|
-
if (col.className) {
|
|
226
|
-
item.className = 'c-table-col-' + clz + ' ' + col.className;
|
|
190
|
+
else {
|
|
191
|
+
props.columns.map(function (col) {
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
var isGroup = lodash_1.default.has(col, 'children') && lodash_1.default.isArray(col.children);
|
|
194
|
+
if (isGroup) {
|
|
195
|
+
col.children.map((function (item) {
|
|
196
|
+
if (lodash_1.default.isString(item.dataIndex))
|
|
197
|
+
HighKeys.add(item.dataIndex);
|
|
198
|
+
}));
|
|
227
199
|
}
|
|
228
200
|
else {
|
|
229
|
-
|
|
201
|
+
var dataIndex = col.dataIndex;
|
|
202
|
+
if (lodash_1.default.isString(dataIndex))
|
|
203
|
+
HighKeys.add(dataIndex);
|
|
230
204
|
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
var column = convertCol(col);
|
|
251
|
-
if (column != null)
|
|
252
|
-
cols.push(column);
|
|
253
|
-
}
|
|
254
|
-
});
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
if (HighKeys.size > 0) {
|
|
208
|
+
cols.map(function (col) {
|
|
209
|
+
if (HighKeys.has(col.dataIndex) && col.render == null) {
|
|
210
|
+
col.render = function (record) {
|
|
211
|
+
if (!lodash_1.default.isString(record))
|
|
212
|
+
return record;
|
|
213
|
+
var keyword = '';
|
|
214
|
+
if (record && keyword) {
|
|
215
|
+
return react_1.default.createElement(HighLight_1.HighLight, { text: record, keyword: keyword });
|
|
216
|
+
}
|
|
217
|
+
return record;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
255
222
|
return cols;
|
|
256
223
|
}, [props.columns]);
|
|
257
224
|
(0, react_1.useLayoutEffect)(function () {
|
|
@@ -269,6 +236,10 @@ var _VTable = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
269
236
|
}, []);
|
|
270
237
|
// 更新高度 table 需要把 head 排除设置滚动
|
|
271
238
|
// useEffect(() => {
|
|
239
|
+
// if (inModal) {
|
|
240
|
+
// setScroll({ x: true })
|
|
241
|
+
// return;
|
|
242
|
+
// }
|
|
272
243
|
// if (props.scroll === null) return;
|
|
273
244
|
// if (props.mode == undefined || props.mode == 'common') return;
|
|
274
245
|
// let height = state?.height;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { TableDefined } from './Components';
|
|
3
|
-
import type { ForwardRefExoticComponent, ExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import type { ReactNode, ForwardRefExoticComponent, ExoticComponent, RefAttributes } from 'react';
|
|
4
3
|
import type { TableProps } from '../_adapt/Table';
|
|
5
4
|
import type { ColumnProps } from 'antd/es/table/interface';
|
|
6
5
|
import type { SearchBarProps } from '../SearchBar/index';
|
|
@@ -8,7 +7,9 @@ import type { TableActionButton } from './Components/ActionBar';
|
|
|
8
7
|
import type { PlainObject, BaseItem, ApiModel } from '../../basetype';
|
|
9
8
|
import type { BoxMode } from '../Box/Box';
|
|
10
9
|
import type { SelectBarProps } from '../Box/SelectBar';
|
|
11
|
-
export type TableColumn = BaseItem & Omit<ColumnProps<any>, 'children'
|
|
10
|
+
export type TableColumn = BaseItem & Omit<ColumnProps<any>, 'children'> & {
|
|
11
|
+
wrap?: boolean;
|
|
12
|
+
};
|
|
12
13
|
export type TableColumnGroup = Pick<TableColumn, 'className' | 'width' | 'align'> & {
|
|
13
14
|
title: string;
|
|
14
15
|
children: TableColumn[];
|
|
@@ -52,7 +53,7 @@ export type BaseTableProps = TableDefine & {
|
|
|
52
53
|
/**
|
|
53
54
|
* 表格操作区域
|
|
54
55
|
*/
|
|
55
|
-
actionBar?: (TableActionButton[]) |
|
|
56
|
+
actionBar?: (TableActionButton[]) | ReactNode;
|
|
56
57
|
/**
|
|
57
58
|
* 表格选择区域
|
|
58
59
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ReactNode, PropsWithChildren } from 'react';
|
|
2
|
+
import type { FC, ReactNode, PropsWithChildren } from 'react';
|
|
3
3
|
import type { TreeNodeData } from '../../utils/TreeUtil';
|
|
4
4
|
import type { TreeSelectProps } from 'antd/es/tree-select';
|
|
5
5
|
import type { BaseTreeSelectProps } from './index';
|
|
@@ -25,7 +25,7 @@ type BaseTreeSelectContext = {
|
|
|
25
25
|
};
|
|
26
26
|
declare const BaseTreeSelectContext: React.Context<BaseTreeSelectContext>;
|
|
27
27
|
export declare const useBaseTree: () => BaseTreeSelectContext;
|
|
28
|
-
export declare const BaseTreeSelect:
|
|
28
|
+
export declare const BaseTreeSelect: FC<PropsWithChildren<BaseTreeSelectProps>>;
|
|
29
29
|
export declare const getNodeParam: (node: any, state: BaseTreeSelectState, disabledNode: (node: PlainObject) => boolean) => any;
|
|
30
|
-
export declare const renderRoot: (props: BaseTreeSelectProps, state: BaseTreeSelectState) =>
|
|
30
|
+
export declare const renderRoot: (props: BaseTreeSelectProps, state: BaseTreeSelectState) => ReactNode;
|
|
31
31
|
export {};
|
|
@@ -58,10 +58,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
58
58
|
}
|
|
59
59
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
60
60
|
};
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
61
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
65
|
exports.renderRoot = exports.getNodeParam = exports.BaseTreeSelect = exports.useBaseTree = void 0;
|
|
63
|
-
var lodash_1 = __importStar(require("lodash"));
|
|
64
66
|
var react_1 = __importStar(require("react"));
|
|
67
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
65
68
|
var antd_1 = require("antd");
|
|
66
69
|
var HighLight_1 = require("../_common/HighLight");
|
|
67
70
|
var Icon_1 = require("../_adapt/Icon");
|
|
@@ -136,7 +139,7 @@ var BaseTreeSelect = function (props) {
|
|
|
136
139
|
}, []);
|
|
137
140
|
var value = (0, react_1.useMemo)(function () {
|
|
138
141
|
if (props.multiple) {
|
|
139
|
-
if (
|
|
142
|
+
if (lodash_1.default.isArray(props.value))
|
|
140
143
|
return props.value;
|
|
141
144
|
if (props.value)
|
|
142
145
|
return [props.value];
|
|
@@ -206,13 +209,13 @@ var getNodeParam = function (node, state, disabledNode) {
|
|
|
206
209
|
var icon = node[iconField];
|
|
207
210
|
if (icon) {
|
|
208
211
|
if (icon.indexOf('/') >= 0) {
|
|
209
|
-
param.title = react_1.default.createElement(react_1.
|
|
212
|
+
param.title = react_1.default.createElement(react_1.Fragment, null,
|
|
210
213
|
react_1.default.createElement("span", { className: 'v-icon-bg' },
|
|
211
214
|
react_1.default.createElement("img", { style: { marginTop: -4 }, src: node[iconField] })),
|
|
212
215
|
title);
|
|
213
216
|
}
|
|
214
217
|
else {
|
|
215
|
-
param.title = react_1.default.createElement(react_1.
|
|
218
|
+
param.title = react_1.default.createElement(react_1.Fragment, null,
|
|
216
219
|
react_1.default.createElement(Icon_1.Icon, { type: node[iconField] }),
|
|
217
220
|
title);
|
|
218
221
|
}
|
|
@@ -221,7 +224,7 @@ var getNodeParam = function (node, state, disabledNode) {
|
|
|
221
224
|
else if (lodash_1.default.isFunction(iconField)) {
|
|
222
225
|
var icon = iconField(node);
|
|
223
226
|
if (icon) {
|
|
224
|
-
param.title = react_1.default.createElement(react_1.
|
|
227
|
+
param.title = react_1.default.createElement(react_1.Fragment, null,
|
|
225
228
|
icon,
|
|
226
229
|
title);
|
|
227
230
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { BaseTreeSelectProps } from './index';
|
|
3
2
|
import type { DTreeData } from '../Trees/DTree';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
4
|
export type DTreeSelectProps = BaseTreeSelectProps & DTreeData;
|
|
5
|
-
export declare const DTreeSelect:
|
|
5
|
+
export declare const DTreeSelect: FC<DTreeSelectProps>;
|
|
@@ -111,8 +111,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
111
111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
112
112
|
exports.DTreeSelect = void 0;
|
|
113
113
|
var react_1 = __importStar(require("react"));
|
|
114
|
-
var antd_1 = require("antd");
|
|
115
114
|
var lodash_1 = __importDefault(require("lodash"));
|
|
115
|
+
var antd_1 = require("antd");
|
|
116
116
|
var BaseTreeSelect_1 = require("./BaseTreeSelect");
|
|
117
117
|
var hooks_1 = require("../../hooks");
|
|
118
118
|
var utils_1 = require("../../utils");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { BaseTreeSelectProps } from './index';
|
|
3
3
|
import type { FTreeData } from '../Trees/FTree';
|
|
4
4
|
export type FTreeSelectProps = BaseTreeSelectProps & Required<FTreeData>;
|
|
5
|
-
export declare const FTreeSelect:
|
|
5
|
+
export declare const FTreeSelect: FC<FTreeSelectProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { STreeData } from '../Trees/STree';
|
|
3
3
|
import type { BaseTreeSelectProps } from './index';
|
|
4
4
|
export type STreeSelectProps = BaseTreeSelectProps & STreeData;
|
|
5
|
-
export declare const STreeSelect:
|
|
5
|
+
export declare const STreeSelect: FC<STreeSelectProps>;
|
|
@@ -37,9 +37,12 @@ export declare const useActionTree: () => ActionTreeContext;
|
|
|
37
37
|
export declare const ActionTree: React.ForwardRefExoticComponent<import("../../utils/TreeUtil").BaseTreeOpts & Pick<import("antd/es/tree/Tree").TreeProps, "className" | "disabled" | "defaultExpandAll"> & {
|
|
38
38
|
iconField?: string | ((item: any) => React.ReactNode);
|
|
39
39
|
titleField: string | import("./index").LanguageField;
|
|
40
|
+
titleRender?: (node: PlainObject) => React.ReactNode;
|
|
40
41
|
mustSelect?: boolean;
|
|
41
42
|
disabledNode?: (node: PlainObject) => boolean;
|
|
42
|
-
onSelect?: (key: Key, node: PlainObject, parentNode: PlainObject, crumb: PlainObject[], pos: number[]) => void;
|
|
43
|
+
onSelect?: (key: Key, node: PlainObject, parentNode: PlainObject, crumb: PlainObject[], pos: number[]) => void; /**
|
|
44
|
+
* 获取子节点方法
|
|
45
|
+
*/
|
|
43
46
|
searchValue?: string;
|
|
44
47
|
} & BaseActionTreeProps & CacheTree & React.RefAttributes<ActionTreeRef>>;
|
|
45
48
|
export declare const renderRoot: (props: ActionTreeProps, state: BaseTreeState, context: ActionTreeContext) => ReactNode;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Language } from '../../utils/_Support';
|
|
3
|
+
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
|
3
4
|
import type { BaseTreeOpts, SearchResult, TreeNodeData } from '../../utils/TreeUtil';
|
|
4
5
|
import type { AntTreeNodeProps, AntTreeNodeSelectedEvent, TreeProps } from 'antd/es/tree';
|
|
5
|
-
import type { PropsWithChildren, ReactNode } from 'react';
|
|
6
6
|
import type { BaseTreeProps } from './index';
|
|
7
7
|
import type { Key, PlainObject } from '../../basetype';
|
|
8
8
|
export type BaseTreeState = Required<BaseTreeOpts> & {
|
|
@@ -11,6 +11,7 @@ export type BaseTreeState = Required<BaseTreeOpts> & {
|
|
|
11
11
|
selectedKeys: string[];
|
|
12
12
|
selectedNode: PlainObject;
|
|
13
13
|
titleField: string;
|
|
14
|
+
titleRender?: (item: any) => ReactNode;
|
|
14
15
|
iconField: string | ((item: any) => ReactNode);
|
|
15
16
|
inited: boolean;
|
|
16
17
|
langs: {
|
|
@@ -27,6 +28,6 @@ type BaseTreeContext = {
|
|
|
27
28
|
};
|
|
28
29
|
declare const BaseTreeContext: React.Context<BaseTreeContext>;
|
|
29
30
|
export declare const useBaseTree: () => BaseTreeContext;
|
|
30
|
-
export declare const BaseTree:
|
|
31
|
+
export declare const BaseTree: FC<PropsWithChildren<BaseTreeProps>>;
|
|
31
32
|
export declare const getNodeParam: (node: any, position: number[], state: BaseTreeState, search: SearchResult, disabledNode: (node: PlainObject) => boolean, folderChecker: (node: PlainObject) => boolean) => AntTreeNodeProps;
|
|
32
33
|
export {};
|
|
@@ -99,6 +99,7 @@ var BaseTree = function (props) {
|
|
|
99
99
|
rootCode: '0',
|
|
100
100
|
search: { word: null, keyword: null, match: null },
|
|
101
101
|
titleField: 'name',
|
|
102
|
+
titleRender: null,
|
|
102
103
|
keyField: 'id',
|
|
103
104
|
iconField: null,
|
|
104
105
|
sortField: null,
|
|
@@ -145,6 +146,9 @@ var BaseTree = function (props) {
|
|
|
145
146
|
DEFAULT.langs = langs;
|
|
146
147
|
}
|
|
147
148
|
}
|
|
149
|
+
if (props.titleRender && lodash_1.default.isFunction(props.titleRender)) {
|
|
150
|
+
DEFAULT.titleRender = props.titleRender;
|
|
151
|
+
}
|
|
148
152
|
var _a = __read((0, hooks_1.useSetState)(DEFAULT), 2), state = _a[0], setState = _a[1];
|
|
149
153
|
var PID = (0, react_1.useRef)(null);
|
|
150
154
|
var searchByKeyWord = (0, react_1.useCallback)(function (word) {
|
|
@@ -203,13 +207,18 @@ var BaseTree = function (props) {
|
|
|
203
207
|
};
|
|
204
208
|
exports.BaseTree = BaseTree;
|
|
205
209
|
var getNodeParam = function (node, position, state, search, disabledNode, folderChecker) {
|
|
206
|
-
var titleField = state.titleField, keyField = state.keyField, iconField = state.iconField;
|
|
210
|
+
var titleField = state.titleField, keyField = state.keyField, iconField = state.iconField, titleRender = state.titleRender;
|
|
207
211
|
var param = { key: node[keyField], data: { node: node, position: position } };
|
|
208
212
|
if (search.keyword) {
|
|
209
213
|
param.title = react_1.default.createElement(HighLight_1.HighLight, { keyword: search.keyword, text: node[titleField] });
|
|
210
214
|
}
|
|
211
215
|
else {
|
|
212
|
-
|
|
216
|
+
if (titleRender) {
|
|
217
|
+
param.title = titleRender(node);
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
param.title = node[titleField];
|
|
221
|
+
}
|
|
213
222
|
}
|
|
214
223
|
if (lodash_1.default.isFunction(disabledNode)) {
|
|
215
224
|
if (disabledNode(node)) {
|
|
@@ -134,7 +134,7 @@ var COButton = function (props) {
|
|
|
134
134
|
value.length > 0 && react_1.default.createElement(index_1.Popover, { style: { width: 480 }, overlayClassName: 'co-button-content', content: react_1.default.createElement(COSelect_1.SelectedTable, __assign({}, props, { value: value })) },
|
|
135
135
|
react_1.default.createElement(index_1.Button, { icon: "unordered-list", type: "primary", style: { paddingRight: 0, paddingLeft: 4 } })),
|
|
136
136
|
react_1.default.createElement(index_1.Modal, { open: open, title: "\u8BF7\u9009\u62E9\u673A\u6784", bodyStyle: { maxHeight: 540, overflow: 'auto' }, width: 720, onCancel: function () { return setOpen(false); }, onOk: onOk },
|
|
137
|
-
react_1.default.createElement(index_1.Alert, { message: react_1.default.createElement(react_1.
|
|
137
|
+
react_1.default.createElement(index_1.Alert, { message: react_1.default.createElement(react_1.Fragment, null,
|
|
138
138
|
"\u9009\u4E2D\u72B6\u6001\u8BF4\u660E \uFF1A ",
|
|
139
139
|
(0, COTreeUtil_1.flagRender)(0, ' :'),
|
|
140
140
|
" ",
|
|
@@ -103,7 +103,7 @@ var COSelect = function (props) {
|
|
|
103
103
|
}
|
|
104
104
|
}, [convert]);
|
|
105
105
|
return react_1.default.createElement(index_1.Input.Group, { compact: true, style: { width: props.width || '100%', display: 'flex' } },
|
|
106
|
-
react_1.default.createElement(index_1.Select, { maxTagCount: 1, mode: "tags", disabled: props.disabled, maxTagPlaceholder:
|
|
106
|
+
react_1.default.createElement(index_1.Select, { maxTagCount: 1, mode: "tags", disabled: props.disabled, maxTagPlaceholder: utils_1.Const.NONE, showSearch: false, className: 'co-select', allowClear: props.allowClear,
|
|
107
107
|
// onClear={() => props.onChange([])}
|
|
108
108
|
placeholder: props.placeholder || '请选择机构', style: { flexGrow: 1 }, showAction: ["click"], options: [], labelInValue: true, value: selectValue, dropdownStyle: { width: props.width || '100%', maxHeight: 360, overflow: 'auto' }, dropdownRender: function () { return react_1.default.createElement(COTree_1.COTree, __assign({}, props, { value: value, onChange: onChange })); }, getPopupContainer: function (evt) {
|
|
109
109
|
return evt.parentElement.parentElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
import type { TreeProps } from 'antd/es/tree/Tree';
|
|
3
4
|
import type { COTreeProps, COTreeValueItem, FLAG } from './COTree';
|
|
4
5
|
import type { PlainObject } from '../../../basetype';
|
|
@@ -9,7 +10,7 @@ export type TreeFields = {
|
|
|
9
10
|
parentField: string;
|
|
10
11
|
checkField?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const flagRender: (flag: FLAG, split?:
|
|
13
|
+
export declare const flagRender: (flag: FLAG, split?: ReactNode) => React.JSX.Element;
|
|
13
14
|
export declare const getTreeDataByLoaded: (all: any[], treeProps: COTreeProps, FIELDS: TreeFields) => [TreeProps, Set<string>, Set<string>, Set<string>];
|
|
14
15
|
export declare const convertFormObject: (obj: PlainObject) => COTreeValueItem[];
|
|
15
16
|
export declare const invertToObject: (items: COTreeValueItem[]) => PlainObject;
|
|
@@ -34,7 +34,15 @@ export type DTreeProps = BaseTreeProps & BaseActionTreeProps & DTreeData;
|
|
|
34
34
|
*/
|
|
35
35
|
export declare const DTree: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("../../utils/TreeUtil").BaseTreeOpts & Pick<TreeProps, "className" | "disabled" | "defaultExpandAll"> & {
|
|
36
36
|
iconField?: string | ((item: any) => React.ReactNode);
|
|
37
|
+
/**
|
|
38
|
+
* 展开子节点:
|
|
39
|
+
*
|
|
40
|
+
* 方式一:传一个 api 接口地址,必须返回 VData<Array<Object>> 格式
|
|
41
|
+
*
|
|
42
|
+
* 方式二:传一个方法 ,接收一个父节点参数,必须返回 Promise<TreeNodeData[]> (不要返回 children, 仅返回一级)
|
|
43
|
+
*/
|
|
37
44
|
titleField: string | import("./index").LanguageField;
|
|
45
|
+
titleRender?: (node: PlainObject) => React.ReactNode;
|
|
38
46
|
mustSelect?: boolean;
|
|
39
47
|
disabledNode?: (node: PlainObject) => boolean;
|
|
40
48
|
onSelect?: (key: Key, node: PlainObject, parentNode: PlainObject, crumb: PlainObject[], pos: number[]) => void;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { TreeUtil } from '../../utils';
|
|
3
3
|
import type { TreeProps } from 'antd/es/tree';
|
|
4
4
|
import type { BaseTreeProps, BaseActionTreeProps, ActionTreeRef } from './index';
|
|
5
|
-
import type { PlainObject } from '../../basetype';
|
|
6
5
|
export type FTreeData = {
|
|
7
6
|
/**
|
|
8
7
|
* 获取全部节点的API,如果不传,刚用 API 的GET模式代替
|
|
@@ -19,8 +18,9 @@ export type FTreeProps = BaseTreeProps & BaseActionTreeProps & FTreeData;
|
|
|
19
18
|
export declare const FTree: React.MemoExoticComponent<React.ForwardRefExoticComponent<TreeUtil.BaseTreeOpts & Pick<TreeProps, "className" | "disabled" | "defaultExpandAll"> & {
|
|
20
19
|
iconField?: string | ((item: any) => React.ReactNode);
|
|
21
20
|
titleField: string | import("./index").LanguageField;
|
|
21
|
+
titleRender?: (node: import("../..").PlainObject) => React.ReactNode;
|
|
22
22
|
mustSelect?: boolean;
|
|
23
|
-
disabledNode?: (node: PlainObject) => boolean;
|
|
24
|
-
onSelect?: (key: import("
|
|
23
|
+
disabledNode?: (node: import("../..").PlainObject) => boolean;
|
|
24
|
+
onSelect?: (key: import("../..").Key, node: import("../..").PlainObject, parentNode: import("../..").PlainObject, crumb: import("../..").PlainObject[], pos: number[]) => void;
|
|
25
25
|
searchValue?: string;
|
|
26
26
|
} & BaseActionTreeProps & FTreeData & React.RefAttributes<ActionTreeRef>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { BaseTreeProps } from './index';
|
|
3
3
|
import type { TreeNodeData } from '../../utils/TreeUtil';
|
|
4
4
|
export type STreeData = {
|
|
@@ -19,4 +19,4 @@ export type STreeProps = BaseTreeProps & STreeData;
|
|
|
19
19
|
* 搜索 : 支持
|
|
20
20
|
* 数据 : 需要组装好后传入
|
|
21
21
|
*/
|
|
22
|
-
export declare const STree:
|
|
22
|
+
export declare const STree: FC<STreeProps>;
|
|
@@ -36,6 +36,10 @@ export type BaseTreeProps = BaseTreeOpts & Pick<TreeProps, 'className' | 'defaul
|
|
|
36
36
|
* 如果需要支持 i18n ,则传一个对象,支持3个字段
|
|
37
37
|
*/
|
|
38
38
|
titleField: string | LanguageField;
|
|
39
|
+
/**
|
|
40
|
+
* 自定义标题
|
|
41
|
+
*/
|
|
42
|
+
titleRender?: (node: PlainObject) => ReactNode;
|
|
39
43
|
/**
|
|
40
44
|
* 是否必选,
|
|
41
45
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC, MutableRefObject, PropsWithChildren } from 'react';
|
|
2
2
|
import type { UFromProps } from './index';
|
|
3
|
-
import type { MutableRefObject, PropsWithChildren } from 'react';
|
|
4
3
|
export type FormState = {
|
|
5
4
|
width: number;
|
|
6
5
|
cols: 1 | 2 | 3;
|
|
@@ -17,6 +16,6 @@ export type FormState = {
|
|
|
17
16
|
};
|
|
18
17
|
export declare const useFormLayout: () => FormState;
|
|
19
18
|
export declare const getDefault: (props: UFromProps) => [boolean, number, 1 | 2 | 3, number];
|
|
20
|
-
export declare const FormWrapper:
|
|
19
|
+
export declare const FormWrapper: FC<PropsWithChildren<UFromProps & {
|
|
21
20
|
isInfo: boolean;
|
|
22
21
|
}>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { FC } from 'react';
|
|
2
3
|
import type { UDescriptionsItemProps, UDescriptionsProps } from './index';
|
|
3
4
|
export declare const UDescriptions: React.ExoticComponent<React.PropsWithChildren<UDescriptionsProps>> & {
|
|
4
|
-
Item:
|
|
5
|
+
Item: FC<UDescriptionsItemProps>;
|
|
5
6
|
};
|