From 30817de57793054f9369d8e3c839804edc4a1f76 Mon Sep 17 00:00:00 2001 From: mehm8128 Date: Wed, 1 Nov 2023 23:52:56 +0900 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E3=81=98=E5=84=AA=E5=85=88=E5=BA=A6?= =?UTF-8?q?=E3=81=AE=E3=81=A8=E3=81=8D=E3=80=81=E5=88=A5=E5=90=8D=E3=82=B9?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=83=97=E3=81=AF=E5=84=AA=E5=85=88=E5=BA=A6?= =?UTF-8?q?=E3=82=92=E4=BD=8E=E3=82=81=E3=81=AB=E4=B8=A6=E3=81=B9=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Main/StampPicker/composables/useStampFilter.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Main/StampPicker/composables/useStampFilter.ts b/src/components/Main/StampPicker/composables/useStampFilter.ts index a6d296bf6..3c25d4c73 100644 --- a/src/components/Main/StampPicker/composables/useStampFilter.ts +++ b/src/components/Main/StampPicker/composables/useStampFilter.ts @@ -76,11 +76,15 @@ const useStampFilter = () => { const result = [ ...altNameRes.map(r => ({ value: altNameToName(r.value), - priority: r.priority + priority: r.priority, + isAltName: true })), - ...res + ...res.map(r => ({ ...r, isAltName: false })) ] - .map(r => ({ value: r.value, sortKey: `${r.priority}${r.value}` })) + .map(r => ({ + value: r.value, + sortKey: `${r.priority}${r.isAltName ? 1 : 0}${r.value}` // 同じpriorityの場合、別名は別名でないものよりも優先度が低い + })) .sort((a, b) => compareStringInsensitive(a.sortKey, b.sortKey)) .map(r => r.value)