myshell-react-lib 0.2.18 → 0.2.19

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.d.cts CHANGED
@@ -638,11 +638,15 @@ interface LinkProps {
638
638
  * 是否是移动端
639
639
  */
640
640
  isMobile?: boolean;
641
+ /**
642
+ * 是否需要做移动端路由
643
+ */
644
+ mobRoute?: boolean;
641
645
  onClick?: (e: any) => void;
642
646
  children?: React.ReactNode;
643
647
  [key: string]: any;
644
648
  }
645
- declare function Link({ className, href, scroll, replace, prefetch, back, children, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
649
+ declare function Link({ className, href, scroll, replace, prefetch, back, children, mobRoute, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
646
650
 
647
651
  interface BreakpointColsObject {
648
652
  default: number;
package/dist/index.d.ts CHANGED
@@ -638,11 +638,15 @@ interface LinkProps {
638
638
  * 是否是移动端
639
639
  */
640
640
  isMobile?: boolean;
641
+ /**
642
+ * 是否需要做移动端路由
643
+ */
644
+ mobRoute?: boolean;
641
645
  onClick?: (e: any) => void;
642
646
  children?: React.ReactNode;
643
647
  [key: string]: any;
644
648
  }
645
- declare function Link({ className, href, scroll, replace, prefetch, back, children, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
649
+ declare function Link({ className, href, scroll, replace, prefetch, back, children, mobRoute, isMobile, onClick, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
646
650
 
647
651
  interface BreakpointColsObject {
648
652
  default: number;
package/dist/index.js CHANGED
@@ -9984,7 +9984,7 @@ function useNativeBridge() {
9984
9984
  import { useMedia as useMedia3 } from "react-use";
9985
9985
  import { jsx as jsx37 } from "react/jsx-runtime";
9986
9986
  function Link(_param) {
9987
- var className = _param.className, href = _param.href, _param_scroll = _param.scroll, scroll = _param_scroll === void 0 ? false : _param_scroll, _param_replace = _param.replace, replace = _param_replace === void 0 ? false : _param_replace, _param_prefetch = _param.prefetch, prefetch = _param_prefetch === void 0 ? true : _param_prefetch, _param_back = _param.back, back = _param_back === void 0 ? false : _param_back, children = _param.children, isMobile2 = _param.isMobile, onClick = _param.onClick, props = _object_without_properties(_param, [
9987
+ var className = _param.className, href = _param.href, _param_scroll = _param.scroll, scroll = _param_scroll === void 0 ? false : _param_scroll, _param_replace = _param.replace, replace = _param_replace === void 0 ? false : _param_replace, _param_prefetch = _param.prefetch, prefetch = _param_prefetch === void 0 ? true : _param_prefetch, _param_back = _param.back, back = _param_back === void 0 ? false : _param_back, children = _param.children, _param_mobRoute = _param.mobRoute, mobRoute = _param_mobRoute === void 0 ? true : _param_mobRoute, isMobile2 = _param.isMobile, onClick = _param.onClick, props = _object_without_properties(_param, [
9988
9988
  "className",
9989
9989
  "href",
9990
9990
  "scroll",
@@ -9992,6 +9992,7 @@ function Link(_param) {
9992
9992
  "prefetch",
9993
9993
  "back",
9994
9994
  "children",
9995
+ "mobRoute",
9995
9996
  "isMobile",
9996
9997
  "onClick"
9997
9998
  ]);
@@ -10005,7 +10006,7 @@ function Link(_param) {
10005
10006
  if (externalLink) return path;
10006
10007
  var formatPath = path;
10007
10008
  var isMobPath = path.startsWith("/m/") || path === "/m";
10008
- if (isMob) {
10009
+ if (isMob && mobRoute) {
10009
10010
  formatPath = isMobPath ? path : "/m".concat(path);
10010
10011
  } else {
10011
10012
  formatPath = isMobPath ? path.slice(2) : path;