@bit-sun/business-component 4.2.1-alpha.15-aiwei → 4.2.1-alpha.17-aiwei

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/index.esm.js CHANGED
@@ -19673,7 +19673,8 @@ var BsSulaQueryTable = (function (props) {
19673
19673
  setPagePath = _useState0[1];
19674
19674
  var _useLocation = useLocation(),
19675
19675
  pathname = _useLocation.pathname,
19676
- _useLocation$state = _useLocation.state;
19676
+ _useLocation$state = _useLocation.state,
19677
+ state = _useLocation$state === void 0 ? {} : _useLocation$state;
19677
19678
  var _useState1 = useState(false),
19678
19679
  _useState10 = _slicedToArray(_useState1, 2),
19679
19680
  isFullScreen = _useState10[0],
@@ -20149,16 +20150,17 @@ var BsSulaQueryTable = (function (props) {
20149
20150
  isFullScreen: isFullScreen
20150
20151
  });
20151
20152
  useEffect(function () {
20152
- // if (!localStorage.getItem('isTabChange') || state?.updateCurrentPage) {
20153
- // if (pagePath === pathname) {
20154
- // // @ts-ignore
20155
- // config.ref?.current?.tableRef?.current?.refreshTable();
20156
- // }
20157
- // }
20158
- // setTimeout(() => {
20159
- // // 处理页面刷新两面
20160
- // localStorage.removeItem('isTabChange');
20161
- // }, 0);
20153
+ if (!localStorage.getItem('isTabChange') || (state === null || state === void 0 ? void 0 : state.updateCurrentPage)) {
20154
+ if (pagePath === pathname) {
20155
+ var _config$ref, _config$ref$current, _config$ref$current$t, _config$ref$current$t2;
20156
+ // @ts-ignore
20157
+ (_config$ref = config.ref) === null || _config$ref === void 0 ? void 0 : (_config$ref$current = _config$ref.current) === null || _config$ref$current === void 0 ? void 0 : (_config$ref$current$t = _config$ref$current.tableRef) === null || _config$ref$current$t === void 0 ? void 0 : (_config$ref$current$t2 = _config$ref$current$t.current) === null || _config$ref$current$t2 === void 0 ? void 0 : _config$ref$current$t2.refreshTable();
20158
+ }
20159
+ }
20160
+ setTimeout(function () {
20161
+ // 处理页面刷新两面
20162
+ localStorage.removeItem('isTabChange');
20163
+ }, 0);
20162
20164
  }, [pathname]);
20163
20165
  var expandedRowKeys = props === null || props === void 0 ? void 0 : (_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.expandedRowKeys;
20164
20166
  //todo summary属性已经被使用,为了兼容之前的,现在使用 summaryList
package/dist/index.js CHANGED
@@ -19696,7 +19696,8 @@ var BsSulaQueryTable = (function (props) {
19696
19696
  setPagePath = _useState0[1];
19697
19697
  var _useLocation = umi.useLocation(),
19698
19698
  pathname = _useLocation.pathname,
19699
- _useLocation$state = _useLocation.state;
19699
+ _useLocation$state = _useLocation.state,
19700
+ state = _useLocation$state === void 0 ? {} : _useLocation$state;
19700
19701
  var _useState1 = React$1.useState(false),
19701
19702
  _useState10 = _slicedToArray(_useState1, 2),
19702
19703
  isFullScreen = _useState10[0],
@@ -20172,16 +20173,17 @@ var BsSulaQueryTable = (function (props) {
20172
20173
  isFullScreen: isFullScreen
20173
20174
  });
20174
20175
  React$1.useEffect(function () {
20175
- // if (!localStorage.getItem('isTabChange') || state?.updateCurrentPage) {
20176
- // if (pagePath === pathname) {
20177
- // // @ts-ignore
20178
- // config.ref?.current?.tableRef?.current?.refreshTable();
20179
- // }
20180
- // }
20181
- // setTimeout(() => {
20182
- // // 处理页面刷新两面
20183
- // localStorage.removeItem('isTabChange');
20184
- // }, 0);
20176
+ if (!localStorage.getItem('isTabChange') || (state === null || state === void 0 ? void 0 : state.updateCurrentPage)) {
20177
+ if (pagePath === pathname) {
20178
+ var _config$ref, _config$ref$current, _config$ref$current$t, _config$ref$current$t2;
20179
+ // @ts-ignore
20180
+ (_config$ref = config.ref) === null || _config$ref === void 0 ? void 0 : (_config$ref$current = _config$ref.current) === null || _config$ref$current === void 0 ? void 0 : (_config$ref$current$t = _config$ref$current.tableRef) === null || _config$ref$current$t === void 0 ? void 0 : (_config$ref$current$t2 = _config$ref$current$t.current) === null || _config$ref$current$t2 === void 0 ? void 0 : _config$ref$current$t2.refreshTable();
20181
+ }
20182
+ }
20183
+ setTimeout(function () {
20184
+ // 处理页面刷新两面
20185
+ localStorage.removeItem('isTabChange');
20186
+ }, 0);
20185
20187
  }, [pathname]);
20186
20188
  var expandedRowKeys = props === null || props === void 0 ? void 0 : (_props$expandable = props.expandable) === null || _props$expandable === void 0 ? void 0 : _props$expandable.expandedRowKeys;
20187
20189
  //todo summary属性已经被使用,为了兼容之前的,现在使用 summaryList
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "4.2.1-alpha.15-aiwei",
3
+ "version": "4.2.1-alpha.17-aiwei",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -852,16 +852,16 @@ export default (props: any) => {
852
852
  };
853
853
 
854
854
  useEffect(() => {
855
- // if (!localStorage.getItem('isTabChange') || state?.updateCurrentPage) {
856
- // if (pagePath === pathname) {
857
- // // @ts-ignore
858
- // config.ref?.current?.tableRef?.current?.refreshTable();
859
- // }
860
- // }
861
- // setTimeout(() => {
862
- // // 处理页面刷新两面
863
- // localStorage.removeItem('isTabChange');
864
- // }, 0);
855
+ if (!localStorage.getItem('isTabChange') || state?.updateCurrentPage) {
856
+ if (pagePath === pathname) {
857
+ // @ts-ignore
858
+ config.ref?.current?.tableRef?.current?.refreshTable();
859
+ }
860
+ }
861
+ setTimeout(() => {
862
+ // 处理页面刷新两面
863
+ localStorage.removeItem('isTabChange');
864
+ }, 0);
865
865
  }, [pathname]);
866
866
 
867
867
  const expandedRowKeys = props?.expandable?.expandedRowKeys;