Commit 79d6f580 authored by wuhao's avatar wuhao 🎯

asder

parent 6bf879ab
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-09-19 08:36:54
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-09-19 08:54:01
* @FilePath: /ems3.3/config/config.js
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
// https://umijs.org/config/ // https://umijs.org/config/
import { defineConfig } from '@umijs/max'; import { defineConfig } from '@umijs/max';
import { join } from 'path'; import { join } from 'path';
...@@ -42,7 +52,7 @@ export default defineConfig({ ...@@ -42,7 +52,7 @@ export default defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? './' : '/', publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
initialState: {}, initialState: {},
model: {}, model: {},
// keepalive: keepalive, keepalive: keepalive,
layout: { layout: {
// https://umijs.org/zh-CN/plugins/plugin-layout // https://umijs.org/zh-CN/plugins/plugin-layout
locale: false, locale: false,
......
/*
* @Author: wuhao930406 1148547900@qq.com
* @Date: 2023-09-19 08:36:54
* @LastEditors: wuhao930406 1148547900@qq.com
* @LastEditTime: 2023-09-19 08:41:04
* @FilePath: /ems3.3/config/proxy.js
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
*/
/** /**
* 在生产环境 代理是无法生效的,所以这里没有生产环境的配置 * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
* ------------------------------- * -------------------------------
...@@ -13,7 +23,7 @@ export default { ...@@ -13,7 +23,7 @@ export default {
dev: { dev: {
[defaultSetting.proxypath]: { [defaultSetting.proxypath]: {
// 要代理的地址 // 要代理的地址
target: 'http://192.168.40.110:8000', //jf哥 target: 'http://192.168.40.111:8000', //jf哥
// target: 'http://192.168.40.248:8080', //jf哥 // target: 'http://192.168.40.248:8080', //jf哥
// target: 'http://192.168.40.64:28000', //gc哥 // target: 'http://192.168.40.64:28000', //gc哥
// target: 'http://192.168.40.203:8000', //dj哥 // target: 'http://192.168.40.203:8000', //dj哥
......
...@@ -54,7 +54,7 @@ const TagView = ({ children, home }) => { ...@@ -54,7 +54,7 @@ const TagView = ({ children, home }) => {
}; };
// 监听路由改变 // 监听路由改变
const handleOnChange = (routeContext) => { const handleOnChange = async (routeContext) => {
const { currentMenu } = routeContext; const { currentMenu } = routeContext;
// console.log(tagList); // console.log(tagList);
// tags初始化 // tags初始化
...@@ -64,7 +64,7 @@ const TagView = ({ children, home }) => { ...@@ -64,7 +64,7 @@ const TagView = ({ children, home }) => {
// 判断是否已打开过该页面 // 判断是否已打开过该页面
let hasOpen = false; let hasOpen = false;
if (currentMenu.path) { if (currentMenu.path) {
const tagsCopy = tagList.map((item) => { let tagsCopy = tagList.map((item) => {
if (currentMenu?.path === item.path) { if (currentMenu?.path === item.path) {
//console.log(item); //console.log(item);
hasOpen = true; hasOpen = true;
...@@ -87,6 +87,8 @@ const TagView = ({ children, home }) => { ...@@ -87,6 +87,8 @@ const TagView = ({ children, home }) => {
refresh: 0, refresh: 0,
active: true, active: true,
}); });
await setrefresh(false);
setrefresh(true);
} }
return setTagList(tagsCopy); return setTagList(tagsCopy);
...@@ -162,7 +164,7 @@ const TagView = ({ children, home }) => { ...@@ -162,7 +164,7 @@ const TagView = ({ children, home }) => {
</div> </div>
<div className={styles.child}> <div className={styles.child}>
<div className={styles.contianbox}> <div className={styles.contianbox}>
<div style={{ width: "100%", height: "100%" }}> {refresh && children}</div> <div style={{ width: '100%', height: '100%' }}> {refresh && children}</div>
</div> </div>
</div> </div>
</> </>
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment