mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-09 19:06:46 +08:00
提交
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
<u-toast ref="toast"></u-toast>
|
||||
<view class="news-page-btn">
|
||||
<view class="btn-index" @click="selectFn">多选</view>
|
||||
<view class="btn-index" @click="isAllClear()">清空</view>
|
||||
<view class="btn-index" @click="allRead()">一键已读</view>
|
||||
<view class="btn-index" :class="{'wu-list':items.length == 0}" @click="isAllClear()">清空</view>
|
||||
<view class="btn-index" :class="{'wu-list':items.length == 0}" @click="allRead()">一键已读</view>
|
||||
</view>
|
||||
<view class="news-page-list">
|
||||
<view class="list-index" v-for="item in items" :key="item.id" @click="returnRouter(item)">
|
||||
@@ -43,6 +43,7 @@
|
||||
props:{
|
||||
items:{
|
||||
type:Array,
|
||||
default:()=>[]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -131,6 +132,9 @@
|
||||
});
|
||||
},
|
||||
isAllClear() {
|
||||
if(this.items.length == 0) {
|
||||
return
|
||||
}
|
||||
this.isAll = 0;
|
||||
this.modalShow = true;
|
||||
this.content='确认删所有信息吗?'
|
||||
@@ -144,6 +148,9 @@
|
||||
})
|
||||
},
|
||||
allRead(){
|
||||
if(this.items.length == 0) {
|
||||
return
|
||||
}
|
||||
let ids = this.items.map(item=>{
|
||||
if(!item.isRead) {
|
||||
return item.id;
|
||||
@@ -160,6 +167,9 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.wu-list{
|
||||
background-color: #eee;
|
||||
}
|
||||
/deep/ .u-modal{
|
||||
width: 288px !important;
|
||||
border-radius: 28upx;
|
||||
|
||||
Reference in New Issue
Block a user