update:请求页面增加遮罩提示
This commit is contained in:
@@ -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: "请求失败",
|
||||
|
||||
Reference in New Issue
Block a user