细节修改

This commit is contained in:
kron
2025-11-11 10:56:53 +08:00
parent dfc62c7e3f
commit 6df7986c47
2 changed files with 8 additions and 11 deletions

View File

@@ -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