Commit 1783eefb by 姜雷

Merge branch 'develop' into 'test'

修改样式载入方式 See merge request !180
parents 1d056479 c319e9ab
......@@ -4,22 +4,12 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>ic_logo.ico" />
<script src="<%= BASE_URL %>system.js"></script>
<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://unpkg.com/vue-router@3.0.1/dist/vue-router.js"></script>
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/customerManage/lib/customerManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/baseManage/lib/baseManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/systemManage/lib/systemManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/operateManage/lib/operateManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/statisticsManage/lib/statisticsManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/deviceManage/lib/deviceManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/smaproManage/lib/smaproManage.css" />
<title>多彩综合管理系统</title>
</head>
......
......@@ -4,22 +4,12 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>ic_logo.ico" />
<script src="<%= BASE_URL %>system.js"></script>
<script src="https://unpkg.com/vue@2.6.10/dist/vue.js"></script>
<script src="https://unpkg.com/vuex@3.1.0/dist/vuex.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.0.1/dist/vue-router.js"></script>
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/customerManage/lib/customerManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/baseManage/lib/baseManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/systemManage/lib/systemManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/operateManage/lib/operateManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/statisticsManage/lib/statisticsManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/deviceManage/lib/deviceManage.css" />
<link rel="stylesheet" href="<%= VUE_APP_SUBSYSTEM %>/smaproManage/lib/smaproManage.css" />
<title>多彩综合管理系统</title>
</head>
......
......@@ -43,9 +43,19 @@ script.text = `
'deviceManage',
'smaproManage',
];
Promise.all(routeNameList.map(name => System.import('${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.umd.min.js?t=${new Date().getTime()}'))).then(res => {
Promise.all(routeNameList.map(name => {
var node = document.createElement("link");
node.rel = "stylesheet";
node.type = "text/css";
node.href = '${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.css?t=${new Date().getTime()}';
document.getElementsByTagName("head")[0].appendChild(node);
return System.import('${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.umd.min.js?t=${new Date().getTime()}')
}))
.then(res => {
for (let index = 0; index < res.length; index++) {
const element = res[index];
allAasyncRouterMap = allAasyncRouterMap.concat(element.default.default);
......
......@@ -36,6 +36,11 @@ script.text = `
];
Promise.all(
routeNameList.map(function(name) {
var node = document.createElement("link");
node.rel = "stylesheet";
node.type = "text/css";
node.href = '${process.env.VUE_APP_SUBSYSTEM}/' + name + '/lib/' + name + '.css?t=${new Date().getTime()}';
document.getElementsByTagName("head")[0].appendChild(node);
return System.import('${
process.env.VUE_APP_SUBSYSTEM
}/' + name + '/lib/' + name + '.umd.min.js?t=${new Date().getTime()}');
......@@ -75,5 +80,6 @@ script.text = `
},
});
});
`;
document.body.appendChild(script);
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