zmdms-webui 0.0.11 → 0.0.12
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.
|
@@ -11,6 +11,7 @@ interface IEditableConfig extends Partial<IEditableConfigOtherProps> {
|
|
|
11
11
|
interface IColumnType<RecordType> extends ColumnType<RecordType> {
|
|
12
12
|
dynamicDisabled?: boolean;
|
|
13
13
|
isCopy?: boolean | string | string[];
|
|
14
|
+
isRequire?: boolean;
|
|
14
15
|
editable?: boolean;
|
|
15
16
|
editableConfig?: IEditableConfig;
|
|
16
17
|
validate?: {
|
|
@@ -18,11 +18,15 @@ function useColumns(columns, options) {
|
|
|
18
18
|
if (Array.isArray(newColumns)) {
|
|
19
19
|
newColumns.forEach(function (column) {
|
|
20
20
|
var _column = __assign({}, column);
|
|
21
|
-
var isCopy = _column.isCopy, editable = _column.editable, editableConfig = _column.editableConfig, title = _column.title, key = _column.key, validate = _column.validate;
|
|
21
|
+
var isCopy = _column.isCopy, editable = _column.editable, editableConfig = _column.editableConfig, title = _column.title, key = _column.key, validate = _column.validate, isRequire = _column.isRequire;
|
|
22
22
|
var _key = key ? key : _column === null || _column === void 0 ? void 0 : _column.dataIndex;
|
|
23
23
|
// 列头增加复制按钮
|
|
24
24
|
if (isCopy) {
|
|
25
|
-
_column.title = (jsxs(Fragment, { children: [title, jsx(CopyIcon, { copyKey: isCopy === true ?
|
|
25
|
+
_column.title = (jsxs(Fragment, { children: [title, jsx(CopyIcon, { copyKey: isCopy === true ? _key : isCopy, dataSourceRef: dataSourceRef })] }));
|
|
26
|
+
}
|
|
27
|
+
// 列头增加必填标识
|
|
28
|
+
if (isRequire) {
|
|
29
|
+
_column.title = (jsxs(Fragment, { children: [jsx("i", __assign({ className: "ztxk-column--required" }, { children: "*" })), _column.title] }));
|
|
26
30
|
}
|
|
27
31
|
// 如果列添加可编辑配置
|
|
28
32
|
if (editable && isEdit) {
|
package/dist/index.build.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export { default as AppLayoutHeader } from './es/applayoutheader/appLayoutHeader
|
|
|
24
24
|
export { default as AppLayoutSider } from './es/applayoutsider/appLayoutSider.js';
|
|
25
25
|
export { default as OperationBtn } from './es/operationbtn/operationBtn.js';
|
|
26
26
|
export { Affix, Alert, Anchor, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, Card, Carousel, Cascader, Checkbox, Col, Collapse, Comment, ConfigProvider, Descriptions, Divider, Drawer, Dropdown, Empty, Grid, Image, Layout, List, Mentions, Menu, PageHeader, Popconfirm, Popover, Progress, Radio, Rate, Result, Row, Segmented, Select, Skeleton, Slider, Space, Spin, Statistic, Steps, Switch, Tag, Timeline, Tooltip, Transfer, Tree, TreeSelect, Typography, Upload, message, notification } from 'antd';
|
|
27
|
-
export { IModalOpenOptions, IModalRef } from './es/modal/interface.js';
|
|
27
|
+
export { IModalOpenOptions, IModalProps, IModalRef } from './es/modal/interface.js';
|
|
28
28
|
export { IFooterDom, IFooterProps } from './es/footer/interface.js';
|
|
29
29
|
export { IColumnsType, ITableProps } from './es/table/interface.js';
|
|
30
30
|
export { IFormItemProps, IProFormProps } from './es/form/interface.js';
|