@lemon-fe/kits 1.0.0-129 → 1.0.0-130
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.
|
@@ -30,9 +30,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
30
30
|
|
|
31
31
|
import { PlayCircleOutlined, PauseCircleOutlined, ReloadOutlined } from '@ant-design/icons';
|
|
32
32
|
import { useThrottle } from '@lemon-fe/hooks';
|
|
33
|
-
import { Modal, Row, Spin } from 'antd';
|
|
33
|
+
import { ConfigProvider, Modal, Row, Spin } from 'antd';
|
|
34
34
|
import { get } from 'lodash';
|
|
35
|
-
import React, { useMemo, useState, useRef, useEffect } from 'react';
|
|
35
|
+
import React, { useMemo, useState, useRef, useEffect, useContext } from 'react';
|
|
36
36
|
import { render } from 'react-dom';
|
|
37
37
|
import { unmountComponentAtNode } from 'react-dom';
|
|
38
38
|
import Actions from "../../components/Actions";
|
|
@@ -452,15 +452,24 @@ function BatchOperate(props) {
|
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
export default function useBatchOperate(options) {
|
|
455
|
+
var ctx = useContext(ConfigProvider.ConfigContext);
|
|
456
|
+
|
|
455
457
|
var run = function run(rows) {
|
|
456
458
|
var root = document.createDocumentFragment();
|
|
457
|
-
|
|
459
|
+
var getPrefixCls = ctx.getPrefixCls,
|
|
460
|
+
iconPrefixCls = ctx.iconPrefixCls,
|
|
461
|
+
locale = ctx.locale;
|
|
462
|
+
render( /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
463
|
+
prefixCls: getPrefixCls(),
|
|
464
|
+
iconPrefixCls: iconPrefixCls,
|
|
465
|
+
locale: locale
|
|
466
|
+
}, /*#__PURE__*/React.createElement(BatchOperate, _extends({
|
|
458
467
|
rows: rows
|
|
459
468
|
}, options, {
|
|
460
469
|
afterClose: function afterClose() {
|
|
461
470
|
unmountComponentAtNode(root);
|
|
462
471
|
}
|
|
463
|
-
})), root);
|
|
472
|
+
}))), root);
|
|
464
473
|
};
|
|
465
474
|
|
|
466
475
|
return {
|