umi4.4.9重新编译,检测不到文件存在,重新保存代码就正常显示了,是不是文件检测有问题 #13019
activeThink
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
最近在用umi4做一个demo,添加动态路由,修改运行时的配置文件,代码重新编译之后,页面就报错了
,

然后什么都不做,到对应的页面ctrl+s保存几下代码就正常了
下面是代码,都是很简单的demo
import React,{useState} from 'react';
import { PageContainer } from '@ant-design/pro-components';
import { Space, Table, Tag, Button, Form, Input, Radio } from 'antd';
const { Column, ColumnGroup } = Table;
interface DataType {
key: React.Key;
firstName: string;
lastName: string;
age: number;
address: string;
tags: string[];
}
const data: DataType[] = [
{
key: '1',
firstName: 'John',
lastName: 'Brown',
age: 32,
address: 'New York No. 1 Lake Park',
tags: ['nice', 'developer'],
},
{
key: '2',
firstName: 'Jim',
lastName: 'Green',
age: 42,
address: 'London No. 1 Lake Park',
tags: ['loser'],
},
{
key: '3',
firstName: 'Joe',
lastName: 'Black',
age: 32,
address: 'Sydney No. 1 Lake Park',
tags: ['cool', 'teacher'],
},
];
const Enterprise = () => {
const [form] = Form.useForm();
const [initFormValues,setInitialState] = useState({
username: '张三',
password: '123',
});
const getSearchFormData = (values: any) => {
console.log(values);
};
const onFinish = (values:any) => {
console.log('Success:', values);
};
const onFinishFailed = (errorInfo:any) => {
console.log('Failed:', errorInfo);
};
return (
<PageContainer
ghost
header={{
title: '企业管理',
}}
>
);
};
export default Enterprise;
All reactions