update:请求页面增加遮罩提示

This commit is contained in:
2021-10-18 17:46:33 +08:00
parent 3b4b4bc575
commit 1d7e944df2
3 changed files with 141 additions and 115 deletions

View File

@@ -1,5 +1,11 @@
<template>
<div class="container">
<div
class="container"
v-loading="loading"
element-loading-text="页面加载中"
element-loading-spinner="el-icon-loading"
element-loading-background="#FFFFFF"
>
<div class="title">{{ info.title }}</div>
<div class="date">{{ modifyDate(info.publicTime) }}</div>
<hr />
@@ -13,6 +19,7 @@ import $ from "jquery";
export default {
data() {
return {
loading: true,
info: {
title: "无数据",
publicTime: "无数据"
@@ -47,6 +54,7 @@ export default {
},
appKey: "es4b8zmz+2001833218+dehllx",
onSuccess: data => {
this.loading = false;
if (data.data.success) {
const { data: res } = data;
this.info = res.data;
@@ -77,6 +85,7 @@ export default {
}
},
onFail: function(err) {
this.loading = false;
this.$notify({
title: "错误",
message: "请求失败",