提交 ae9c3d70 authored 作者: lihuihui's avatar lihuihui

添加确认删除弹窗

上级 bb5c9fbf
......@@ -57,9 +57,19 @@
<template v-else>
<div class="z-btn" @click="batchDel.selectShow = false">返回</div>
<div class="z-btn mar" @click="allSelect">{{ batchDel.isAllSelect ? '取消全选' : '全选' }}</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDelClick">删除</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDel.isPopShow = true">删除</div>
</template>
</div>
<div class="exam_submit" v-if="batchDel.isPopShow">
<div class="pop">
<div class="tit"></div>
<div class="txt">确认删除</div>
<div class="btn_box">
<div class="btn" @click="batchDel.isPopShow = false">取消</div>
<div class="btn btn2" @click="batchDelClick">删除</div>
</div>
</div>
</div>
</div>
</template>
......@@ -79,7 +89,8 @@ export default {
selectShow: false,
isDelBtn: false,
countData: [],
isAllSelect: false
isAllSelect: false,
isPopShow: false
},
screen: {
isShow: false,
......@@ -139,6 +150,7 @@ export default {
cumulativeObj[countNum] = item.getAttribute('data-id')
cumulativeValue.push(countNum)
})
this.scrollFlag = true
if (countNum < clientDomH) {
// 直接全选
if (this.batchDel.countData.length === this.question.list.length) {
......@@ -236,9 +248,16 @@ export default {
this.clear()
}
this.batchDel.isDelBtn = false
this.batchDel.isPopShow = false
Toast('删除成功')
this.batchDel.isAllSelect = false
this.question.list.length ? this.initData(true) : this.initData()
console.log(this.question.list)
if (this.question.list.length < 5) {
this.params.page = this.params.page + 1
this.initData()
} else {
this.initData(true)
}
}
})
},
......@@ -344,6 +363,57 @@ export default {
</script>
<style lang="scss" scoped>
.exam_submit{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.6);
.pop{
width: 5.9rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
background:rgba(255,255,255,1);
border-radius:.12rem;
padding: 0.4rem 0;
.tit{
font-weight:bold;
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
}
.txt{
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
margin-top: .8rem;
}
.btn_box{
padding:0 0.2rem;
display: flex;
margin-top: .8rem;
.btn{
width:2.6rem;
height:.7rem;
background:#C62245;
border-radius:.12rem;
text-align: center;
line-height: .7rem;
color: #fff;
font-size: .3rem;
}
.btn2{
margin-left: auto;
}
}
}
}
.btn-box{
position: fixed;
bottom: 0;
......
......@@ -67,9 +67,19 @@
<template v-else>
<div class="z-btn" @click="batchDel.selectShow = false">返回</div>
<div class="z-btn mar" @click="allSelect">{{ batchDel.isAllSelect ? '取消全选' : '全选' }}</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDelClick">删除</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDel.isPopShow = true">删除</div>
</template>
</div>
<div class="exam_submit" v-if="batchDel.isPopShow">
<div class="pop">
<div class="tit"></div>
<div class="txt">确认删除</div>
<div class="btn_box">
<div class="btn" @click="batchDel.isPopShow = false">取消</div>
<div class="btn btn2" @click="batchDelClick">删除</div>
</div>
</div>
</div>
</div>
</template>
......@@ -89,7 +99,8 @@ export default {
selectShow: false,
isDelBtn: false,
countData: [],
isAllSelect: false
isAllSelect: false,
isPopShow: false
},
screen: {
isShow: false,
......@@ -149,6 +160,7 @@ export default {
cumulativeObj[countNum] = item.getAttribute('data-id')
cumulativeValue.push(countNum)
})
this.scrollFlag = true
if (countNum < clientDomH) {
// 直接全选
if (this.batchDel.countData.length === this.question.list.length) {
......@@ -246,9 +258,16 @@ export default {
this.clear()
}
this.batchDel.isDelBtn = false
this.batchDel.isPopShow = false
Toast('删除成功')
this.batchDel.isAllSelect = false
this.question.list.length ? this.initData(true) : this.initData()
console.log(this.question.list)
if (this.question.list.length < 5) {
this.params.page = this.params.page + 1
this.initData()
} else {
this.initData(true)
}
}
})
},
......@@ -354,6 +373,57 @@ export default {
</script>
<style lang="scss" scoped>
.exam_submit{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.6);
.pop{
width: 5.9rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
background:rgba(255,255,255,1);
border-radius:.12rem;
padding: 0.4rem 0;
.tit{
font-weight:bold;
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
}
.txt{
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
margin-top: .8rem;
}
.btn_box{
padding:0 0.2rem;
display: flex;
margin-top: .8rem;
.btn{
width:2.6rem;
height:.7rem;
background:#C62245;
border-radius:.12rem;
text-align: center;
line-height: .7rem;
color: #fff;
font-size: .3rem;
}
.btn2{
margin-left: auto;
}
}
}
}
.btn-box{
position: fixed;
bottom: 0;
......
......@@ -67,9 +67,19 @@
<template v-else>
<div class="z-btn" @click="batchDel.selectShow = false">返回</div>
<div class="z-btn mar" @click="allSelect">{{ batchDel.isAllSelect ? '取消全选' : '全选' }}</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDelClick">删除</div>
<div :class="!batchDel.isDelBtn ? 'z-btn col' : 'z-btn'" @click="batchDel.isPopShow = true">删除</div>
</template>
</div>
<div class="exam_submit" v-if="batchDel.isPopShow">
<div class="pop">
<div class="tit"></div>
<div class="txt">确认删除</div>
<div class="btn_box">
<div class="btn" @click="batchDel.isPopShow = false">取消</div>
<div class="btn btn2" @click="batchDelClick">删除</div>
</div>
</div>
</div>
</div>
</template>
......@@ -90,7 +100,8 @@ export default {
selectShow: false,
isDelBtn: false,
countData: [],
isAllSelect: false
isAllSelect: false,
isPopShow: false
},
screen: {
isShow: false,
......@@ -150,6 +161,7 @@ export default {
cumulativeObj[countNum] = item.getAttribute('data-id')
cumulativeValue.push(countNum)
})
this.scrollFlag = true
if (countNum < clientDomH) {
// 直接全选
if (this.batchDel.countData.length === this.question.list.length) {
......@@ -265,9 +277,16 @@ export default {
this.clear()
}
this.batchDel.isDelBtn = false
this.batchDel.isPopShow = false
Toast('删除成功')
this.batchDel.isAllSelect = false
this.question.list.length ? this.initData(true) : this.initData()
console.log(this.question.list)
if (this.question.list.length < 5) {
this.params.page = this.params.page + 1
this.initData()
} else {
this.initData(true)
}
}
})
},
......@@ -374,6 +393,57 @@ export default {
</script>
<style lang="scss" scoped>
.exam_submit{
position: fixed;
top: 0;
left: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.6);
.pop{
width: 5.9rem;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
background:rgba(255,255,255,1);
border-radius:.12rem;
padding: 0.4rem 0;
.tit{
font-weight:bold;
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
}
.txt{
color:rgba(34,34,34,1);
font-size:.3rem;
text-align: center;
line-height: 100%;
margin-top: .8rem;
}
.btn_box{
padding:0 0.2rem;
display: flex;
margin-top: .8rem;
.btn{
width:2.6rem;
height:.7rem;
background:#C62245;
border-radius:.12rem;
text-align: center;
line-height: .7rem;
color: #fff;
font-size: .3rem;
}
.btn2{
margin-left: auto;
}
}
}
}
.btn-box{
position: fixed;
bottom: 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论