From 6df7986c47f999b6f1cdf31e88740b0a9e777bf6 Mon Sep 17 00:00:00 2001 From: kron Date: Tue, 11 Nov 2025 10:56:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/EditOption.vue | 10 ++++++---- src/pages/point-book-detail.vue | 9 ++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/EditOption.vue b/src/components/EditOption.vue index 4f93593..555d4b2 100644 --- a/src/components/EditOption.vue +++ b/src/components/EditOption.vue @@ -73,7 +73,7 @@ const onMeterChange = (e) => { }; const onSetsChange = (e) => { if (!e.detail.value) return; - sets.value = Math.min(30, Number(e.detail.value)); + sets.value = Math.min(30, Math.max(1, Number(e.detail.value))); if (!sets.value) return; if (secondSelectIndex.value !== -1) { props.onSelect( @@ -88,7 +88,7 @@ const onSetsChange = (e) => { }; const onArrowAmountChange = (e) => { if (!e.detail.value) return; - arrowAmount.value = Math.min(60, Number(e.detail.value)); + arrowAmount.value = Math.min(60, Math.max(1, Number(e.detail.value))); if (!arrowAmount.value) return; if (selectedIndex.value !== -1) { props.onSelect( @@ -153,8 +153,10 @@ const loadConfig = () => { const formatSetAndAmount = computed(() => { if (selectedIndex.value === -1 || secondSelectIndex.value === -1) return itemTexts[props.itemIndex]; - if(selectedIndex.value === 99 && !sets.value) return itemTexts[props.itemIndex]; - if(secondSelectIndex.value === 99 && !arrowAmount.value) return itemTexts[props.itemIndex]; + if (selectedIndex.value === 99 && !sets.value) + return itemTexts[props.itemIndex]; + if (secondSelectIndex.value === 99 && !arrowAmount.value) + return itemTexts[props.itemIndex]; return `${selectedIndex.value === 99 ? sets.value : selectedIndex.value}组/${ secondSelectIndex.value === 99 ? arrowAmount.value diff --git a/src/pages/point-book-detail.vue b/src/pages/point-book-detail.vue index 8baa0e4..95b038e 100644 --- a/src/pages/point-book-detail.vue +++ b/src/pages/point-book-detail.vue @@ -23,7 +23,6 @@ const targetId = ref(0); const targetSrc = ref(""); const arrows = ref([]); const notes = ref(""); -const draftNotes = ref(""); const record = ref({ groups: [], user: {}, @@ -43,8 +42,6 @@ const closeTip = () => { }; const saveNote = async () => { - notes.value = draftNotes.value; - draftNotes.value = ""; showTip3.value = false; if (record.value.id) { await addNoteAPI(record.value.id, notes.value); @@ -309,17 +306,15 @@ onShareTimeline(async () => { 备注 - {{ notes }}