From 6d26d1f3d77c6ba8d6c736af69733d413d5220e6 Mon Sep 17 00:00:00 2001 From: lld <15027638633@163.com> Date: Sat, 4 Apr 2026 00:59:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=82=80=E8=AF=B7=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index.vue | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/pages/index.vue b/pages/index.vue index 4d8e53b..3b897ae 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -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) + this.agriId = item.id; + this.agriName = item.agriName; + this.imei = item.imei; + this.$refs.renameAgri.open(); } 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;