Skip to content

Commit

Permalink
fix: type (resolve #12030)
Browse files Browse the repository at this point in the history
  • Loading branch information
fz6m committed Jan 6, 2024
1 parent 41f1908 commit 3b8a311
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/plugins/src/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export function accessProvider(container) {
content: `
import React, { PropsWithChildren } from 'react';
import { AccessContext } from './context';
import type { IRoute } from 'umi';
import type { IRoute } from '@@/exports';
export const useAccess = () => {
return React.useContext(AccessContext);
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/src/dva.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export { getDvaApp } from './dva';
api.writeTmpFile({
path: 'types.d.ts',
tpl: `
import type { History } from 'umi';
import type { History } from '@@/exports';
export interface ConnectProps {
dispatch?: Dispatch;
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/src/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ${isFlattedDepsDir ? '/// <reference types="antd" />' : ''}
content: `
${PKG_TYPE_REFERENCE}
import { Link, useLocation, useNavigate, Outlet, useAppData, useRouteData, matchRoutes } from 'umi';
import type { IRoute } from 'umi';
import type { IRoute } from '@@/exports';
import React, { useMemo } from 'react';
import {
ProLayout,
Expand Down Expand Up @@ -741,7 +741,7 @@ export default LogoIcon;
path: 'Exception.tsx',
content: `
import React from 'react';
import { history, type IRoute } from 'umi';
import { history, type IRoute } from '@@/exports';
import { Result, Button } from 'antd';
const Exception: React.FC<{
Expand Down

0 comments on commit 3b8a311

Please sign in to comment.