feat:移植工程
This commit is contained in:
40
src/views/mobile-home/journal/record.vue
Normal file
40
src/views/mobile-home/journal/record.vue
Normal file
@@ -0,0 +1,40 @@
|
||||
<template>
|
||||
<div class="mobile-journal-view common-mobile-view">
|
||||
<journal-calendar />
|
||||
|
||||
<draggable-button @click="addClick"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import JournalCalendar from '@/components/Home/Journal/JournalCalendar.vue'
|
||||
import DraggableButton from '@/components/Mobile/DraggableButton.vue'
|
||||
import { useJournalStore } from '@/store/journal.ts'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { onMounted } from 'vue'
|
||||
import { getCurrentMonth, getStartEndDate } from 'vue3-common/utils/dateUtil'
|
||||
|
||||
const journalStore = useJournalStore()
|
||||
const router = useRouter()
|
||||
|
||||
onMounted(async () => {
|
||||
const dateInfo = getStartEndDate(getCurrentMonth(), 'month')
|
||||
journalStore.queryInfo.startDate = dateInfo[0]
|
||||
journalStore.queryInfo.endDate = dateInfo[1]
|
||||
await journalStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addClick = () => {
|
||||
journalStore.journalApiType = 'ADD'
|
||||
journalStore.currentJournal = journalStore.getEmptyJournal()
|
||||
router.push({ name: 'MobileHomeJournalDetailId', params: { id: 0 } })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.mobile-journal-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user