升级umi4.0,修复新建脚本

This commit is contained in:
whyour
2022-09-18 20:40:59 +08:00
parent 518e8903a3
commit 1e55f4065d
28 changed files with 227 additions and 126 deletions
+1 -2
View File
@@ -6,8 +6,7 @@
overflow: hidden;
position: relative;
background-color: @component-background;
height: calc(100vh - 128px);
height: calc(100vh - var(--vh-offset, 0px) - 128px);
height: 100%;
display: flex;
flex-direction: column;
}
+4 -1
View File
@@ -7,6 +7,8 @@ import { request } from '@/utils/http';
import styles from './index.module.less';
import { Controlled as CodeMirror } from 'react-codemirror2';
import SplitPane from 'react-split-pane';
import { useOutletContext } from '@umijs/max';
import { SharedContext } from '@/layouts';
function getFilterData(keyword: string, data: any) {
const expandedKeys: string[] = [];
@@ -36,7 +38,8 @@ function getFilterData(keyword: string, data: any) {
return { tree: data, expandedKeys };
}
const Log = ({ headerStyle, isPhone, theme }: any) => {
const Log = () => {
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
const [title, setTitle] = useState('请选择日志文件');
const [value, setValue] = useState('请选择日志文件');
const [select, setSelect] = useState<any>();