Browse Source

完善弹框

master
xyiege 3 months 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

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

Loading…
Cancel
Save