新增邀请功能
parent
7cf8871cef
commit
6d26d1f3d7
|
|
@ -147,13 +147,22 @@ export default {
|
|||
{
|
||||
text: '重命名',
|
||||
style: {
|
||||
backgroundColor: '#2d56d8'
|
||||
backgroundColor: 'rgba(45,86,216,0.12)',
|
||||
color: '#2d56d8'
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '邀请用户',
|
||||
style: {
|
||||
backgroundColor: 'rgba(27,209,167,0.12)',
|
||||
color: '#1bd1a7'
|
||||
}
|
||||
},
|
||||
{
|
||||
text: '删除',
|
||||
style: {
|
||||
backgroundColor: '#E83A30'
|
||||
backgroundColor: 'rgba(232,58,48,0.12)',
|
||||
color: "#E83A30"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
@ -341,12 +350,10 @@ export default {
|
|||
},
|
||||
onDeleteItem(e, item) {
|
||||
if (e.content.text === '重命名') { // 通过事件对象的 content.text 判断
|
||||
setTimeout(() => {
|
||||
this.agriId = item.id;
|
||||
this.agriName = item.agriName;
|
||||
this.imei = item.imei;
|
||||
this.$refs.renameAgri.open();
|
||||
}, 300)
|
||||
} else if (e.content.text === '删除') { // 删除操作
|
||||
uni.showModal({
|
||||
title: '操作提示:',
|
||||
|
|
@ -370,6 +377,8 @@ export default {
|
|||
}
|
||||
}
|
||||
});
|
||||
} else if (e.content.text === '邀请用户') {
|
||||
this.$refs.fab.close()
|
||||
}
|
||||
},
|
||||
// 点击列表项
|
||||
|
|
@ -519,6 +528,10 @@ export default {
|
|||
this.$modal.msgError("请输入新名称!");
|
||||
return;
|
||||
}
|
||||
if (this.newAgriName.length > 10) {
|
||||
this.$modal.msgError("新名称长度不能超过10个字符!");
|
||||
return;
|
||||
}
|
||||
uni.showModal({
|
||||
title: '操作提示:',
|
||||
content: `确定将大棚【${this.agriName}】重命名为【${this.newAgriName}】?`,
|
||||
|
|
@ -605,9 +618,6 @@ page {
|
|||
box-shadow: 8rpx 5rpx 10rpx #999;
|
||||
}
|
||||
|
||||
/deep/ .uni-swipe_button:nth-child(even) {
|
||||
margin-right: 10rpx
|
||||
}
|
||||
.list-item,/deep/.tn-swipe-action-item {
|
||||
height: 190rpx !important;
|
||||
/* 移除border-bottom,改为margin-top,并且把列表项背景设为半透明白色 */
|
||||
|
|
@ -622,15 +632,6 @@ page {
|
|||
pointer-events: auto !important;
|
||||
// #endif
|
||||
}
|
||||
.list-item:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
.item-card:active {
|
||||
background-color: #F5F5F5;
|
||||
// #ifdef MP-WEIXIN
|
||||
transform: scale(0.98);
|
||||
// #endif
|
||||
}
|
||||
|
||||
.item-title {
|
||||
font-size: 28rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue