细节修改
This commit is contained in:
@@ -73,7 +73,7 @@ const onMeterChange = (e) => {
|
|||||||
};
|
};
|
||||||
const onSetsChange = (e) => {
|
const onSetsChange = (e) => {
|
||||||
if (!e.detail.value) return;
|
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 (!sets.value) return;
|
||||||
if (secondSelectIndex.value !== -1) {
|
if (secondSelectIndex.value !== -1) {
|
||||||
props.onSelect(
|
props.onSelect(
|
||||||
@@ -88,7 +88,7 @@ const onSetsChange = (e) => {
|
|||||||
};
|
};
|
||||||
const onArrowAmountChange = (e) => {
|
const onArrowAmountChange = (e) => {
|
||||||
if (!e.detail.value) return;
|
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 (!arrowAmount.value) return;
|
||||||
if (selectedIndex.value !== -1) {
|
if (selectedIndex.value !== -1) {
|
||||||
props.onSelect(
|
props.onSelect(
|
||||||
@@ -153,8 +153,10 @@ const loadConfig = () => {
|
|||||||
const formatSetAndAmount = computed(() => {
|
const formatSetAndAmount = computed(() => {
|
||||||
if (selectedIndex.value === -1 || secondSelectIndex.value === -1)
|
if (selectedIndex.value === -1 || secondSelectIndex.value === -1)
|
||||||
return itemTexts[props.itemIndex];
|
return itemTexts[props.itemIndex];
|
||||||
if(selectedIndex.value === 99 && !sets.value) return itemTexts[props.itemIndex];
|
if (selectedIndex.value === 99 && !sets.value)
|
||||||
if(secondSelectIndex.value === 99 && !arrowAmount.value) return itemTexts[props.itemIndex];
|
return itemTexts[props.itemIndex];
|
||||||
|
if (secondSelectIndex.value === 99 && !arrowAmount.value)
|
||||||
|
return itemTexts[props.itemIndex];
|
||||||
return `${selectedIndex.value === 99 ? sets.value : selectedIndex.value}组/${
|
return `${selectedIndex.value === 99 ? sets.value : selectedIndex.value}组/${
|
||||||
secondSelectIndex.value === 99
|
secondSelectIndex.value === 99
|
||||||
? arrowAmount.value
|
? arrowAmount.value
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ const targetId = ref(0);
|
|||||||
const targetSrc = ref("");
|
const targetSrc = ref("");
|
||||||
const arrows = ref([]);
|
const arrows = ref([]);
|
||||||
const notes = ref("");
|
const notes = ref("");
|
||||||
const draftNotes = ref("");
|
|
||||||
const record = ref({
|
const record = ref({
|
||||||
groups: [],
|
groups: [],
|
||||||
user: {},
|
user: {},
|
||||||
@@ -43,8 +42,6 @@ const closeTip = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const saveNote = async () => {
|
const saveNote = async () => {
|
||||||
notes.value = draftNotes.value;
|
|
||||||
draftNotes.value = "";
|
|
||||||
showTip3.value = false;
|
showTip3.value = false;
|
||||||
if (record.value.id) {
|
if (record.value.id) {
|
||||||
await addNoteAPI(record.value.id, notes.value);
|
await addNoteAPI(record.value.id, notes.value);
|
||||||
@@ -309,17 +306,15 @@ onShareTimeline(async () => {
|
|||||||
</block>
|
</block>
|
||||||
<block v-if="showTip3">
|
<block v-if="showTip3">
|
||||||
<text>备注</text>
|
<text>备注</text>
|
||||||
<text v-if="notes">{{ notes }}</text>
|
|
||||||
<textarea
|
<textarea
|
||||||
v-if="!notes"
|
v-model="notes"
|
||||||
v-model="draftNotes"
|
|
||||||
maxlength="300"
|
maxlength="300"
|
||||||
rows="4"
|
rows="4"
|
||||||
class="notes-input"
|
class="notes-input"
|
||||||
placeholder="写下本次射箭的补充信息与心得"
|
placeholder="写下本次射箭的补充信息与心得"
|
||||||
placeholder-style="color: #ccc;"
|
placeholder-style="color: #ccc;"
|
||||||
/>
|
/>
|
||||||
<view v-if="!notes">
|
<view>
|
||||||
<button hover-class="none" @click="showTip3 = false">取消</button>
|
<button hover-class="none" @click="showTip3 = false">取消</button>
|
||||||
<button hover-class="none" @click="saveNote">保存备注</button>
|
<button hover-class="none" @click="saveNote">保存备注</button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user