Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: type (resolve #12030) #12034

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: type (resolve #12030)
  • Loading branch information
fz6m committed Jan 6, 2024
commit 3b8a3119ce81d9a85fe5e3dff012353290f58b2b
2 changes: 1 addition & 1 deletion packages/plugins/src/access.ts
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion packages/plugins/src/dva.ts
Original file line number Diff line number Diff line change
@@ -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;
4 changes: 2 additions & 2 deletions packages/plugins/src/layout.ts
Original file line number Diff line number Diff line change
@@ -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,
@@ -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<{