调整导航链接初始化提示
This commit is contained in:
@@ -93,12 +93,17 @@ body {
|
|||||||
background-color: rgba(255, 255, 255, .5) !important;
|
background-color: rgba(255, 255, 255, .5) !important;
|
||||||
backdrop-filter: blur(.2rem);
|
backdrop-filter: blur(.2rem);
|
||||||
|
|
||||||
|
.el-loading-spinner {
|
||||||
|
transform: translateY(-50%);
|
||||||
|
}
|
||||||
|
|
||||||
.el-icon-loading {
|
.el-icon-loading {
|
||||||
font-size: 2rem !important;
|
font-size: 2rem !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-loading-text {
|
.el-loading-text {
|
||||||
font-size: 1.5rem !important;
|
margin: 0.5rem 0;
|
||||||
|
font-size: 1.25rem !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,12 +16,12 @@ let utils = {
|
|||||||
* 设置唯一 ID & 改变结构
|
* 设置唯一 ID & 改变结构
|
||||||
*/
|
*/
|
||||||
init: function () {
|
init: function () {
|
||||||
// 载入中提示
|
// 初始化提示
|
||||||
var loading = Loading.service({
|
var loading = Loading.service({
|
||||||
customClass: 'loading-link',
|
customClass: 'loading-link',
|
||||||
lock: true,
|
lock: true,
|
||||||
spinner: 'el-icon-loading',
|
spinner: 'el-icon-loading',
|
||||||
text: '导航链接列表正在初始化,请稍候'
|
text: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
var currentIndex = 0;
|
var currentIndex = 0;
|
||||||
@@ -62,22 +62,25 @@ let utils = {
|
|||||||
}, 10 * currentIndex);
|
}, 10 * currentIndex);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 提示文本
|
||||||
|
loading.text = `初始化导航链接,请稍候 [${currentIndex}]`;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 检测 currentIndex 是否已停止变化
|
// 检测 currentIndex 是否已停止变化
|
||||||
var timer = setInterval(() => {
|
var timer = setInterval(() => {
|
||||||
if (currentIndex == currentIndexCpy) {
|
if (currentIndexCpy == currentIndex) {
|
||||||
// 停止检测
|
// 停止检测
|
||||||
clearInterval(timer);
|
clearInterval(timer);
|
||||||
|
|
||||||
// 日志
|
// 日志
|
||||||
console.log('[导航链接] 初始化完毕');
|
console.log('[导航链接] 初始化完毕');
|
||||||
|
|
||||||
// 关闭载入中提示
|
// 关闭提示
|
||||||
loading.close();
|
loading.close();
|
||||||
|
|
||||||
// 更新
|
// 更新
|
||||||
datas.list = navLinks;
|
datas.list = JSON.parse(JSON.stringify(navLinks));
|
||||||
|
|
||||||
// 写入缓存
|
// 写入缓存
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
Reference in New Issue
Block a user