@ant-design/pro-components 2.3.9 → 2.3.10
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.js +32 -21
- package/dist/components.min.js +1 -1
- package/es/version.js +9 -9
- package/package.json +9 -9
package/dist/components.js
CHANGED
|
@@ -33172,7 +33172,7 @@ var conversionMomentValue = function conversionMomentValue(value, dateFormatter,
|
|
|
33172
33172
|
|
|
33173
33173
|
if (Array.isArray(itemValue)) {
|
|
33174
33174
|
tmpValue[key] = itemValue.map(function (arrayValue, index) {
|
|
33175
|
-
if (dayjs_min_default().isDayjs(arrayValue) || isMoment(
|
|
33175
|
+
if (dayjs_min_default().isDayjs(arrayValue) || isMoment(arrayValue)) {
|
|
33176
33176
|
return convertMoment(arrayValue, dateFormat || dateFormatter, valueType);
|
|
33177
33177
|
}
|
|
33178
33178
|
|
|
@@ -37119,7 +37119,7 @@ var genColStyle = function genColStyle(index, token) {
|
|
|
37119
37119
|
|
|
37120
37120
|
return defineProperty_defineProperty({}, "".concat(componentCls, "-col-").concat(index), {
|
|
37121
37121
|
flexShrink: 0,
|
|
37122
|
-
width: "".concat(
|
|
37122
|
+
width: "".concat(index / GRID_COLUMNS * 100, "%")
|
|
37123
37123
|
});
|
|
37124
37124
|
};
|
|
37125
37125
|
|
|
@@ -61179,29 +61179,32 @@ function genStringToTheme(val) {
|
|
|
61179
61179
|
}
|
|
61180
61180
|
function clearMenuItem(menusData) {
|
|
61181
61181
|
return menusData.map(function (item) {
|
|
61182
|
-
var children = item.children ||
|
|
61182
|
+
var children = item.children || [];
|
|
61183
61183
|
|
|
61184
61184
|
var finalItem = objectSpread2_objectSpread2({}, item);
|
|
61185
61185
|
|
|
61186
|
+
if (!finalItem.children && finalItem.routes) {
|
|
61187
|
+
finalItem.children = finalItem.routes;
|
|
61188
|
+
}
|
|
61189
|
+
|
|
61186
61190
|
if (!finalItem.name || finalItem.hideInMenu) {
|
|
61187
61191
|
return null;
|
|
61188
61192
|
}
|
|
61189
61193
|
|
|
61190
|
-
if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.
|
|
61194
|
+
if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
|
|
61191
61195
|
if (!finalItem.hideChildrenInMenu && children.some(function (child) {
|
|
61192
61196
|
return child && child.name && !child.hideInMenu;
|
|
61193
61197
|
})) {
|
|
61194
61198
|
return objectSpread2_objectSpread2(objectSpread2_objectSpread2({}, item), {}, {
|
|
61195
|
-
children: clearMenuItem(children)
|
|
61196
|
-
routes: clearMenuItem(children)
|
|
61199
|
+
children: clearMenuItem(children)
|
|
61197
61200
|
});
|
|
61198
61201
|
} // children 为空就直接删掉
|
|
61199
61202
|
|
|
61200
61203
|
|
|
61201
|
-
delete finalItem.routes;
|
|
61202
61204
|
delete finalItem.children;
|
|
61203
61205
|
}
|
|
61204
61206
|
|
|
61207
|
+
delete finalItem.routes;
|
|
61205
61208
|
return finalItem;
|
|
61206
61209
|
}).filter(function (item) {
|
|
61207
61210
|
return item;
|
|
@@ -62140,6 +62143,7 @@ function menu_useStyle(prefixCls) {
|
|
|
62140
62143
|
|
|
62141
62144
|
|
|
62142
62145
|
|
|
62146
|
+
|
|
62143
62147
|
var IconFont = create({
|
|
62144
62148
|
scriptUrl: defaultSettings.iconfontUrl
|
|
62145
62149
|
}); // Allow menu.js config icon as string or ReactNode
|
|
@@ -62214,6 +62218,7 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(props) {
|
|
|
62214
62218
|
var name = _this.getIntlName(item);
|
|
62215
62219
|
|
|
62216
62220
|
var children = (item === null || item === void 0 ? void 0 : item.children) || (item === null || item === void 0 ? void 0 : item.routes);
|
|
62221
|
+
(0,lib_warning["default"])(!(item === null || item === void 0 ? void 0 : item.routes), 'routes 将会废弃,为了保证兼容请使用 children 作为子节点定义方式');
|
|
62217
62222
|
var menuType = isGroup && level === 0 ? 'group' : undefined;
|
|
62218
62223
|
|
|
62219
62224
|
if (Array.isArray(children) && children.length > 0) {
|
|
@@ -64908,6 +64913,14 @@ var SettingDrawer = function SettingDrawer(props) {
|
|
|
64908
64913
|
}, []);
|
|
64909
64914
|
(0,external_React_.useEffect)(function () {
|
|
64910
64915
|
updateTheme(settingState.navTheme === 'realDark');
|
|
64916
|
+
|
|
64917
|
+
if (compareVersions(external_antd_.version, '5.0.0') < 0) {
|
|
64918
|
+
external_antd_.ConfigProvider.config({
|
|
64919
|
+
theme: {
|
|
64920
|
+
primaryColor: settingState.colorPrimary
|
|
64921
|
+
}
|
|
64922
|
+
});
|
|
64923
|
+
}
|
|
64911
64924
|
}, [settingState.colorPrimary, settingState.navTheme]);
|
|
64912
64925
|
/**
|
|
64913
64926
|
* 修改设置
|
|
@@ -74149,8 +74162,10 @@ function genProColumnToColumn(params) {
|
|
|
74149
74162
|
var Table_excluded = ["rowKey", "tableClassName", "action", "tableColumn", "type", "pagination", "rowSelection", "size", "defaultSize", "tableStyle", "toolbarDom", "searchNode", "style", "cardProps", "alertDom", "name", "onSortChange", "onFilterChange", "options", "isLightFilter", "className", "cardBordered", "editableUtils", "getRowKey"],
|
|
74150
74163
|
Table_excluded2 = ["cardBordered", "request", "className", "params", "defaultData", "headerTitle", "postData", "ghost", "pagination", "actionRef", "columns", "toolBarRender", "onLoad", "onRequestError", "style", "cardProps", "tableStyle", "tableClassName", "columnsStateMap", "onColumnsStateChange", "options", "search", "name", "onLoadingChange", "rowSelection", "beforeSearchSubmit", "tableAlertRender", "defaultClassName", "formRef", "type", "columnEmptyText", "toolbar", "rowKey", "manualRequest", "polling", "tooltip", "revalidateOnFocus"];
|
|
74151
74164
|
|
|
74165
|
+
// 兼容代码-----------
|
|
74166
|
+
|
|
74152
74167
|
|
|
74153
|
-
|
|
74168
|
+
//----------------------
|
|
74154
74169
|
|
|
74155
74170
|
|
|
74156
74171
|
|
|
@@ -75730,10 +75745,6 @@ function FieldEditableTable(props) {
|
|
|
75730
75745
|
FieldEditableTable.RecordCreator = RecordCreator;
|
|
75731
75746
|
/* harmony default export */ var components_EditableTable = (FieldEditableTable);
|
|
75732
75747
|
;// CONCATENATED MODULE: ./packages/table/es/index.js
|
|
75733
|
-
// 兼容代码-----------
|
|
75734
|
-
|
|
75735
|
-
//----------------------
|
|
75736
|
-
|
|
75737
75748
|
|
|
75738
75749
|
|
|
75739
75750
|
|
|
@@ -97502,17 +97513,17 @@ function BaseProList(props) {
|
|
|
97502
97513
|
/* harmony default export */ var list_es = ((/* unused pure expression or super */ null && (ProList)));
|
|
97503
97514
|
;// CONCATENATED MODULE: ./packages/components/src/version.ts
|
|
97504
97515
|
var version_version = {
|
|
97505
|
-
"@ant-design/pro-card": "2.0.
|
|
97506
|
-
"@ant-design/pro-components": "2.3.
|
|
97507
|
-
"@ant-design/pro-descriptions": "2.0.
|
|
97508
|
-
"@ant-design/pro-field": "2.1.
|
|
97509
|
-
"@ant-design/pro-form": "2.1.
|
|
97510
|
-
"@ant-design/pro-layout": "7.0.
|
|
97511
|
-
"@ant-design/pro-list": "2.0.
|
|
97516
|
+
"@ant-design/pro-card": "2.0.7",
|
|
97517
|
+
"@ant-design/pro-components": "2.3.9",
|
|
97518
|
+
"@ant-design/pro-descriptions": "2.0.8",
|
|
97519
|
+
"@ant-design/pro-field": "2.1.1",
|
|
97520
|
+
"@ant-design/pro-form": "2.1.1",
|
|
97521
|
+
"@ant-design/pro-layout": "7.0.7",
|
|
97522
|
+
"@ant-design/pro-list": "2.0.8",
|
|
97512
97523
|
"@ant-design/pro-provider": "2.0.3",
|
|
97513
97524
|
"@ant-design/pro-skeleton": "2.0.3",
|
|
97514
|
-
"@ant-design/pro-table": "3.0.
|
|
97515
|
-
"@ant-design/pro-utils": "2.1.
|
|
97525
|
+
"@ant-design/pro-table": "3.0.8",
|
|
97526
|
+
"@ant-design/pro-utils": "2.1.1"
|
|
97516
97527
|
};
|
|
97517
97528
|
;// CONCATENATED MODULE: ./packages/components/src/index.tsx
|
|
97518
97529
|
|