dengjie commit : 删除二次确认

This commit is contained in:
clay
2022-12-24 16:49:42 +08:00
parent 50ff30eb62
commit 750559bf4c
4 changed files with 150 additions and 17 deletions

View File

@@ -12,17 +12,22 @@
<view class="release_time">
<text>{{item.time}}</text>
</view>
<view class="btn">
<u-icon name="edit-pen" color="#15CA65" size="20"></u-icon>
<text class="btn_text">修改</text>
</view>
<view class="btn">
<u-icon name="trash" color="#15CA65" size="20"></u-icon>
<text class="btn_text">删除</text>
<view style="display: flex;">
<view class="btn" @click="editNeeds()">
<u-icon name="edit-pen" color="#15CA65" size="20"></u-icon>
<text class="btn_text">修改</text>
</view>
<view class="btn" @click="showModal()">
<u-icon name="trash" color="#15CA65" size="20"></u-icon>
<text class="btn_text">删除</text>
</view>
</view>
</view>
</view>
</view>
<u-modal :show="showM" :content="content" showCancelButton closeOnClickOverlay @confirm="confirm"
@cancel="cancel" @close="close">
</u-modal>
<view v-if="tabCurrent == 1" style="background-color: #fff;">
<view v-for="(item,index) in ideasList" :key="index" class="my_line"
style="padding: 24rpx 19rpx; border-bottom: 1px solid #EEEEEE;">
@@ -31,13 +36,15 @@
<view class="release_time">
<text>{{item.time}}</text>
</view>
<view class="btn">
<u-icon name="edit-pen" color="#15CA65" size="20"></u-icon>
<text class="btn_text">修改</text>
</view>
<view class="btn">
<u-icon name="trash" color="#15CA65" size="20"></u-icon>
<text class="btn_text">删除</text>
<view style="display: flex;">
<view class="btn" @click="editIdeas()">
<u-icon name="edit-pen" color="#15CA65" size="20"></u-icon>
<text class="btn_text">修改</text>
</view>
<view class="btn" @click="showModal()">
<u-icon name="trash" color="#15CA65" size="20"></u-icon>
<text class="btn_text">删除</text>
</view>
</view>
</view>
</view>
@@ -49,6 +56,8 @@
export default {
data() {
return {
showM: false,
content: '您确定删除吗?',
tabCurrent: 0,
tabsList: [{
name: '需求发布'
@@ -80,11 +89,73 @@
this.tabCurrent = data.index
this.needsPublishForm = {}
},
//删除按钮
showModal() {
this.showM = true
},
confirm() {
},
cancel() {
this.showM = false
},
close() {
this.showM = false
},
//修改我的需求
editNeeds() {
console.log('修改需求');
uni.redirectTo({
url: '/pages/ideasAndNeeds/ideasAndNeeds?index=' + 0
})
},
//修改我的创意
editIdeas() {
console.log('修改创意');
uni.redirectTo({
// id=' + ideaId + '&
url: '/pages/ideasAndNeeds/ideasAndNeeds?index=' + 1
})
}
}
}
</script>
<style lang="scss">
.u-modal {
width: 472rpx !important;
}
.u-modal__button-group__wrapper--cancel {
background: #D8D8D8;
.u-modal__button-group__wrapper__text {
color: #fff !important;
}
}
.u-modal__content {
padding: 43rpx 104rpx !important;
text-indent: 25rpx;
}
.u-modal__content__text {
font-size: 32rpx !important;
font-weight: 400;
color: #252421 !important;
}
.u-modal__button-group__wrapper--confirm {
background: #0EBB5B;
.u-modal__button-group__wrapper__text {
color: #fff !important;
}
}
.u-tabs {
margin-bottom: 10rpx;
@@ -132,6 +203,7 @@
display: flex;
align-items: center;
justify-content: center;
margin-left: 40rpx;
.u-icon__icon {
top: 1px !important;