update ruoyi-admin/src/main/resources/static/ruoyi/js/common.js.
This commit is contained in:
parent
0ceb2bde2b
commit
2817614447
|
|
@ -464,11 +464,17 @@ var sub = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 动态加载css文件
|
// 动态加载css文件
|
||||||
function loadCss(file, headElem) {
|
function loadCss(file, headElem,id) {
|
||||||
var link = document.createElement('link');
|
var link = document.createElement('link');
|
||||||
link.href = file;
|
link.href = file;
|
||||||
link.rel = 'stylesheet';
|
link.rel = 'stylesheet';
|
||||||
link.type = 'text/css';
|
link.type = 'text/css';
|
||||||
|
if(id){
|
||||||
|
if($("#"+id)&&$("#"+id).attr("href")&&$("#"+id).attr("href")==file){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
link.id = id;
|
||||||
|
}
|
||||||
if (headElem) headElem.appendChild(link);
|
if (headElem) headElem.appendChild(link);
|
||||||
else document.getElementsByTagName('head')[0].appendChild(link);
|
else document.getElementsByTagName('head')[0].appendChild(link);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue