修改后台管理

This commit is contained in:
何童崇 2022-04-02 16:41:19 +08:00
parent 6c55f5b039
commit 672726d683
5 changed files with 12 additions and 6 deletions

View File

@ -19,7 +19,9 @@ const getClientEnvironment = require("./env");
let publicPath = "/react/build/";
const publicUrl = publicPath.slice(0, -1);
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
// const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== "false";
const shouldUseSourceMap = process.env.NODE_ENV !== "production";
const env = getClientEnvironment(publicPath);
// This is the production configuration.
@ -54,7 +56,8 @@ module.exports = {
},
bail: true,
mode: "production",
devtool: false, //测试版
// devtool: false, //测试版
devtool: shouldUseSourceMap?'source-map':false,
entry: [require.resolve("./polyfills"), paths.appIndexJs],
output: {
path: paths.appBuild,

View File

@ -101,8 +101,10 @@ export default (props) => {
}
function iframeLoad() {
console.log('iframeLoad----------iframeLoad');
try {
document.getElementById("iframe").height = document.getElementById("iframe").contentWindow.top.document.documentElement.scrollHeight;
let myIframe=document.getElementById("iframe");
myIframe.height = myIframe.contentWindow.top.document.documentElement.scrollHeight;
} catch (err) {
console.error(err);
}
@ -145,7 +147,7 @@ export default (props) => {
<div className="managements">
<div className="head-title">{head(keyPath)}</div>
{acitve && acitve.urlType && acitve.urlType !== 'self' ?
<iframe id="iframe" className="iframe-item" src={`${setting[acitve.urlType]}${acitve.location && acitve.location.startsWith('/administration') ? acitve.location.replace(/\/administration/, "") : acitve.location}?${acitve.params}`} onLoad={iframeLoad}></iframe>
<iframe id="iframe" className="iframe-item" src={`${setting[acitve.urlType]}${acitve.location && acitve.location.startsWith('/administration') ? acitve.location.replace(/\/administration/, "") : acitve.location}?${acitve.params||'layout=none'}`} onLoad={iframeLoad}></iframe>
: children
}
</div>

View File

@ -58,7 +58,7 @@
}
.iframe-item{
width: 100%;
height: 100vh;
min-height: 100vh;
border: 0;
}
.ant-input, .ant-select-selection{

View File

@ -4,7 +4,7 @@
justify-content: flex-end;
}
.menuDetail{
div{
>div{
display: flex;
align-items: center;
}

View File

@ -166,6 +166,7 @@ export default Form.create()(({ form}) => {
icon: values.icon,
hidden: values.hidden,
level: parseInt(values.parentKey)+1,
urlType:values.urlType,
}
createMenu(params).then(response=>{
if(response && response.message=='success'){