@quansitech/antd-admin 1.1.27 → 1.1.28

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.
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import './New.scss';
2
3
  export default function ({ children, pageTitle, siteTitle, setDarkMode }: {
3
4
  children: React.ReactNode;
4
5
  pageTitle: string;
@@ -24,6 +24,7 @@ import http from "../../lib/http";
24
24
 
25
25
  import { MoonOutlined, SunOutlined } from "@ant-design/icons";
26
26
  import { usePage } from "@inertiajs/react";
27
+ import "./New.scss";
27
28
  export default function (_ref) {
28
29
  var _layoutContext$props$;
29
30
  var children = _ref.children,
@@ -0,0 +1,3 @@
1
+ .ant-pro-global-header .ant-menu {
2
+ background: none;
3
+ }
@@ -37,7 +37,7 @@ export default function (_ref) {
37
37
  }, c.props.badge ? /*#__PURE__*/React.createElement(Badge, {
38
38
  count: c.props.badge,
39
39
  style: {
40
- zIndex: 100
40
+ zIndex: 2
41
41
  }
42
42
  }, /*#__PURE__*/React.createElement(c.Component, c.props)) : /*#__PURE__*/React.createElement(c.Component, c.props));
43
43
  })));
@@ -27,8 +27,7 @@ import http from "../lib/http";
27
27
  import "./Table.scss";
28
28
  import { ModalContext } from "./ModalContext";
29
29
  import { commonHandler } from "../lib/schemaHandler";
30
- import { diffTree, getValueByPath } from "../lib/helpers";
31
- import { router } from "@inertiajs/react";
30
+ import { diffTree, getValueByPath, routerNavigateTo } from "../lib/helpers";
32
31
  import qs from 'qs';
33
32
  import { TabsContext } from "./TabsContext";
34
33
  export default function (props) {
@@ -58,7 +57,9 @@ export default function (props) {
58
57
  if (tabsContext.inTabs) {
59
58
  only.push('tabs');
60
59
  }
61
- router.get(searchUrl, data, {
60
+ routerNavigateTo(searchUrl, {
61
+ method: 'get',
62
+ data: data,
62
63
  preserveScroll: true,
63
64
  preserveState: true,
64
65
  only: only,
@@ -43,6 +43,10 @@ export function replaceParams(params, data) {
43
43
  return res;
44
44
  }
45
45
  export function routerNavigateTo(url, config) {
46
+ if (url.indexOf('javascript:') !== -1) {
47
+ window.location.href = url;
48
+ return;
49
+ }
46
50
  return router.visit(url, _objectSpread({}, config));
47
51
  }
48
52
  export function createScript(url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quansitech/antd-admin",
3
- "version": "1.1.27",
3
+ "version": "1.1.28",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@ant-design/pro-components": "^2.7.15",
15
- "@inertiajs/react": "^1.2.0",
15
+ "@inertiajs/react": "^1.2.0 || ^2.0.0",
16
16
  "antd": "^5.20.5",
17
17
  "antd-img-crop": "^4.23.0",
18
18
  "axios": "^1.7.7",