'admin-21.04.01:修复雪花屏loading不同步主题颜色的问题'

This commit is contained in:
lyt-Top
2021-04-01 20:18:27 +08:00
parent d2d5fffe60
commit 641ace768c
4 changed files with 60 additions and 2 deletions

View File

@ -1,7 +1,16 @@
import { nextTick } from 'vue';
import loadingCss from '/@/theme/loading.scss';
// 定义方法
export const NextLoading = {
// 载入 css
setCss: () => {
let link = document.createElement('link');
link.rel = 'stylesheet';
link.href = loadingCss;
link.crossOrigin = 'anonymous';
document.getElementsByTagName('head')[0].appendChild(link);
},
// 创建 loading
start: () => {
const bodys: any = document.body;