ztxkui 4.2.18-111 → 4.2.18-113
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/dist/components/Table/hooks/useColumns.js +26 -2
- package/dist/components/electron-signatures/content.js +360 -340
- package/dist/components/electron-signatures/demoComponents/coUseDetail.d.ts +8 -0
- package/dist/components/electron-signatures/demoComponents/coUseDetail.js +255 -0
- package/dist/components/electron-signatures/demoComponents/index.js +4 -1
- package/dist/components/electron-signatures/demoComponents/makingData.d.ts +12 -0
- package/dist/components/electron-signatures/demoComponents/makingData.js +14 -0
- package/dist/components/electron-signatures/electron-signatures-fragment.js +74 -26
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.d.ts +35 -0
- package/dist/components/electron-signatures/electronComponents/electron-seal-personal-sign.js +39 -0
- package/dist/components/electron-signatures/electronComponents/useElectronColumns.js +20 -2
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.d.ts +4 -0
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +103 -16
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.d.ts +13 -4
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +238 -165
- package/dist/components/electron-signatures/index.d.ts +2 -0
- package/dist/components/electron-signatures/index.js +14 -5
- package/dist/components/electron-signatures/interface.d.ts +16 -0
- package/dist/components/electron-signatures/qunjComponents/qunj-list.js +14 -5
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +5 -0
- package/dist/components/electron-signatures/qunjComponents/useQunjColumns.js +2 -2
- package/dist/components/utils/ZtxkContext.d.ts +10 -0
- package/dist/components/utils/ZtxkContext.js +2 -0
- package/dist/components/utils/checkSealCoUse.d.ts +16 -0
- package/dist/components/utils/checkSealCoUse.js +83 -0
- package/dist/components/utils/useBaseContext.d.ts +2 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +52 -13
- package/dist/index.css.map +1 -1
- package/dist/index.js +10 -0
- package/package.json +1 -1
|
@@ -325,7 +325,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
325
325
|
var columns = basicConfig.columns, newColumnsRef = basicConfig.newColumnsRef, showColumnDynamic = basicConfig.showColumnDynamic, showColumnDynamicKey = basicConfig.showColumnDynamicKey, configInfo = basicConfig.configInfo, currentDataSource = basicConfig.currentDataSource, preDataSource = basicConfig.preDataSource, rowKey = basicConfig.rowKey, dataSourceRef = basicConfig.dataSourceRef, expandableChildrenColumnName = basicConfig.expandableChildrenColumnName, upDateColumnsRef = basicConfig.upDateColumnsRef, setUpDateColumnsRef = basicConfig.setUpDateColumnsRef, isUpDateColumnsRef = basicConfig.isUpDateColumnsRef, setIsUpDateColumnsRef = basicConfig.setIsUpDateColumnsRef;
|
|
326
326
|
var onEditableSave = editableConfig.onEditableSave, onTableChange = editableConfig.onTableChange, currentPage = editableConfig.currentPage, onFillDownChangeRef = editableConfig.onFillDownChangeRef;
|
|
327
327
|
var ColumnDynamicCom = dynamicConfig.ColumnDynamicCom, DelAllCom = dynamicConfig.DelAllCom, onAddAndDelHandleMemo = dynamicConfig.onAddAndDelHandleMemo, onAddAndDelHandle = dynamicConfig.onAddAndDelHandle, hideAddIcon = dynamicConfig.hideAddIcon, addIconText = dynamicConfig.addIconText, hideDelIcon = dynamicConfig.hideDelIcon, delIconText = dynamicConfig.delIconText;
|
|
328
|
-
var copyByKey = otherConfig.copyByKey, myCatchColumns = otherConfig.myCatchColumns, customSortHandle = otherConfig.customSortHandle, customOrder = otherConfig.customOrder, setCustomOrder = otherConfig.setCustomOrder, isSort = otherConfig.isSort, isFilter = otherConfig.isFilter, handleSearch = otherConfig.handleSearch, handleReset = otherConfig.handleReset, searchInput = otherConfig.searchInput, isModalInput = otherConfig.isModalInput, tableNumberFormatter = otherConfig.tableNumberFormatter, isNumberInputThousandth = otherConfig.isNumberInputThousandth, isNumberInputAlignRight = otherConfig.isNumberInputAlignRight, autoDecimalFieldsRef = otherConfig.autoDecimalFieldsRef, isCustomDecimalField = otherConfig.isCustomDecimalField, customDecimalFieldRender = otherConfig.customDecimalFieldRender, isTableSortEnabled = otherConfig.isTableSortEnabled, isTableFilterEnabled = otherConfig.isTableFilterEnabled, firstRefresh = otherConfig.firstRefresh;
|
|
328
|
+
var copyByKey = otherConfig.copyByKey, myCatchColumns = otherConfig.myCatchColumns, customSortHandle = otherConfig.customSortHandle, customOrder = otherConfig.customOrder, setCustomOrder = otherConfig.setCustomOrder, isSort = otherConfig.isSort, isFilter = otherConfig.isFilter, handleSearch = otherConfig.handleSearch, handleReset = otherConfig.handleReset, searchInput = otherConfig.searchInput, isModalInput = otherConfig.isModalInput, tableNumberFormatter = otherConfig.tableNumberFormatter, isNumberInputThousandth = otherConfig.isNumberInputThousandth, isNumberInputAlignRight = otherConfig.isNumberInputAlignRight, autoDecimalFieldsRef = otherConfig.autoDecimalFieldsRef, isCustomDecimalField = otherConfig.isCustomDecimalField, customDecimalFieldRender = otherConfig.customDecimalFieldRender, isTableSortEnabled = otherConfig.isTableSortEnabled, isTableFilterEnabled = otherConfig.isTableFilterEnabled, sortColumnExtraWidth = otherConfig.sortColumnExtraWidth, filterColumnExtraWidth = otherConfig.filterColumnExtraWidth, firstRefresh = otherConfig.firstRefresh;
|
|
329
329
|
var tableLayout = showColumnDynamicKey
|
|
330
330
|
? getStorage(showColumnDynamicKey)
|
|
331
331
|
: myCatchColumns;
|
|
@@ -603,9 +603,12 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
603
603
|
}
|
|
604
604
|
// 2023-05-04 添加排序功能 如果是必填字段 不做处理
|
|
605
605
|
var key = col.dataIndex;
|
|
606
|
+
// 该列最终是否渲染了排序图标(用于按全局配置追加列宽)
|
|
607
|
+
var hasSortTitle = false;
|
|
606
608
|
if (typeof key === 'string' && !onEditableSave && !_column.required) {
|
|
607
609
|
// 如果用户传入了排序字段,那么说明该列需要排序
|
|
608
610
|
if (_column.sorter === true) {
|
|
611
|
+
hasSortTitle = true;
|
|
609
612
|
var title_3 = _column.title;
|
|
610
613
|
_column.title = function () {
|
|
611
614
|
return (React.createElement(TableSortTitle, { title: title_3, field: key, customOrder: customOrder, setCustomOrder: setCustomOrder, onChange: customSortHandle, align: align }));
|
|
@@ -614,6 +617,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
614
617
|
}
|
|
615
618
|
// 如果传入得排序函数
|
|
616
619
|
if (typeof _column.sorter === 'function') {
|
|
620
|
+
hasSortTitle = true;
|
|
617
621
|
var title_4 = _column.title;
|
|
618
622
|
var sorterHandle_1 = _column.sorter;
|
|
619
623
|
_column.title = function () {
|
|
@@ -626,12 +630,30 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
626
630
|
// 纯粹的前端排序
|
|
627
631
|
var needSort = isSort === false ? false : isSort || isTableSortEnabled;
|
|
628
632
|
if (_column.sorter == null && needSort) {
|
|
633
|
+
hasSortTitle = true;
|
|
629
634
|
var title_5 = _column.title;
|
|
630
635
|
_column.title = function () {
|
|
631
636
|
return (React.createElement(TableSortTitle, { title: title_5, field: key, customOrder: customOrder, setCustomOrder: setCustomOrder, onChange: customSortHandle, align: align }));
|
|
632
637
|
};
|
|
633
638
|
}
|
|
634
639
|
}
|
|
640
|
+
// 按全局配置给带排序/过滤的列在配置宽度基础上追加宽度,
|
|
641
|
+
// 避免图标挤压表头文字(仅对配置了数字 width 的叶子列生效;
|
|
642
|
+
// 未配置 width 的列由 antd 自适应,无需追加)
|
|
643
|
+
if (!Array.isArray(_column.children) &&
|
|
644
|
+
typeof _column.width === 'number' &&
|
|
645
|
+
(hasSortTitle || needFilter)) {
|
|
646
|
+
var extraWidth = 0;
|
|
647
|
+
if (hasSortTitle && sortColumnExtraWidth) {
|
|
648
|
+
extraWidth += sortColumnExtraWidth;
|
|
649
|
+
}
|
|
650
|
+
if (needFilter && filterColumnExtraWidth) {
|
|
651
|
+
extraWidth += filterColumnExtraWidth;
|
|
652
|
+
}
|
|
653
|
+
if (extraWidth > 0) {
|
|
654
|
+
_column.width = _column.width + extraWidth;
|
|
655
|
+
}
|
|
656
|
+
}
|
|
635
657
|
});
|
|
636
658
|
if (showColumnDynamic) {
|
|
637
659
|
// 如果需要展示动态列
|
|
@@ -842,7 +864,7 @@ function getNewColumns(basicConfig, editableConfig, dynamicConfig, otherConfig)
|
|
|
842
864
|
}
|
|
843
865
|
function useColumns(props) {
|
|
844
866
|
var columns = props.columns, hiddenColumnDynamicIcon = props.hiddenColumnDynamicIcon, showColumnDynamic = props.showColumnDynamic, showColumnDynamicKey = props.showColumnDynamicKey, onAddAndDelHandle = props.onAddAndDelHandle, hideAddIcon = props.hideAddIcon, showDelAllBtn = props.showDelAllBtn, delAllChange = props.delAllChange, addIconText = props.addIconText, hideDelIcon = props.hideDelIcon, delIconText = props.delIconText, showDynamicHandle = props.showDynamicHandle, onEditableSave = props.onEditableSave, configInfo = props.configInfo, copyByKey = props.copyByKey, onTableChange = props.onTableChange, currentPage = props.currentPage, currentDataSource = props.currentDataSource, preDataSource = props.preDataSource, rowKey = props.rowKey, dataSourceRef = props.dataSourceRef, expandableChildrenColumnName = props.expandableChildrenColumnName, customSortHandle = props.customSortHandle, customOrder = props.customOrder, setCustomOrder = props.setCustomOrder, isSort = props.isSort, isFilter = props.isFilter, onFillDownChangeRef = props.onFillDownChangeRef, isModalInput = props.isModalInput, isNumberInputThousandth = props.isNumberInputThousandth, isNumberInputAlignRight = props.isNumberInputAlignRight, autoDecimalFieldsRef = props.autoDecimalFieldsRef;
|
|
845
|
-
var _a = useBaseContext(), tableNumberFormatter = _a.tableNumberFormatter, isCustomDecimalField = _a.isCustomDecimalField, customDecimalFieldRender = _a.customDecimalFieldRender, isTableSortEnabled = _a.isTableSortEnabled, isTableFilterEnabled = _a.isTableFilterEnabled;
|
|
867
|
+
var _a = useBaseContext(), tableNumberFormatter = _a.tableNumberFormatter, isCustomDecimalField = _a.isCustomDecimalField, customDecimalFieldRender = _a.customDecimalFieldRender, isTableSortEnabled = _a.isTableSortEnabled, isTableFilterEnabled = _a.isTableFilterEnabled, sortColumnExtraWidth = _a.sortColumnExtraWidth, filterColumnExtraWidth = _a.filterColumnExtraWidth;
|
|
846
868
|
var firstRefresh = useRefreshScuCellFirst().firstRefresh;
|
|
847
869
|
var newColumnsRef = useRef();
|
|
848
870
|
var _b = useAsyncSetValue(columns), upDateColumnsRef = _b[0], setUpDateColumnsRef = _b[1];
|
|
@@ -924,6 +946,8 @@ function useColumns(props) {
|
|
|
924
946
|
customDecimalFieldRender: customDecimalFieldRender,
|
|
925
947
|
isTableSortEnabled: isTableSortEnabled,
|
|
926
948
|
isTableFilterEnabled: isTableFilterEnabled,
|
|
949
|
+
sortColumnExtraWidth: sortColumnExtraWidth,
|
|
950
|
+
filterColumnExtraWidth: filterColumnExtraWidth,
|
|
927
951
|
firstRefresh: firstRefresh,
|
|
928
952
|
});
|
|
929
953
|
}, [
|