Browse Source

完善弹框

master
xyiege 1 month ago
parent
commit
d17e54be9f
  1. 38
      vue/afvue/src/assets/main.css
  2. 34
      vue/afvue/src/views/Sfilecompare.vue

38
vue/afvue/src/assets/main.css

@ -88,3 +88,41 @@ a,
.tb-php{
background-position: 0px -852px;
}
/*
对话框
*/
.dialog{
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
float: left;
left: 0;
top: 0;
position: fixed;
animation: fadeOut 3s ease-in-out forwards;
}
.dialog .alert{
position: fixed;
top: 50%;
left: 50%;
transform: translateX(-50%);
padding: 10px 20px;
border-radius: 5px;
z-index: 9999;
/* 3s后消失 */
animation: fadeOut 3s ease-in-out forwards;
}
/** 同步成功提示 3s后消失*/
.alert-success{
/* display: none; */
background-color: #aee9bc;
color: #fff;
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}

34
vue/afvue/src/views/Sfilecompare.vue

@ -92,7 +92,7 @@
</div>
<!-- 弹框提示 -->
<div class="dialog">
<div class="dialog" v-if="dialogShow">
<div class="alert alert-success">
同步成功
</div>
@ -124,8 +124,7 @@ export default {
isMenuVisible: false, //
menuTop: 0, //
menuLeft: 0, //
dialogShow: false, //
isShowDir: false, //
}
},
@ -344,16 +343,25 @@ export default {
// build to schema
const pdata = new URLSearchParams(data)
//
// SendZipFile(pdata).then(res=>{
// console.log(res,"res")
// console.log(res.data.reply,"pdata")
// //
// this.selectedFiles = []
// // pdata
// pdata.forEach((value, key) => {
// pdata.delete(key)
// })
// })
SendZipFile(pdata).then(res=>{
console.log(res,"res")
// alert(res.status)
if(res.status == "200"){
//
this.dialogShow = true
// 3s
setTimeout(() => {
this.dialogShow = false
}, 3000);
}
// alert(res.data.reply)
//
this.selectedFiles = []
// pdata
pdata.forEach((value, key) => {
pdata.delete(key)
})
})
return
},

Loading…
Cancel
Save