细节修改
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user