日历
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
<template>
|
||||
<div class="calendarInfo">
|
||||
<div class="calendar">
|
||||
<uni-calendar :insert="true" :selected="selected" :lunar="false" @change="change" @monthSwitch="changeMonth"/>
|
||||
<uni-calendar :insert="true" :selected="selected" :lunar="false" @bindDateChange="setDate" @change="change" @monthSwitch="changeMonth"/>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="dailyMatters">
|
||||
<div v-if="list && list.length">
|
||||
<div>
|
||||
@@ -28,7 +27,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { uniCalendar } from "@dcloudio/uni-ui"
|
||||
import uniCalendar from "./uni-calendar/uni-calendar.vue"
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -51,25 +50,35 @@ export default {
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
// 切换月
|
||||
changeMonth(e) {
|
||||
if(e.month<=9) {
|
||||
this.yyyyMM = e.year + '0' + e.month
|
||||
} else if(e.month > 9) {
|
||||
this.yyyyMM = e.year + e.month
|
||||
}
|
||||
console.log(e);
|
||||
this.getData()
|
||||
},
|
||||
// 切换日
|
||||
change(val) {
|
||||
this.date = val.fulldate
|
||||
this.day = val.date
|
||||
this.getData()
|
||||
},
|
||||
|
||||
setDate(v) {
|
||||
this.yyyyMM = v.detail.value.replace('-', '')
|
||||
this.getData()
|
||||
},
|
||||
|
||||
getNowDay() {
|
||||
const date = new Date()
|
||||
this.year = date.getFullYear()
|
||||
this.month = date.getMonth() + 1
|
||||
this.day = date.getDate()
|
||||
},
|
||||
|
||||
toGroup() {
|
||||
uni.navigateTo({url: './groupSendResident'})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user