|
|
@ -32,7 +32,7 @@ |
|
|
|
</view> |
|
|
|
<view style="margin-left: auto; width: 20px;"> |
|
|
|
<u-checkbox-group v-model="item.checked"> |
|
|
|
<u-checkbox shape="circle" activeColor="#ffbf60"></u-checkbox> |
|
|
|
<u-checkbox shape="circle" :name="true" activeColor="#ffbf60"></u-checkbox> |
|
|
|
</u-checkbox-group> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -202,7 +202,7 @@ export default { |
|
|
|
const currentPet = currentPets.find(item => item.id === e.id) |
|
|
|
if (currentPet) { |
|
|
|
e.selectedDate = currentPet.selectedDate |
|
|
|
e.checked = currentPet.checked |
|
|
|
e.checked = [!!currentPet.checked] |
|
|
|
} else { |
|
|
|
e.selectedDate = [] |
|
|
|
e.checked = false |
|
|
@ -329,8 +329,13 @@ export default { |
|
|
|
this.showCalendar = true; |
|
|
|
}, |
|
|
|
confirmCanlendar() { |
|
|
|
this.petList.find(e => e.id == this.currentId).selectedDate = this.selectedDate.sort((a, b) => new Date(a.date) - new Date(b.date)) |
|
|
|
this.selectedDate = [] |
|
|
|
const currentPet = this.petList.find(e => e.id == this.currentId); |
|
|
|
currentPet.selectedDate = this.selectedDate.sort((a, b) => new Date(a.date) - new Date(b.date)); |
|
|
|
// 选择日期后自动勾选该宠物 |
|
|
|
if (this.selectedDate.length > 0) { |
|
|
|
currentPet.checked = [true]; |
|
|
|
} |
|
|
|
this.selectedDate = []; |
|
|
|
this.showCalendar = false; |
|
|
|
}, |
|
|
|
change(e) { |
|
|
|