From 5dca603b29104f6c6a69dbf2e77fad17111db570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E6=AF=85?= <1335909236@qq.com> Date: Fri, 1 Aug 2025 16:39:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0=E6=88=BF?= =?UTF-8?q?=E4=BA=A7-=E6=A5=BC=E5=B1=82=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/community/choseCommunity/index.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/community/choseCommunity/index.vue b/packages/community/choseCommunity/index.vue index 78f88d6c..c87a4fb9 100644 --- a/packages/community/choseCommunity/index.vue +++ b/packages/community/choseCommunity/index.vue @@ -267,8 +267,16 @@ export default { : item.label : "", }).then((res) => { - this.filteredFloorsList = - this.step == 4 ? this.filteredFloorsList : res.rows; + // 对楼层数据进行从大到小排序 + if(this.step != 4) { + res.rows.sort((a, b) => { + // 提取楼层数字 + const floorA = parseInt(a.label.replace(/[^\d]/g, '')); + const floorB = parseInt(b.label.replace(/[^\d]/g, '')); + return floorA - floorB; + }); + } + this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows; this.searchList = res.rows; this.searchQuery = ""; if (this.step == "1") {